]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/mac80211/util.c
minstrel_ht: move minstrel_mcs_groups declaration to header file
[mv-sheeva.git] / net / mac80211 / util.c
index 2b75b4fb68f42fba375e7fafbb49b33cd87f08e5..a54cf146ed5066c993f501f67a6c332a68024509 100644 (file)
@@ -1138,18 +1138,6 @@ int ieee80211_reconfig(struct ieee80211_local *local)
        }
        mutex_unlock(&local->sta_mtx);
 
-       /* Clear Suspend state so that ADDBA requests can be processed */
-
-       rcu_read_lock();
-
-       if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) {
-               list_for_each_entry_rcu(sta, &local->sta_list, list) {
-                       clear_sta_flags(sta, WLAN_STA_BLOCK_BA);
-               }
-       }
-
-       rcu_read_unlock();
-
        /* setup RTS threshold */
        drv_set_rts_threshold(local, hw->wiphy->rts_threshold);
 
@@ -1160,18 +1148,33 @@ int ieee80211_reconfig(struct ieee80211_local *local)
 
        /* Finally also reconfigure all the BSS information */
        list_for_each_entry(sdata, &local->interfaces, list) {
-               u32 changed = ~0;
+               u32 changed;
+
                if (!ieee80211_sdata_running(sdata))
                        continue;
+
+               /* common change flags for all interface types */
+               changed = BSS_CHANGED_ERP_CTS_PROT |
+                         BSS_CHANGED_ERP_PREAMBLE |
+                         BSS_CHANGED_ERP_SLOT |
+                         BSS_CHANGED_HT |
+                         BSS_CHANGED_BASIC_RATES |
+                         BSS_CHANGED_BEACON_INT |
+                         BSS_CHANGED_BSSID |
+                         BSS_CHANGED_CQM;
+
                switch (sdata->vif.type) {
                case NL80211_IFTYPE_STATION:
-                       /* disable beacon change bits */
-                       changed &= ~(BSS_CHANGED_BEACON |
-                                    BSS_CHANGED_BEACON_ENABLED);
-                       /* fall through */
+                       changed |= BSS_CHANGED_ASSOC;
+                       ieee80211_bss_info_change_notify(sdata, changed);
+                       break;
                case NL80211_IFTYPE_ADHOC:
+                       changed |= BSS_CHANGED_IBSS;
+                       /* fall through */
                case NL80211_IFTYPE_AP:
                case NL80211_IFTYPE_MESH_POINT:
+                       changed |= BSS_CHANGED_BEACON |
+                                  BSS_CHANGED_BEACON_ENABLED;
                        ieee80211_bss_info_change_notify(sdata, changed);
                        break;
                case NL80211_IFTYPE_WDS:
@@ -1187,13 +1190,26 @@ int ieee80211_reconfig(struct ieee80211_local *local)
                }
        }
 
-       rcu_read_lock();
+       /*
+        * Clear the WLAN_STA_BLOCK_BA flag so new aggregation
+        * sessions can be established after a resume.
+        *
+        * Also tear down aggregation sessions since reconfiguring
+        * them in a hardware restart scenario is not easily done
+        * right now, and the hardware will have lost information
+        * about the sessions, but we and the AP still think they
+        * are active. This is really a workaround though.
+        */
        if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) {
-               list_for_each_entry_rcu(sta, &local->sta_list, list) {
+               mutex_lock(&local->sta_mtx);
+
+               list_for_each_entry(sta, &local->sta_list, list) {
                        ieee80211_sta_tear_down_BA_sessions(sta);
+                       clear_sta_flags(sta, WLAN_STA_BLOCK_BA);
                }
+
+               mutex_unlock(&local->sta_mtx);
        }
-       rcu_read_unlock();
 
        /* add back keys */
        list_for_each_entry(sdata, &local->interfaces, list)