diff options
author | Rajkumar Manoharan <rmanohar@qca.qualcomm.com> | 2012-06-12 00:43:54 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-13 14:35:57 -0400 |
commit | a197b76c230725962dc8e13102b24468e8621bfb (patch) | |
tree | fab4f7d3e6e15f109cda7c015deb243da3977f72 /drivers/net | |
parent | 3c7992e33ab8d0c625a45ded11cc10d5b622bcd4 (diff) |
ath9k: fix btcoex duty cycle
* Reset duty cycle before updating btcoex scheme. Otherwise duty cycle
reaches max limit and never be reduced again
* Adjust duty cycle with proper BDR profile value
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/mci.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/mci.c b/drivers/net/wireless/ath/ath9k/mci.c index e53df86dfce5..f0c8fa48d79e 100644 --- a/drivers/net/wireless/ath/ath9k/mci.c +++ b/drivers/net/wireless/ath/ath9k/mci.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include "ath9k.h" | 20 | #include "ath9k.h" |
21 | #include "mci.h" | 21 | #include "mci.h" |
22 | 22 | ||
23 | static const u8 ath_mci_duty_cycle[] = { 0, 50, 60, 70, 80, 85, 90, 95, 98 }; | 23 | static const u8 ath_mci_duty_cycle[] = { 55, 50, 60, 70, 80, 85, 90, 95, 98 }; |
24 | 24 | ||
25 | static struct ath_mci_profile_info* | 25 | static struct ath_mci_profile_info* |
26 | ath_mci_find_profile(struct ath_mci_profile *mci, | 26 | ath_mci_find_profile(struct ath_mci_profile *mci, |
@@ -120,6 +120,8 @@ static void ath_mci_update_scheme(struct ath_softc *sc) | |||
120 | if (mci_hw->config & ATH_MCI_CONFIG_DISABLE_TUNING) | 120 | if (mci_hw->config & ATH_MCI_CONFIG_DISABLE_TUNING) |
121 | goto skip_tuning; | 121 | goto skip_tuning; |
122 | 122 | ||
123 | btcoex->duty_cycle = ath_mci_duty_cycle[num_profile]; | ||
124 | |||
123 | if (num_profile == 1) { | 125 | if (num_profile == 1) { |
124 | info = list_first_entry(&mci->info, | 126 | info = list_first_entry(&mci->info, |
125 | struct ath_mci_profile_info, | 127 | struct ath_mci_profile_info, |
@@ -178,7 +180,7 @@ skip_tuning: | |||
178 | if (IS_CHAN_5GHZ(sc->sc_ah->curchan)) | 180 | if (IS_CHAN_5GHZ(sc->sc_ah->curchan)) |
179 | return; | 181 | return; |
180 | 182 | ||
181 | btcoex->duty_cycle += (mci->num_bdr ? ATH_MCI_MAX_DUTY_CYCLE : 0); | 183 | btcoex->duty_cycle += (mci->num_bdr ? ATH_MCI_BDR_DUTY_CYCLE : 0); |
182 | if (btcoex->duty_cycle > ATH_MCI_MAX_DUTY_CYCLE) | 184 | if (btcoex->duty_cycle > ATH_MCI_MAX_DUTY_CYCLE) |
183 | btcoex->duty_cycle = ATH_MCI_MAX_DUTY_CYCLE; | 185 | btcoex->duty_cycle = ATH_MCI_MAX_DUTY_CYCLE; |
184 | 186 | ||
@@ -247,14 +249,12 @@ static void ath_mci_process_profile(struct ath_softc *sc, | |||
247 | btcoex->btcoex_period = ATH_MCI_DEF_BT_PERIOD; | 249 | btcoex->btcoex_period = ATH_MCI_DEF_BT_PERIOD; |
248 | mci->aggr_limit = mci->num_sco ? 6 : 0; | 250 | mci->aggr_limit = mci->num_sco ? 6 : 0; |
249 | 251 | ||
250 | if (NUM_PROF(mci)) { | 252 | btcoex->duty_cycle = ath_mci_duty_cycle[NUM_PROF(mci)]; |
253 | if (NUM_PROF(mci)) | ||
251 | btcoex->bt_stomp_type = ATH_BTCOEX_STOMP_LOW; | 254 | btcoex->bt_stomp_type = ATH_BTCOEX_STOMP_LOW; |
252 | btcoex->duty_cycle = ath_mci_duty_cycle[NUM_PROF(mci)]; | 255 | else |
253 | } else { | ||
254 | btcoex->bt_stomp_type = mci->num_mgmt ? ATH_BTCOEX_STOMP_ALL : | 256 | btcoex->bt_stomp_type = mci->num_mgmt ? ATH_BTCOEX_STOMP_ALL : |
255 | ATH_BTCOEX_STOMP_LOW; | 257 | ATH_BTCOEX_STOMP_LOW; |
256 | btcoex->duty_cycle = ATH_BTCOEX_DEF_DUTY_CYCLE; | ||
257 | } | ||
258 | 258 | ||
259 | ieee80211_queue_work(sc->hw, &sc->mci_work); | 259 | ieee80211_queue_work(sc->hw, &sc->mci_work); |
260 | } | 260 | } |