]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/mac80211/util.c
mac80211: initialise queue QoS parameters at hw start
[linux-2.6-omap-h63xx.git] / net / mac80211 / util.c
index e19c74cada399e83d3d7e10821f31ecb4ce3af4a..55be3ef5c7556d2e8e02035fed19bcbf42618198 100644 (file)
@@ -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);
+}