Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
[firefly-linux-kernel-4.4.55.git] / net / mac80211 / agg-rx.c
index 7702978a4c999dfd10d9b49792b8b25899e23966..5c564a68fb5088e21ccec11ffdde963bf8bb6cdf 100644 (file)
@@ -238,6 +238,14 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta,
        int i, ret = -EOPNOTSUPP;
        u16 status = WLAN_STATUS_REQUEST_DECLINED;
 
+       if (!sta->sta.ht_cap.ht_supported) {
+               ht_dbg(sta->sdata,
+                      "STA %pM erroneously requests BA session on tid %d w/o QoS\n",
+                      sta->sta.addr, tid);
+               /* send a response anyway, it's an error case if we get here */
+               goto end_no_lock;
+       }
+
        if (test_sta_flag(sta, WLAN_STA_BLOCK_BA)) {
                ht_dbg(sta->sdata,
                       "Suspend in progress - Denying ADDBA request (%pM tid %d)\n",