OSDN Git Service

Merge android-4.4.190 (ac7fbca) into msm-4.4
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / net / mac80211 / mlme.c
index 9066003..1f2b1c8 100644 (file)
@@ -1104,9 +1104,6 @@ static void ieee80211_chswitch_work(struct work_struct *work)
                goto out;
        }
 
-       /* XXX: shouldn't really modify cfg80211-owned data! */
-       ifmgd->associated->channel = sdata->csa_chandef.chan;
-
        ifmgd->csa_waiting_bcn = true;
 
        ieee80211_sta_reset_beacon_monitor(sdata);
@@ -1895,6 +1892,16 @@ static bool ieee80211_sta_wmm_params(struct ieee80211_local *local,
                }
        }
 
+       /* WMM specification requires all 4 ACIs. */
+       for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
+               if (params[ac].cw_min == 0) {
+                       sdata_info(sdata,
+                                  "AP has invalid WMM params (missing AC %d), using defaults\n",
+                                  ac);
+                       return false;
+               }
+       }
+
        for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
                mlme_dbg(sdata,
                         "WMM AC=%d acm=%d aifs=%d cWmin=%d cWmax=%d txop=%d uapsd=%d, downgraded=%d\n",