Commit d0802abd authored by Eliad Peller's avatar Eliad Peller Committed by Luciano Coelho

wl12xx: move ba fields into wlvif

move ba_fields into the per-interface data, rather than
being global.
Signed-off-by: default avatarEliad Peller <eliad@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent 04324d99
...@@ -357,8 +357,6 @@ static ssize_t driver_state_read(struct file *file, char __user *user_buf, ...@@ -357,8 +357,6 @@ static ssize_t driver_state_read(struct file *file, char __user *user_buf,
DRIVER_STATE_PRINT_INT(noise); DRIVER_STATE_PRINT_INT(noise);
DRIVER_STATE_PRINT_LHEX(ap_hlid_map[0]); DRIVER_STATE_PRINT_LHEX(ap_hlid_map[0]);
DRIVER_STATE_PRINT_INT(last_tx_hlid); DRIVER_STATE_PRINT_INT(last_tx_hlid);
DRIVER_STATE_PRINT_INT(ba_support);
DRIVER_STATE_PRINT_HEX(ba_rx_bitmap);
DRIVER_STATE_PRINT_HEX(ap_fw_ps_map); DRIVER_STATE_PRINT_HEX(ap_fw_ps_map);
DRIVER_STATE_PRINT_LHEX(ap_ps_map); DRIVER_STATE_PRINT_LHEX(ap_ps_map);
DRIVER_STATE_PRINT_HEX(quirks); DRIVER_STATE_PRINT_HEX(quirks);
......
...@@ -184,9 +184,9 @@ static void wl1271_event_rssi_trigger(struct wl1271 *wl, ...@@ -184,9 +184,9 @@ static void wl1271_event_rssi_trigger(struct wl1271 *wl,
static void wl1271_stop_ba_event(struct wl1271 *wl, struct wl12xx_vif *wlvif) static void wl1271_stop_ba_event(struct wl1271 *wl, struct wl12xx_vif *wlvif)
{ {
if (wlvif->bss_type != BSS_TYPE_AP_BSS) { if (wlvif->bss_type != BSS_TYPE_AP_BSS) {
if (!wl->ba_rx_bitmap) if (!wlvif->sta.ba_rx_bitmap)
return; return;
ieee80211_stop_rx_ba_session(wl->vif, wl->ba_rx_bitmap, ieee80211_stop_rx_ba_session(wl->vif, wlvif->sta.ba_rx_bitmap,
wl->vif->bss_conf.bssid); wl->vif->bss_conf.bssid);
} else { } else {
int i; int i;
...@@ -306,9 +306,9 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox) ...@@ -306,9 +306,9 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox)
wl1271_debug(DEBUG_EVENT, "BA_SESSION_RX_CONSTRAINT_EVENT_ID. " wl1271_debug(DEBUG_EVENT, "BA_SESSION_RX_CONSTRAINT_EVENT_ID. "
"ba_allowed = 0x%x", mbox->rx_ba_allowed); "ba_allowed = 0x%x", mbox->rx_ba_allowed);
wl->ba_allowed = !!mbox->rx_ba_allowed; wlvif->ba_allowed = !!mbox->rx_ba_allowed;
if (wl->vif && !wl->ba_allowed) if (wl->vif && !wlvif->ba_allowed)
wl1271_stop_ba_event(wl, wlvif); wl1271_stop_ba_event(wl, wlvif);
} }
......
...@@ -486,18 +486,17 @@ int wl1271_init_ap_rates(struct wl1271 *wl, struct wl12xx_vif *wlvif) ...@@ -486,18 +486,17 @@ int wl1271_init_ap_rates(struct wl1271 *wl, struct wl12xx_vif *wlvif)
static int wl1271_set_ba_policies(struct wl1271 *wl, struct wl12xx_vif *wlvif) static int wl1271_set_ba_policies(struct wl1271 *wl, struct wl12xx_vif *wlvif)
{ {
/* Reset the BA RX indicators */ /* Reset the BA RX indicators */
wl->ba_rx_bitmap = 0; wlvif->ba_allowed = true;
wl->ba_allowed = true;
wl->ba_rx_session_count = 0; wl->ba_rx_session_count = 0;
/* BA is supported in STA/AP modes */ /* BA is supported in STA/AP modes */
if (wlvif->bss_type != BSS_TYPE_AP_BSS && if (wlvif->bss_type != BSS_TYPE_AP_BSS &&
wlvif->bss_type != BSS_TYPE_STA_BSS) { wlvif->bss_type != BSS_TYPE_STA_BSS) {
wl->ba_support = false; wlvif->ba_support = false;
return 0; return 0;
} }
wl->ba_support = true; wlvif->ba_support = true;
/* 802.11n initiator BA session setting */ /* 802.11n initiator BA session setting */
return wl12xx_acx_set_ba_initiator_policy(wl, wlvif); return wl12xx_acx_set_ba_initiator_policy(wl, wlvif);
......
...@@ -4106,7 +4106,7 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw, ...@@ -4106,7 +4106,7 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw,
if (wlvif->bss_type == BSS_TYPE_STA_BSS) { if (wlvif->bss_type == BSS_TYPE_STA_BSS) {
hlid = wlvif->sta.hlid; hlid = wlvif->sta.hlid;
ba_bitmap = &wl->ba_rx_bitmap; ba_bitmap = &wlvif->sta.ba_rx_bitmap;
} else if (wlvif->bss_type == BSS_TYPE_AP_BSS) { } else if (wlvif->bss_type == BSS_TYPE_AP_BSS) {
struct wl1271_station *wl_sta; struct wl1271_station *wl_sta;
...@@ -4127,7 +4127,7 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw, ...@@ -4127,7 +4127,7 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw,
switch (action) { switch (action) {
case IEEE80211_AMPDU_RX_START: case IEEE80211_AMPDU_RX_START:
if (!wl->ba_support || !wl->ba_allowed) { if (!wlvif->ba_support || !wlvif->ba_allowed) {
ret = -ENOTSUPP; ret = -ENOTSUPP;
break; break;
} }
......
...@@ -941,7 +941,7 @@ void wl1271_tx_reset(struct wl1271 *wl, bool reset_tx_queues) ...@@ -941,7 +941,7 @@ void wl1271_tx_reset(struct wl1271 *wl, bool reset_tx_queues)
} }
} }
wl->ba_rx_bitmap = 0; wlvif->sta.ba_rx_bitmap = 0;
} }
for (i = 0; i < NUM_TX_QUEUES; i++) for (i = 0; i < NUM_TX_QUEUES; i++)
......
...@@ -546,11 +546,6 @@ struct wl1271 { ...@@ -546,11 +546,6 @@ struct wl1271 {
/* bands supported by this instance of wl12xx */ /* bands supported by this instance of wl12xx */
struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
/* RX BA constraint value */
bool ba_support;
u8 ba_rx_bitmap;
bool ba_allowed;
int tcxo_clock; int tcxo_clock;
/* /*
...@@ -605,6 +600,7 @@ struct wl12xx_vif { ...@@ -605,6 +600,7 @@ struct wl12xx_vif {
union { union {
struct { struct {
u8 hlid; u8 hlid;
u8 ba_rx_bitmap;
} sta; } sta;
struct { struct {
u8 global_hlid; u8 global_hlid;
...@@ -652,6 +648,10 @@ struct wl12xx_vif { ...@@ -652,6 +648,10 @@ struct wl12xx_vif {
int rssi_thold; int rssi_thold;
int last_rssi_event; int last_rssi_event;
/* RX BA constraint value */
bool ba_support;
bool ba_allowed;
}; };
static inline struct wl12xx_vif *wl12xx_vif_to_data(struct ieee80211_vif *vif) static inline struct wl12xx_vif *wl12xx_vif_to_data(struct ieee80211_vif *vif)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment