aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2011-08-25 05:43:16 -0400
committerLuciano Coelho <coelho@ti.com>2011-09-14 06:15:18 -0400
commitf4d3b6ab5e78fbdf3c27123cc29c44ff3d626c59 (patch)
treeacca4108bff4539c0c0f26d35e43ce7b0f879835 /drivers
parentda03209eaca9302e110925f84a515e03062aaa9e (diff)
wl12xx: AP mode - enable the BA constraint event from the FW
Unblock the RX BA constraint event from firmware in AP mode as well. This allows us to stop RX BA sessions when the FW requests it. In addition refactor the handler for this event to make the flow clearer. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/wl12xx/event.c37
1 files changed, 23 insertions, 14 deletions
diff --git a/drivers/net/wireless/wl12xx/event.c b/drivers/net/wireless/wl12xx/event.c
index 0bd7b020a42..c73fe4c6b61 100644
--- a/drivers/net/wireless/wl12xx/event.c
+++ b/drivers/net/wireless/wl12xx/event.c
@@ -171,19 +171,26 @@ static void wl1271_event_rssi_trigger(struct wl1271 *wl,
171 wl->last_rssi_event = event; 171 wl->last_rssi_event = event;
172} 172}
173 173
174static void wl1271_stop_ba_event(struct wl1271 *wl, u8 ba_allowed) 174static void wl1271_stop_ba_event(struct wl1271 *wl)
175{ 175{
176 /* Convert the value to bool */ 176 if (wl->bss_type != BSS_TYPE_AP_BSS) {
177 wl->ba_allowed = !!ba_allowed; 177 if (!wl->ba_rx_bitmap)
178 178 return;
179 /* 179 ieee80211_stop_rx_ba_session(wl->vif, wl->ba_rx_bitmap,
180 * Return in case: 180 wl->bssid);
181 * there are not BA open or the event indication is to allowed BA 181 } else {
182 */ 182 int i;
183 if ((!wl->ba_rx_bitmap) || (wl->ba_allowed)) 183 struct wl1271_link *lnk;
184 return; 184 for (i = WL1271_AP_STA_HLID_START; i < WL12XX_MAX_LINKS; i++) {
185 lnk = &wl->links[i];
186 if (!wl1271_is_active_sta(wl, i) || !lnk->ba_bitmap)
187 continue;
185 188
186 ieee80211_stop_rx_ba_session(wl->vif, wl->ba_rx_bitmap, wl->bssid); 189 ieee80211_stop_rx_ba_session(wl->vif,
190 lnk->ba_bitmap,
191 lnk->addr);
192 }
193 }
187} 194}
188 195
189static void wl12xx_event_soft_gemini_sense(struct wl1271 *wl, 196static void wl12xx_event_soft_gemini_sense(struct wl1271 *wl,
@@ -283,12 +290,14 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox)
283 wl1271_event_rssi_trigger(wl, mbox); 290 wl1271_event_rssi_trigger(wl, mbox);
284 } 291 }
285 292
286 if ((vector & BA_SESSION_RX_CONSTRAINT_EVENT_ID) && !is_ap) { 293 if ((vector & BA_SESSION_RX_CONSTRAINT_EVENT_ID)) {
287 wl1271_debug(DEBUG_EVENT, "BA_SESSION_RX_CONSTRAINT_EVENT_ID. " 294 wl1271_debug(DEBUG_EVENT, "BA_SESSION_RX_CONSTRAINT_EVENT_ID. "
288 "ba_allowed = 0x%x", mbox->rx_ba_allowed); 295 "ba_allowed = 0x%x", mbox->rx_ba_allowed);
289 296
290 if (wl->vif) 297 wl->ba_allowed = !!mbox->rx_ba_allowed;
291 wl1271_stop_ba_event(wl, mbox->rx_ba_allowed); 298
299 if (wl->vif && !wl->ba_allowed)
300 wl1271_stop_ba_event(wl);
292 } 301 }
293 302
294 if ((vector & DUMMY_PACKET_EVENT_ID)) { 303 if ((vector & DUMMY_PACKET_EVENT_ID)) {