aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-02-10 10:49:38 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:37:07 -0500
commit3330d7be7008fa8e213648750fc13613eecc54bb (patch)
tree89f8ce89b984819144d6643e7c4a5e7e2d67e7cc /net
parentbb1eeff12d4cd6c706ef9fae340a9c93bb41ad05 (diff)
mac80211: give burst time in txop rather than 0.1msec units
This changes mac80211 to pass the burst time to conf_tx in txop units rather than 0.1msec units. 0.1msec units are only required by atheros hardware (according to current driver support), all other drivers do other calculations or require the txop value. Therefore, it results in fewer calculations and more precision if we just pass the txop value through to the driver. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/ieee80211_sta.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index a8251a23917b..11f2ee6b2269 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -297,12 +297,13 @@ static void ieee80211_sta_wmm_params(struct net_device *dev,
297 params.aifs = pos[0] & 0x0f; 297 params.aifs = pos[0] & 0x0f;
298 params.cw_max = ecw2cw((pos[1] & 0xf0) >> 4); 298 params.cw_max = ecw2cw((pos[1] & 0xf0) >> 4);
299 params.cw_min = ecw2cw(pos[1] & 0x0f); 299 params.cw_min = ecw2cw(pos[1] & 0x0f);
300 /* TXOP is in units of 32 usec; burst_time in 0.1 ms */ 300 params.txop = pos[2] | (pos[3] << 8);
301 params.burst_time = (pos[2] | (pos[3] << 8)) * 32 / 100; 301#ifdef CONFIG_MAC80211_DEBUG
302 printk(KERN_DEBUG "%s: WMM queue=%d aci=%d acm=%d aifs=%d " 302 printk(KERN_DEBUG "%s: WMM queue=%d aci=%d acm=%d aifs=%d "
303 "cWmin=%d cWmax=%d burst=%d\n", 303 "cWmin=%d cWmax=%d txop=%d\n",
304 dev->name, queue, aci, acm, params.aifs, params.cw_min, 304 dev->name, queue, aci, acm, params.aifs, params.cw_min,
305 params.cw_max, params.burst_time); 305 params.cw_max, params.txop);
306#endif
306 /* TODO: handle ACM (block TX, fallback to next lowest allowed 307 /* TODO: handle ACM (block TX, fallback to next lowest allowed
307 * AC for now) */ 308 * AC for now) */
308 if (local->ops->conf_tx(local_to_hw(local), queue, &params)) { 309 if (local->ops->conf_tx(local_to_hw(local), queue, &params)) {
@@ -3230,7 +3231,7 @@ int ieee80211_sta_set_ssid(struct net_device *dev, char *ssid, size_t len)
3230 qparam.cw_min = 15; 3231 qparam.cw_min = 15;
3231 3232
3232 qparam.cw_max = 1023; 3233 qparam.cw_max = 1023;
3233 qparam.burst_time = 0; 3234 qparam.txop = 0;
3234 3235
3235 for (i = IEEE80211_TX_QUEUE_DATA0; i < NUM_TX_DATA_QUEUES; i++) 3236 for (i = IEEE80211_TX_QUEUE_DATA0; i < NUM_TX_DATA_QUEUES; i++)
3236 local->ops->conf_tx(local_to_hw(local), 3237 local->ops->conf_tx(local_to_hw(local),