aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-11-04 14:45:14 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-11-04 14:45:14 -0500
commit01925efdf7e03b4b803b5c9f985163d687f7f017 (patch)
tree6c318f9bf002efac5ccd87e8edad35863d72bd17 /drivers/net/wireless/iwlwifi/mvm
parenta1b13b9ad3759dca24c6b721ee026c540a4e6564 (diff)
parent8ce9beac4661f576ea0d518b9f086bb52a171a37 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts: drivers/net/wireless/iwlwifi/pcie/drv.c
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/power.c5
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/scan.c18
2 files changed, 18 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/power.c b/drivers/net/wireless/iwlwifi/mvm/power.c
index 80d5f88a9d32..550824aa84ea 100644
--- a/drivers/net/wireless/iwlwifi/mvm/power.c
+++ b/drivers/net/wireless/iwlwifi/mvm/power.c
@@ -273,7 +273,10 @@ static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm,
273 if (!mvmvif->queue_params[ac].uapsd) 273 if (!mvmvif->queue_params[ac].uapsd)
274 continue; 274 continue;
275 275
276 cmd->flags |= cpu_to_le16(POWER_FLAGS_ADVANCE_PM_ENA_MSK); 276 if (mvm->cur_ucode != IWL_UCODE_WOWLAN)
277 cmd->flags |=
278 cpu_to_le16(POWER_FLAGS_ADVANCE_PM_ENA_MSK);
279
277 cmd->uapsd_ac_flags |= BIT(ac); 280 cmd->uapsd_ac_flags |= BIT(ac);
278 281
279 /* QNDP TID - the highest TID with no admission control */ 282 /* QNDP TID - the highest TID with no admission control */
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c
index 778dcd9320fe..dff7592e1ff8 100644
--- a/drivers/net/wireless/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/iwlwifi/mvm/scan.c
@@ -97,10 +97,10 @@ static inline __le32 iwl_mvm_scan_max_out_time(struct ieee80211_vif *vif)
97 97
98static inline __le32 iwl_mvm_scan_suspend_time(struct ieee80211_vif *vif) 98static inline __le32 iwl_mvm_scan_suspend_time(struct ieee80211_vif *vif)
99{ 99{
100 if (vif->bss_conf.assoc) 100 if (!vif->bss_conf.assoc)
101 return cpu_to_le32(vif->bss_conf.beacon_int);
102 else
103 return 0; 101 return 0;
102
103 return cpu_to_le32(ieee80211_tu_to_usec(vif->bss_conf.beacon_int));
104} 104}
105 105
106static inline __le32 106static inline __le32
@@ -423,6 +423,11 @@ static bool iwl_mvm_scan_abort_notif(struct iwl_notif_wait_data *notif_wait,
423 return false; 423 return false;
424 } 424 }
425 425
426 /*
427 * If scan cannot be aborted, it means that we had a
428 * SCAN_COMPLETE_NOTIFICATION in the pipe and it called
429 * ieee80211_scan_completed already.
430 */
426 IWL_DEBUG_SCAN(mvm, "Scan cannot be aborted, exit now: %d\n", 431 IWL_DEBUG_SCAN(mvm, "Scan cannot be aborted, exit now: %d\n",
427 *resp); 432 *resp);
428 return true; 433 return true;
@@ -446,14 +451,19 @@ void iwl_mvm_cancel_scan(struct iwl_mvm *mvm)
446 SCAN_COMPLETE_NOTIFICATION }; 451 SCAN_COMPLETE_NOTIFICATION };
447 int ret; 452 int ret;
448 453
454 if (mvm->scan_status == IWL_MVM_SCAN_NONE)
455 return;
456
449 iwl_init_notification_wait(&mvm->notif_wait, &wait_scan_abort, 457 iwl_init_notification_wait(&mvm->notif_wait, &wait_scan_abort,
450 scan_abort_notif, 458 scan_abort_notif,
451 ARRAY_SIZE(scan_abort_notif), 459 ARRAY_SIZE(scan_abort_notif),
452 iwl_mvm_scan_abort_notif, NULL); 460 iwl_mvm_scan_abort_notif, NULL);
453 461
454 ret = iwl_mvm_send_cmd_pdu(mvm, SCAN_ABORT_CMD, CMD_SYNC, 0, NULL); 462 ret = iwl_mvm_send_cmd_pdu(mvm, SCAN_ABORT_CMD,
463 CMD_SYNC | CMD_SEND_IN_RFKILL, 0, NULL);
455 if (ret) { 464 if (ret) {
456 IWL_ERR(mvm, "Couldn't send SCAN_ABORT_CMD: %d\n", ret); 465 IWL_ERR(mvm, "Couldn't send SCAN_ABORT_CMD: %d\n", ret);
466 /* mac80211's state will be cleaned in the fw_restart flow */
457 goto out_remove_notif; 467 goto out_remove_notif;
458 } 468 }
459 469