diff options
author | Rajkumar Manoharan <rmanohar@qca.qualcomm.com> | 2012-06-11 02:49:33 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-13 14:35:53 -0400 |
commit | 1bde95fa7ed84094d0606d9e79356a9dd8d0e01b (patch) | |
tree | ba9ccd0dbcf9e150ffc45dfef980fbcd054b5feb /drivers/net/wireless | |
parent | 3863495b86d8ee8e7e70a328de5b88d555d7305a (diff) |
ath9k_hw: fix incorrect LNA register settings
After a full reset, mci_reset will put LNA update to the setting
for 2G mode. Those registers need to be forced to update when
the channel is in 5G.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_mci.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_mci.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 2 |
3 files changed, 11 insertions, 17 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c index cbeff9c4b5d8..c11dbaa2f5b1 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c | |||
@@ -1013,38 +1013,32 @@ static void ar9003_mci_queue_unsent_gpm(struct ath_hw *ah, u8 header, | |||
1013 | } | 1013 | } |
1014 | } | 1014 | } |
1015 | 1015 | ||
1016 | void ar9003_mci_2g5g_switch(struct ath_hw *ah, bool wait_done) | 1016 | void ar9003_mci_2g5g_switch(struct ath_hw *ah, bool force) |
1017 | { | 1017 | { |
1018 | struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; | 1018 | struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; |
1019 | 1019 | ||
1020 | if (!mci->update_2g5g) | 1020 | if (!mci->update_2g5g && !force) |
1021 | return; | 1021 | return; |
1022 | 1022 | ||
1023 | if (mci->is_2g) { | 1023 | if (mci->is_2g) { |
1024 | ar9003_mci_send_2g5g_status(ah, true); | 1024 | ar9003_mci_send_2g5g_status(ah, true); |
1025 | ar9003_mci_send_lna_transfer(ah, true); | ||
1026 | udelay(5); | ||
1027 | 1025 | ||
1028 | REG_CLR_BIT(ah, AR_MCI_TX_CTRL, | 1026 | REG_SET_BIT(ah, AR_MCI_TX_CTRL, |
1029 | AR_MCI_TX_CTRL_DISABLE_LNA_UPDATE); | 1027 | AR_MCI_TX_CTRL_DISABLE_LNA_UPDATE); |
1030 | REG_CLR_BIT(ah, AR_PHY_GLB_CONTROL, | 1028 | REG_CLR_BIT(ah, AR_PHY_GLB_CONTROL, |
1031 | AR_BTCOEX_CTRL_BT_OWN_SPDT_CTRL); | 1029 | AR_BTCOEX_CTRL_BT_OWN_SPDT_CTRL); |
1032 | 1030 | ||
1033 | if (!(mci->config & ATH_MCI_CONFIG_DISABLE_OSLA)) | 1031 | if (!(mci->config & ATH_MCI_CONFIG_DISABLE_OSLA)) |
1034 | REG_SET_BIT(ah, AR_BTCOEX_CTRL, | 1032 | ar9003_mci_osla_setup(ah, true); |
1035 | AR_BTCOEX_CTRL_ONE_STEP_LOOK_AHEAD_EN); | ||
1036 | } else { | 1033 | } else { |
1037 | ar9003_mci_send_lna_take(ah, true); | ||
1038 | udelay(5); | ||
1039 | |||
1040 | REG_SET_BIT(ah, AR_MCI_TX_CTRL, | 1034 | REG_SET_BIT(ah, AR_MCI_TX_CTRL, |
1041 | AR_MCI_TX_CTRL_DISABLE_LNA_UPDATE); | 1035 | AR_MCI_TX_CTRL_DISABLE_LNA_UPDATE); |
1042 | REG_SET_BIT(ah, AR_PHY_GLB_CONTROL, | 1036 | REG_SET_BIT(ah, AR_PHY_GLB_CONTROL, |
1043 | AR_BTCOEX_CTRL_BT_OWN_SPDT_CTRL); | 1037 | AR_BTCOEX_CTRL_BT_OWN_SPDT_CTRL); |
1044 | REG_CLR_BIT(ah, AR_BTCOEX_CTRL, | ||
1045 | AR_BTCOEX_CTRL_ONE_STEP_LOOK_AHEAD_EN); | ||
1046 | 1038 | ||
1047 | ar9003_mci_send_2g5g_status(ah, true); | 1039 | ar9003_mci_osla_setup(ah, false); |
1040 | if (!force) | ||
1041 | ar9003_mci_send_2g5g_status(ah, true); | ||
1048 | } | 1042 | } |
1049 | } | 1043 | } |
1050 | 1044 | ||
@@ -1313,7 +1307,7 @@ u32 ar9003_mci_state(struct ath_hw *ah, u32 state_type, u32 *p_data) | |||
1313 | if (mci->unhalt_bt_gpm) | 1307 | if (mci->unhalt_bt_gpm) |
1314 | ar9003_mci_send_coex_halt_bt_gpm(ah, false, true); | 1308 | ar9003_mci_send_coex_halt_bt_gpm(ah, false, true); |
1315 | 1309 | ||
1316 | ar9003_mci_2g5g_switch(ah, true); | 1310 | ar9003_mci_2g5g_switch(ah, false); |
1317 | break; | 1311 | break; |
1318 | case MCI_STATE_SET_BT_CAL_START: | 1312 | case MCI_STATE_SET_BT_CAL_START: |
1319 | mci->bt_state = MCI_BT_CAL_START; | 1313 | mci->bt_state = MCI_BT_CAL_START; |
@@ -1394,7 +1388,7 @@ u32 ar9003_mci_state(struct ath_hw *ah, u32 state_type, u32 *p_data) | |||
1394 | mci->query_bt = true; | 1388 | mci->query_bt = true; |
1395 | mci->need_flush_btinfo = true; | 1389 | mci->need_flush_btinfo = true; |
1396 | ar9003_mci_send_coex_wlan_channels(ah, true); | 1390 | ar9003_mci_send_coex_wlan_channels(ah, true); |
1397 | ar9003_mci_2g5g_switch(ah, true); | 1391 | ar9003_mci_2g5g_switch(ah, false); |
1398 | break; | 1392 | break; |
1399 | case MCI_STATE_NEED_FTP_STOMP: | 1393 | case MCI_STATE_NEED_FTP_STOMP: |
1400 | value = !(mci->config & ATH_MCI_CONFIG_DISABLE_FTP_STOMP); | 1394 | value = !(mci->config & ATH_MCI_CONFIG_DISABLE_FTP_STOMP); |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.h b/drivers/net/wireless/ath/ath9k/ar9003_mci.h index 45624e1d3960..8cb33078f40a 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_mci.h +++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.h | |||
@@ -276,7 +276,7 @@ void ar9003_mci_stop_bt(struct ath_hw *ah, bool save_fullsleep); | |||
276 | void ar9003_mci_init_cal_req(struct ath_hw *ah, bool *is_reusable); | 276 | void ar9003_mci_init_cal_req(struct ath_hw *ah, bool *is_reusable); |
277 | void ar9003_mci_init_cal_done(struct ath_hw *ah); | 277 | void ar9003_mci_init_cal_done(struct ath_hw *ah); |
278 | void ar9003_mci_set_full_sleep(struct ath_hw *ah); | 278 | void ar9003_mci_set_full_sleep(struct ath_hw *ah); |
279 | void ar9003_mci_2g5g_switch(struct ath_hw *ah, bool wait_done); | 279 | void ar9003_mci_2g5g_switch(struct ath_hw *ah, bool force); |
280 | void ar9003_mci_check_bt(struct ath_hw *ah); | 280 | void ar9003_mci_check_bt(struct ath_hw *ah); |
281 | bool ar9003_mci_start_reset(struct ath_hw *ah, struct ath9k_channel *chan); | 281 | bool ar9003_mci_start_reset(struct ath_hw *ah, struct ath9k_channel *chan); |
282 | int ar9003_mci_end_reset(struct ath_hw *ah, struct ath9k_channel *chan, | 282 | int ar9003_mci_end_reset(struct ath_hw *ah, struct ath9k_channel *chan, |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 8412128b842a..a9d328c955e9 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -1711,7 +1711,7 @@ static int ath9k_hw_do_fastcc(struct ath_hw *ah, struct ath9k_channel *chan) | |||
1711 | ath9k_hw_start_nfcal(ah, true); | 1711 | ath9k_hw_start_nfcal(ah, true); |
1712 | 1712 | ||
1713 | if (ath9k_hw_mci_is_enabled(ah)) | 1713 | if (ath9k_hw_mci_is_enabled(ah)) |
1714 | ar9003_mci_2g5g_switch(ah, true); | 1714 | ar9003_mci_2g5g_switch(ah, false); |
1715 | 1715 | ||
1716 | if (AR_SREV_9271(ah)) | 1716 | if (AR_SREV_9271(ah)) |
1717 | ar9002_hw_load_ani_reg(ah, chan); | 1717 | ar9002_hw_load_ani_reg(ah, chan); |