aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2013-09-09 05:24:34 -0400
committerLuciano Coelho <luciano.coelho@intel.com>2013-10-23 02:47:39 -0400
commit71e996bef90b23919f627a38367b9e8b44b77d37 (patch)
tree740d3e7b576e5141fe236041e99f172d5e753b41 /drivers/net/wireless
parentbbd74557e5711e3d5f4d94d050ae05987c4fd0be (diff)
wlcore: add ap_event_mask
Add new ap_event_mask field, to indicate events that should be unmasked only when there's an ap interface. This is done in order to avoid spurious wakeups when we don't care about the incoming event anyway. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ti/wl12xx/main.c3
-rw-r--r--drivers/net/wireless/ti/wl18xx/main.c3
-rw-r--r--drivers/net/wireless/ti/wlcore/event.c1
-rw-r--r--drivers/net/wireless/ti/wlcore/init.c6
-rw-r--r--drivers/net/wireless/ti/wlcore/main.c6
-rw-r--r--drivers/net/wireless/ti/wlcore/wlcore.h2
6 files changed, 19 insertions, 2 deletions
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c
index 591526b99154..7d88a950383a 100644
--- a/drivers/net/wireless/ti/wl12xx/main.c
+++ b/drivers/net/wireless/ti/wl12xx/main.c
@@ -1262,9 +1262,10 @@ static int wl12xx_boot(struct wl1271 *wl)
1262 BA_SESSION_RX_CONSTRAINT_EVENT_ID | 1262 BA_SESSION_RX_CONSTRAINT_EVENT_ID |
1263 REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID | 1263 REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID |
1264 INACTIVE_STA_EVENT_ID | 1264 INACTIVE_STA_EVENT_ID |
1265 MAX_TX_RETRY_EVENT_ID |
1266 CHANNEL_SWITCH_COMPLETE_EVENT_ID; 1265 CHANNEL_SWITCH_COMPLETE_EVENT_ID;
1267 1266
1267 wl->ap_event_mask = MAX_TX_RETRY_EVENT_ID;
1268
1268 ret = wlcore_boot_run_firmware(wl); 1269 ret = wlcore_boot_run_firmware(wl);
1269 if (ret < 0) 1270 if (ret < 0)
1270 goto out; 1271 goto out;
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c
index b48d01db3ef4..3804a554ecf0 100644
--- a/drivers/net/wireless/ti/wl18xx/main.c
+++ b/drivers/net/wireless/ti/wl18xx/main.c
@@ -988,10 +988,11 @@ static int wl18xx_boot(struct wl1271 *wl)
988 BA_SESSION_RX_CONSTRAINT_EVENT_ID | 988 BA_SESSION_RX_CONSTRAINT_EVENT_ID |
989 REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID | 989 REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID |
990 INACTIVE_STA_EVENT_ID | 990 INACTIVE_STA_EVENT_ID |
991 MAX_TX_FAILURE_EVENT_ID |
992 CHANNEL_SWITCH_COMPLETE_EVENT_ID | 991 CHANNEL_SWITCH_COMPLETE_EVENT_ID |
993 DFS_CHANNELS_CONFIG_COMPLETE_EVENT; 992 DFS_CHANNELS_CONFIG_COMPLETE_EVENT;
994 993
994 wl->ap_event_mask = MAX_TX_FAILURE_EVENT_ID;
995
995 ret = wlcore_boot_run_firmware(wl); 996 ret = wlcore_boot_run_firmware(wl);
996 if (ret < 0) 997 if (ret < 0)
997 goto out; 998 goto out;
diff --git a/drivers/net/wireless/ti/wlcore/event.c b/drivers/net/wireless/ti/wlcore/event.c
index 67f61689b49e..8d3b34965db3 100644
--- a/drivers/net/wireless/ti/wlcore/event.c
+++ b/drivers/net/wireless/ti/wlcore/event.c
@@ -266,6 +266,7 @@ int wl1271_event_unmask(struct wl1271 *wl)
266{ 266{
267 int ret; 267 int ret;
268 268
269 wl1271_debug(DEBUG_EVENT, "unmasking event_mask 0x%x", wl->event_mask);
269 ret = wl1271_acx_event_mbox_mask(wl, ~(wl->event_mask)); 270 ret = wl1271_acx_event_mbox_mask(wl, ~(wl->event_mask));
270 if (ret < 0) 271 if (ret < 0)
271 return ret; 272 return ret;
diff --git a/drivers/net/wireless/ti/wlcore/init.c b/drivers/net/wireless/ti/wlcore/init.c
index 5c6f11e157d9..7699f9d07e26 100644
--- a/drivers/net/wireless/ti/wlcore/init.c
+++ b/drivers/net/wireless/ti/wlcore/init.c
@@ -571,6 +571,12 @@ int wl1271_init_vif_specific(struct wl1271 *wl, struct ieee80211_vif *vif)
571 ret = wl1271_acx_sleep_auth(wl, WL1271_PSM_CAM); 571 ret = wl1271_acx_sleep_auth(wl, WL1271_PSM_CAM);
572 if (ret < 0) 572 if (ret < 0)
573 return ret; 573 return ret;
574
575 /* unmask ap events */
576 wl->event_mask |= wl->ap_event_mask;
577 ret = wl1271_event_unmask(wl);
578 if (ret < 0)
579 return ret;
574 /* first STA, no APs */ 580 /* first STA, no APs */
575 } else if (wl->sta_count == 0 && wl->ap_count == 0 && !is_ap) { 581 } else if (wl->sta_count == 0 && wl->ap_count == 0 && !is_ap) {
576 u8 sta_auth = wl->conf.conn.sta_sleep_auth; 582 u8 sta_auth = wl->conf.conn.sta_sleep_auth;
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index bbdd10632373..31476656ac81 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -2623,6 +2623,12 @@ deinit:
2623 !test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY, &wl->flags)) 2623 !test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY, &wl->flags))
2624 goto unlock; 2624 goto unlock;
2625 2625
2626 if (wl->ap_count == 0 && is_ap) {
2627 /* mask ap events */
2628 wl->event_mask &= ~wl->ap_event_mask;
2629 wl1271_event_unmask(wl);
2630 }
2631
2626 if (wl->ap_count == 0 && is_ap && wl->sta_count) { 2632 if (wl->ap_count == 0 && is_ap && wl->sta_count) {
2627 u8 sta_auth = wl->conf.conn.sta_sleep_auth; 2633 u8 sta_auth = wl->conf.conn.sta_sleep_auth;
2628 /* Configure for power according to debugfs */ 2634 /* Configure for power according to debugfs */
diff --git a/drivers/net/wireless/ti/wlcore/wlcore.h b/drivers/net/wireless/ti/wlcore/wlcore.h
index 54ce5d5e84db..f9272229d73d 100644
--- a/drivers/net/wireless/ti/wlcore/wlcore.h
+++ b/drivers/net/wireless/ti/wlcore/wlcore.h
@@ -307,6 +307,8 @@ struct wl1271 {
307 307
308 /* The mbox event mask */ 308 /* The mbox event mask */
309 u32 event_mask; 309 u32 event_mask;
310 /* events to unmask only when ap interface is up */
311 u32 ap_event_mask;
310 312
311 /* Mailbox pointers */ 313 /* Mailbox pointers */
312 u32 mbox_size; 314 u32 mbox_size;