diff options
author | Maxim Altshul <maxim.altshul@ti.com> | 2016-08-21 14:24:25 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-11-17 09:38:05 +0300 |
commit | e7ee74b56f23ba447d3124f2eccc32033cca501d (patch) | |
tree | 9e4b048515b2f50ae6821693d478bbfa74a75bbe /drivers/net/wireless/ti/wl18xx/event.c | |
parent | 42c7372a111630dab200c2f959424f5ec3bf79a4 (diff) | |
download | linux-e7ee74b56f23ba447d3124f2eccc32033cca501d.tar.xz |
wlcore: Add RX_BA_WIN_SIZE_CHANGE_EVENT event
This event is used by the Firmware to limit the RX BA win size
for a specific link.
The event handler updates the new size in the mac's sta->sta struct.
BA sessions opened for that link will use the new restricted
win_size. This limitation remains until a new update is received or
until the link is closed.
Signed-off-by: Maxim Altshul <maxim.altshul@ti.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ti/wl18xx/event.c')
-rw-r--r-- | drivers/net/wireless/ti/wl18xx/event.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/event.c b/drivers/net/wireless/ti/wl18xx/event.c index b36ce185c9f2..86fa0fc69084 100644 --- a/drivers/net/wireless/ti/wl18xx/event.c +++ b/drivers/net/wireless/ti/wl18xx/event.c @@ -218,5 +218,33 @@ int wl18xx_process_mailbox_events(struct wl1271 *wl) if (vector & FW_LOGGER_INDICATION) wlcore_event_fw_logger(wl); + if (vector & RX_BA_WIN_SIZE_CHANGE_EVENT_ID) { + struct wl12xx_vif *wlvif; + struct ieee80211_vif *vif; + struct ieee80211_sta *sta; + u8 link_id = mbox->rx_ba_link_id; + u8 win_size = mbox->rx_ba_win_size; + const u8 *addr; + + wlvif = wl->links[link_id].wlvif; + vif = wl12xx_wlvif_to_vif(wlvif); + + /* Update RX aggregation window size and call + * MAC routine to stop active RX aggregations for this link + */ + if (wlvif->bss_type != BSS_TYPE_AP_BSS) + addr = vif->bss_conf.bssid; + else + addr = wl->links[link_id].addr; + + sta = ieee80211_find_sta(vif, addr); + if (sta) { + sta->max_rx_aggregation_subframes = win_size; + ieee80211_stop_rx_ba_session(vif, + wl->links[link_id].ba_bitmap, + addr); + } + } + return 0; } |