aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-scan.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c50
1 files changed, 4 insertions, 46 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index e5d727f537d0..359d2182757b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -416,6 +416,8 @@ static u16 iwl_limit_dwell(struct iwl_priv *priv, u16 dwell_time)
416 416
417 if (!iwl_is_associated_ctx(ctx)) 417 if (!iwl_is_associated_ctx(ctx))
418 continue; 418 continue;
419 if (ctx->staging.dev_type == RXON_DEV_TYPE_P2P)
420 continue;
419 value = ctx->beacon_int; 421 value = ctx->beacon_int;
420 if (!value) 422 if (!value)
421 value = IWL_PASSIVE_DWELL_BASE; 423 value = IWL_PASSIVE_DWELL_BASE;
@@ -678,7 +680,8 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
678 priv->contexts[IWL_RXON_CTX_BSS].active.flags & 680 priv->contexts[IWL_RXON_CTX_BSS].active.flags &
679 RXON_FLG_CHANNEL_MODE_MSK) 681 RXON_FLG_CHANNEL_MODE_MSK)
680 >> RXON_FLG_CHANNEL_MODE_POS; 682 >> RXON_FLG_CHANNEL_MODE_POS;
681 if (chan_mod == CHANNEL_MODE_PURE_40) { 683 if ((priv->scan_request && priv->scan_request->no_cck) ||
684 chan_mod == CHANNEL_MODE_PURE_40) {
682 rate = IWL_RATE_6M_PLCP; 685 rate = IWL_RATE_6M_PLCP;
683 } else { 686 } else {
684 rate = IWL_RATE_1M_PLCP; 687 rate = IWL_RATE_1M_PLCP;
@@ -938,51 +941,6 @@ int __must_check iwl_scan_initiate(struct iwl_priv *priv,
938 return 0; 941 return 0;
939} 942}
940 943
941int iwlagn_mac_hw_scan(struct ieee80211_hw *hw,
942 struct ieee80211_vif *vif,
943 struct cfg80211_scan_request *req)
944{
945 struct iwl_priv *priv = hw->priv;
946 int ret;
947
948 IWL_DEBUG_MAC80211(priv, "enter\n");
949
950 if (req->n_channels == 0)
951 return -EINVAL;
952
953 mutex_lock(&priv->shrd->mutex);
954
955 /*
956 * If an internal scan is in progress, just set
957 * up the scan_request as per above.
958 */
959 if (priv->scan_type != IWL_SCAN_NORMAL) {
960 IWL_DEBUG_SCAN(priv,
961 "SCAN request during internal scan - defer\n");
962 priv->scan_request = req;
963 priv->scan_vif = vif;
964 ret = 0;
965 } else {
966 priv->scan_request = req;
967 priv->scan_vif = vif;
968 /*
969 * mac80211 will only ask for one band at a time
970 * so using channels[0] here is ok
971 */
972 ret = iwl_scan_initiate(priv, vif, IWL_SCAN_NORMAL,
973 req->channels[0]->band);
974 if (ret) {
975 priv->scan_request = NULL;
976 priv->scan_vif = NULL;
977 }
978 }
979
980 IWL_DEBUG_MAC80211(priv, "leave\n");
981
982 mutex_unlock(&priv->shrd->mutex);
983
984 return ret;
985}
986 944
987/* 945/*
988 * internal short scan, this function should only been called while associated. 946 * internal short scan, this function should only been called while associated.