aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2009-05-08 16:44:42 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-05-11 15:24:02 -0400
commitfff7a4346c07c30a39910c3b627434fc0e7ccc33 (patch)
tree4137c6073df104842bff3e7a0ce9ad6a7ad5e4fa /drivers/net
parent43121432e2d3a9018c40e820b1e44f3f180aa0d6 (diff)
iwlwifi: use #define instead of hard coded value
Instead of hard coded value, use the define in iwl-commands.h for better code maintenance Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c14
2 files changed, 12 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 112bfa50b8fa..597d9552fe4b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -960,10 +960,10 @@ void iwl_set_rxon_chain(struct iwl_priv *priv)
960 if (iwl_is_monitor_mode(priv) && 960 if (iwl_is_monitor_mode(priv) &&
961 !(priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK) && 961 !(priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK) &&
962 ((priv->hw_rev & CSR_HW_REV_TYPE_MSK) == CSR_HW_REV_TYPE_4965)) { 962 ((priv->hw_rev & CSR_HW_REV_TYPE_MSK) == CSR_HW_REV_TYPE_4965)) {
963 rx_chain = 0x07 << RXON_RX_CHAIN_VALID_POS; 963 rx_chain = ANT_ABC << RXON_RX_CHAIN_VALID_POS;
964 rx_chain |= 0x06 << RXON_RX_CHAIN_FORCE_SEL_POS; 964 rx_chain |= ANT_BC << RXON_RX_CHAIN_FORCE_SEL_POS;
965 rx_chain |= 0x07 << RXON_RX_CHAIN_FORCE_MIMO_SEL_POS; 965 rx_chain |= ANT_ABC << RXON_RX_CHAIN_FORCE_MIMO_SEL_POS;
966 rx_chain |= 0x01 << RXON_RX_CHAIN_DRIVER_FORCE_POS; 966 rx_chain |= 0x1 << RXON_RX_CHAIN_DRIVER_FORCE_POS;
967 } 967 }
968 968
969 priv->staging_rxon.rx_chain = cpu_to_le16(rx_chain); 969 priv->staging_rxon.rx_chain = cpu_to_le16(rx_chain);
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index dd8766b80b34..065214b55895 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -580,9 +580,10 @@ static void iwl_bg_request_scan(struct work_struct *data)
580 int ret = 0; 580 int ret = 0;
581 u32 rate_flags = 0; 581 u32 rate_flags = 0;
582 u16 cmd_len; 582 u16 cmd_len;
583 u16 rx_chain = 0;
583 enum ieee80211_band band; 584 enum ieee80211_band band;
584 u8 n_probes = 0; 585 u8 n_probes = 0;
585 u8 rx_chain = priv->hw_params.valid_rx_ant; 586 u8 rx_ant = priv->hw_params.valid_rx_ant;
586 u8 rate; 587 u8 rate;
587 bool is_active = false; 588 bool is_active = false;
588 589
@@ -723,7 +724,7 @@ static void iwl_bg_request_scan(struct work_struct *data)
723 * Avoid A (0x1) because of its off-channel reception on A-band. 724 * Avoid A (0x1) because of its off-channel reception on A-band.
724 */ 725 */
725 if ((priv->hw_rev & CSR_HW_REV_TYPE_MSK) == CSR_HW_REV_TYPE_4965) 726 if ((priv->hw_rev & CSR_HW_REV_TYPE_MSK) == CSR_HW_REV_TYPE_4965)
726 rx_chain = 0x6; 727 rx_ant = ANT_BC;
727 } else { 728 } else {
728 IWL_WARN(priv, "Invalid scan band count\n"); 729 IWL_WARN(priv, "Invalid scan band count\n");
729 goto done; 730 goto done;
@@ -735,10 +736,11 @@ static void iwl_bg_request_scan(struct work_struct *data)
735 scan->tx_cmd.rate_n_flags = iwl_hw_set_rate_n_flags(rate, rate_flags); 736 scan->tx_cmd.rate_n_flags = iwl_hw_set_rate_n_flags(rate, rate_flags);
736 737
737 /* MIMO is not used here, but value is required */ 738 /* MIMO is not used here, but value is required */
738 scan->rx_chain = RXON_RX_CHAIN_DRIVER_FORCE_MSK | 739 rx_chain |= ANT_ABC << RXON_RX_CHAIN_VALID_POS;
739 cpu_to_le16((0x7 << RXON_RX_CHAIN_VALID_POS) | 740 rx_chain |= ANT_ABC << RXON_RX_CHAIN_FORCE_MIMO_SEL_POS;
740 (rx_chain << RXON_RX_CHAIN_FORCE_SEL_POS) | 741 rx_chain |= rx_ant << RXON_RX_CHAIN_FORCE_SEL_POS;
741 (0x7 << RXON_RX_CHAIN_FORCE_MIMO_SEL_POS)); 742 rx_chain |= 0x1 << RXON_RX_CHAIN_DRIVER_FORCE_POS;
743 scan->rx_chain = cpu_to_le16(rx_chain);
742 cmd_len = iwl_fill_probe_req(priv, 744 cmd_len = iwl_fill_probe_req(priv,
743 (struct ieee80211_mgmt *)scan->data, 745 (struct ieee80211_mgmt *)scan->data,
744 priv->scan_request->ie, 746 priv->scan_request->ie,