aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-07-08 10:50:03 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-07-08 16:35:51 -0400
commit8d2ef7bd76f222b068a3fd534fe5fdb8c9543ba0 (patch)
treece053dcce72f1c483b3edf31e55f7a512394f65a /drivers/net/wireless/wl12xx
parentca52a5ebbb7caff2995214a6ca41a36c5210b0bd (diff)
wl1271: Disable dynamic PS based on BT co-ext sense events
This patch requests mac80211 to disable dynamic PSM based on sense events coming from the firmware. Effectively, whenever there is bluetooth traffic, the mac80211 is forced into full PSM mode. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_boot.c3
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_event.c9
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c8
3 files changed, 18 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_boot.c b/drivers/net/wireless/wl12xx/wl1271_boot.c
index f44ccaff4e4..f36430b0336 100644
--- a/drivers/net/wireless/wl12xx/wl1271_boot.c
+++ b/drivers/net/wireless/wl12xx/wl1271_boot.c
@@ -415,7 +415,8 @@ static int wl1271_boot_run_firmware(struct wl1271 *wl)
415 JOIN_EVENT_COMPLETE_ID | 415 JOIN_EVENT_COMPLETE_ID |
416 DISCONNECT_EVENT_COMPLETE_ID | 416 DISCONNECT_EVENT_COMPLETE_ID |
417 RSSI_SNR_TRIGGER_0_EVENT_ID | 417 RSSI_SNR_TRIGGER_0_EVENT_ID |
418 PSPOLL_DELIVERY_FAILURE_EVENT_ID; 418 PSPOLL_DELIVERY_FAILURE_EVENT_ID |
419 SOFT_GEMINI_SENSE_EVENT_ID;
419 420
420 ret = wl1271_event_unmask(wl); 421 ret = wl1271_event_unmask(wl);
421 if (ret < 0) { 422 if (ret < 0) {
diff --git a/drivers/net/wireless/wl12xx/wl1271_event.c b/drivers/net/wireless/wl12xx/wl1271_event.c
index 15f6b86f81a..525ba1a5b8f 100644
--- a/drivers/net/wireless/wl12xx/wl1271_event.c
+++ b/drivers/net/wireless/wl12xx/wl1271_event.c
@@ -225,6 +225,15 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox)
225 return ret; 225 return ret;
226 } 226 }
227 227
228 /* disable dynamic PS when requested by the firmware */
229 if (vector & SOFT_GEMINI_SENSE_EVENT_ID &&
230 wl->bss_type == BSS_TYPE_STA_BSS) {
231 if (mbox->soft_gemini_sense_info)
232 ieee80211_disable_dyn_ps(wl->vif, true);
233 else
234 ieee80211_disable_dyn_ps(wl->vif, false);
235 }
236
228 /* 237 /*
229 * The BSS_LOSE_EVENT_ID is only needed while psm (and hence beacon 238 * The BSS_LOSE_EVENT_ID is only needed while psm (and hence beacon
230 * filtering) is enabled. Without PSM, the stack will receive all 239 * filtering) is enabled. Without PSM, the stack will receive all
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 15c99dd7677..366e41518fe 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -54,7 +54,7 @@ static struct conf_drv_settings default_conf = {
54 [CONF_SG_HV3_MAX_OVERRIDE] = 0, 54 [CONF_SG_HV3_MAX_OVERRIDE] = 0,
55 [CONF_SG_BT_NFS_SAMPLE_INTERVAL] = 400, 55 [CONF_SG_BT_NFS_SAMPLE_INTERVAL] = 400,
56 [CONF_SG_BT_LOAD_RATIO] = 50, 56 [CONF_SG_BT_LOAD_RATIO] = 50,
57 [CONF_SG_AUTO_PS_MODE] = 0, 57 [CONF_SG_AUTO_PS_MODE] = 1,
58 [CONF_SG_AUTO_SCAN_PROBE_REQ] = 170, 58 [CONF_SG_AUTO_SCAN_PROBE_REQ] = 170,
59 [CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3] = 50, 59 [CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3] = 50,
60 [CONF_SG_ANTENNA_CONFIGURATION] = 0, 60 [CONF_SG_ANTENNA_CONFIGURATION] = 0,
@@ -937,6 +937,9 @@ static void wl1271_op_remove_interface(struct ieee80211_hw *hw,
937 937
938 WARN_ON(wl->state != WL1271_STATE_ON); 938 WARN_ON(wl->state != WL1271_STATE_ON);
939 939
940 /* enable dyn ps just in case (if left on due to fw crash etc) */
941 ieee80211_disable_dyn_ps(wl->vif, false);
942
940 if (test_and_clear_bit(WL1271_FLAG_SCANNING, &wl->flags)) { 943 if (test_and_clear_bit(WL1271_FLAG_SCANNING, &wl->flags)) {
941 mutex_unlock(&wl->mutex); 944 mutex_unlock(&wl->mutex);
942 ieee80211_scan_completed(wl->hw, true); 945 ieee80211_scan_completed(wl->hw, true);
@@ -1774,6 +1777,9 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
1774 clear_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags); 1777 clear_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags);
1775 wl->aid = 0; 1778 wl->aid = 0;
1776 1779
1780 /* re-enable dynamic ps - just in case */
1781 ieee80211_disable_dyn_ps(wl->vif, false);
1782
1777 /* revert back to minimum rates for the current band */ 1783 /* revert back to minimum rates for the current band */
1778 wl1271_set_band_rate(wl); 1784 wl1271_set_band_rate(wl);
1779 wl->basic_rate = wl1271_min_rate_get(wl); 1785 wl->basic_rate = wl1271_min_rate_get(wl);