aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965.c
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2009-05-22 14:01:49 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-05-22 14:06:05 -0400
commita2b0f02e4795bfde5f11720a10af8923cb98b654 (patch)
tree1d2cad3ff20f43ba51aace00a8c2c627fe013581 /drivers/net/wireless/iwlwifi/iwl-4965.c
parenta9c146b369cd8facbbbec7d8b31440f6eaa43e03 (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-4965.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 4be7bd29ef6d..7df41163ded2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -293,10 +293,12 @@ restart:
293 queue_work(priv->workqueue, &priv->restart); 293 queue_work(priv->workqueue, &priv->restart);
294} 294}
295 295
296static int is_fat_channel(__le32 rxon_flags) 296static bool is_fat_channel(__le32 rxon_flags)
297{ 297{
298 return (rxon_flags & RXON_FLG_CHANNEL_MODE_PURE_40_MSK) || 298 int chan_mod = le32_to_cpu(rxon_flags & RXON_FLG_CHANNEL_MODE_MSK)
299 (rxon_flags & RXON_FLG_CHANNEL_MODE_MIXED_MSK); 299 >> RXON_FLG_CHANNEL_MODE_POS;
300 return ((chan_mod == CHANNEL_MODE_PURE_40) ||
301 (chan_mod == CHANNEL_MODE_MIXED));
300} 302}
301 303
302/* 304/*
@@ -1490,7 +1492,7 @@ static int iwl4965_send_tx_power(struct iwl_priv *priv)
1490 struct iwl4965_txpowertable_cmd cmd = { 0 }; 1492 struct iwl4965_txpowertable_cmd cmd = { 0 };
1491 int ret; 1493 int ret;
1492 u8 band = 0; 1494 u8 band = 0;
1493 u8 is_fat = 0; 1495 bool is_fat = false;
1494 u8 ctrl_chan_high = 0; 1496 u8 ctrl_chan_high = 0;
1495 1497
1496 if (test_bit(STATUS_SCANNING, &priv->status)) { 1498 if (test_bit(STATUS_SCANNING, &priv->status)) {
@@ -1568,7 +1570,7 @@ static int iwl4965_hw_channel_switch(struct iwl_priv *priv, u16 channel)
1568{ 1570{
1569 int rc; 1571 int rc;
1570 u8 band = 0; 1572 u8 band = 0;
1571 u8 is_fat = 0; 1573 bool is_fat = false;
1572 u8 ctrl_chan_high = 0; 1574 u8 ctrl_chan_high = 0;
1573 struct iwl4965_channel_switch_cmd cmd = { 0 }; 1575 struct iwl4965_channel_switch_cmd cmd = { 0 };
1574 const struct iwl_channel_info *ch_info; 1576 const struct iwl_channel_info *ch_info;