From: Johannes Berg Date: Fri, 14 Oct 2011 19:54:48 +0000 (-0700) Subject: iwlagn: use 6 Mbps rate for no-CCK scans X-Git-Tag: Ubuntu-5.2.0-15.16~19022^2~545^2~186 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=3a8aea098c8ebe3437d877542d138085be33346c;p=mirror_ubuntu-eoan-kernel.git iwlagn: use 6 Mbps rate for no-CCK scans When userspace requested that a scan not be done with CCK rates, use 6 Mbps. This is used for example for P2P scanning. Signed-off-by: Johannes Berg Signed-off-by: Wey-Yi Guy Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index e5d727f537d0..a26fbd33a5d9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c @@ -678,7 +678,8 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) priv->contexts[IWL_RXON_CTX_BSS].active.flags & RXON_FLG_CHANNEL_MODE_MSK) >> RXON_FLG_CHANNEL_MODE_POS; - if (chan_mod == CHANNEL_MODE_PURE_40) { + if ((priv->scan_request && priv->scan_request->no_cck) || + chan_mod == CHANNEL_MODE_PURE_40) { rate = IWL_RATE_6M_PLCP; } else { rate = IWL_RATE_1M_PLCP;