diff options
author | Winkler, Tomas <tomas.winkler@intel.com> | 2009-01-23 16:45:21 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 16:01:38 -0500 |
commit | 0d21044effa10044930419c6f837f75191229c3a (patch) | |
tree | c5d460adc539f02356bae2df36be1d5f00ec47ca /drivers | |
parent | 17f841cd6cb0837ba0599ad18a746c30ddd83e08 (diff) |
iwlwifi: fix probe mask for 39 scan API
This pach make use of 39 own scan probe mask
the variables or of different types
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-commands.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index 7571110f5f15..e49415c7fb2a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h | |||
@@ -2432,6 +2432,9 @@ struct iwl3945_scan_channel { | |||
2432 | __le16 passive_dwell; /* in 1024-uSec TU (time units), typ 20-500 */ | 2432 | __le16 passive_dwell; /* in 1024-uSec TU (time units), typ 20-500 */ |
2433 | } __attribute__ ((packed)); | 2433 | } __attribute__ ((packed)); |
2434 | 2434 | ||
2435 | /* set number of direct probes u8 type */ | ||
2436 | #define IWL39_SCAN_PROBE_MASK(n) ((BIT(n) | (BIT(n) - BIT(1)))) | ||
2437 | |||
2435 | struct iwl_scan_channel { | 2438 | struct iwl_scan_channel { |
2436 | /* | 2439 | /* |
2437 | * type is defined as: | 2440 | * type is defined as: |
@@ -2448,6 +2451,9 @@ struct iwl_scan_channel { | |||
2448 | __le16 passive_dwell; /* in 1024-uSec TU (time units), typ 20-500 */ | 2451 | __le16 passive_dwell; /* in 1024-uSec TU (time units), typ 20-500 */ |
2449 | } __attribute__ ((packed)); | 2452 | } __attribute__ ((packed)); |
2450 | 2453 | ||
2454 | /* set number of direct probes __le32 type */ | ||
2455 | #define IWL_SCAN_PROBE_MASK(n) cpu_to_le32((BIT(n) | (BIT(n) - BIT(1)))) | ||
2456 | |||
2451 | /** | 2457 | /** |
2452 | * struct iwl_ssid_ie - directed scan network information element | 2458 | * struct iwl_ssid_ie - directed scan network information element |
2453 | * | 2459 | * |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index c8e1dad6fb54..3c6a4b0c2c3b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -346,7 +346,6 @@ int iwl_send_scan_abort(struct iwl_priv *priv); | |||
346 | #define IWL_ACTIVE_QUIET_TIME __constant_cpu_to_le16(10) /* msec */ | 346 | #define IWL_ACTIVE_QUIET_TIME __constant_cpu_to_le16(10) /* msec */ |
347 | #define IWL_PLCP_QUIET_THRESH __constant_cpu_to_le16(1) /* packets */ | 347 | #define IWL_PLCP_QUIET_THRESH __constant_cpu_to_le16(1) /* packets */ |
348 | 348 | ||
349 | #define IWL_SCAN_PROBE_MASK(n) cpu_to_le32((BIT(n) | (BIT(n) - BIT(1)))) | ||
350 | 349 | ||
351 | /******************************************************************************* | 350 | /******************************************************************************* |
352 | * Calibrations - implemented in iwl-calib.c | 351 | * Calibrations - implemented in iwl-calib.c |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index d09325591de0..25a350810a10 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -3267,12 +3267,12 @@ static int iwl3945_get_channels_for_scan(struct iwl_priv *priv, | |||
3267 | * hearing clear Rx packet).*/ | 3267 | * hearing clear Rx packet).*/ |
3268 | if (IWL_UCODE_API(priv->ucode_ver) >= 2) { | 3268 | if (IWL_UCODE_API(priv->ucode_ver) >= 2) { |
3269 | if (n_probes) | 3269 | if (n_probes) |
3270 | scan_ch->type |= IWL_SCAN_PROBE_MASK(n_probes); | 3270 | scan_ch->type |= IWL39_SCAN_PROBE_MASK(n_probes); |
3271 | } else { | 3271 | } else { |
3272 | /* uCode v1 does not allow setting direct probe bits on | 3272 | /* uCode v1 does not allow setting direct probe bits on |
3273 | * passive channel. */ | 3273 | * passive channel. */ |
3274 | if ((scan_ch->type & 1) && n_probes) | 3274 | if ((scan_ch->type & 1) && n_probes) |
3275 | scan_ch->type |= IWL_SCAN_PROBE_MASK(n_probes); | 3275 | scan_ch->type |= IWL39_SCAN_PROBE_MASK(n_probes); |
3276 | } | 3276 | } |
3277 | 3277 | ||
3278 | /* Set txpower levels to defaults */ | 3278 | /* Set txpower levels to defaults */ |