mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 07:01:57 +00:00
Two more fixes:
* reject aggregation sessions for TSID/TID 8-16 that we can never use anyway and which could confuse drivers * check return value of skb_linearize() -----BEGIN PGP SIGNATURE----- iQIcBAABCgAGBQJX2+l7AAoJEGt7eEactAAdedMP/0k225qWRR+19lavkZ3/lSqb YiQdYNwKCZf9WR+5FiQKFcTV4XMCfKiWX2eJJWqFI5r+V4mfTJAZDehZpddCvJou KW3dZYe25+DaFApdhQiJXTxKSeJAbRB7EWT4i0P54Ned0YUeFwwOjvxuH+fq2VY0 tScX5JogPuGFVzXhlqUVZTjbHlBkcILGv7QjOXXL9yf4d2x57uXyabOB14l351RF 4hqXm7u+JQedbGjhYHDMKnyuwXQW4mbhELBdyMh7heLPqufWf4Xakrwh8WYSKuBb H5dICeq+/JPKnwOStmwtz1FQVIlU08PMLnWzQbByrkDvQPCIkMHLu6h6oNierqAH z4vyy8w05KzFNG3R5egygopXbncZvSOCcOPkDQxbTYmh2tK97OMUjXbUfPEUXZs2 WbSuECm+RVSNKtLlUip7TrM3iYI7xmCN/qPB4Wuq+z/JiSOrnP+G047iUbhdDpnE fwLmRWWdEGkjnv3TFdzzxLVAJPCQWyuLfxaUBlHlYRNqBY8ufTR3FHUKj4dVwqJK EqnSiDUqbZE6qJw516MEp+CqZGb8hzeMCeAu+docWMa3CmnNlglZtYgNiou45y9Z 9/8dAO93/qAzsaw9A/XprnIVPcu1vsFSicrhjOdZsnYoVJDGoW6rjzz6HpCk9QxB 7FjxZ5LilJ5Ws4ltlwr7 =3dek -----END PGP SIGNATURE----- Merge tag 'mac80211-for-davem-2016-09-16' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Two more fixes: * reject aggregation sessions for TSID/TID 8-16 that we can never use anyway and which could confuse drivers * check return value of skb_linearize() ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
7ac327318e
@ -261,10 +261,16 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta,
|
||||
.timeout = timeout,
|
||||
.ssn = start_seq_num,
|
||||
};
|
||||
|
||||
int i, ret = -EOPNOTSUPP;
|
||||
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) {
|
||||
ht_dbg(sta->sdata,
|
||||
"STA %pM erroneously requests BA session on tid %d w/o QoS\n",
|
||||
|
@ -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))
|
||||
return -EINVAL;
|
||||
|
||||
if (WARN_ON(tid >= IEEE80211_FIRST_TSPEC_TSID))
|
||||
return -EINVAL;
|
||||
|
||||
ht_dbg(sdata, "Open BA session requested for %pM tid %u\n",
|
||||
pubsta->addr, tid);
|
||||
|
||||
|
@ -1515,8 +1515,12 @@ out:
|
||||
spin_unlock_bh(&fq->lock);
|
||||
|
||||
if (skb && skb_has_frag_list(skb) &&
|
||||
!ieee80211_hw_check(&local->hw, TX_FRAG_LIST))
|
||||
skb_linearize(skb);
|
||||
!ieee80211_hw_check(&local->hw, TX_FRAG_LIST)) {
|
||||
if (skb_linearize(skb)) {
|
||||
ieee80211_free_txskb(&local->hw, skb);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return skb;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user