OSDN Git Service

Merge tag 'mac80211-next-for-davem-2015-02-03' of git://git.kernel.org/pub/scm/linux...
[uclinux-h8/linux.git] / net / wireless / util.c
index 919fee8..6903dbd 100644 (file)
@@ -352,6 +352,12 @@ unsigned int __attribute_const__ ieee80211_hdrlen(__le16 fc)
                goto out;
        }
 
+       if (ieee80211_is_mgmt(fc)) {
+               if (ieee80211_has_order(fc))
+                       hdrlen += IEEE80211_HT_CTL_LEN;
+               goto out;
+       }
+
        if (ieee80211_is_ctl(fc)) {
                /*
                 * ACK and CTS are 10 bytes, all others 16. To see how
@@ -752,8 +758,8 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb,
        if (skb->priority >= 256 && skb->priority <= 263)
                return skb->priority - 256;
 
-       if (vlan_tx_tag_present(skb)) {
-               vlan_priority = (vlan_tx_tag_get(skb) & VLAN_PRIO_MASK)
+       if (skb_vlan_tag_present(skb)) {
+               vlan_priority = (skb_vlan_tag_get(skb) & VLAN_PRIO_MASK)
                        >> VLAN_PRIO_SHIFT;
                if (vlan_priority > 0)
                        return vlan_priority;