diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2012-02-22 08:10:38 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-27 20:06:34 +0100 |
commit | c0ac53fa5725aa9e571386d3e7249c1be50eca10 (patch) | |
tree | 77a2ac188d9a24b887ff41434d2a733631e68eb6 /drivers/net/wireless/ath/ath9k/gpio.c | |
parent | ath9k: Process BTCOEX interrupts using a helper (diff) | |
download | linux-c0ac53fa5725aa9e571386d3e7249c1be50eca10.tar.xz linux-c0ac53fa5725aa9e571386d3e7249c1be50eca10.zip |
ath9k: Calculate ampdu limit using a helper
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/gpio.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/gpio.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c index a24aa679c699..e870251cdd1b 100644 --- a/drivers/net/wireless/ath/ath9k/gpio.c +++ b/drivers/net/wireless/ath/ath9k/gpio.c @@ -318,6 +318,20 @@ void ath9k_btcoex_timer_pause(struct ath_softc *sc) btcoex->hw_timer_enabled = false; } +u16 ath9k_btcoex_aggr_limit(struct ath_softc *sc, u32 max_4ms_framelen) +{ + struct ath_mci_profile *mci = &sc->btcoex.mci; + u16 aggr_limit = 0; + + if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_MCI) && mci->aggr_limit) + aggr_limit = (max_4ms_framelen * mci->aggr_limit) >> 4; + else if (sc->sc_flags & SC_OP_BT_PRIORITY_DETECTED) + aggr_limit = min((max_4ms_framelen * 3) / 8, + (u32)ATH_AMPDU_LIMIT_MAX); + + return aggr_limit; +} + void ath9k_btcoex_handle_interrupt(struct ath_softc *sc, u32 status) { struct ath_hw *ah = sc->sc_ah; |