diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-12-14 14:34:25 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-01-03 13:01:37 +0100 |
commit | ad2d223aa900179031feb40273881e212941573d (patch) | |
tree | 2d9a697ae91adb3460aabf32901e7108bdc8523f /net/mac80211/pm.c | |
parent | mac80211: further simplify ieee80211_bss_info_change_notify (diff) | |
download | linux-ad2d223aa900179031feb40273881e212941573d.tar.xz linux-ad2d223aa900179031feb40273881e212941573d.zip |
mac80211: assign bss_conf.bssid only once
Instead of checking every time bss_info_changed is called,
assign the pointer once depending on the interface type
and then leave it untouched until the interface type is
changed. This makes the ieee80211_bss_info_change_notify()
now a simple wrapper to call the driver only.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/pm.c')
-rw-r--r-- | net/mac80211/pm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c index 8a67d7e982f7..f81fd30581d9 100644 --- a/net/mac80211/pm.c +++ b/net/mac80211/pm.c @@ -121,6 +121,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) /* remove all interfaces */ list_for_each_entry(sdata, &local->interfaces, list) { + static u8 zero_addr[ETH_ALEN] = {}; u32 changed = 0; if (!ieee80211_sdata_running(sdata)) @@ -152,6 +153,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) sdata->suspend_bss_conf = sdata->vif.bss_conf; memset(&sdata->vif.bss_conf, 0, sizeof(sdata->vif.bss_conf)); sdata->vif.bss_conf.idle = true; + if (sdata->suspend_bss_conf.bssid) + sdata->vif.bss_conf.bssid = zero_addr; /* disable beaconing or remove association */ ieee80211_bss_info_change_notify(sdata, changed); |