diff options
Diffstat (limited to 'net/mac80211/wme.c')
-rw-r--r-- | net/mac80211/wme.c | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c index 7ab82b376e1b..0f11ccd30a36 100644 --- a/net/mac80211/wme.c +++ b/net/mac80211/wme.c | |||
@@ -18,70 +18,6 @@ | |||
18 | #include "ieee80211_i.h" | 18 | #include "ieee80211_i.h" |
19 | #include "wme.h" | 19 | #include "wme.h" |
20 | 20 | ||
21 | static inline int WLAN_FC_IS_QOS_DATA(u16 fc) | ||
22 | { | ||
23 | return (fc & 0x8C) == 0x88; | ||
24 | } | ||
25 | |||
26 | |||
27 | ieee80211_txrx_result | ||
28 | ieee80211_rx_h_parse_qos(struct ieee80211_txrx_data *rx) | ||
29 | { | ||
30 | u8 *data = rx->skb->data; | ||
31 | int tid; | ||
32 | |||
33 | /* does the frame have a qos control field? */ | ||
34 | if (WLAN_FC_IS_QOS_DATA(rx->fc)) { | ||
35 | u8 *qc = data + ieee80211_get_hdrlen(rx->fc) - QOS_CONTROL_LEN; | ||
36 | /* frame has qos control */ | ||
37 | tid = qc[0] & QOS_CONTROL_TID_MASK; | ||
38 | } else { | ||
39 | if (unlikely((rx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT)) { | ||
40 | /* Separate TID for management frames */ | ||
41 | tid = NUM_RX_DATA_QUEUES - 1; | ||
42 | } else { | ||
43 | /* no qos control present */ | ||
44 | tid = 0; /* 802.1d - Best Effort */ | ||
45 | } | ||
46 | } | ||
47 | #ifdef CONFIG_MAC80211_DEBUG_COUNTERS | ||
48 | I802_DEBUG_INC(rx->local->wme_rx_queue[tid]); | ||
49 | if (rx->sta) { | ||
50 | I802_DEBUG_INC(rx->sta->wme_rx_queue[tid]); | ||
51 | } | ||
52 | #endif /* CONFIG_MAC80211_DEBUG_COUNTERS */ | ||
53 | |||
54 | rx->u.rx.queue = tid; | ||
55 | /* Set skb->priority to 1d tag if highest order bit of TID is not set. | ||
56 | * For now, set skb->priority to 0 for other cases. */ | ||
57 | rx->skb->priority = (tid > 7) ? 0 : tid; | ||
58 | |||
59 | return TXRX_CONTINUE; | ||
60 | } | ||
61 | |||
62 | |||
63 | ieee80211_txrx_result | ||
64 | ieee80211_rx_h_remove_qos_control(struct ieee80211_txrx_data *rx) | ||
65 | { | ||
66 | u16 fc = rx->fc; | ||
67 | u8 *data = rx->skb->data; | ||
68 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) data; | ||
69 | |||
70 | if (!WLAN_FC_IS_QOS_DATA(fc)) | ||
71 | return TXRX_CONTINUE; | ||
72 | |||
73 | /* remove the qos control field, update frame type and meta-data */ | ||
74 | memmove(data + 2, data, ieee80211_get_hdrlen(fc) - 2); | ||
75 | hdr = (struct ieee80211_hdr *) skb_pull(rx->skb, 2); | ||
76 | /* change frame type to non QOS */ | ||
77 | rx->fc = fc &= ~IEEE80211_STYPE_QOS_DATA; | ||
78 | hdr->frame_control = cpu_to_le16(fc); | ||
79 | |||
80 | return TXRX_CONTINUE; | ||
81 | } | ||
82 | |||
83 | |||
84 | #ifdef CONFIG_NET_SCHED | ||
85 | /* maximum number of hardware queues we support. */ | 21 | /* maximum number of hardware queues we support. */ |
86 | #define TC_80211_MAX_QUEUES 8 | 22 | #define TC_80211_MAX_QUEUES 8 |
87 | 23 | ||
@@ -675,4 +611,3 @@ void ieee80211_wme_unregister(void) | |||
675 | { | 611 | { |
676 | unregister_qdisc(&wme_qdisc_ops); | 612 | unregister_qdisc(&wme_qdisc_ops); |
677 | } | 613 | } |
678 | #endif /* CONFIG_NET_SCHED */ | ||