diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-04-21 13:00:47 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-07 15:02:21 -0400 |
commit | e58c6aca99357d7f85f18e0b661d8c5a87f926a9 (patch) | |
tree | 8f7f5c3b78a1beae3121d8fbe95d21a21e361df9 /drivers/net/wireless/rt2x00/rt2x00queue.h | |
parent | 62e70cf8568151a41e8525ddf0e56c0380a71cfd (diff) |
rt2x00: Use rt2x00 queue numbering
Use the rt2x00 queue enumeration as much as possible,
removing the usage of the mac80211 queue numbering
wherever it is possible.
This makes it easier for mac80211 to change it queue
identification scheme without having to deal with
big changes in the rt2x00 code.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00queue.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.h | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h index 7027c9f47d3f..29fe26525550 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.h +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h | |||
@@ -54,6 +54,17 @@ | |||
54 | 54 | ||
55 | /** | 55 | /** |
56 | * enum data_queue_qid: Queue identification | 56 | * enum data_queue_qid: Queue identification |
57 | * | ||
58 | * @QID_AC_BE: AC BE queue | ||
59 | * @QID_AC_BK: AC BK queue | ||
60 | * @QID_AC_VI: AC VI queue | ||
61 | * @QID_AC_VO: AC VO queue | ||
62 | * @QID_HCCA: HCCA queue | ||
63 | * @QID_MGMT: MGMT queue (prio queue) | ||
64 | * @QID_RX: RX queue | ||
65 | * @QID_OTHER: None of the above (don't use, only present for completeness) | ||
66 | * @QID_BEACON: Beacon queue (value unspecified, don't send it to device) | ||
67 | * @QID_ATIM: Atim queue (value unspeficied, don't send it to device) | ||
57 | */ | 68 | */ |
58 | enum data_queue_qid { | 69 | enum data_queue_qid { |
59 | QID_AC_BE = 0, | 70 | QID_AC_BE = 0, |
@@ -64,22 +75,25 @@ enum data_queue_qid { | |||
64 | QID_MGMT = 13, | 75 | QID_MGMT = 13, |
65 | QID_RX = 14, | 76 | QID_RX = 14, |
66 | QID_OTHER = 15, | 77 | QID_OTHER = 15, |
78 | QID_BEACON, | ||
79 | QID_ATIM, | ||
67 | }; | 80 | }; |
68 | 81 | ||
69 | /** | 82 | /** |
70 | * enum rt2x00_bcn_queue: Beacon queue index | 83 | * mac80211_queue_to_qid - Convert mac80211 queue to rt2x00 qid |
71 | * | 84 | * @queue: mac80211 queue. |
72 | * Start counting with a high offset, this because this enumeration | ||
73 | * supplements &enum ieee80211_tx_queue and we should prevent value | ||
74 | * conflicts. | ||
75 | * | ||
76 | * @RT2X00_BCN_QUEUE_BEACON: Beacon queue | ||
77 | * @RT2X00_BCN_QUEUE_ATIM: Atim queue (sends frame after beacon) | ||
78 | */ | 85 | */ |
79 | enum rt2x00_bcn_queue { | 86 | static inline enum data_queue_qid mac80211_queue_to_qid(unsigned int queue) |
80 | RT2X00_BCN_QUEUE_BEACON = 100, | 87 | { |
81 | RT2X00_BCN_QUEUE_ATIM = 101, | 88 | /* Regular TX queues are mapped directly */ |
82 | }; | 89 | if (queue < NUM_TX_DATA_QUEUES) |
90 | return queue; | ||
91 | else if (queue == IEEE80211_TX_QUEUE_BEACON) | ||
92 | return QID_BEACON; | ||
93 | else if (queue == IEEE80211_TX_QUEUE_AFTER_BEACON) | ||
94 | return QID_ATIM; | ||
95 | return QID_OTHER; | ||
96 | } | ||
83 | 97 | ||
84 | /** | 98 | /** |
85 | * enum skb_frame_desc_flags: Flags for &struct skb_frame_desc | 99 | * enum skb_frame_desc_flags: Flags for &struct skb_frame_desc |
@@ -105,7 +119,6 @@ enum skb_frame_desc_flags { | |||
105 | * of the scope of the skb->data pointer. | 119 | * of the scope of the skb->data pointer. |
106 | * @data_len: Length of the frame data. | 120 | * @data_len: Length of the frame data. |
107 | * @desc_len: Length of the frame descriptor. | 121 | * @desc_len: Length of the frame descriptor. |
108 | |||
109 | * @entry: The entry to which this sk buffer belongs. | 122 | * @entry: The entry to which this sk buffer belongs. |
110 | */ | 123 | */ |
111 | struct skb_frame_desc { | 124 | struct skb_frame_desc { |
@@ -240,7 +253,6 @@ struct txentry_desc { | |||
240 | * encryption or decryption. The entry should only be touched after | 253 | * encryption or decryption. The entry should only be touched after |
241 | * the device has signaled it is done with it. | 254 | * the device has signaled it is done with it. |
242 | */ | 255 | */ |
243 | |||
244 | enum queue_entry_flags { | 256 | enum queue_entry_flags { |
245 | ENTRY_BCN_ASSIGNED, | 257 | ENTRY_BCN_ASSIGNED, |
246 | ENTRY_OWNER_DEVICE_DATA, | 258 | ENTRY_OWNER_DEVICE_DATA, |