diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-10 04:54:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-10 04:54:31 -0400 |
commit | 788c0a53164c05c5ccdb1472474372b72ba74644 (patch) | |
tree | 5f274102e3dc4bcca6cb3a695aa2c8228ad5fc4f /include/net | |
parent | e64bda89b8fe81cce9b4a20885d2c204c2d52532 (diff) | |
parent | 78cf07472f0ede8394bacc4bc02354505080cfe1 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Conflicts:
drivers/net/ps3_gelic_wireless.c
drivers/net/wireless/libertas/main.c
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/mac80211.h | 348 | ||||
-rw-r--r-- | include/net/wireless.h | 6 |
2 files changed, 183 insertions, 171 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 2f9853997992..1196de85f8db 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -201,102 +201,128 @@ struct ieee80211_bss_conf { | |||
201 | }; | 201 | }; |
202 | 202 | ||
203 | /** | 203 | /** |
204 | * enum mac80211_tx_control_flags - flags to describe Tx configuration for | 204 | * enum mac80211_tx_flags - flags to transmission information/status |
205 | * the Tx frame | 205 | * |
206 | * | 206 | * These flags are used with the @flags member of &ieee80211_tx_info |
207 | * These flags are used with the @flags member of &ieee80211_tx_control | 207 | * |
208 | * | 208 | * @IEEE80211_TX_CTL_REQ_TX_STATUS: request TX status callback for this frame. |
209 | * @IEEE80211_TXCTL_REQ_TX_STATUS: request TX status callback for this frame. | 209 | * @IEEE80211_TX_CTL_DO_NOT_ENCRYPT: send this frame without encryption; |
210 | * @IEEE80211_TXCTL_DO_NOT_ENCRYPT: send this frame without encryption; | 210 | * e.g., for EAPOL frame |
211 | * e.g., for EAPOL frame | 211 | * @IEEE80211_TX_CTL_USE_RTS_CTS: use RTS-CTS before sending frame |
212 | * @IEEE80211_TXCTL_USE_RTS_CTS: use RTS-CTS before sending frame | 212 | * @IEEE80211_TX_CTL_USE_CTS_PROTECT: use CTS protection for the frame (e.g., |
213 | * @IEEE80211_TXCTL_USE_CTS_PROTECT: use CTS protection for the frame (e.g., | 213 | * for combined 802.11g / 802.11b networks) |
214 | * for combined 802.11g / 802.11b networks) | 214 | * @IEEE80211_TX_CTL_NO_ACK: tell the low level not to wait for an ack |
215 | * @IEEE80211_TXCTL_NO_ACK: tell the low level not to wait for an ack | 215 | * @IEEE80211_TX_CTL_RATE_CTRL_PROBE |
216 | * @IEEE80211_TXCTL_RATE_CTRL_PROBE | 216 | * @IEEE80211_TX_CTL_CLEAR_PS_FILT: clear powersave filter for destination |
217 | * @EEE80211_TXCTL_CLEAR_PS_FILT: clear powersave filter | 217 | * station |
218 | * for destination station | 218 | * @IEEE80211_TX_CTL_REQUEUE: |
219 | * @IEEE80211_TXCTL_REQUEUE: | 219 | * @IEEE80211_TX_CTL_FIRST_FRAGMENT: this is a first fragment of the frame |
220 | * @IEEE80211_TXCTL_FIRST_FRAGMENT: this is a first fragment of the frame | 220 | * @IEEE80211_TX_CTL_LONG_RETRY_LIMIT: this frame should be send using the |
221 | * @IEEE80211_TXCTL_LONG_RETRY_LIMIT: this frame should be send using the | 221 | * through set_retry_limit configured long retry value |
222 | * through set_retry_limit configured long | 222 | * @IEEE80211_TX_CTL_EAPOL_FRAME: internal to mac80211 |
223 | * retry value | 223 | * @IEEE80211_TX_CTL_SEND_AFTER_DTIM: send this frame after DTIM beacon |
224 | * @IEEE80211_TXCTL_EAPOL_FRAME: internal to mac80211 | 224 | * @IEEE80211_TX_CTL_AMPDU: this frame should be sent as part of an A-MPDU |
225 | * @IEEE80211_TXCTL_SEND_AFTER_DTIM: send this frame after DTIM beacon | 225 | * @IEEE80211_TX_CTL_OFDM_HT: this frame can be sent in HT OFDM rates. number |
226 | * @IEEE80211_TXCTL_AMPDU: this frame should be sent as part of an A-MPDU | 226 | * of streams when this flag is on can be extracted from antenna_sel_tx, |
227 | * @IEEE80211_TXCTL_OFDM_HT: this frame can be sent in HT OFDM rates. number | 227 | * so if 1 antenna is marked use SISO, 2 antennas marked use MIMO, n |
228 | * of streams when this flag is on can be extracted | 228 | * antennas marked use MIMO_n. |
229 | * from antenna_sel_tx, so if 1 antenna is marked | 229 | * @IEEE80211_TX_CTL_GREEN_FIELD: use green field protection for this frame |
230 | * use SISO, 2 antennas marked use MIMO, n antennas | 230 | * @IEEE80211_TX_CTL_40_MHZ_WIDTH: send this frame using 40 Mhz channel width |
231 | * marked use MIMO_n. | 231 | * @IEEE80211_TX_CTL_DUP_DATA: duplicate data frame on both 20 Mhz channels |
232 | * @IEEE80211_TXCTL_GREEN_FIELD: use green field protection for this frame | 232 | * @IEEE80211_TX_CTL_SHORT_GI: send this frame using short guard interval |
233 | * @IEEE80211_TXCTL_40_MHZ_WIDTH: send this frame using 40 Mhz channel width | 233 | * @IEEE80211_TX_STAT_TX_FILTERED: The frame was not transmitted |
234 | * @IEEE80211_TXCTL_DUP_DATA: duplicate data frame on both 20 Mhz channels | 234 | * because the destination STA was in powersave mode. |
235 | * @IEEE80211_TXCTL_SHORT_GI: send this frame using short guard interval | 235 | * @IEEE80211_TX_STAT_ACK: Frame was acknowledged |
236 | * @IEEE80211_TX_STAT_AMPDU: The frame was aggregated, so status | ||
237 | * is for the whole aggregation. | ||
236 | */ | 238 | */ |
237 | enum mac80211_tx_control_flags { | 239 | enum mac80211_tx_control_flags { |
238 | IEEE80211_TXCTL_REQ_TX_STATUS = (1<<0), | 240 | IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), |
239 | IEEE80211_TXCTL_DO_NOT_ENCRYPT = (1<<1), | 241 | IEEE80211_TX_CTL_DO_NOT_ENCRYPT = BIT(1), |
240 | IEEE80211_TXCTL_USE_RTS_CTS = (1<<2), | 242 | IEEE80211_TX_CTL_USE_RTS_CTS = BIT(2), |
241 | IEEE80211_TXCTL_USE_CTS_PROTECT = (1<<3), | 243 | IEEE80211_TX_CTL_USE_CTS_PROTECT = BIT(3), |
242 | IEEE80211_TXCTL_NO_ACK = (1<<4), | 244 | IEEE80211_TX_CTL_NO_ACK = BIT(4), |
243 | IEEE80211_TXCTL_RATE_CTRL_PROBE = (1<<5), | 245 | IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(5), |
244 | IEEE80211_TXCTL_CLEAR_PS_FILT = (1<<6), | 246 | IEEE80211_TX_CTL_CLEAR_PS_FILT = BIT(6), |
245 | IEEE80211_TXCTL_REQUEUE = (1<<7), | 247 | IEEE80211_TX_CTL_REQUEUE = BIT(7), |
246 | IEEE80211_TXCTL_FIRST_FRAGMENT = (1<<8), | 248 | IEEE80211_TX_CTL_FIRST_FRAGMENT = BIT(8), |
247 | IEEE80211_TXCTL_SHORT_PREAMBLE = (1<<9), | 249 | IEEE80211_TX_CTL_SHORT_PREAMBLE = BIT(9), |
248 | IEEE80211_TXCTL_LONG_RETRY_LIMIT = (1<<10), | 250 | IEEE80211_TX_CTL_LONG_RETRY_LIMIT = BIT(10), |
249 | IEEE80211_TXCTL_EAPOL_FRAME = (1<<11), | 251 | IEEE80211_TX_CTL_EAPOL_FRAME = BIT(11), |
250 | IEEE80211_TXCTL_SEND_AFTER_DTIM = (1<<12), | 252 | IEEE80211_TX_CTL_SEND_AFTER_DTIM = BIT(12), |
251 | IEEE80211_TXCTL_AMPDU = (1<<13), | 253 | IEEE80211_TX_CTL_AMPDU = BIT(13), |
252 | IEEE80211_TXCTL_OFDM_HT = (1<<14), | 254 | IEEE80211_TX_CTL_OFDM_HT = BIT(14), |
253 | IEEE80211_TXCTL_GREEN_FIELD = (1<<15), | 255 | IEEE80211_TX_CTL_GREEN_FIELD = BIT(15), |
254 | IEEE80211_TXCTL_40_MHZ_WIDTH = (1<<16), | 256 | IEEE80211_TX_CTL_40_MHZ_WIDTH = BIT(16), |
255 | IEEE80211_TXCTL_DUP_DATA = (1<<17), | 257 | IEEE80211_TX_CTL_DUP_DATA = BIT(17), |
256 | IEEE80211_TXCTL_SHORT_GI = (1<<18), | 258 | IEEE80211_TX_CTL_SHORT_GI = BIT(18), |
259 | IEEE80211_TX_CTL_INJECTED = BIT(19), | ||
260 | IEEE80211_TX_STAT_TX_FILTERED = BIT(20), | ||
261 | IEEE80211_TX_STAT_ACK = BIT(21), | ||
262 | IEEE80211_TX_STAT_AMPDU = BIT(22), | ||
257 | }; | 263 | }; |
258 | 264 | ||
259 | /* Transmit control fields. This data structure is passed to low-level driver | 265 | |
260 | * with each TX frame. The low-level driver is responsible for configuring | 266 | #define IEEE80211_TX_INFO_DRIVER_DATA_SIZE \ |
261 | * the hardware to use given values (depending on what is supported). | 267 | (sizeof(((struct sk_buff *)0)->cb) - 8) |
268 | #define IEEE80211_TX_INFO_DRIVER_DATA_PTRS \ | ||
269 | (IEEE80211_TX_INFO_DRIVER_DATA_SIZE / sizeof(void *)) | ||
270 | |||
271 | /** | ||
272 | * struct ieee80211_tx_info - skb transmit information | ||
262 | * | 273 | * |
263 | * NOTE: Be careful with using the pointers outside of the ieee80211_ops->tx() | 274 | * This structure is placed in skb->cb for three uses: |
264 | * context (i.e. when defering the work to a workqueue). | 275 | * (1) mac80211 TX control - mac80211 tells the driver what to do |
265 | * The vif pointer is valid until the it has been removed with the | 276 | * (2) driver internal use (if applicable) |
266 | * ieee80211_ops->remove_interface() callback funtion. | 277 | * (3) TX status information - driver tells mac80211 what happened |
267 | * The hw_key pointer is valid until it has been removed with the | 278 | * |
268 | * ieee80211_ops->set_key() callback function. | 279 | * @flags: transmit info flags, defined above |
269 | * The tx_rate and alt_retry_rate pointers are valid until the phy is | 280 | * @retry_count: number of retries |
270 | * deregistered. | 281 | * @excessive_retries: set to 1 if the frame was retried many times |
282 | * but not acknowledged | ||
283 | * @ampdu_ack_len: number of aggregated frames. | ||
284 | * relevant only if IEEE80211_TX_STATUS_AMPDU was set. | ||
285 | * @ampdu_ack_map: block ack bit map for the aggregation. | ||
286 | * relevant only if IEEE80211_TX_STATUS_AMPDU was set. | ||
287 | * @ack_signal: signal strength of the ACK frame | ||
271 | */ | 288 | */ |
272 | struct ieee80211_tx_control { | 289 | struct ieee80211_tx_info { |
273 | struct ieee80211_vif *vif; | 290 | /* common information */ |
274 | struct ieee80211_rate *tx_rate; | 291 | u32 flags; |
275 | 292 | u8 band; | |
276 | /* Transmit rate for RTS/CTS frame */ | 293 | s8 tx_rate_idx; |
277 | struct ieee80211_rate *rts_cts_rate; | 294 | u8 antenna_sel_tx; |
278 | 295 | ||
279 | /* retry rate for the last retries */ | 296 | /* 1 byte hole */ |
280 | struct ieee80211_rate *alt_retry_rate; | 297 | |
281 | 298 | union { | |
282 | /* Key used for hardware encryption | 299 | struct { |
283 | * NULL if IEEE80211_TXCTL_DO_NOT_ENCRYPT is set */ | 300 | struct ieee80211_vif *vif; |
284 | struct ieee80211_key_conf *hw_key; | 301 | struct ieee80211_key_conf *hw_key; |
285 | 302 | unsigned long jiffies; | |
286 | u32 flags; /* tx control flags defined above */ | 303 | int ifindex; |
287 | u8 retry_limit; /* 1 = only first attempt, 2 = one retry, .. | 304 | u16 aid; |
288 | * This could be used when set_retry_limit | 305 | s8 rts_cts_rate_idx, alt_retry_rate_idx; |
289 | * is not implemented by the driver */ | 306 | u8 retry_limit; |
290 | u8 antenna_sel_tx; /* 0 = default/diversity, otherwise bit | 307 | u8 icv_len; |
291 | * position represents antenna number used */ | 308 | u8 iv_len; |
292 | u8 icv_len; /* length of the ICV/MIC field in octets */ | 309 | } control; |
293 | u8 iv_len; /* length of the IV field in octets */ | 310 | struct { |
294 | u16 queue; /* hardware queue to use for this frame; | 311 | u64 ampdu_ack_map; |
295 | * 0 = highest, hw->queues-1 = lowest */ | 312 | int ack_signal; |
296 | u16 aid; /* Station AID */ | 313 | u8 retry_count; |
297 | int type; /* internal */ | 314 | bool excessive_retries; |
315 | u8 ampdu_ack_len; | ||
316 | } status; | ||
317 | void *driver_data[IEEE80211_TX_INFO_DRIVER_DATA_PTRS]; | ||
318 | }; | ||
298 | }; | 319 | }; |
299 | 320 | ||
321 | static inline struct ieee80211_tx_info *IEEE80211_SKB_CB(struct sk_buff *skb) | ||
322 | { | ||
323 | return (struct ieee80211_tx_info *)skb->cb; | ||
324 | } | ||
325 | |||
300 | 326 | ||
301 | /** | 327 | /** |
302 | * enum mac80211_rx_flags - receive flags | 328 | * enum mac80211_rx_flags - receive flags |
@@ -363,52 +389,6 @@ struct ieee80211_rx_status { | |||
363 | }; | 389 | }; |
364 | 390 | ||
365 | /** | 391 | /** |
366 | * enum ieee80211_tx_status_flags - transmit status flags | ||
367 | * | ||
368 | * Status flags to indicate various transmit conditions. | ||
369 | * | ||
370 | * @IEEE80211_TX_STATUS_TX_FILTERED: The frame was not transmitted | ||
371 | * because the destination STA was in powersave mode. | ||
372 | * @IEEE80211_TX_STATUS_ACK: Frame was acknowledged | ||
373 | * @IEEE80211_TX_STATUS_AMPDU: The frame was aggregated, so status | ||
374 | * is for the whole aggregation. | ||
375 | */ | ||
376 | enum ieee80211_tx_status_flags { | ||
377 | IEEE80211_TX_STATUS_TX_FILTERED = 1<<0, | ||
378 | IEEE80211_TX_STATUS_ACK = 1<<1, | ||
379 | IEEE80211_TX_STATUS_AMPDU = 1<<2, | ||
380 | }; | ||
381 | |||
382 | /** | ||
383 | * struct ieee80211_tx_status - transmit status | ||
384 | * | ||
385 | * As much information as possible should be provided for each transmitted | ||
386 | * frame with ieee80211_tx_status(). | ||
387 | * | ||
388 | * @control: a copy of the &struct ieee80211_tx_control passed to the driver | ||
389 | * in the tx() callback. | ||
390 | * @flags: transmit status flags, defined above | ||
391 | * @retry_count: number of retries | ||
392 | * @excessive_retries: set to 1 if the frame was retried many times | ||
393 | * but not acknowledged | ||
394 | * @ampdu_ack_len: number of aggregated frames. | ||
395 | * relevant only if IEEE80211_TX_STATUS_AMPDU was set. | ||
396 | * @ampdu_ack_map: block ack bit map for the aggregation. | ||
397 | * relevant only if IEEE80211_TX_STATUS_AMPDU was set. | ||
398 | * @ack_signal: signal strength of the ACK frame either in dBm, dB or unspec | ||
399 | * depending on hardware capabilites flags @IEEE80211_HW_SIGNAL_* | ||
400 | */ | ||
401 | struct ieee80211_tx_status { | ||
402 | struct ieee80211_tx_control control; | ||
403 | u8 flags; | ||
404 | u8 retry_count; | ||
405 | bool excessive_retries; | ||
406 | u8 ampdu_ack_len; | ||
407 | u64 ampdu_ack_map; | ||
408 | int ack_signal; | ||
409 | }; | ||
410 | |||
411 | /** | ||
412 | * enum ieee80211_conf_flags - configuration flags | 392 | * enum ieee80211_conf_flags - configuration flags |
413 | * | 393 | * |
414 | * Flags to define PHY configuration options | 394 | * Flags to define PHY configuration options |
@@ -563,7 +543,6 @@ struct ieee80211_if_conf { | |||
563 | u8 *ssid; | 543 | u8 *ssid; |
564 | size_t ssid_len; | 544 | size_t ssid_len; |
565 | struct sk_buff *beacon; | 545 | struct sk_buff *beacon; |
566 | struct ieee80211_tx_control *beacon_control; | ||
567 | }; | 546 | }; |
568 | 547 | ||
569 | /** | 548 | /** |
@@ -823,6 +802,51 @@ static inline void SET_IEEE80211_PERM_ADDR(struct ieee80211_hw *hw, u8 *addr) | |||
823 | memcpy(hw->wiphy->perm_addr, addr, ETH_ALEN); | 802 | memcpy(hw->wiphy->perm_addr, addr, ETH_ALEN); |
824 | } | 803 | } |
825 | 804 | ||
805 | static inline int ieee80211_num_regular_queues(struct ieee80211_hw *hw) | ||
806 | { | ||
807 | #ifdef CONFIG_MAC80211_QOS | ||
808 | return hw->queues; | ||
809 | #else | ||
810 | return 1; | ||
811 | #endif | ||
812 | } | ||
813 | |||
814 | static inline int ieee80211_num_queues(struct ieee80211_hw *hw) | ||
815 | { | ||
816 | #ifdef CONFIG_MAC80211_QOS | ||
817 | return hw->queues + hw->ampdu_queues; | ||
818 | #else | ||
819 | return 1; | ||
820 | #endif | ||
821 | } | ||
822 | |||
823 | static inline struct ieee80211_rate * | ||
824 | ieee80211_get_tx_rate(const struct ieee80211_hw *hw, | ||
825 | const struct ieee80211_tx_info *c) | ||
826 | { | ||
827 | if (WARN_ON(c->tx_rate_idx < 0)) | ||
828 | return NULL; | ||
829 | return &hw->wiphy->bands[c->band]->bitrates[c->tx_rate_idx]; | ||
830 | } | ||
831 | |||
832 | static inline struct ieee80211_rate * | ||
833 | ieee80211_get_rts_cts_rate(const struct ieee80211_hw *hw, | ||
834 | const struct ieee80211_tx_info *c) | ||
835 | { | ||
836 | if (c->control.rts_cts_rate_idx < 0) | ||
837 | return NULL; | ||
838 | return &hw->wiphy->bands[c->band]->bitrates[c->control.rts_cts_rate_idx]; | ||
839 | } | ||
840 | |||
841 | static inline struct ieee80211_rate * | ||
842 | ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | ||
843 | const struct ieee80211_tx_info *c) | ||
844 | { | ||
845 | if (c->control.alt_retry_rate_idx < 0) | ||
846 | return NULL; | ||
847 | return &hw->wiphy->bands[c->band]->bitrates[c->control.alt_retry_rate_idx]; | ||
848 | } | ||
849 | |||
826 | /** | 850 | /** |
827 | * DOC: Hardware crypto acceleration | 851 | * DOC: Hardware crypto acceleration |
828 | * | 852 | * |
@@ -980,8 +1004,10 @@ enum ieee80211_ampdu_mlme_action { | |||
980 | * @tx: Handler that 802.11 module calls for each transmitted frame. | 1004 | * @tx: Handler that 802.11 module calls for each transmitted frame. |
981 | * skb contains the buffer starting from the IEEE 802.11 header. | 1005 | * skb contains the buffer starting from the IEEE 802.11 header. |
982 | * The low-level driver should send the frame out based on | 1006 | * The low-level driver should send the frame out based on |
983 | * configuration in the TX control data. Must be implemented and | 1007 | * configuration in the TX control data. This handler should, |
984 | * atomic. | 1008 | * preferably, never fail and stop queues appropriately, more |
1009 | * importantly, however, it must never fail for A-MPDU-queues. | ||
1010 | * Must be implemented and atomic. | ||
985 | * | 1011 | * |
986 | * @start: Called before the first netdevice attached to the hardware | 1012 | * @start: Called before the first netdevice attached to the hardware |
987 | * is enabled. This should turn on the hardware and must turn on | 1013 | * is enabled. This should turn on the hardware and must turn on |
@@ -1115,8 +1141,7 @@ enum ieee80211_ampdu_mlme_action { | |||
1115 | * that TX/RX_STOP can pass NULL for this parameter. | 1141 | * that TX/RX_STOP can pass NULL for this parameter. |
1116 | */ | 1142 | */ |
1117 | struct ieee80211_ops { | 1143 | struct ieee80211_ops { |
1118 | int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb, | 1144 | int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); |
1119 | struct ieee80211_tx_control *control); | ||
1120 | int (*start)(struct ieee80211_hw *hw); | 1145 | int (*start)(struct ieee80211_hw *hw); |
1121 | void (*stop)(struct ieee80211_hw *hw); | 1146 | void (*stop)(struct ieee80211_hw *hw); |
1122 | int (*add_interface)(struct ieee80211_hw *hw, | 1147 | int (*add_interface)(struct ieee80211_hw *hw, |
@@ -1160,8 +1185,7 @@ struct ieee80211_ops { | |||
1160 | u64 (*get_tsf)(struct ieee80211_hw *hw); | 1185 | u64 (*get_tsf)(struct ieee80211_hw *hw); |
1161 | void (*reset_tsf)(struct ieee80211_hw *hw); | 1186 | void (*reset_tsf)(struct ieee80211_hw *hw); |
1162 | int (*beacon_update)(struct ieee80211_hw *hw, | 1187 | int (*beacon_update)(struct ieee80211_hw *hw, |
1163 | struct sk_buff *skb, | 1188 | struct sk_buff *skb); |
1164 | struct ieee80211_tx_control *control); | ||
1165 | int (*tx_last_beacon)(struct ieee80211_hw *hw); | 1189 | int (*tx_last_beacon)(struct ieee80211_hw *hw); |
1166 | int (*ampdu_action)(struct ieee80211_hw *hw, | 1190 | int (*ampdu_action)(struct ieee80211_hw *hw, |
1167 | enum ieee80211_ampdu_mlme_action action, | 1191 | enum ieee80211_ampdu_mlme_action action, |
@@ -1357,13 +1381,9 @@ void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, | |||
1357 | * | 1381 | * |
1358 | * @hw: the hardware the frame was transmitted by | 1382 | * @hw: the hardware the frame was transmitted by |
1359 | * @skb: the frame that was transmitted, owned by mac80211 after this call | 1383 | * @skb: the frame that was transmitted, owned by mac80211 after this call |
1360 | * @status: status information for this frame; the status pointer need not | ||
1361 | * be valid after this function returns and is not freed by mac80211, | ||
1362 | * it is recommended that it points to a stack area | ||
1363 | */ | 1384 | */ |
1364 | void ieee80211_tx_status(struct ieee80211_hw *hw, | 1385 | void ieee80211_tx_status(struct ieee80211_hw *hw, |
1365 | struct sk_buff *skb, | 1386 | struct sk_buff *skb); |
1366 | struct ieee80211_tx_status *status); | ||
1367 | 1387 | ||
1368 | /** | 1388 | /** |
1369 | * ieee80211_tx_status_irqsafe - irq-safe transmit status callback | 1389 | * ieee80211_tx_status_irqsafe - irq-safe transmit status callback |
@@ -1376,13 +1396,9 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, | |||
1376 | * | 1396 | * |
1377 | * @hw: the hardware the frame was transmitted by | 1397 | * @hw: the hardware the frame was transmitted by |
1378 | * @skb: the frame that was transmitted, owned by mac80211 after this call | 1398 | * @skb: the frame that was transmitted, owned by mac80211 after this call |
1379 | * @status: status information for this frame; the status pointer need not | ||
1380 | * be valid after this function returns and is not freed by mac80211, | ||
1381 | * it is recommended that it points to a stack area | ||
1382 | */ | 1399 | */ |
1383 | void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, | 1400 | void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, |
1384 | struct sk_buff *skb, | 1401 | struct sk_buff *skb); |
1385 | struct ieee80211_tx_status *status); | ||
1386 | 1402 | ||
1387 | /** | 1403 | /** |
1388 | * ieee80211_beacon_get - beacon generation function | 1404 | * ieee80211_beacon_get - beacon generation function |
@@ -1398,8 +1414,7 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, | |||
1398 | * is responsible of freeing it. | 1414 | * is responsible of freeing it. |
1399 | */ | 1415 | */ |
1400 | struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, | 1416 | struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, |
1401 | struct ieee80211_vif *vif, | 1417 | struct ieee80211_vif *vif); |
1402 | struct ieee80211_tx_control *control); | ||
1403 | 1418 | ||
1404 | /** | 1419 | /** |
1405 | * ieee80211_rts_get - RTS frame generation function | 1420 | * ieee80211_rts_get - RTS frame generation function |
@@ -1407,7 +1422,7 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, | |||
1407 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 1422 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. |
1408 | * @frame: pointer to the frame that is going to be protected by the RTS. | 1423 | * @frame: pointer to the frame that is going to be protected by the RTS. |
1409 | * @frame_len: the frame length (in octets). | 1424 | * @frame_len: the frame length (in octets). |
1410 | * @frame_txctl: &struct ieee80211_tx_control of the frame. | 1425 | * @frame_txctl: &struct ieee80211_tx_info of the frame. |
1411 | * @rts: The buffer where to store the RTS frame. | 1426 | * @rts: The buffer where to store the RTS frame. |
1412 | * | 1427 | * |
1413 | * If the RTS frames are generated by the host system (i.e., not in | 1428 | * If the RTS frames are generated by the host system (i.e., not in |
@@ -1417,7 +1432,7 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, | |||
1417 | */ | 1432 | */ |
1418 | void ieee80211_rts_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 1433 | void ieee80211_rts_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
1419 | const void *frame, size_t frame_len, | 1434 | const void *frame, size_t frame_len, |
1420 | const struct ieee80211_tx_control *frame_txctl, | 1435 | const struct ieee80211_tx_info *frame_txctl, |
1421 | struct ieee80211_rts *rts); | 1436 | struct ieee80211_rts *rts); |
1422 | 1437 | ||
1423 | /** | 1438 | /** |
@@ -1425,7 +1440,7 @@ void ieee80211_rts_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
1425 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 1440 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
1426 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 1441 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. |
1427 | * @frame_len: the length of the frame that is going to be protected by the RTS. | 1442 | * @frame_len: the length of the frame that is going to be protected by the RTS. |
1428 | * @frame_txctl: &struct ieee80211_tx_control of the frame. | 1443 | * @frame_txctl: &struct ieee80211_tx_info of the frame. |
1429 | * | 1444 | * |
1430 | * If the RTS is generated in firmware, but the host system must provide | 1445 | * If the RTS is generated in firmware, but the host system must provide |
1431 | * the duration field, the low-level driver uses this function to receive | 1446 | * the duration field, the low-level driver uses this function to receive |
@@ -1433,7 +1448,7 @@ void ieee80211_rts_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
1433 | */ | 1448 | */ |
1434 | __le16 ieee80211_rts_duration(struct ieee80211_hw *hw, | 1449 | __le16 ieee80211_rts_duration(struct ieee80211_hw *hw, |
1435 | struct ieee80211_vif *vif, size_t frame_len, | 1450 | struct ieee80211_vif *vif, size_t frame_len, |
1436 | const struct ieee80211_tx_control *frame_txctl); | 1451 | const struct ieee80211_tx_info *frame_txctl); |
1437 | 1452 | ||
1438 | /** | 1453 | /** |
1439 | * ieee80211_ctstoself_get - CTS-to-self frame generation function | 1454 | * ieee80211_ctstoself_get - CTS-to-self frame generation function |
@@ -1441,7 +1456,7 @@ __le16 ieee80211_rts_duration(struct ieee80211_hw *hw, | |||
1441 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 1456 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. |
1442 | * @frame: pointer to the frame that is going to be protected by the CTS-to-self. | 1457 | * @frame: pointer to the frame that is going to be protected by the CTS-to-self. |
1443 | * @frame_len: the frame length (in octets). | 1458 | * @frame_len: the frame length (in octets). |
1444 | * @frame_txctl: &struct ieee80211_tx_control of the frame. | 1459 | * @frame_txctl: &struct ieee80211_tx_info of the frame. |
1445 | * @cts: The buffer where to store the CTS-to-self frame. | 1460 | * @cts: The buffer where to store the CTS-to-self frame. |
1446 | * | 1461 | * |
1447 | * If the CTS-to-self frames are generated by the host system (i.e., not in | 1462 | * If the CTS-to-self frames are generated by the host system (i.e., not in |
@@ -1452,7 +1467,7 @@ __le16 ieee80211_rts_duration(struct ieee80211_hw *hw, | |||
1452 | void ieee80211_ctstoself_get(struct ieee80211_hw *hw, | 1467 | void ieee80211_ctstoself_get(struct ieee80211_hw *hw, |
1453 | struct ieee80211_vif *vif, | 1468 | struct ieee80211_vif *vif, |
1454 | const void *frame, size_t frame_len, | 1469 | const void *frame, size_t frame_len, |
1455 | const struct ieee80211_tx_control *frame_txctl, | 1470 | const struct ieee80211_tx_info *frame_txctl, |
1456 | struct ieee80211_cts *cts); | 1471 | struct ieee80211_cts *cts); |
1457 | 1472 | ||
1458 | /** | 1473 | /** |
@@ -1460,7 +1475,7 @@ void ieee80211_ctstoself_get(struct ieee80211_hw *hw, | |||
1460 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 1475 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
1461 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 1476 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. |
1462 | * @frame_len: the length of the frame that is going to be protected by the CTS-to-self. | 1477 | * @frame_len: the length of the frame that is going to be protected by the CTS-to-self. |
1463 | * @frame_txctl: &struct ieee80211_tx_control of the frame. | 1478 | * @frame_txctl: &struct ieee80211_tx_info of the frame. |
1464 | * | 1479 | * |
1465 | * If the CTS-to-self is generated in firmware, but the host system must provide | 1480 | * If the CTS-to-self is generated in firmware, but the host system must provide |
1466 | * the duration field, the low-level driver uses this function to receive | 1481 | * the duration field, the low-level driver uses this function to receive |
@@ -1469,7 +1484,7 @@ void ieee80211_ctstoself_get(struct ieee80211_hw *hw, | |||
1469 | __le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw, | 1484 | __le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw, |
1470 | struct ieee80211_vif *vif, | 1485 | struct ieee80211_vif *vif, |
1471 | size_t frame_len, | 1486 | size_t frame_len, |
1472 | const struct ieee80211_tx_control *frame_txctl); | 1487 | const struct ieee80211_tx_info *frame_txctl); |
1473 | 1488 | ||
1474 | /** | 1489 | /** |
1475 | * ieee80211_generic_frame_duration - Calculate the duration field for a frame | 1490 | * ieee80211_generic_frame_duration - Calculate the duration field for a frame |
@@ -1508,8 +1523,7 @@ __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw, | |||
1508 | * use common code for all beacons. | 1523 | * use common code for all beacons. |
1509 | */ | 1524 | */ |
1510 | struct sk_buff * | 1525 | struct sk_buff * |
1511 | ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 1526 | ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif); |
1512 | struct ieee80211_tx_control *control); | ||
1513 | 1527 | ||
1514 | /** | 1528 | /** |
1515 | * ieee80211_get_hdrlen_from_skb - get header length from data | 1529 | * ieee80211_get_hdrlen_from_skb - get header length from data |
@@ -1567,14 +1581,6 @@ void ieee80211_wake_queue(struct ieee80211_hw *hw, int queue); | |||
1567 | void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue); | 1581 | void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue); |
1568 | 1582 | ||
1569 | /** | 1583 | /** |
1570 | * ieee80211_start_queues - start all queues | ||
1571 | * @hw: pointer to as obtained from ieee80211_alloc_hw(). | ||
1572 | * | ||
1573 | * Drivers should use this function instead of netif_start_queue. | ||
1574 | */ | ||
1575 | void ieee80211_start_queues(struct ieee80211_hw *hw); | ||
1576 | |||
1577 | /** | ||
1578 | * ieee80211_stop_queues - stop all queues | 1584 | * ieee80211_stop_queues - stop all queues |
1579 | * @hw: pointer as obtained from ieee80211_alloc_hw(). | 1585 | * @hw: pointer as obtained from ieee80211_alloc_hw(). |
1580 | * | 1586 | * |
diff --git a/include/net/wireless.h b/include/net/wireless.h index 667b4080d30f..9324f8dd183e 100644 --- a/include/net/wireless.h +++ b/include/net/wireless.h | |||
@@ -39,12 +39,18 @@ enum ieee80211_band { | |||
39 | * on this channel. | 39 | * on this channel. |
40 | * @IEEE80211_CHAN_NO_IBSS: IBSS is not allowed on this channel. | 40 | * @IEEE80211_CHAN_NO_IBSS: IBSS is not allowed on this channel. |
41 | * @IEEE80211_CHAN_RADAR: Radar detection is required on this channel. | 41 | * @IEEE80211_CHAN_RADAR: Radar detection is required on this channel. |
42 | * @IEEE80211_CHAN_NO_FAT_ABOVE: extension channel above this channel | ||
43 | * is not permitted. | ||
44 | * @IEEE80211_CHAN_NO_FAT_BELOW: extension channel below this channel | ||
45 | * is not permitted. | ||
42 | */ | 46 | */ |
43 | enum ieee80211_channel_flags { | 47 | enum ieee80211_channel_flags { |
44 | IEEE80211_CHAN_DISABLED = 1<<0, | 48 | IEEE80211_CHAN_DISABLED = 1<<0, |
45 | IEEE80211_CHAN_PASSIVE_SCAN = 1<<1, | 49 | IEEE80211_CHAN_PASSIVE_SCAN = 1<<1, |
46 | IEEE80211_CHAN_NO_IBSS = 1<<2, | 50 | IEEE80211_CHAN_NO_IBSS = 1<<2, |
47 | IEEE80211_CHAN_RADAR = 1<<3, | 51 | IEEE80211_CHAN_RADAR = 1<<3, |
52 | IEEE80211_CHAN_NO_FAT_ABOVE = 1<<4, | ||
53 | IEEE80211_CHAN_NO_FAT_BELOW = 1<<5, | ||
48 | }; | 54 | }; |
49 | 55 | ||
50 | /** | 56 | /** |