diff options
author | Ron Rindjunsky <ron.rindjunsky@intel.com> | 2008-03-04 21:09:26 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-07 16:02:59 -0500 |
commit | 11f4b1cec98ad95abda80dc20bdc3cecac145d77 (patch) | |
tree | c3b3c81a1e41020f30614ea1bc7377a18938bab9 /include/net/mac80211.h | |
parent | 134eb5d327270c5d3816f8d812e68aa27a335ca8 (diff) |
mac80211: adding mac80211_tx_control_flags and HT flags
This patch makes enum from the defines previously dwelled inside
ieee80211_tx_control for better readability.
The patch also addes HT flags, for 802.11n drivers:
- IEEE80211_TXCTL_OFDM_HT: request low-level driver to use HT OFDM rates
- IEEE80211_TXCTL_GREEN_FIELD: use green field protection
- IEEE80211_TXCTL_DUP_DATA: duplicate data on both 20 Mhz channels
- IEEE80211_TXCTL_40_MHZ_WIDTH: send this frame in 40Mhz width
- IEEE80211_TXCTL_SHORT_GI: send this frame with short guard interval
Tx command can be a combination of any of these flags, along with
bitrate represented by ieee80211_rate. this will allow legacy drivers to
switch easily to any 11n rate representation.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
CC: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 86 |
1 files changed, 55 insertions, 31 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index d002b1c6e78e..cde1b4953534 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -205,6 +205,58 @@ struct ieee80211_bss_conf { | |||
205 | bool use_short_preamble; | 205 | bool use_short_preamble; |
206 | }; | 206 | }; |
207 | 207 | ||
208 | /** | ||
209 | * enum mac80211_tx_control_flags - flags to describe Tx configuration for | ||
210 | * the Tx frame | ||
211 | * | ||
212 | * These flags are used with the @flags member of &ieee80211_tx_control | ||
213 | * | ||
214 | * @IEEE80211_TXCTL_REQ_TX_STATUS: request TX status callback for this frame. | ||
215 | * @IEEE80211_TXCTL_DO_NOT_ENCRYPT: send this frame without encryption; | ||
216 | * e.g., for EAPOL frame | ||
217 | * @IEEE80211_TXCTL_USE_RTS_CTS: use RTS-CTS before sending frame | ||
218 | * @IEEE80211_TXCTL_USE_CTS_PROTECT: use CTS protection for the frame (e.g., | ||
219 | * for combined 802.11g / 802.11b networks) | ||
220 | * @IEEE80211_TXCTL_NO_ACK: tell the low level not to wait for an ack | ||
221 | * @IEEE80211_TXCTL_RATE_CTRL_PROBE | ||
222 | * @EEE80211_TXCTL_CLEAR_PS_FILT: clear powersave filter | ||
223 | * for destination station | ||
224 | * @IEEE80211_TXCTL_REQUEUE: | ||
225 | * @IEEE80211_TXCTL_FIRST_FRAGMENT: this is a first fragment of the frame | ||
226 | * @IEEE80211_TXCTL_LONG_RETRY_LIMIT: this frame should be send using the | ||
227 | * through set_retry_limit configured long | ||
228 | * retry value | ||
229 | * @IEEE80211_TXCTL_EAPOL_FRAME: internal to mac80211 | ||
230 | * @IEEE80211_TXCTL_SEND_AFTER_DTIM: send this frame after DTIM beacon | ||
231 | * @IEEE80211_TXCTL_AMPDU: this frame should be sent as part of an A-MPDU | ||
232 | * @IEEE80211_TXCTL_OFDM_HT: this frame can be sent in HT OFDM rates | ||
233 | * @IEEE80211_TXCTL_GREEN_FIELD: use green field protection for this frame | ||
234 | * @IEEE80211_TXCTL_40_MHZ_WIDTH: send this frame using 40 Mhz channel width | ||
235 | * @IEEE80211_TXCTL_DUP_DATA: duplicate data frame on both 20 Mhz channels | ||
236 | * @IEEE80211_TXCTL_SHORT_GI: send this frame using short guard interval | ||
237 | */ | ||
238 | enum mac80211_tx_control_flags { | ||
239 | IEEE80211_TXCTL_REQ_TX_STATUS = (1<<0), | ||
240 | IEEE80211_TXCTL_DO_NOT_ENCRYPT = (1<<1), | ||
241 | IEEE80211_TXCTL_USE_RTS_CTS = (1<<2), | ||
242 | IEEE80211_TXCTL_USE_CTS_PROTECT = (1<<3), | ||
243 | IEEE80211_TXCTL_NO_ACK = (1<<4), | ||
244 | IEEE80211_TXCTL_RATE_CTRL_PROBE = (1<<5), | ||
245 | IEEE80211_TXCTL_CLEAR_PS_FILT = (1<<6), | ||
246 | IEEE80211_TXCTL_REQUEUE = (1<<7), | ||
247 | IEEE80211_TXCTL_FIRST_FRAGMENT = (1<<8), | ||
248 | IEEE80211_TXCTL_SHORT_PREAMBLE = (1<<9), | ||
249 | IEEE80211_TXCTL_LONG_RETRY_LIMIT = (1<<10), | ||
250 | IEEE80211_TXCTL_EAPOL_FRAME = (1<<11), | ||
251 | IEEE80211_TXCTL_SEND_AFTER_DTIM = (1<<12), | ||
252 | IEEE80211_TXCTL_AMPDU = (1<<13), | ||
253 | IEEE80211_TXCTL_OFDM_HT = (1<<14), | ||
254 | IEEE80211_TXCTL_GREEN_FIELD = (1<<15), | ||
255 | IEEE80211_TXCTL_40_MHZ_WIDTH = (1<<16), | ||
256 | IEEE80211_TXCTL_DUP_DATA = (1<<17), | ||
257 | IEEE80211_TXCTL_SHORT_GI = (1<<18), | ||
258 | }; | ||
259 | |||
208 | /* Transmit control fields. This data structure is passed to low-level driver | 260 | /* Transmit control fields. This data structure is passed to low-level driver |
209 | * with each TX frame. The low-level driver is responsible for configuring | 261 | * with each TX frame. The low-level driver is responsible for configuring |
210 | * the hardware to use given values (depending on what is supported). */ | 262 | * the hardware to use given values (depending on what is supported). */ |
@@ -219,42 +271,14 @@ struct ieee80211_tx_control { | |||
219 | /* retry rate for the last retries */ | 271 | /* retry rate for the last retries */ |
220 | struct ieee80211_rate *alt_retry_rate; | 272 | struct ieee80211_rate *alt_retry_rate; |
221 | 273 | ||
222 | #define IEEE80211_TXCTL_REQ_TX_STATUS (1<<0)/* request TX status callback for | 274 | u32 flags; /* tx control flags defined above */ |
223 | * this frame */ | ||
224 | #define IEEE80211_TXCTL_DO_NOT_ENCRYPT (1<<1) /* send this frame without | ||
225 | * encryption; e.g., for EAPOL | ||
226 | * frames */ | ||
227 | #define IEEE80211_TXCTL_USE_RTS_CTS (1<<2) /* use RTS-CTS before sending | ||
228 | * frame */ | ||
229 | #define IEEE80211_TXCTL_USE_CTS_PROTECT (1<<3) /* use CTS protection for the | ||
230 | * frame (e.g., for combined | ||
231 | * 802.11g / 802.11b networks) */ | ||
232 | #define IEEE80211_TXCTL_NO_ACK (1<<4) /* tell the low level not to | ||
233 | * wait for an ack */ | ||
234 | #define IEEE80211_TXCTL_RATE_CTRL_PROBE (1<<5) | ||
235 | #define IEEE80211_TXCTL_CLEAR_PS_FILT (1<<6) /* clear powersave filter | ||
236 | * for destination station */ | ||
237 | #define IEEE80211_TXCTL_REQUEUE (1<<7) | ||
238 | #define IEEE80211_TXCTL_FIRST_FRAGMENT (1<<8) /* this is a first fragment of | ||
239 | * the frame */ | ||
240 | #define IEEE80211_TXCTL_SHORT_PREAMBLE (1<<9) | ||
241 | #define IEEE80211_TXCTL_LONG_RETRY_LIMIT (1<<10) /* this frame should be send | ||
242 | * using the through | ||
243 | * set_retry_limit configured | ||
244 | * long retry value */ | ||
245 | #define IEEE80211_TXCTL_EAPOL_FRAME (1<<11) /* internal to mac80211 */ | ||
246 | #define IEEE80211_TXCTL_SEND_AFTER_DTIM (1<<12) /* send this frame after DTIM | ||
247 | * beacon */ | ||
248 | #define IEEE80211_TXCTL_AMPDU (1<<13) /* this frame should be sent | ||
249 | * as part of an A-MPDU */ | ||
250 | u32 flags; /* tx control flags defined | ||
251 | * above */ | ||
252 | u8 key_idx; /* keyidx from hw->set_key(), undefined if | 275 | u8 key_idx; /* keyidx from hw->set_key(), undefined if |
253 | * IEEE80211_TXCTL_DO_NOT_ENCRYPT is set */ | 276 | * IEEE80211_TXCTL_DO_NOT_ENCRYPT is set */ |
254 | u8 retry_limit; /* 1 = only first attempt, 2 = one retry, .. | 277 | u8 retry_limit; /* 1 = only first attempt, 2 = one retry, .. |
255 | * This could be used when set_retry_limit | 278 | * This could be used when set_retry_limit |
256 | * is not implemented by the driver */ | 279 | * is not implemented by the driver */ |
257 | u8 antenna_sel_tx; /* 0 = default/diversity, 1 = Ant0, 2 = Ant1 */ | 280 | u8 antenna_sel_tx; /* 0 = default/diversity, otherwise bit |
281 | * position represents antenna number used */ | ||
258 | u8 icv_len; /* length of the ICV/MIC field in octets */ | 282 | u8 icv_len; /* length of the ICV/MIC field in octets */ |
259 | u8 iv_len; /* length of the IV field in octets */ | 283 | u8 iv_len; /* length of the IV field in octets */ |
260 | u8 queue; /* hardware queue to use for this frame; | 284 | u8 queue; /* hardware queue to use for this frame; |