aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2010-06-01 05:44:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-03 14:14:41 -0400
commit764580f577a46adce6ad6717a9b34aa8e3a09159 (patch)
tree445e3a863c4d3fe2e27df5578ab54a23e9155e4e /drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
parent21d5130b8cb8e19a3e69e704aa29d918624fce49 (diff)
ath9k_htc: Fix fair beacon distribution
This patch fixes beacon distribution in IBSS mode by configuring the hardware beacon queue properly. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/htc_drv_beacon.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_beacon.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
index c10c7d002eb7..12a3bb0a9159 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
@@ -222,6 +222,29 @@ void ath9k_htc_swba(struct ath9k_htc_priv *priv, u8 beacon_pending)
222 spin_unlock_bh(&priv->beacon_lock); 222 spin_unlock_bh(&priv->beacon_lock);
223} 223}
224 224
225/* Currently, only for IBSS */
226void ath9k_htc_beaconq_config(struct ath9k_htc_priv *priv)
227{
228 struct ath_hw *ah = priv->ah;
229 struct ath9k_tx_queue_info qi, qi_be;
230 int qnum = priv->hwq_map[ATH9K_WME_AC_BE];
231
232 memset(&qi, 0, sizeof(struct ath9k_tx_queue_info));
233 memset(&qi_be, 0, sizeof(struct ath9k_tx_queue_info));
234
235 ath9k_hw_get_txq_props(ah, qnum, &qi_be);
236
237 qi.tqi_aifs = qi_be.tqi_aifs;
238 qi.tqi_cwmin = 4*qi_be.tqi_cwmin;
239 qi.tqi_cwmax = qi_be.tqi_cwmax;
240
241 if (!ath9k_hw_set_txq_props(ah, priv->beaconq, &qi)) {
242 ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL,
243 "Unable to update beacon queue %u!\n", qnum);
244 } else {
245 ath9k_hw_resettxqueue(ah, priv->beaconq);
246 }
247}
225 248
226void ath9k_htc_beacon_config(struct ath9k_htc_priv *priv, 249void ath9k_htc_beacon_config(struct ath9k_htc_priv *priv,
227 struct ieee80211_vif *vif) 250 struct ieee80211_vif *vif)