Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85d5313e authored by Johannes Berg's avatar Johannes Berg
Browse files

mac80211: reject TSPEC TIDs (TSIDs) for aggregation



Since mac80211 doesn't currently support TSIDs 8-15 which can
only be used after QoS TSPEC negotiation (and not even after
WMM negotiation), reject attempts to set up aggregation
sessions for them, which might confuse drivers. In mac80211
we do correctly handle that, but the TSIDs should never get
used anyway, and drivers might not be able to handle it.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 0b97a484
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -261,10 +261,16 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta,
		.timeout = timeout,
		.timeout = timeout,
		.ssn = start_seq_num,
		.ssn = start_seq_num,
	};
	};

	int i, ret = -EOPNOTSUPP;
	int i, ret = -EOPNOTSUPP;
	u16 status = WLAN_STATUS_REQUEST_DECLINED;
	u16 status = WLAN_STATUS_REQUEST_DECLINED;


	if (tid >= IEEE80211_FIRST_TSPEC_TSID) {
		ht_dbg(sta->sdata,
		       "STA %pM requests BA session on unsupported tid %d\n",
		       sta->sta.addr, tid);
		goto end_no_lock;
	}

	if (!sta->sta.ht_cap.ht_supported) {
	if (!sta->sta.ht_cap.ht_supported) {
		ht_dbg(sta->sdata,
		ht_dbg(sta->sdata,
		       "STA %pM erroneously requests BA session on tid %d w/o QoS\n",
		       "STA %pM erroneously requests BA session on tid %d w/o QoS\n",
+3 −0
Original line number Original line Diff line number Diff line
@@ -584,6 +584,9 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
	    ieee80211_hw_check(&local->hw, TX_AMPDU_SETUP_IN_HW))
	    ieee80211_hw_check(&local->hw, TX_AMPDU_SETUP_IN_HW))
		return -EINVAL;
		return -EINVAL;


	if (WARN_ON(tid >= IEEE80211_FIRST_TSPEC_TSID))
		return -EINVAL;

	ht_dbg(sdata, "Open BA session requested for %pM tid %u\n",
	ht_dbg(sdata, "Open BA session requested for %pM tid %u\n",
	       pubsta->addr, tid);
	       pubsta->addr, tid);