diff options
author | Eliad Peller <eliad@wizery.com> | 2011-10-05 05:56:04 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-10-07 01:32:54 -0400 |
commit | d0802abdf9c60b1dadb097e806022f3449b0cc6b (patch) | |
tree | 7e8c8d4480a3aa44073224f17a4bc46ad26d145e /drivers | |
parent | 04324d99818d16da4f64e266b45cad2e5803b961 (diff) |
wl12xx: move ba fields into wlvif
move ba_fields into the per-interface data, rather than
being global.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/debugfs.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/event.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/init.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/tx.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl12xx.h | 10 |
6 files changed, 15 insertions, 18 deletions
diff --git a/drivers/net/wireless/wl12xx/debugfs.c b/drivers/net/wireless/wl12xx/debugfs.c index e53f96830c2f..ee42a43d6a66 100644 --- a/drivers/net/wireless/wl12xx/debugfs.c +++ b/drivers/net/wireless/wl12xx/debugfs.c | |||
@@ -357,8 +357,6 @@ static ssize_t driver_state_read(struct file *file, char __user *user_buf, | |||
357 | DRIVER_STATE_PRINT_INT(noise); | 357 | DRIVER_STATE_PRINT_INT(noise); |
358 | DRIVER_STATE_PRINT_LHEX(ap_hlid_map[0]); | 358 | DRIVER_STATE_PRINT_LHEX(ap_hlid_map[0]); |
359 | DRIVER_STATE_PRINT_INT(last_tx_hlid); | 359 | DRIVER_STATE_PRINT_INT(last_tx_hlid); |
360 | DRIVER_STATE_PRINT_INT(ba_support); | ||
361 | DRIVER_STATE_PRINT_HEX(ba_rx_bitmap); | ||
362 | DRIVER_STATE_PRINT_HEX(ap_fw_ps_map); | 360 | DRIVER_STATE_PRINT_HEX(ap_fw_ps_map); |
363 | DRIVER_STATE_PRINT_LHEX(ap_ps_map); | 361 | DRIVER_STATE_PRINT_LHEX(ap_ps_map); |
364 | DRIVER_STATE_PRINT_HEX(quirks); | 362 | DRIVER_STATE_PRINT_HEX(quirks); |
diff --git a/drivers/net/wireless/wl12xx/event.c b/drivers/net/wireless/wl12xx/event.c index 775ad952ac8f..8c31274228ea 100644 --- a/drivers/net/wireless/wl12xx/event.c +++ b/drivers/net/wireless/wl12xx/event.c | |||
@@ -184,9 +184,9 @@ static void wl1271_event_rssi_trigger(struct wl1271 *wl, | |||
184 | static void wl1271_stop_ba_event(struct wl1271 *wl, struct wl12xx_vif *wlvif) | 184 | static void wl1271_stop_ba_event(struct wl1271 *wl, struct wl12xx_vif *wlvif) |
185 | { | 185 | { |
186 | if (wlvif->bss_type != BSS_TYPE_AP_BSS) { | 186 | if (wlvif->bss_type != BSS_TYPE_AP_BSS) { |
187 | if (!wl->ba_rx_bitmap) | 187 | if (!wlvif->sta.ba_rx_bitmap) |
188 | return; | 188 | return; |
189 | ieee80211_stop_rx_ba_session(wl->vif, wl->ba_rx_bitmap, | 189 | ieee80211_stop_rx_ba_session(wl->vif, wlvif->sta.ba_rx_bitmap, |
190 | wl->vif->bss_conf.bssid); | 190 | wl->vif->bss_conf.bssid); |
191 | } else { | 191 | } else { |
192 | int i; | 192 | int i; |
@@ -306,9 +306,9 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox) | |||
306 | wl1271_debug(DEBUG_EVENT, "BA_SESSION_RX_CONSTRAINT_EVENT_ID. " | 306 | wl1271_debug(DEBUG_EVENT, "BA_SESSION_RX_CONSTRAINT_EVENT_ID. " |
307 | "ba_allowed = 0x%x", mbox->rx_ba_allowed); | 307 | "ba_allowed = 0x%x", mbox->rx_ba_allowed); |
308 | 308 | ||
309 | wl->ba_allowed = !!mbox->rx_ba_allowed; | 309 | wlvif->ba_allowed = !!mbox->rx_ba_allowed; |
310 | 310 | ||
311 | if (wl->vif && !wl->ba_allowed) | 311 | if (wl->vif && !wlvif->ba_allowed) |
312 | wl1271_stop_ba_event(wl, wlvif); | 312 | wl1271_stop_ba_event(wl, wlvif); |
313 | } | 313 | } |
314 | 314 | ||
diff --git a/drivers/net/wireless/wl12xx/init.c b/drivers/net/wireless/wl12xx/init.c index 1eaa0a3d9273..80e89e319879 100644 --- a/drivers/net/wireless/wl12xx/init.c +++ b/drivers/net/wireless/wl12xx/init.c | |||
@@ -486,18 +486,17 @@ int wl1271_init_ap_rates(struct wl1271 *wl, struct wl12xx_vif *wlvif) | |||
486 | static int wl1271_set_ba_policies(struct wl1271 *wl, struct wl12xx_vif *wlvif) | 486 | static int wl1271_set_ba_policies(struct wl1271 *wl, struct wl12xx_vif *wlvif) |
487 | { | 487 | { |
488 | /* Reset the BA RX indicators */ | 488 | /* Reset the BA RX indicators */ |
489 | wl->ba_rx_bitmap = 0; | 489 | wlvif->ba_allowed = true; |
490 | wl->ba_allowed = true; | ||
491 | wl->ba_rx_session_count = 0; | 490 | wl->ba_rx_session_count = 0; |
492 | 491 | ||
493 | /* BA is supported in STA/AP modes */ | 492 | /* BA is supported in STA/AP modes */ |
494 | if (wlvif->bss_type != BSS_TYPE_AP_BSS && | 493 | if (wlvif->bss_type != BSS_TYPE_AP_BSS && |
495 | wlvif->bss_type != BSS_TYPE_STA_BSS) { | 494 | wlvif->bss_type != BSS_TYPE_STA_BSS) { |
496 | wl->ba_support = false; | 495 | wlvif->ba_support = false; |
497 | return 0; | 496 | return 0; |
498 | } | 497 | } |
499 | 498 | ||
500 | wl->ba_support = true; | 499 | wlvif->ba_support = true; |
501 | 500 | ||
502 | /* 802.11n initiator BA session setting */ | 501 | /* 802.11n initiator BA session setting */ |
503 | return wl12xx_acx_set_ba_initiator_policy(wl, wlvif); | 502 | return wl12xx_acx_set_ba_initiator_policy(wl, wlvif); |
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 72ab25657dab..984dae881a8d 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -4106,7 +4106,7 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw, | |||
4106 | 4106 | ||
4107 | if (wlvif->bss_type == BSS_TYPE_STA_BSS) { | 4107 | if (wlvif->bss_type == BSS_TYPE_STA_BSS) { |
4108 | hlid = wlvif->sta.hlid; | 4108 | hlid = wlvif->sta.hlid; |
4109 | ba_bitmap = &wl->ba_rx_bitmap; | 4109 | ba_bitmap = &wlvif->sta.ba_rx_bitmap; |
4110 | } else if (wlvif->bss_type == BSS_TYPE_AP_BSS) { | 4110 | } else if (wlvif->bss_type == BSS_TYPE_AP_BSS) { |
4111 | struct wl1271_station *wl_sta; | 4111 | struct wl1271_station *wl_sta; |
4112 | 4112 | ||
@@ -4127,7 +4127,7 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw, | |||
4127 | 4127 | ||
4128 | switch (action) { | 4128 | switch (action) { |
4129 | case IEEE80211_AMPDU_RX_START: | 4129 | case IEEE80211_AMPDU_RX_START: |
4130 | if (!wl->ba_support || !wl->ba_allowed) { | 4130 | if (!wlvif->ba_support || !wlvif->ba_allowed) { |
4131 | ret = -ENOTSUPP; | 4131 | ret = -ENOTSUPP; |
4132 | break; | 4132 | break; |
4133 | } | 4133 | } |
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c index 509ae10f0e03..6ce61635f3bd 100644 --- a/drivers/net/wireless/wl12xx/tx.c +++ b/drivers/net/wireless/wl12xx/tx.c | |||
@@ -941,7 +941,7 @@ void wl1271_tx_reset(struct wl1271 *wl, bool reset_tx_queues) | |||
941 | } | 941 | } |
942 | } | 942 | } |
943 | 943 | ||
944 | wl->ba_rx_bitmap = 0; | 944 | wlvif->sta.ba_rx_bitmap = 0; |
945 | } | 945 | } |
946 | 946 | ||
947 | for (i = 0; i < NUM_TX_QUEUES; i++) | 947 | for (i = 0; i < NUM_TX_QUEUES; i++) |
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h index 5a82450d8c70..fcc779147c1c 100644 --- a/drivers/net/wireless/wl12xx/wl12xx.h +++ b/drivers/net/wireless/wl12xx/wl12xx.h | |||
@@ -546,11 +546,6 @@ struct wl1271 { | |||
546 | /* bands supported by this instance of wl12xx */ | 546 | /* bands supported by this instance of wl12xx */ |
547 | struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; | 547 | struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; |
548 | 548 | ||
549 | /* RX BA constraint value */ | ||
550 | bool ba_support; | ||
551 | u8 ba_rx_bitmap; | ||
552 | bool ba_allowed; | ||
553 | |||
554 | int tcxo_clock; | 549 | int tcxo_clock; |
555 | 550 | ||
556 | /* | 551 | /* |
@@ -605,6 +600,7 @@ struct wl12xx_vif { | |||
605 | union { | 600 | union { |
606 | struct { | 601 | struct { |
607 | u8 hlid; | 602 | u8 hlid; |
603 | u8 ba_rx_bitmap; | ||
608 | } sta; | 604 | } sta; |
609 | struct { | 605 | struct { |
610 | u8 global_hlid; | 606 | u8 global_hlid; |
@@ -652,6 +648,10 @@ struct wl12xx_vif { | |||
652 | 648 | ||
653 | int rssi_thold; | 649 | int rssi_thold; |
654 | int last_rssi_event; | 650 | int last_rssi_event; |
651 | |||
652 | /* RX BA constraint value */ | ||
653 | bool ba_support; | ||
654 | bool ba_allowed; | ||
655 | }; | 655 | }; |
656 | 656 | ||
657 | static inline struct wl12xx_vif *wl12xx_vif_to_data(struct ieee80211_vif *vif) | 657 | static inline struct wl12xx_vif *wl12xx_vif_to_data(struct ieee80211_vif *vif) |