Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340897
b: refs/heads/master
c: 78b1775
h: refs/heads/master
i:
  340895: a97d30e
v: v3
  • Loading branch information
Sujith Manoharan authored and John W. Linville committed Oct 19, 2012
1 parent 28ed3f6 commit 9fd95e1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 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: dfae714361ba75323914da19eb411aaae53d6af0
refs/heads/master: 78b1775ba03c2edcc8d765dd53a7e171b18e79ac
33 changes: 21 additions & 12 deletions trunk/drivers/net/wireless/ath/ath9k/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,25 @@ static void ath9k_gen_timer_stop(struct ath_hw *ah, struct ath_gen_timer *timer)
}
}

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

btcoex->bt_wait_time += btcoex->btcoex_period;
if (btcoex->bt_wait_time > ATH_BTCOEX_RX_WAIT_TIME) {
if (ar9003_mci_state(ah, MCI_STATE_NEED_FTP_STOMP) &&
(mci->num_pan || mci->num_other_acl))
ah->btcoex_hw.mci.stomp_ftp =
(sc->rx.num_pkts < ATH_BTCOEX_STOMP_FTP_THRESH);
else
ah->btcoex_hw.mci.stomp_ftp = false;
btcoex->bt_wait_time = 0;
sc->rx.num_pkts = 0;
}
}

/*
* This is the master bt coex timer which runs for every
* 45ms, bt traffic will be given priority during 55% of this
Expand All @@ -197,7 +216,6 @@ static void ath_btcoex_period_timer(unsigned long data)
struct ath_softc *sc = (struct ath_softc *) data;
struct ath_hw *ah = sc->sc_ah;
struct ath_btcoex *btcoex = &sc->btcoex;
struct ath_mci_profile *mci = &btcoex->mci;
u32 timer_period;
bool is_btscan;
unsigned long flags;
Expand All @@ -214,17 +232,8 @@ static void ath_btcoex_period_timer(unsigned long data)
ath_detect_bt_priority(sc);
is_btscan = test_bit(BT_OP_SCAN, &btcoex->op_flags);

btcoex->bt_wait_time += btcoex->btcoex_period;
if (btcoex->bt_wait_time > ATH_BTCOEX_RX_WAIT_TIME) {
if (ar9003_mci_state(ah, MCI_STATE_NEED_FTP_STOMP) &&
(mci->num_pan || mci->num_other_acl))
ah->btcoex_hw.mci.stomp_ftp =
(sc->rx.num_pkts < ATH_BTCOEX_STOMP_FTP_THRESH);
else
ah->btcoex_hw.mci.stomp_ftp = false;
btcoex->bt_wait_time = 0;
sc->rx.num_pkts = 0;
}
if (ah->caps.hw_caps & ATH9K_HW_CAP_MCI)
ath_mci_ftp_adjust(sc);

spin_lock_bh(&btcoex->btcoex_lock);

Expand Down

0 comments on commit 9fd95e1

Please sign in to comment.