Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341555
b: refs/heads/master
c: 2884561
h: refs/heads/master
i:
  341553: 887e7c3
  341551: 77a8e04
v: v3
  • Loading branch information
Rajkumar Manoharan authored and John W. Linville committed Nov 21, 2012
1 parent ae8d896 commit bb3ba6f
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b88083bfb37297330240a478bef76316ee3f1b9b
refs/heads/master: 2884561a6472d6f9c960ccf2250a72ca058167a1
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath9k/ath9k.h
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ struct ath_btcoex {
int rssi_count;
struct ath_gen_timer *no_stomp_timer; /* Timer for no BT stomping */
struct ath_mci_profile mci;
u8 stomp_audio;
};

#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath9k/btcoex.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ static const u32 mci_wlan_weights[ATH_BTCOEX_STOMP_MAX]
{ 0x01017d01, 0x3b3b3b01, 0x3b3b3b01, 0x3b3b3b3b }, /* STOMP_LOW */
{ 0x01017d01, 0x01010101, 0x01010101, 0x01010101 }, /* STOMP_NONE */
{ 0x01017d01, 0x013b0101, 0x3b3b0101, 0x3b3b013b }, /* STOMP_LOW_FTP */
{ 0xffffff01, 0xffffffff, 0xffffff01, 0xffffffff }, /* STOMP_AUDIO */
};

void ath9k_hw_init_btcoex_hw(struct ath_hw *ah, int qnum)
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath9k/btcoex.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ enum ath_stomp_type {
ATH_BTCOEX_STOMP_LOW,
ATH_BTCOEX_STOMP_NONE,
ATH_BTCOEX_STOMP_LOW_FTP,
ATH_BTCOEX_STOMP_AUDIO,
ATH_BTCOEX_STOMP_MAX
};

Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/net/wireless/ath/ath9k/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ static void ath_btcoex_period_timer(unsigned long data)
stomp_type = ATH_BTCOEX_STOMP_ALL;
timer_period = btcoex->btscan_no_stomp;
}
} else if (btcoex->stomp_audio >= 5) {
stomp_type = ATH_BTCOEX_STOMP_AUDIO;
btcoex->stomp_audio = 0;
}

ath9k_hw_btcoex_bt_stomp(ah, stomp_type);
Expand Down Expand Up @@ -295,7 +298,7 @@ static void ath_btcoex_no_stomp_timer(void *arg)
(!(ah->caps.hw_caps & ATH9K_HW_CAP_MCI) &&
test_bit(BT_OP_SCAN, &btcoex->op_flags)))
ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_NONE);
else if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_ALL)
else if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_ALL)
ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_LOW);

ath9k_hw_btcoex_enable(ah);
Expand Down
18 changes: 18 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,12 +729,30 @@ void ath9k_mci_set_txpower(struct ath_softc *sc, bool setchannel,
ath9k_hw_set_txpowerlimit(ah, sc->config.txpowlimit, false);
}

static void ath9k_mci_stomp_audio(struct ath_softc *sc)
{
struct ath_hw *ah = sc->sc_ah;
struct ath_btcoex *btcoex = &sc->btcoex;
struct ath_mci_profile *mci = &btcoex->mci;

if (!mci->num_sco && !mci->num_a2dp)
return;

if (ah->stats.avgbrssi > 25) {
btcoex->stomp_audio = 0;
return;
}

btcoex->stomp_audio++;
}
void ath9k_mci_update_rssi(struct ath_softc *sc)
{
struct ath_hw *ah = sc->sc_ah;
struct ath_btcoex *btcoex = &sc->btcoex;
struct ath9k_hw_mci *mci_hw = &sc->sc_ah->btcoex_hw.mci;

ath9k_mci_stomp_audio(sc);

if (!(mci_hw->config & ATH_MCI_CONFIG_CONCUR_TX))
return;

Expand Down

0 comments on commit bb3ba6f

Please sign in to comment.