Skip to content

Commit

Permalink
ath9k_hw: fix LNA control on WLAN sleep
Browse files Browse the repository at this point in the history
When WLAN enter full sleep mode, WLAN HW should send out a LNA_TAKE
message for BT to take control of the shared LNA. Otherwise BT traffic
is completely stopped whenever the wlan interface is moved full sleep
mode.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Rajkumar Manoharan authored and John W. Linville committed Jun 20, 2012
1 parent 0967d86 commit 4ff6a9d
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions drivers/net/wireless/ath/ath9k/ar9003_mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,16 +1015,26 @@ void ar9003_mci_2g5g_switch(struct ath_hw *ah, bool force)
return;

if (mci->is_2g) {
ar9003_mci_send_2g5g_status(ah, true);
if (!force) {
ar9003_mci_send_2g5g_status(ah, true);

REG_SET_BIT(ah, AR_MCI_TX_CTRL,
ar9003_mci_send_lna_transfer(ah, true);
udelay(5);
}

REG_CLR_BIT(ah, AR_MCI_TX_CTRL,
AR_MCI_TX_CTRL_DISABLE_LNA_UPDATE);
REG_CLR_BIT(ah, AR_PHY_GLB_CONTROL,
AR_BTCOEX_CTRL_BT_OWN_SPDT_CTRL);

if (!(mci->config & ATH_MCI_CONFIG_DISABLE_OSLA))
ar9003_mci_osla_setup(ah, true);
} else {
if (!force) {
ar9003_mci_send_lna_take(ah, true);
udelay(5);
}

REG_SET_BIT(ah, AR_MCI_TX_CTRL,
AR_MCI_TX_CTRL_DISABLE_LNA_UPDATE);
REG_SET_BIT(ah, AR_PHY_GLB_CONTROL,
Expand Down Expand Up @@ -1251,6 +1261,9 @@ void ar9003_mci_bt_gain_ctrl(struct ath_hw *ah)

ath_dbg(common, MCI, "Give LNA and SPDT control to BT\n");

ar9003_mci_send_lna_take(ah, true);
udelay(50);

REG_SET_BIT(ah, AR_PHY_GLB_CONTROL, AR_BTCOEX_CTRL_BT_OWN_SPDT_CTRL);
mci->is_2g = false;
mci->update_2g5g = true;
Expand Down

0 comments on commit 4ff6a9d

Please sign in to comment.