Commit 7ac32731 authored by David S. Miller's avatar David S. Miller

Merge tag 'mac80211-for-davem-2016-09-16' of...

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: default avatarDavid S. Miller <davem@davemloft.net>
parents 19cd1203 85d5313e
...@@ -261,10 +261,16 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta, ...@@ -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",
......
...@@ -584,6 +584,9 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid, ...@@ -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);
......
...@@ -1515,8 +1515,12 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw, ...@@ -1515,8 +1515,12 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
spin_unlock_bh(&fq->lock); spin_unlock_bh(&fq->lock);
if (skb && skb_has_frag_list(skb) && if (skb && skb_has_frag_list(skb) &&
!ieee80211_hw_check(&local->hw, TX_FRAG_LIST)) !ieee80211_hw_check(&local->hw, TX_FRAG_LIST)) {
skb_linearize(skb); if (skb_linearize(skb)) {
ieee80211_free_txskb(&local->hw, skb);
return NULL;
}
}
return skb; return skb;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment