aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-04-30 17:42:15 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-04-30 18:03:51 -0400
commit96ff56419504ac6a610ff1af42330e0423242e16 (patch)
treef9f47566e06944cde52d5c7e2902d9a683656891 /drivers
parent0250ececdf6813457c98719e2d33b3684881fde0 (diff)
iwlwifi: work around passive scan issue
Some firmware versions don't behave properly when passive scanning is requested on radar channels without enabling active scanning on receiving a good frame. Work around that issue by asking the firmware to only enable the active scanning after receiving a huge number of good frames, a number that can never be reached during our dwell time. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-commands.h4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c23
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c3
3 files changed, 23 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h
index 6383d9f8c9b3..f4e59ae07f8e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-commands.h
+++ b/drivers/net/wireless/iwlwifi/iwl-commands.h
@@ -2621,7 +2621,9 @@ struct iwl_ssid_ie {
2621#define PROBE_OPTION_MAX_3945 4 2621#define PROBE_OPTION_MAX_3945 4
2622#define PROBE_OPTION_MAX 20 2622#define PROBE_OPTION_MAX 20
2623#define TX_CMD_LIFE_TIME_INFINITE cpu_to_le32(0xFFFFFFFF) 2623#define TX_CMD_LIFE_TIME_INFINITE cpu_to_le32(0xFFFFFFFF)
2624#define IWL_GOOD_CRC_TH cpu_to_le16(1) 2624#define IWL_GOOD_CRC_TH_DISABLED 0
2625#define IWL_GOOD_CRC_TH_DEFAULT cpu_to_le16(1)
2626#define IWL_GOOD_CRC_TH_NEVER cpu_to_le16(0xffff)
2625#define IWL_MAX_SCAN_SIZE 1024 2627#define IWL_MAX_SCAN_SIZE 1024
2626#define IWL_MAX_CMD_SIZE 4096 2628#define IWL_MAX_CMD_SIZE 4096
2627#define IWL_MAX_PROBE_REQUEST 200 2629#define IWL_MAX_PROBE_REQUEST 200
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index 5062f4ebb6a9..2367286eb74d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -812,16 +812,29 @@ static void iwl_bg_request_scan(struct work_struct *data)
812 rate = IWL_RATE_1M_PLCP; 812 rate = IWL_RATE_1M_PLCP;
813 rate_flags = RATE_MCS_CCK_MSK; 813 rate_flags = RATE_MCS_CCK_MSK;
814 } 814 }
815 scan->good_CRC_th = 0; 815 scan->good_CRC_th = IWL_GOOD_CRC_TH_DISABLED;
816 } else if (priv->scan_bands & BIT(IEEE80211_BAND_5GHZ)) { 816 } else if (priv->scan_bands & BIT(IEEE80211_BAND_5GHZ)) {
817 band = IEEE80211_BAND_5GHZ; 817 band = IEEE80211_BAND_5GHZ;
818 rate = IWL_RATE_6M_PLCP; 818 rate = IWL_RATE_6M_PLCP;
819 /* 819 /*
820 * If active scaning is requested but a certain channel 820 * If active scanning is requested but a certain channel is
821 * is marked passive, we can do active scanning if we 821 * marked passive, we can do active scanning if we detect
822 * detect transmissions. 822 * transmissions.
823 *
824 * There is an issue with some firmware versions that triggers
825 * a sysassert on a "good CRC threshold" of zero (== disabled),
826 * on a radar channel even though this means that we should NOT
827 * send probes.
828 *
829 * The "good CRC threshold" is the number of frames that we
830 * need to receive during our dwell time on a channel before
831 * sending out probes -- setting this to a huge value will
832 * mean we never reach it, but at the same time work around
833 * the aforementioned issue. Thus use IWL_GOOD_CRC_TH_NEVER
834 * here instead of IWL_GOOD_CRC_TH_DISABLED.
823 */ 835 */
824 scan->good_CRC_th = is_active ? IWL_GOOD_CRC_TH : 0; 836 scan->good_CRC_th = is_active ? IWL_GOOD_CRC_TH_DEFAULT :
837 IWL_GOOD_CRC_TH_NEVER;
825 838
826 /* Force use of chains B and C (0x6) for scan Rx for 4965 839 /* Force use of chains B and C (0x6) for scan Rx for 4965
827 * Avoid A (0x1) because of its off-channel reception on A-band. 840 * Avoid A (0x1) because of its off-channel reception on A-band.
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index e276f2a4e835..2f47d9332bfc 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2966,7 +2966,8 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
2966 * is marked passive, we can do active scanning if we 2966 * is marked passive, we can do active scanning if we
2967 * detect transmissions. 2967 * detect transmissions.
2968 */ 2968 */
2969 scan->good_CRC_th = is_active ? IWL_GOOD_CRC_TH : 0; 2969 scan->good_CRC_th = is_active ? IWL_GOOD_CRC_TH_DEFAULT :
2970 IWL_GOOD_CRC_TH_DISABLED;
2970 band = IEEE80211_BAND_5GHZ; 2971 band = IEEE80211_BAND_5GHZ;
2971 } else { 2972 } else {
2972 IWL_WARN(priv, "Invalid scan band count\n"); 2973 IWL_WARN(priv, "Invalid scan band count\n");