Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 237007
b: refs/heads/master
c: bf6a057
h: refs/heads/master
i:
  237005: aa617ee
  237003: 259b44e
  236999: 675a88b
  236991: 28d2a48
v: v3
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Feb 3, 2011
1 parent 361b0e8 commit 526d23c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73b30dfe4f756315b8cc431fca3ff340090c0ae4
refs/heads/master: bf6a0579f60ae5225280c82cc52b51db1255e7fb
20 changes: 13 additions & 7 deletions trunk/net/wireless/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,13 +718,6 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
wdev->ps = false;
/* allow mac80211 to determine the timeout */
wdev->ps_timeout = -1;
if (rdev->ops->set_power_mgmt)
if (rdev->ops->set_power_mgmt(wdev->wiphy, dev,
wdev->ps,
wdev->ps_timeout)) {
/* assume this means it's off */
wdev->ps = false;
}

if (!dev->ethtool_ops)
dev->ethtool_ops = &cfg80211_ethtool_ops;
Expand Down Expand Up @@ -813,6 +806,19 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
rdev->opencount++;
mutex_unlock(&rdev->devlist_mtx);
cfg80211_unlock_rdev(rdev);

/*
* Configure power management to the driver here so that its
* correctly set also after interface type changes etc.
*/
if (wdev->iftype == NL80211_IFTYPE_STATION &&
rdev->ops->set_power_mgmt)
if (rdev->ops->set_power_mgmt(wdev->wiphy, dev,
wdev->ps,
wdev->ps_timeout)) {
/* assume this means it's off */
wdev->ps = false;
}
break;
case NETDEV_UNREGISTER:
/*
Expand Down

0 comments on commit 526d23c

Please sign in to comment.