Skip to content

Commit

Permalink
wlcore: consolidate Rx BA bitmap management to links struct
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arik Nemtsov authored and Luciano Coelho committed Dec 11, 2012
1 parent d6037d2 commit 9ae5d8d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion drivers/net/wireless/ti/wlcore/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions drivers/net/wireless/ti/wlcore/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/ti/wlcore/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/ti/wlcore/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/ti/wlcore/wlcore_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ struct wl12xx_vif {
union {
struct {
u8 hlid;
u8 ba_rx_bitmap;

u8 basic_rate_idx;
u8 ap_rate_idx;
Expand Down

0 comments on commit 9ae5d8d

Please sign in to comment.