Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266241
b: refs/heads/master
c: f4d3b6a
h: refs/heads/master
i:
  266239: 79d1193
v: v3
  • Loading branch information
Arik Nemtsov authored and Luciano Coelho committed Sep 14, 2011
1 parent 8253c2c commit 43ea16e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da03209eaca9302e110925f84a515e03062aaa9e
refs/heads/master: f4d3b6ab5e78fbdf3c27123cc29c44ff3d626c59
37 changes: 23 additions & 14 deletions trunk/drivers/net/wireless/wl12xx/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,19 +171,26 @@ static void wl1271_event_rssi_trigger(struct wl1271 *wl,
wl->last_rssi_event = event;
}

static void wl1271_stop_ba_event(struct wl1271 *wl, u8 ba_allowed)
static void wl1271_stop_ba_event(struct wl1271 *wl)
{
/* Convert the value to bool */
wl->ba_allowed = !!ba_allowed;

/*
* Return in case:
* there are not BA open or the event indication is to allowed BA
*/
if ((!wl->ba_rx_bitmap) || (wl->ba_allowed))
return;
if (wl->bss_type != BSS_TYPE_AP_BSS) {
if (!wl->ba_rx_bitmap)
return;
ieee80211_stop_rx_ba_session(wl->vif, wl->ba_rx_bitmap,
wl->bssid);
} else {
int i;
struct wl1271_link *lnk;
for (i = WL1271_AP_STA_HLID_START; i < WL12XX_MAX_LINKS; i++) {
lnk = &wl->links[i];
if (!wl1271_is_active_sta(wl, i) || !lnk->ba_bitmap)
continue;

ieee80211_stop_rx_ba_session(wl->vif, wl->ba_rx_bitmap, wl->bssid);
ieee80211_stop_rx_ba_session(wl->vif,
lnk->ba_bitmap,
lnk->addr);
}
}
}

static void wl12xx_event_soft_gemini_sense(struct wl1271 *wl,
Expand Down Expand Up @@ -283,12 +290,14 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox)
wl1271_event_rssi_trigger(wl, mbox);
}

if ((vector & BA_SESSION_RX_CONSTRAINT_EVENT_ID) && !is_ap) {
if ((vector & BA_SESSION_RX_CONSTRAINT_EVENT_ID)) {
wl1271_debug(DEBUG_EVENT, "BA_SESSION_RX_CONSTRAINT_EVENT_ID. "
"ba_allowed = 0x%x", mbox->rx_ba_allowed);

if (wl->vif)
wl1271_stop_ba_event(wl, mbox->rx_ba_allowed);
wl->ba_allowed = !!mbox->rx_ba_allowed;

if (wl->vif && !wl->ba_allowed)
wl1271_stop_ba_event(wl);
}

if ((vector & DUMMY_PACKET_EVENT_ID)) {
Expand Down

0 comments on commit 43ea16e

Please sign in to comment.