diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-09-09 12:56:01 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-09-11 15:53:39 -0400 |
commit | 5825fe100d654fff89aa67a1e202af1f8a7f0ad0 (patch) | |
tree | 09c9b6f7e1f51a34fcc5d5030d6339b642e41057 /net/mac80211/util.c | |
parent | 3110bef78cb4282c58245bc8fd6d95d9ccb19749 (diff) | |
download | op-kernel-dev-5825fe100d654fff89aa67a1e202af1f8a7f0ad0.zip op-kernel-dev-5825fe100d654fff89aa67a1e202af1f8a7f0ad0.tar.gz |
mac80211: initialise queue QoS parameters at hw start
When hardware is started it might be in a confused state with
respect to queue QoS parameters. This patch changes mac80211
to set sane defaults right after the hardware is brought up.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index e19c74c..55be3ef 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -572,3 +572,29 @@ void ieee802_11_parse_elems(u8 *start, size_t len, pos += elen; } } + +void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata) +{ + struct ieee80211_local *local = sdata->local; + struct ieee80211_tx_queue_params qparam; + int i; + + if (!local->ops->conf_tx) + return; + + memset(&qparam, 0, sizeof(qparam)); + + qparam.aifs = 2; + + if (local->hw.conf.channel->band == IEEE80211_BAND_2GHZ && + !(sdata->flags & IEEE80211_SDATA_OPERATING_GMODE)) + qparam.cw_min = 31; + else + qparam.cw_min = 15; + + qparam.cw_max = 1023; + qparam.txop = 0; + + for (i = 0; i < local_to_hw(local)->queues; i++) + local->ops->conf_tx(local_to_hw(local), i, &qparam); +} |