diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2009-05-22 14:01:49 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-22 14:06:05 -0400 |
commit | a2b0f02e4795bfde5f11720a10af8923cb98b654 (patch) | |
tree | 1d2cad3ff20f43ba51aace00a8c2c627fe013581 /drivers/net/wireless/iwlwifi/iwl-scan.c | |
parent | a9c146b369cd8facbbbec7d8b31440f6eaa43e03 (diff) |
iwlwifi: support "pure 40MHz" in RXON command
Fix the bug when using 11n "pure 40MHz" mode cause uCode
crashing by adding support for "pure 40MHz" in RX_ON command flag.
the "mode" field (bits 25:26) has value of 0-3
0 = 20 MHz only
1 = 40MHz only
2 = Mixed
3 = Reserved
Control Channel ID (bit 22) is valid only in Mixed mode.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-scan.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index 065214b55895..f6d4af5c7509 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -586,6 +586,7 @@ static void iwl_bg_request_scan(struct work_struct *data) | |||
586 | u8 rx_ant = priv->hw_params.valid_rx_ant; | 586 | u8 rx_ant = priv->hw_params.valid_rx_ant; |
587 | u8 rate; | 587 | u8 rate; |
588 | bool is_active = false; | 588 | bool is_active = false; |
589 | int chan_mod; | ||
589 | 590 | ||
590 | conf = ieee80211_get_hw_conf(priv->hw); | 591 | conf = ieee80211_get_hw_conf(priv->hw); |
591 | 592 | ||
@@ -703,7 +704,9 @@ static void iwl_bg_request_scan(struct work_struct *data) | |||
703 | if (priv->scan_bands & BIT(IEEE80211_BAND_2GHZ)) { | 704 | if (priv->scan_bands & BIT(IEEE80211_BAND_2GHZ)) { |
704 | band = IEEE80211_BAND_2GHZ; | 705 | band = IEEE80211_BAND_2GHZ; |
705 | scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK; | 706 | scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK; |
706 | if (priv->active_rxon.flags & RXON_FLG_CHANNEL_MODE_PURE_40_MSK) { | 707 | chan_mod = le32_to_cpu(priv->active_rxon.flags & RXON_FLG_CHANNEL_MODE_MSK) |
708 | >> RXON_FLG_CHANNEL_MODE_POS; | ||
709 | if (chan_mod == CHANNEL_MODE_PURE_40) { | ||
707 | rate = IWL_RATE_6M_PLCP; | 710 | rate = IWL_RATE_6M_PLCP; |
708 | } else { | 711 | } else { |
709 | rate = IWL_RATE_1M_PLCP; | 712 | rate = IWL_RATE_1M_PLCP; |