summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/wl12xx/event.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-10-05 13:56:05 +0400
committerLuciano Coelho <coelho@ti.com>2011-10-07 09:33:46 +0400
commitc7ffb902cca655e4d6bdda4156407008573bb214 (patch)
treed5dc1af5d2fd29a59d45fe6dcde61c58c3aa9503 /drivers/net/wireless/wl12xx/event.c
parentd0802abdf9c60b1dadb097e806022f3449b0cc6b (diff)
downloadlinux-c7ffb902cca655e4d6bdda4156407008573bb214.tar.xz
wl12xx: move ap_hlid_map into wlvif.ap
Add wlvif->links_map bitmap to represent all the links allocated for this vif. AP vif also has a sta_hlid_map bitmap, which represents the links stations connected to it (sta_hlid_bitmap is a subset of wlvif->links_map, which itself is a subset of the global wl->links_map) Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/event.c')
-rw-r--r--drivers/net/wireless/wl12xx/event.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/wireless/wl12xx/event.c b/drivers/net/wireless/wl12xx/event.c
index 8c31274228ea..486c8ee0101a 100644
--- a/drivers/net/wireless/wl12xx/event.c
+++ b/drivers/net/wireless/wl12xx/event.c
@@ -189,11 +189,12 @@ static void wl1271_stop_ba_event(struct wl1271 *wl, struct wl12xx_vif *wlvif)
ieee80211_stop_rx_ba_session(wl->vif, wlvif->sta.ba_rx_bitmap,
wl->vif->bss_conf.bssid);
} else {
- int i;
+ u8 hlid;
struct wl1271_link *lnk;
- for (i = WL1271_AP_STA_HLID_START; i < AP_MAX_LINKS; i++) {
- lnk = &wl->links[i];
- if (!wl1271_is_active_sta(wl, i) || !lnk->ba_bitmap)
+ for_each_set_bit(hlid, wlvif->ap.sta_hlid_map,
+ WL12XX_MAX_LINKS) {
+ lnk = &wl->links[hlid];
+ if (!lnk->ba_bitmap)
continue;
ieee80211_stop_rx_ba_session(wl->vif,
@@ -355,10 +356,8 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox)
const u8 *addr;
int h;
- for (h = find_first_bit(&sta_bitmap, AP_MAX_LINKS);
- h < AP_MAX_LINKS;
- h = find_next_bit(&sta_bitmap, AP_MAX_LINKS, h+1)) {
- if (!wl1271_is_active_sta(wl, h))
+ for_each_set_bit(h, &sta_bitmap, WL12XX_MAX_LINKS) {
+ if (!test_bit(h, wlvif->ap.sta_hlid_map))
continue;
addr = wl->links[h].addr;