Skip to content

Commit d439226

Browse files
Maxim Altshulgregkh
authored andcommitted
wlcore: Add RX_BA_WIN_SIZE_CHANGE_EVENT event
commit e7ee74b56f23ba447d3124f2eccc32033cca501d upstream. 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> [AmitP: Minor refactoring for linux-4.4.y] Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4b86b46 commit d439226

3 files changed

Lines changed: 31 additions & 1 deletion

File tree

drivers/net/wireless/ti/wl18xx/event.c

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,5 +206,33 @@ int wl18xx_process_mailbox_events(struct wl1271 *wl)
206206
mbox->sc_pwd_len,
207207
mbox->sc_pwd);
208208

209+
if (vector & RX_BA_WIN_SIZE_CHANGE_EVENT_ID) {
210+
struct wl12xx_vif *wlvif;
211+
struct ieee80211_vif *vif;
212+
struct ieee80211_sta *sta;
213+
u8 link_id = mbox->rx_ba_link_id;
214+
u8 win_size = mbox->rx_ba_win_size;
215+
const u8 *addr;
216+
217+
wlvif = wl->links[link_id].wlvif;
218+
vif = wl12xx_wlvif_to_vif(wlvif);
219+
220+
/* Update RX aggregation window size and call
221+
* MAC routine to stop active RX aggregations for this link
222+
*/
223+
if (wlvif->bss_type != BSS_TYPE_AP_BSS)
224+
addr = vif->bss_conf.bssid;
225+
else
226+
addr = wl->links[link_id].addr;
227+
228+
sta = ieee80211_find_sta(vif, addr);
229+
if (sta) {
230+
sta->max_rx_aggregation_subframes = win_size;
231+
ieee80211_stop_rx_ba_session(vif,
232+
wl->links[link_id].ba_bitmap,
233+
addr);
234+
}
235+
}
236+
209237
return 0;
210238
}

drivers/net/wireless/ti/wl18xx/event.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ enum {
3838
REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID = BIT(18),
3939
DFS_CHANNELS_CONFIG_COMPLETE_EVENT = BIT(19),
4040
PERIODIC_SCAN_REPORT_EVENT_ID = BIT(20),
41+
RX_BA_WIN_SIZE_CHANGE_EVENT_ID = BIT(21),
4142
SMART_CONFIG_SYNC_EVENT_ID = BIT(22),
4243
SMART_CONFIG_DECODE_EVENT_ID = BIT(23),
4344
TIME_SYNC_EVENT_ID = BIT(24),

drivers/net/wireless/ti/wl18xx/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,8 @@ static int wl18xx_boot(struct wl1271 *wl)
10291029
DFS_CHANNELS_CONFIG_COMPLETE_EVENT |
10301030
SMART_CONFIG_SYNC_EVENT_ID |
10311031
SMART_CONFIG_DECODE_EVENT_ID |
1032-
TIME_SYNC_EVENT_ID;
1032+
TIME_SYNC_EVENT_ID |
1033+
RX_BA_WIN_SIZE_CHANGE_EVENT_ID;
10331034

10341035
wl->ap_event_mask = MAX_TX_FAILURE_EVENT_ID;
10351036

0 commit comments

Comments
 (0)