diff options
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 e19c74cada39..55be3ef5c755 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, | |||
572 | pos += elen; | 572 | pos += elen; |
573 | } | 573 | } |
574 | } | 574 | } |
575 | |||
576 | void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata) | ||
577 | { | ||
578 | struct ieee80211_local *local = sdata->local; | ||
579 | struct ieee80211_tx_queue_params qparam; | ||
580 | int i; | ||
581 | |||
582 | if (!local->ops->conf_tx) | ||
583 | return; | ||
584 | |||
585 | memset(&qparam, 0, sizeof(qparam)); | ||
586 | |||
587 | qparam.aifs = 2; | ||
588 | |||
589 | if (local->hw.conf.channel->band == IEEE80211_BAND_2GHZ && | ||
590 | !(sdata->flags & IEEE80211_SDATA_OPERATING_GMODE)) | ||
591 | qparam.cw_min = 31; | ||
592 | else | ||
593 | qparam.cw_min = 15; | ||
594 | |||
595 | qparam.cw_max = 1023; | ||
596 | qparam.txop = 0; | ||
597 | |||
598 | for (i = 0; i < local_to_hw(local)->queues; i++) | ||
599 | local->ops->conf_tx(local_to_hw(local), i, &qparam); | ||
600 | } | ||