ath9k: simplify/fix tx packet TID handling
authorFelix Fietkau <nbd@openwrt.org>
Thu, 19 Dec 2013 17:01:51 +0000 (18:01 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 19 Dec 2013 19:41:57 +0000 (14:41 -0500)
mac80211 guarantees that skb->priority is set to the TID, so use it
instead of trying to parse the QoS header manually.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/xmit.c

index 24846d91554b98f56fb07caed59a4ccfb5ff8684..475433288bbe4d2097d9bba9472a49c9bd6e5ee8 100644 (file)
@@ -174,14 +174,7 @@ static void ath_txq_skb_done(struct ath_softc *sc, struct ath_txq *txq,
 static struct ath_atx_tid *
 ath_get_skb_tid(struct ath_softc *sc, struct ath_node *an, struct sk_buff *skb)
 {
-       struct ieee80211_hdr *hdr;
-       u8 tidno = 0;
-
-       hdr = (struct ieee80211_hdr *) skb->data;
-       if (ieee80211_is_data_qos(hdr->frame_control))
-               tidno = ieee80211_get_qos_ctl(hdr)[0];
-
-       tidno &= IEEE80211_QOS_CTL_TID_MASK;
+       u8 tidno = skb->priority & IEEE80211_QOS_CTL_TID_MASK;
        return ATH_AN_2_TID(an, tidno);
 }