aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorShahar Levi <shahar_levi@ti.com>2011-05-22 09:10:22 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-06-07 14:44:02 -0400
commit70559a06657c55aeefe2f06619d3592a08cc68ac (patch)
treee7a3e58a3296e12cdc320f3f1fba2c0f0bdc18a6 /drivers/net/wireless
parentf41ccd71d800c6fac18d2b4ae1830a222c6713da (diff)
wl12xx: Stop BA session event from device
Adding new event that close RX BA session in case of periodic BT activity limiting WLAN activity. Signed-off-by: Shahar Levi <shahar_levi@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/wl12xx/boot.c3
-rw-r--r--drivers/net/wireless/wl12xx/event.c23
-rw-r--r--drivers/net/wireless/wl12xx/event.h17
-rw-r--r--drivers/net/wireless/wl12xx/init.c1
-rw-r--r--drivers/net/wireless/wl12xx/main.c5
-rw-r--r--drivers/net/wireless/wl12xx/wl12xx.h1
6 files changed, 46 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/boot.c b/drivers/net/wireless/wl12xx/boot.c
index b07f8b7e5f11..7ccec07a600c 100644
--- a/drivers/net/wireless/wl12xx/boot.c
+++ b/drivers/net/wireless/wl12xx/boot.c
@@ -485,7 +485,8 @@ static int wl1271_boot_run_firmware(struct wl1271 *wl)
485 if (wl->bss_type == BSS_TYPE_AP_BSS) 485 if (wl->bss_type == BSS_TYPE_AP_BSS)
486 wl->event_mask |= STA_REMOVE_COMPLETE_EVENT_ID; 486 wl->event_mask |= STA_REMOVE_COMPLETE_EVENT_ID;
487 else 487 else
488 wl->event_mask |= DUMMY_PACKET_EVENT_ID; 488 wl->event_mask |= DUMMY_PACKET_EVENT_ID |
489 BA_SESSION_RX_CONSTRAINT_EVENT_ID;
489 490
490 ret = wl1271_event_unmask(wl); 491 ret = wl1271_event_unmask(wl);
491 if (ret < 0) { 492 if (ret < 0) {
diff --git a/drivers/net/wireless/wl12xx/event.c b/drivers/net/wireless/wl12xx/event.c
index c3c554cd6580..94bbd00ec31b 100644
--- a/drivers/net/wireless/wl12xx/event.c
+++ b/drivers/net/wireless/wl12xx/event.c
@@ -168,6 +168,21 @@ static void wl1271_event_rssi_trigger(struct wl1271 *wl,
168 wl->last_rssi_event = event; 168 wl->last_rssi_event = event;
169} 169}
170 170
171static void wl1271_stop_ba_event(struct wl1271 *wl, u8 ba_allowed)
172{
173 /* Convert the value to bool */
174 wl->ba_allowed = !!ba_allowed;
175
176 /*
177 * Return in case:
178 * there are not BA open or the event indication is to allowed BA
179 */
180 if ((!wl->ba_rx_bitmap) || (wl->ba_allowed))
181 return;
182
183 ieee80211_stop_rx_ba_session(wl->vif, wl->ba_rx_bitmap, wl->bssid);
184}
185
171static void wl1271_event_mbox_dump(struct event_mailbox *mbox) 186static void wl1271_event_mbox_dump(struct event_mailbox *mbox)
172{ 187{
173 wl1271_debug(DEBUG_EVENT, "MBOX DUMP:"); 188 wl1271_debug(DEBUG_EVENT, "MBOX DUMP:");
@@ -252,6 +267,14 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox)
252 wl1271_event_rssi_trigger(wl, mbox); 267 wl1271_event_rssi_trigger(wl, mbox);
253 } 268 }
254 269
270 if ((vector & BA_SESSION_RX_CONSTRAINT_EVENT_ID) && !is_ap) {
271 wl1271_debug(DEBUG_EVENT, "BA_SESSION_RX_CONSTRAINT_EVENT_ID. "
272 "ba_allowed = 0x%x", mbox->ba_allowed);
273
274 if (wl->vif)
275 wl1271_stop_ba_event(wl, mbox->ba_allowed);
276 }
277
255 if ((vector & DUMMY_PACKET_EVENT_ID) && !is_ap) { 278 if ((vector & DUMMY_PACKET_EVENT_ID) && !is_ap) {
256 wl1271_debug(DEBUG_EVENT, "DUMMY_PACKET_ID_EVENT_ID"); 279 wl1271_debug(DEBUG_EVENT, "DUMMY_PACKET_ID_EVENT_ID");
257 if (wl->vif) 280 if (wl->vif)
diff --git a/drivers/net/wireless/wl12xx/event.h b/drivers/net/wireless/wl12xx/event.h
index b6cf06e565a4..ce99adf4256e 100644
--- a/drivers/net/wireless/wl12xx/event.h
+++ b/drivers/net/wireless/wl12xx/event.h
@@ -71,7 +71,7 @@ enum {
71 HEALTH_CHECK_REPLY_EVENT_ID = BIT(27), 71 HEALTH_CHECK_REPLY_EVENT_ID = BIT(27),
72 PERIODIC_SCAN_COMPLETE_EVENT_ID = BIT(28), 72 PERIODIC_SCAN_COMPLETE_EVENT_ID = BIT(28),
73 PERIODIC_SCAN_REPORT_EVENT_ID = BIT(29), 73 PERIODIC_SCAN_REPORT_EVENT_ID = BIT(29),
74 BA_SESSION_TEAR_DOWN_EVENT_ID = BIT(30), 74 BA_SESSION_RX_CONSTRAINT_EVENT_ID = BIT(30),
75 EVENT_MBOX_ALL_EVENT_ID = 0x7fffffff, 75 EVENT_MBOX_ALL_EVENT_ID = 0x7fffffff,
76}; 76};
77 77
@@ -122,7 +122,20 @@ struct event_mailbox {
122 __le16 sta_aging_status; 122 __le16 sta_aging_status;
123 __le16 sta_tx_retry_exceeded; 123 __le16 sta_tx_retry_exceeded;
124 124
125 u8 reserved_5[24]; 125 /*
126 * Bitmap, Each bit set represents the Role ID for which this constraint
127 * is set. Range: 0 - FF, FF means ANY role
128 */
129 u8 ba_role_id;
130 /*
131 * Bitmap, Each bit set represents the Link ID for which this constraint
132 * is set. Not applicable if ba_role_id is set to ANY role (FF).
133 * Range: 0 - FFFF, FFFF means ANY link in that role
134 */
135 u8 ba_link_id;
136 u8 ba_allowed;
137
138 u8 reserved_5[21];
126} __packed; 139} __packed;
127 140
128int wl1271_event_unmask(struct wl1271 *wl); 141int wl1271_event_unmask(struct wl1271 *wl);
diff --git a/drivers/net/wireless/wl12xx/init.c b/drivers/net/wireless/wl12xx/init.c
index a8f4f156c055..f5c2c9e6f84b 100644
--- a/drivers/net/wireless/wl12xx/init.c
+++ b/drivers/net/wireless/wl12xx/init.c
@@ -541,6 +541,7 @@ static int wl1271_set_ba_policies(struct wl1271 *wl)
541 541
542 /* Reset the BA RX indicators */ 542 /* Reset the BA RX indicators */
543 wl->ba_rx_bitmap = 0; 543 wl->ba_rx_bitmap = 0;
544 wl->ba_allowed = true;
544 545
545 /* validate that FW support BA */ 546 /* validate that FW support BA */
546 wl1271_check_ba_support(wl); 547 wl1271_check_ba_support(wl);
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index e6497dc669df..f37f0b873c73 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -3354,9 +3354,12 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw,
3354 if (ret < 0) 3354 if (ret < 0)
3355 goto out; 3355 goto out;
3356 3356
3357 wl1271_debug(DEBUG_MAC80211, "mac80211 ampdu: Rx tid %d action %d",
3358 tid, action);
3359
3357 switch (action) { 3360 switch (action) {
3358 case IEEE80211_AMPDU_RX_START: 3361 case IEEE80211_AMPDU_RX_START:
3359 if (wl->ba_support) { 3362 if ((wl->ba_support) && (wl->ba_allowed)) {
3360 ret = wl1271_acx_set_ba_receiver_session(wl, tid, *ssn, 3363 ret = wl1271_acx_set_ba_receiver_session(wl, tid, *ssn,
3361 true); 3364 true);
3362 if (!ret) 3365 if (!ret)
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h
index fbe8f46d1232..3bc794a1ee75 100644
--- a/drivers/net/wireless/wl12xx/wl12xx.h
+++ b/drivers/net/wireless/wl12xx/wl12xx.h
@@ -564,6 +564,7 @@ struct wl1271 {
564 /* RX BA constraint value */ 564 /* RX BA constraint value */
565 bool ba_support; 565 bool ba_support;
566 u8 ba_rx_bitmap; 566 u8 ba_rx_bitmap;
567 bool ba_allowed;
567 568
568 int tcxo_clock; 569 int tcxo_clock;
569 570