wlcore: consolidate Rx BA bitmap management to links struct
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>
This commit is contained in:
parent
d6037d22f3
commit
9ae5d8d4b7
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -330,7 +330,6 @@ struct wl12xx_vif {
|
|||
union {
|
||||
struct {
|
||||
u8 hlid;
|
||||
u8 ba_rx_bitmap;
|
||||
|
||||
u8 basic_rate_idx;
|
||||
u8 ap_rate_idx;
|
||||
|
|
Loading…
Reference in New Issue