]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
mac80211: fix struct ieee80211_tx_queue_params
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 10 Jul 2008 09:22:31 +0000 (11:22 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 14 Jul 2008 18:52:57 +0000 (14:52 -0400)
Multiple issues:
 - there are no "default" values needed
 - cw_min/cw_max can be larger than documented
 - restructure to decrease size
 - use get_unaligned_le16

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
include/net/mac80211.h
net/mac80211/mlme.c

index 1dbd49fc557ebf566f0b573ffd054b94f8e7ab4e..24a69f6075c2273471e0240ae45e4e9b12f3fcd5 100644 (file)
@@ -115,17 +115,17 @@ enum ieee80211_max_queues {
  * The information provided in this structure is required for QoS
  * transmit queue configuration. Cf. IEEE 802.11 7.3.2.29.
  *
- * @aifs: arbitration interface space [0..255, -1: use default]
- * @cw_min: minimum contention window [will be a value of the form
- *     2^n-1 in the range 1..1023; 0: use default]
+ * @aifs: arbitration interface space [0..255]
+ * @cw_min: minimum contention window [a value of the form
+ *     2^n-1 in the range 1..32767]
  * @cw_max: maximum contention window [like @cw_min]
  * @txop: maximum burst time in units of 32 usecs, 0 meaning disabled
  */
 struct ieee80211_tx_queue_params {
-       s16 aifs;
+       u16 txop;
        u16 cw_min;
        u16 cw_max;
-       u16 txop;
+       u8 aifs;
 };
 
 /**
index 61d7f81bf45efed42e4250dccb48002a79c57f02..a4bbc8d6d0e61c63896feac544c95564f1c00da9 100644 (file)
@@ -345,7 +345,7 @@ static void ieee80211_sta_wmm_params(struct net_device *dev,
                params.aifs = pos[0] & 0x0f;
                params.cw_max = ecw2cw((pos[1] & 0xf0) >> 4);
                params.cw_min = ecw2cw(pos[1] & 0x0f);
-               params.txop = pos[2] | (pos[3] << 8);
+               params.txop = get_unaligned_le16(pos + 2);
 #ifdef CONFIG_MAC80211_VERBOSE_DEBUG
                printk(KERN_DEBUG "%s: WMM queue=%d aci=%d acm=%d aifs=%d "
                       "cWmin=%d cWmax=%d txop=%d\n",