wlcore: consolidate Rx BA bitmap management to links struct
authorArik Nemtsov <arik@wizery.com>
Wed, 28 Nov 2012 09:42:45 +0000 (11:42 +0200)
committerLuciano Coelho <coelho@ti.com>
Tue, 11 Dec 2012 10:37:23 +0000 (12:37 +0200)
Remove the STA specific ba_rx_bitmap field and use the common links
structure. This simplifies code setting/checking the BA bitmap.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/ti/wlcore/debugfs.c
drivers/net/wireless/ti/wlcore/event.c
drivers/net/wireless/ti/wlcore/main.c
drivers/net/wireless/ti/wlcore/tx.c
drivers/net/wireless/ti/wlcore/wlcore_i.h

index f115fba..e70a7c8 100644 (file)
@@ -560,7 +560,6 @@ static ssize_t vifs_state_read(struct file *file, char __user *user_buf,
                if (wlvif->bss_type == BSS_TYPE_STA_BSS ||
                    wlvif->bss_type == BSS_TYPE_IBSS) {
                        VIF_STATE_PRINT_INT(sta.hlid);
-                       VIF_STATE_PRINT_INT(sta.ba_rx_bitmap);
                        VIF_STATE_PRINT_INT(sta.basic_rate_idx);
                        VIF_STATE_PRINT_INT(sta.ap_rate_idx);
                        VIF_STATE_PRINT_INT(sta.p2p_rate_idx);
index cb32c02..2776d95 100644 (file)
@@ -58,9 +58,10 @@ static void wl1271_stop_ba_event(struct wl1271 *wl, struct wl12xx_vif *wlvif)
        struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
 
        if (wlvif->bss_type != BSS_TYPE_AP_BSS) {
-               if (!wlvif->sta.ba_rx_bitmap)
+               u8 hlid = wlvif->sta.hlid;
+               if (!wl->links[hlid].ba_bitmap)
                        return;
-               ieee80211_stop_rx_ba_session(vif, wlvif->sta.ba_rx_bitmap,
+               ieee80211_stop_rx_ba_session(vif, wl->links[hlid].ba_bitmap,
                                             vif->bss_conf.bssid);
        } else {
                u8 hlid;
index 56a5308..227c571 100644 (file)
@@ -4764,18 +4764,18 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw,
 
        if (wlvif->bss_type == BSS_TYPE_STA_BSS) {
                hlid = wlvif->sta.hlid;
-               ba_bitmap = &wlvif->sta.ba_rx_bitmap;
        } else if (wlvif->bss_type == BSS_TYPE_AP_BSS) {
                struct wl1271_station *wl_sta;
 
                wl_sta = (struct wl1271_station *)sta->drv_priv;
                hlid = wl_sta->hlid;
-               ba_bitmap = &wl->links[hlid].ba_bitmap;
        } else {
                ret = -EINVAL;
                goto out;
        }
 
+       ba_bitmap = &wl->links[hlid].ba_bitmap;
+
        ret = wl1271_ps_elp_wakeup(wl);
        if (ret < 0)
                goto out;
index 894ddc7..ece392c 100644 (file)
@@ -1066,7 +1066,6 @@ void wl12xx_tx_reset_wlvif(struct wl1271 *wl, struct wl12xx_vif *wlvif)
                        wl1271_free_sta(wl, wlvif, i);
                } else {
                        u8 hlid = i;
-                       wlvif->sta.ba_rx_bitmap = 0;
                        wl12xx_free_link(wl, wlvif, &hlid);
                }
        }
index ee49676..20316ac 100644 (file)
@@ -330,7 +330,6 @@ struct wl12xx_vif {
        union {
                struct {
                        u8 hlid;
-                       u8 ba_rx_bitmap;
 
                        u8 basic_rate_idx;
                        u8 ap_rate_idx;