diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-12-02 11:19:18 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-12-02 14:53:17 -0500 |
commit | 34a5b4b6af104cf18eb50748509528b9bdbc4036 (patch) | |
tree | 4f3e35734e32ea279a1fdb9fe777fa40357bfbfc /drivers/net | |
parent | 274b89ca3b006926cb9b45d78ab5906f4c0fc0aa (diff) |
iwlwifi: do not re-configure HT40 after associated
The ht40 setting should not change after association unless channel switch
This fix a problem we are seeing which cause uCode assert because driver
sending invalid information and make uCode confuse
Here is the firmware assert message:
kernel: iwlagn 0000:03:00.0: Microcode SW error detected. Restarting 0x82000000.
kernel: iwlagn 0000:03:00.0: Loaded firmware version: 17.168.5.3 build 42301
kernel: iwlagn 0000:03:00.0: Start IWL Error Log Dump:
kernel: iwlagn 0000:03:00.0: Status: 0x000512E4, count: 6
kernel: iwlagn 0000:03:00.0: 0x00002078 | ADVANCED_SYSASSERT
kernel: iwlagn 0000:03:00.0: 0x00009514 | uPc
kernel: iwlagn 0000:03:00.0: 0x00009496 | branchlink1
kernel: iwlagn 0000:03:00.0: 0x00009496 | branchlink2
kernel: iwlagn 0000:03:00.0: 0x0000D1F2 | interruptlink1
kernel: iwlagn 0000:03:00.0: 0x00000000 | interruptlink2
kernel: iwlagn 0000:03:00.0: 0x01008035 | data1
kernel: iwlagn 0000:03:00.0: 0x0000C90F | data2
kernel: iwlagn 0000:03:00.0: 0x000005A7 | line
kernel: iwlagn 0000:03:00.0: 0x5080B520 | beacon time
kernel: iwlagn 0000:03:00.0: 0xCC515AE0 | tsf low
kernel: iwlagn 0000:03:00.0: 0x00000003 | tsf hi
kernel: iwlagn 0000:03:00.0: 0x00000000 | time gp1
kernel: iwlagn 0000:03:00.0: 0x29703BF0 | time gp2
kernel: iwlagn 0000:03:00.0: 0x00000000 | time gp3
kernel: iwlagn 0000:03:00.0: 0x000111A8 | uCode version
kernel: iwlagn 0000:03:00.0: 0x000000B0 | hw version
kernel: iwlagn 0000:03:00.0: 0x00480303 | board version
kernel: iwlagn 0000:03:00.0: 0x09E8004E | hcmd
kernel: iwlagn 0000:03:00.0: CSR values:
kernel: iwlagn 0000:03:00.0: (2nd byte of CSR_INT_COALESCING is CSR_INT_PERIODIC_REG)
kernel: iwlagn 0000:03:00.0: CSR_HW_IF_CONFIG_REG: 0X00480303
kernel: iwlagn 0000:03:00.0: CSR_INT_COALESCING: 0X0000ff40
kernel: iwlagn 0000:03:00.0: CSR_INT: 0X00000000
kernel: iwlagn 0000:03:00.0: CSR_INT_MASK: 0X00000000
kernel: iwlagn 0000:03:00.0: CSR_FH_INT_STATUS: 0X00000000
kernel: iwlagn 0000:03:00.0: CSR_GPIO_IN: 0X00000030
kernel: iwlagn 0000:03:00.0: CSR_RESET: 0X00000000
kernel: iwlagn 0000:03:00.0: CSR_GP_CNTRL: 0X080403c5
kernel: iwlagn 0000:03:00.0: CSR_HW_REV: 0X000000b0
kernel: iwlagn 0000:03:00.0: CSR_EEPROM_REG: 0X07d60ffd
kernel: iwlagn 0000:03:00.0: CSR_EEPROM_GP: 0X90000001
kernel: iwlagn 0000:03:00.0: CSR_OTP_GP_REG: 0X00030001
kernel: iwlagn 0000:03:00.0: CSR_GIO_REG: 0X00080044
kernel: iwlagn 0000:03:00.0: CSR_GP_UCODE_REG: 0X000093bb
kernel: iwlagn 0000:03:00.0: CSR_GP_DRIVER_REG: 0X00000000
kernel: iwlagn 0000:03:00.0: CSR_UCODE_DRV_GP1: 0X00000000
kernel: iwlagn 0000:03:00.0: CSR_UCODE_DRV_GP2: 0X00000000
kernel: iwlagn 0000:03:00.0: CSR_LED_REG: 0X00000078
kernel: iwlagn 0000:03:00.0: CSR_DRAM_INT_TBL_REG: 0X88214dd2
kernel: iwlagn 0000:03:00.0: CSR_GIO_CHICKEN_BITS: 0X27800200
kernel: iwlagn 0000:03:00.0: CSR_ANA_PLL_CFG: 0X00000000
kernel: iwlagn 0000:03:00.0: CSR_HW_REV_WA_REG: 0X0001001a
kernel: iwlagn 0000:03:00.0: CSR_DBG_HPET_MEM_REG: 0Xffff0010
kernel: iwlagn 0000:03:00.0: FH register values:
kernel: iwlagn 0000:03:00.0: FH_RSCSR_CHNL0_STTS_WPTR_REG: 0X21316d00
kernel: iwlagn 0000:03:00.0: FH_RSCSR_CHNL0_RBDCB_BASE_REG: 0X021479c0
kernel: iwlagn 0000:03:00.0: FH_RSCSR_CHNL0_WPTR: 0X00000060
kernel: iwlagn 0000:03:00.0: FH_MEM_RCSR_CHNL0_CONFIG_REG: 0X80819104
kernel: iwlagn 0000:03:00.0: FH_MEM_RSSR_SHARED_CTRL_REG: 0X000000fc
kernel: iwlagn 0000:03:00.0: FH_MEM_RSSR_RX_STATUS_REG: 0X07030000
kernel: iwlagn 0000:03:00.0: FH_MEM_RSSR_RX_ENABLE_ERR_IRQ2DRV: 0X00000000
kernel: iwlagn 0000:03:00.0: FH_TSSR_TX_STATUS_REG: 0X07ff0001
kernel: iwlagn 0000:03:00.0: FH_TSSR_TX_ERROR_REG: 0X00000000
kernel: iwlagn 0000:03:00.0: Start IWL Event Log Dump: display last 20 entries
kernel: ------------[ cut here ]------------
WARNING: at net/mac80211/util.c:1208 ieee80211_reconfig+0x1f1/0x407()
kernel: Hardware name: 4290W4H
kernel: Pid: 1896, comm: kworker/0:0 Not tainted 3.1.0 #2
kernel: Call Trace:
kernel: [<ffffffff81036558>] ? warn_slowpath_common+0x73/0x87
kernel: [<ffffffff813b8966>] ? ieee80211_reconfig+0x1f1/0x407
kernel: [<ffffffff8139e8dc>] ? ieee80211_recalc_smps_work+0x32/0x32
kernel: [<ffffffff8139e95a>] ? ieee80211_restart_work+0x7e/0x87
kernel: [<ffffffff810472fa>] ? process_one_work+0x1c8/0x2e3
kernel: [<ffffffff810480c9>] ? worker_thread+0x17a/0x23a
kernel: [<ffffffff81047f4f>] ? manage_workers.clone.18+0x15b/0x15b
kernel: [<ffffffff81047f4f>] ? manage_workers.clone.18+0x15b/0x15b
kernel: [<ffffffff8104ba97>] ? kthread+0x7a/0x82
kernel: [<ffffffff813d21b4>] ? kernel_thread_helper+0x4/0x10
kernel: [<ffffffff8104ba1d>] ? kthread_flush_work_fn+0x11/0x11
kernel: [<ffffffff813d21b0>] ? gs_change+0xb/0xb
Cc: <stable@kernel.org> 3.1+
Reported-by: Udo Steinberg <udo@hypervisor.org>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 36 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 18 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.h | 2 |
3 files changed, 28 insertions, 28 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index 58a381c01c89..a7a6def40d05 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | |||
@@ -528,6 +528,24 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
528 | return 0; | 528 | return 0; |
529 | } | 529 | } |
530 | 530 | ||
531 | void iwlagn_config_ht40(struct ieee80211_conf *conf, | ||
532 | struct iwl_rxon_context *ctx) | ||
533 | { | ||
534 | if (conf_is_ht40_minus(conf)) { | ||
535 | ctx->ht.extension_chan_offset = | ||
536 | IEEE80211_HT_PARAM_CHA_SEC_BELOW; | ||
537 | ctx->ht.is_40mhz = true; | ||
538 | } else if (conf_is_ht40_plus(conf)) { | ||
539 | ctx->ht.extension_chan_offset = | ||
540 | IEEE80211_HT_PARAM_CHA_SEC_ABOVE; | ||
541 | ctx->ht.is_40mhz = true; | ||
542 | } else { | ||
543 | ctx->ht.extension_chan_offset = | ||
544 | IEEE80211_HT_PARAM_CHA_SEC_NONE; | ||
545 | ctx->ht.is_40mhz = false; | ||
546 | } | ||
547 | } | ||
548 | |||
531 | int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed) | 549 | int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed) |
532 | { | 550 | { |
533 | struct iwl_priv *priv = hw->priv; | 551 | struct iwl_priv *priv = hw->priv; |
@@ -586,19 +604,11 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
586 | ctx->ht.enabled = conf_is_ht(conf); | 604 | ctx->ht.enabled = conf_is_ht(conf); |
587 | 605 | ||
588 | if (ctx->ht.enabled) { | 606 | if (ctx->ht.enabled) { |
589 | if (conf_is_ht40_minus(conf)) { | 607 | /* if HT40 is used, it should not change |
590 | ctx->ht.extension_chan_offset = | 608 | * after associated except channel switch */ |
591 | IEEE80211_HT_PARAM_CHA_SEC_BELOW; | 609 | if (iwl_is_associated_ctx(ctx) && |
592 | ctx->ht.is_40mhz = true; | 610 | !ctx->ht.is_40mhz) |
593 | } else if (conf_is_ht40_plus(conf)) { | 611 | iwlagn_config_ht40(conf, ctx); |
594 | ctx->ht.extension_chan_offset = | ||
595 | IEEE80211_HT_PARAM_CHA_SEC_ABOVE; | ||
596 | ctx->ht.is_40mhz = true; | ||
597 | } else { | ||
598 | ctx->ht.extension_chan_offset = | ||
599 | IEEE80211_HT_PARAM_CHA_SEC_NONE; | ||
600 | ctx->ht.is_40mhz = false; | ||
601 | } | ||
602 | } else | 612 | } else |
603 | ctx->ht.is_40mhz = false; | 613 | ctx->ht.is_40mhz = false; |
604 | 614 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 6094deab5106..f5564514868e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -2610,21 +2610,9 @@ static void iwlagn_mac_channel_switch(struct ieee80211_hw *hw, | |||
2610 | 2610 | ||
2611 | /* Configure HT40 channels */ | 2611 | /* Configure HT40 channels */ |
2612 | ctx->ht.enabled = conf_is_ht(conf); | 2612 | ctx->ht.enabled = conf_is_ht(conf); |
2613 | if (ctx->ht.enabled) { | 2613 | if (ctx->ht.enabled) |
2614 | if (conf_is_ht40_minus(conf)) { | 2614 | iwlagn_config_ht40(conf, ctx); |
2615 | ctx->ht.extension_chan_offset = | 2615 | else |
2616 | IEEE80211_HT_PARAM_CHA_SEC_BELOW; | ||
2617 | ctx->ht.is_40mhz = true; | ||
2618 | } else if (conf_is_ht40_plus(conf)) { | ||
2619 | ctx->ht.extension_chan_offset = | ||
2620 | IEEE80211_HT_PARAM_CHA_SEC_ABOVE; | ||
2621 | ctx->ht.is_40mhz = true; | ||
2622 | } else { | ||
2623 | ctx->ht.extension_chan_offset = | ||
2624 | IEEE80211_HT_PARAM_CHA_SEC_NONE; | ||
2625 | ctx->ht.is_40mhz = false; | ||
2626 | } | ||
2627 | } else | ||
2628 | ctx->ht.is_40mhz = false; | 2616 | ctx->ht.is_40mhz = false; |
2629 | 2617 | ||
2630 | if ((le16_to_cpu(ctx->staging.channel) != ch)) | 2618 | if ((le16_to_cpu(ctx->staging.channel) != ch)) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h index 5b936ec1a541..3856abaea507 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn.h | |||
@@ -86,6 +86,8 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw, | |||
86 | struct ieee80211_vif *vif, | 86 | struct ieee80211_vif *vif, |
87 | struct ieee80211_bss_conf *bss_conf, | 87 | struct ieee80211_bss_conf *bss_conf, |
88 | u32 changes); | 88 | u32 changes); |
89 | void iwlagn_config_ht40(struct ieee80211_conf *conf, | ||
90 | struct iwl_rxon_context *ctx); | ||
89 | 91 | ||
90 | /* uCode */ | 92 | /* uCode */ |
91 | int iwlagn_rx_calib_result(struct iwl_priv *priv, | 93 | int iwlagn_rx_calib_result(struct iwl_priv *priv, |