mac80211: reconfig bss_info_changed only if beaconing
authorJohannes Berg <johannes.berg@intel.com>
Fri, 14 Dec 2012 13:17:26 +0000 (14:17 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 3 Jan 2013 12:01:36 +0000 (13:01 +0100)
For AP/IBSS/mesh interfaces, call the driver to reconfigure
bss_info_changed only if the interface was beaconing before
suspend, otherwise we call the driver and it might interpret
the change as going from enabled to disabled.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/util.c

index 2e2e13b..e27c89c 100644 (file)
@@ -1555,9 +1555,11 @@ int ieee80211_reconfig(struct ieee80211_local *local)
 
                        /* fall through */
                case NL80211_IFTYPE_MESH_POINT:
-                       changed |= BSS_CHANGED_BEACON |
-                                  BSS_CHANGED_BEACON_ENABLED;
-                       ieee80211_bss_info_change_notify(sdata, changed);
+                       if (sdata->vif.bss_conf.enable_beacon) {
+                               changed |= BSS_CHANGED_BEACON |
+                                          BSS_CHANGED_BEACON_ENABLED;
+                               ieee80211_bss_info_change_notify(sdata, changed);
+                       }
                        break;
                case NL80211_IFTYPE_WDS:
                        break;