Commit 8ef67e00 authored by Maxim Altshul's avatar Maxim Altshul Committed by Greg Kroah-Hartman

mac80211: RX BA support for sta max_rx_aggregation_subframes

commit 480dd46b upstream.

The ability to change the max_rx_aggregation frames is useful
in cases of IOP.

There exist some devices (latest mobile phones and some AP's)
that tend to not respect a BA sessions maximum size (in Kbps).
These devices won't respect the AMPDU size that was negotiated during
association (even though they do respect the maximal number of packets).

This violation is characterized by a valid number of packets in
a single AMPDU. Even so, the total size will exceed the size negotiated
during association.

Eventually, this will cause some undefined behavior, which in turn
causes the hw to drop packets, causing the throughput to plummet.

This patch will make the subframe limitation to be held by each station,
instead of being held only by hw.
Signed-off-by: default avatarMaxim Altshul <maxim.altshul@ti.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarAmit Pundir <amit.pundir@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d13333ed
...@@ -1662,6 +1662,9 @@ struct ieee80211_sta_rates { ...@@ -1662,6 +1662,9 @@ struct ieee80211_sta_rates {
* @supp_rates: Bitmap of supported rates (per band) * @supp_rates: Bitmap of supported rates (per band)
* @ht_cap: HT capabilities of this STA; restricted to our own capabilities * @ht_cap: HT capabilities of this STA; restricted to our own capabilities
* @vht_cap: VHT capabilities of this STA; restricted to our own capabilities * @vht_cap: VHT capabilities of this STA; restricted to our own capabilities
* @max_rx_aggregation_subframes: maximal amount of frames in a single AMPDU
* that this station is allowed to transmit to us.
* Can be modified by driver.
* @wme: indicates whether the STA supports QoS/WME (if local devices does, * @wme: indicates whether the STA supports QoS/WME (if local devices does,
* otherwise always false) * otherwise always false)
* @drv_priv: data area for driver use, will always be aligned to * @drv_priv: data area for driver use, will always be aligned to
...@@ -1688,6 +1691,7 @@ struct ieee80211_sta { ...@@ -1688,6 +1691,7 @@ struct ieee80211_sta {
u16 aid; u16 aid;
struct ieee80211_sta_ht_cap ht_cap; struct ieee80211_sta_ht_cap ht_cap;
struct ieee80211_sta_vht_cap vht_cap; struct ieee80211_sta_vht_cap vht_cap;
u8 max_rx_aggregation_subframes;
bool wme; bool wme;
u8 uapsd_queues; u8 uapsd_queues;
u8 max_sp; u8 max_sp;
......
...@@ -290,10 +290,13 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta, ...@@ -290,10 +290,13 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta,
buf_size = IEEE80211_MAX_AMPDU_BUF; buf_size = IEEE80211_MAX_AMPDU_BUF;
/* make sure the size doesn't exceed the maximum supported by the hw */ /* make sure the size doesn't exceed the maximum supported by the hw */
if (buf_size > local->hw.max_rx_aggregation_subframes) if (buf_size > sta->sta.max_rx_aggregation_subframes)
buf_size = local->hw.max_rx_aggregation_subframes; buf_size = sta->sta.max_rx_aggregation_subframes;
params.buf_size = buf_size; params.buf_size = buf_size;
ht_dbg(sta->sdata, "AddBA Req buf_size=%d for %pM\n",
buf_size, sta->sta.addr);
/* examine state machine */ /* examine state machine */
mutex_lock(&sta->ampdu_mlme.mtx); mutex_lock(&sta->ampdu_mlme.mtx);
......
...@@ -329,6 +329,9 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata, ...@@ -329,6 +329,9 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
memcpy(sta->addr, addr, ETH_ALEN); memcpy(sta->addr, addr, ETH_ALEN);
memcpy(sta->sta.addr, addr, ETH_ALEN); memcpy(sta->sta.addr, addr, ETH_ALEN);
sta->sta.max_rx_aggregation_subframes =
local->hw.max_rx_aggregation_subframes;
sta->local = local; sta->local = local;
sta->sdata = sdata; sta->sdata = sdata;
sta->rx_stats.last_rx = jiffies; sta->rx_stats.last_rx = jiffies;
......
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