aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h264
1 files changed, 140 insertions, 124 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 3b83a80e3fe0..c06104476973 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -19,7 +19,6 @@
19#include <linux/wireless.h> 19#include <linux/wireless.h>
20#include <linux/device.h> 20#include <linux/device.h>
21#include <linux/ieee80211.h> 21#include <linux/ieee80211.h>
22#include <net/wireless.h>
23#include <net/cfg80211.h> 22#include <net/cfg80211.h>
24 23
25/** 24/**
@@ -74,22 +73,6 @@
74 */ 73 */
75 74
76/** 75/**
77 * struct ieee80211_ht_bss_info - describing BSS's HT characteristics
78 *
79 * This structure describes most essential parameters needed
80 * to describe 802.11n HT characteristics in a BSS.
81 *
82 * @primary_channel: channel number of primery channel
83 * @bss_cap: 802.11n's general BSS capabilities (e.g. channel width)
84 * @bss_op_mode: 802.11n's BSS operation modes (e.g. HT protection)
85 */
86struct ieee80211_ht_bss_info {
87 u8 primary_channel;
88 u8 bss_cap; /* use IEEE80211_HT_IE_CHA_ */
89 u8 bss_op_mode; /* use IEEE80211_HT_IE_ */
90};
91
92/**
93 * enum ieee80211_max_queues - maximum number of queues 76 * enum ieee80211_max_queues - maximum number of queues
94 * 77 *
95 * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues. 78 * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues.
@@ -150,6 +133,13 @@ struct ieee80211_low_level_stats {
150 * @BSS_CHANGED_ERP_SLOT: slot timing changed 133 * @BSS_CHANGED_ERP_SLOT: slot timing changed
151 * @BSS_CHANGED_HT: 802.11n parameters changed 134 * @BSS_CHANGED_HT: 802.11n parameters changed
152 * @BSS_CHANGED_BASIC_RATES: Basic rateset changed 135 * @BSS_CHANGED_BASIC_RATES: Basic rateset changed
136 * @BSS_CHANGED_BEACON_INT: Beacon interval changed
137 * @BSS_CHANGED_BSSID: BSSID changed, for whatever
138 * reason (IBSS and managed mode)
139 * @BSS_CHANGED_BEACON: Beacon data changed, retrieve
140 * new beacon (beaconing modes)
141 * @BSS_CHANGED_BEACON_ENABLED: Beaconing should be
142 * enabled/disabled (beaconing modes)
153 */ 143 */
154enum ieee80211_bss_change { 144enum ieee80211_bss_change {
155 BSS_CHANGED_ASSOC = 1<<0, 145 BSS_CHANGED_ASSOC = 1<<0,
@@ -158,14 +148,10 @@ enum ieee80211_bss_change {
158 BSS_CHANGED_ERP_SLOT = 1<<3, 148 BSS_CHANGED_ERP_SLOT = 1<<3,
159 BSS_CHANGED_HT = 1<<4, 149 BSS_CHANGED_HT = 1<<4,
160 BSS_CHANGED_BASIC_RATES = 1<<5, 150 BSS_CHANGED_BASIC_RATES = 1<<5,
161}; 151 BSS_CHANGED_BEACON_INT = 1<<6,
162 152 BSS_CHANGED_BSSID = 1<<7,
163/** 153 BSS_CHANGED_BEACON = 1<<8,
164 * struct ieee80211_bss_ht_conf - BSS's changing HT configuration 154 BSS_CHANGED_BEACON_ENABLED = 1<<9,
165 * @operation_mode: HT operation mode (like in &struct ieee80211_ht_info)
166 */
167struct ieee80211_bss_ht_conf {
168 u16 operation_mode;
169}; 155};
170 156
171/** 157/**
@@ -187,12 +173,16 @@ struct ieee80211_bss_ht_conf {
187 * @timestamp: beacon timestamp 173 * @timestamp: beacon timestamp
188 * @beacon_int: beacon interval 174 * @beacon_int: beacon interval
189 * @assoc_capability: capabilities taken from assoc resp 175 * @assoc_capability: capabilities taken from assoc resp
190 * @ht: BSS's HT configuration
191 * @basic_rates: bitmap of basic rates, each bit stands for an 176 * @basic_rates: bitmap of basic rates, each bit stands for an
192 * index into the rate table configured by the driver in 177 * index into the rate table configured by the driver in
193 * the current band. 178 * the current band.
179 * @bssid: The BSSID for this BSS
180 * @enable_beacon: whether beaconing should be enabled or not
181 * @ht_operation_mode: HT operation mode (like in &struct ieee80211_ht_info).
182 * This field is only valid when the channel type is one of the HT types.
194 */ 183 */
195struct ieee80211_bss_conf { 184struct ieee80211_bss_conf {
185 const u8 *bssid;
196 /* association related data */ 186 /* association related data */
197 bool assoc; 187 bool assoc;
198 u16 aid; 188 u16 aid;
@@ -200,12 +190,13 @@ struct ieee80211_bss_conf {
200 bool use_cts_prot; 190 bool use_cts_prot;
201 bool use_short_preamble; 191 bool use_short_preamble;
202 bool use_short_slot; 192 bool use_short_slot;
193 bool enable_beacon;
203 u8 dtim_period; 194 u8 dtim_period;
204 u16 beacon_int; 195 u16 beacon_int;
205 u16 assoc_capability; 196 u16 assoc_capability;
206 u64 timestamp; 197 u64 timestamp;
207 u32 basic_rates; 198 u32 basic_rates;
208 struct ieee80211_bss_ht_conf ht; 199 u16 ht_operation_mode;
209}; 200};
210 201
211/** 202/**
@@ -248,6 +239,8 @@ struct ieee80211_bss_conf {
248 * @IEEE80211_TX_INTFL_NEED_TXPROCESSING: completely internal to mac80211, 239 * @IEEE80211_TX_INTFL_NEED_TXPROCESSING: completely internal to mac80211,
249 * used to indicate that a pending frame requires TX processing before 240 * used to indicate that a pending frame requires TX processing before
250 * it can be sent out. 241 * it can be sent out.
242 * @IEEE80211_TX_INTFL_RETRIED: completely internal to mac80211,
243 * used to indicate that a frame was already retried due to PS
251 */ 244 */
252enum mac80211_tx_control_flags { 245enum mac80211_tx_control_flags {
253 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), 246 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0),
@@ -265,6 +258,7 @@ enum mac80211_tx_control_flags {
265 IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12), 258 IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12),
266 IEEE80211_TX_INTFL_RCALGO = BIT(13), 259 IEEE80211_TX_INTFL_RCALGO = BIT(13),
267 IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), 260 IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14),
261 IEEE80211_TX_INTFL_RETRIED = BIT(15),
268}; 262};
269 263
270/** 264/**
@@ -518,52 +512,76 @@ struct ieee80211_rx_status {
518 * Flags to define PHY configuration options 512 * Flags to define PHY configuration options
519 * 513 *
520 * @IEEE80211_CONF_RADIOTAP: add radiotap header at receive time (if supported) 514 * @IEEE80211_CONF_RADIOTAP: add radiotap header at receive time (if supported)
521 * @IEEE80211_CONF_PS: Enable 802.11 power save mode 515 * @IEEE80211_CONF_PS: Enable 802.11 power save mode (managed mode only)
516 * @IEEE80211_CONF_IDLE: The device is running, but idle; if the flag is set
517 * the driver should be prepared to handle configuration requests but
518 * may turn the device off as much as possible. Typically, this flag will
519 * be set when an interface is set UP but not associated or scanning, but
520 * it can also be unset in that case when monitor interfaces are active.
522 */ 521 */
523enum ieee80211_conf_flags { 522enum ieee80211_conf_flags {
524 IEEE80211_CONF_RADIOTAP = (1<<0), 523 IEEE80211_CONF_RADIOTAP = (1<<0),
525 IEEE80211_CONF_PS = (1<<1), 524 IEEE80211_CONF_PS = (1<<1),
525 IEEE80211_CONF_IDLE = (1<<2),
526}; 526};
527 527
528 528
529/** 529/**
530 * enum ieee80211_conf_changed - denotes which configuration changed 530 * enum ieee80211_conf_changed - denotes which configuration changed
531 * 531 *
532 * @IEEE80211_CONF_CHANGE_RADIO_ENABLED: the value of radio_enabled changed 532 * @_IEEE80211_CONF_CHANGE_RADIO_ENABLED: DEPRECATED
533 * @IEEE80211_CONF_CHANGE_BEACON_INTERVAL: the beacon interval changed
534 * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed 533 * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed
535 * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed 534 * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed
536 * @IEEE80211_CONF_CHANGE_PS: the PS flag changed 535 * @IEEE80211_CONF_CHANGE_PS: the PS flag or dynamic PS timeout changed
537 * @IEEE80211_CONF_CHANGE_DYNPS_TIMEOUT: the dynamic PS timeout changed
538 * @IEEE80211_CONF_CHANGE_POWER: the TX power changed 536 * @IEEE80211_CONF_CHANGE_POWER: the TX power changed
539 * @IEEE80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed 537 * @IEEE80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed
540 * @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed 538 * @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed
539 * @IEEE80211_CONF_CHANGE_IDLE: Idle flag changed
541 */ 540 */
542enum ieee80211_conf_changed { 541enum ieee80211_conf_changed {
543 IEEE80211_CONF_CHANGE_RADIO_ENABLED = BIT(0), 542 _IEEE80211_CONF_CHANGE_RADIO_ENABLED = BIT(0),
544 IEEE80211_CONF_CHANGE_BEACON_INTERVAL = BIT(1),
545 IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2), 543 IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2),
546 IEEE80211_CONF_CHANGE_RADIOTAP = BIT(3), 544 IEEE80211_CONF_CHANGE_RADIOTAP = BIT(3),
547 IEEE80211_CONF_CHANGE_PS = BIT(4), 545 IEEE80211_CONF_CHANGE_PS = BIT(4),
548 IEEE80211_CONF_CHANGE_DYNPS_TIMEOUT = BIT(5), 546 IEEE80211_CONF_CHANGE_POWER = BIT(5),
549 IEEE80211_CONF_CHANGE_POWER = BIT(6), 547 IEEE80211_CONF_CHANGE_CHANNEL = BIT(6),
550 IEEE80211_CONF_CHANGE_CHANNEL = BIT(7), 548 IEEE80211_CONF_CHANGE_RETRY_LIMITS = BIT(7),
551 IEEE80211_CONF_CHANGE_RETRY_LIMITS = BIT(8), 549 IEEE80211_CONF_CHANGE_IDLE = BIT(8),
552}; 550};
553 551
552static inline __deprecated enum ieee80211_conf_changed
553__IEEE80211_CONF_CHANGE_RADIO_ENABLED(void)
554{
555 return _IEEE80211_CONF_CHANGE_RADIO_ENABLED;
556}
557#define IEEE80211_CONF_CHANGE_RADIO_ENABLED \
558 __IEEE80211_CONF_CHANGE_RADIO_ENABLED()
559
554/** 560/**
555 * struct ieee80211_conf - configuration of the device 561 * struct ieee80211_conf - configuration of the device
556 * 562 *
557 * This struct indicates how the driver shall configure the hardware. 563 * This struct indicates how the driver shall configure the hardware.
558 * 564 *
565 * @flags: configuration flags defined above
566 *
559 * @radio_enabled: when zero, driver is required to switch off the radio. 567 * @radio_enabled: when zero, driver is required to switch off the radio.
560 * @beacon_int: beacon interval (TODO make interface config) 568 * @beacon_int: DEPRECATED, DO NOT USE
569 *
561 * @listen_interval: listen interval in units of beacon interval 570 * @listen_interval: listen interval in units of beacon interval
562 * @flags: configuration flags defined above 571 * @max_sleep_period: the maximum number of beacon intervals to sleep for
572 * before checking the beacon for a TIM bit (managed mode only); this
573 * value will be only achievable between DTIM frames, the hardware
574 * needs to check for the multicast traffic bit in DTIM beacons.
575 * This variable is valid only when the CONF_PS flag is set.
576 * @dynamic_ps_timeout: The dynamic powersave timeout (in ms), see the
577 * powersave documentation below. This variable is valid only when
578 * the CONF_PS flag is set.
579 *
563 * @power_level: requested transmit power (in dBm) 580 * @power_level: requested transmit power (in dBm)
564 * @dynamic_ps_timeout: dynamic powersave timeout (in ms) 581 *
565 * @channel: the channel to tune to 582 * @channel: the channel to tune to
566 * @channel_type: the channel (HT) type 583 * @channel_type: the channel (HT) type
584 *
567 * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame 585 * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame
568 * (a frame not RTS protected), called "dot11LongRetryLimit" in 802.11, 586 * (a frame not RTS protected), called "dot11LongRetryLimit" in 802.11,
569 * but actually means the number of transmissions not the number of retries 587 * but actually means the number of transmissions not the number of retries
@@ -572,12 +590,13 @@ enum ieee80211_conf_changed {
572 * number of transmissions not the number of retries 590 * number of transmissions not the number of retries
573 */ 591 */
574struct ieee80211_conf { 592struct ieee80211_conf {
575 int beacon_int; 593 int __deprecated beacon_int;
576 u32 flags; 594 u32 flags;
577 int power_level, dynamic_ps_timeout; 595 int power_level, dynamic_ps_timeout;
596 int max_sleep_period;
578 597
579 u16 listen_interval; 598 u16 listen_interval;
580 bool radio_enabled; 599 bool __deprecated radio_enabled;
581 600
582 u8 long_frame_max_tx_count, short_frame_max_tx_count; 601 u8 long_frame_max_tx_count, short_frame_max_tx_count;
583 602
@@ -640,37 +659,6 @@ struct ieee80211_if_init_conf {
640}; 659};
641 660
642/** 661/**
643 * enum ieee80211_if_conf_change - interface config change flags
644 *
645 * @IEEE80211_IFCC_BSSID: The BSSID changed.
646 * @IEEE80211_IFCC_BEACON: The beacon for this interface changed
647 * (currently AP and MESH only), use ieee80211_beacon_get().
648 * @IEEE80211_IFCC_BEACON_ENABLED: The enable_beacon value changed.
649 */
650enum ieee80211_if_conf_change {
651 IEEE80211_IFCC_BSSID = BIT(0),
652 IEEE80211_IFCC_BEACON = BIT(1),
653 IEEE80211_IFCC_BEACON_ENABLED = BIT(2),
654};
655
656/**
657 * struct ieee80211_if_conf - configuration of an interface
658 *
659 * @changed: parameters that have changed, see &enum ieee80211_if_conf_change.
660 * @bssid: BSSID of the network we are associated to/creating.
661 * @enable_beacon: Indicates whether beacons can be sent.
662 * This is valid only for AP/IBSS/MESH modes.
663 *
664 * This structure is passed to the config_interface() callback of
665 * &struct ieee80211_hw.
666 */
667struct ieee80211_if_conf {
668 u32 changed;
669 const u8 *bssid;
670 bool enable_beacon;
671};
672
673/**
674 * enum ieee80211_key_alg - key algorithm 662 * enum ieee80211_key_alg - key algorithm
675 * @ALG_WEP: WEP40 or WEP104 663 * @ALG_WEP: WEP40 or WEP104
676 * @ALG_TKIP: TKIP 664 * @ALG_TKIP: TKIP
@@ -685,16 +673,6 @@ enum ieee80211_key_alg {
685}; 673};
686 674
687/** 675/**
688 * enum ieee80211_key_len - key length
689 * @LEN_WEP40: WEP 5-byte long key
690 * @LEN_WEP104: WEP 13-byte long key
691 */
692enum ieee80211_key_len {
693 LEN_WEP40 = 5,
694 LEN_WEP104 = 13,
695};
696
697/**
698 * enum ieee80211_key_flags - key flags 676 * enum ieee80211_key_flags - key flags
699 * 677 *
700 * These flags are used for communication about keys between the driver 678 * These flags are used for communication about keys between the driver
@@ -1109,11 +1087,9 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
1109 * need software support for parsing the TIM bitmap. This is also supported 1087 * need software support for parsing the TIM bitmap. This is also supported
1110 * by mac80211 by combining the %IEEE80211_HW_SUPPORTS_PS and 1088 * by mac80211 by combining the %IEEE80211_HW_SUPPORTS_PS and
1111 * %IEEE80211_HW_PS_NULLFUNC_STACK flags. The hardware is of course still 1089 * %IEEE80211_HW_PS_NULLFUNC_STACK flags. The hardware is of course still
1112 * required to pass up beacons. Additionally, in this case, mac80211 will 1090 * required to pass up beacons. The hardware is still required to handle
1113 * wake up the hardware when multicast traffic is announced in the beacon. 1091 * waking up for multicast traffic; if it cannot the driver must handle that
1114 * 1092 * as best as it can, mac80211 is too slow.
1115 * FIXME: I don't think we can be fast enough in software when we want to
1116 * receive multicast traffic?
1117 * 1093 *
1118 * Dynamic powersave mode is an extension to normal powersave mode in which 1094 * Dynamic powersave mode is an extension to normal powersave mode in which
1119 * the hardware stays awake for a user-specified period of time after sending 1095 * the hardware stays awake for a user-specified period of time after sending
@@ -1134,11 +1110,53 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
1134 * way the host will only receive beacons where some relevant information 1110 * way the host will only receive beacons where some relevant information
1135 * (for example ERP protection or WMM settings) have changed. 1111 * (for example ERP protection or WMM settings) have changed.
1136 * 1112 *
1137 * Beacon filter support is informed with %IEEE80211_HW_BEACON_FILTER flag. 1113 * Beacon filter support is advertised with the %IEEE80211_HW_BEACON_FILTER
1138 * The driver needs to enable beacon filter support whenever power save is 1114 * hardware capability. The driver needs to enable beacon filter support
1139 * enabled, that is %IEEE80211_CONF_PS is set. When power save is enabled, 1115 * whenever power save is enabled, that is %IEEE80211_CONF_PS is set. When
1140 * the stack will not check for beacon miss at all and the driver needs to 1116 * power save is enabled, the stack will not check for beacon loss and the
1141 * notify about complete loss of beacons with ieee80211_beacon_loss(). 1117 * driver needs to notify about loss of beacons with ieee80211_beacon_loss().
1118 *
1119 * The time (or number of beacons missed) until the firmware notifies the
1120 * driver of a beacon loss event (which in turn causes the driver to call
1121 * ieee80211_beacon_loss()) should be configurable and will be controlled
1122 * by mac80211 and the roaming algorithm in the future.
1123 *
1124 * Since there may be constantly changing information elements that nothing
1125 * in the software stack cares about, we will, in the future, have mac80211
1126 * tell the driver which information elements are interesting in the sense
1127 * that we want to see changes in them. This will include
1128 * - a list of information element IDs
1129 * - a list of OUIs for the vendor information element
1130 *
1131 * Ideally, the hardware would filter out any beacons without changes in the
1132 * requested elements, but if it cannot support that it may, at the expense
1133 * of some efficiency, filter out only a subset. For example, if the device
1134 * doesn't support checking for OUIs it should pass up all changes in all
1135 * vendor information elements.
1136 *
1137 * Note that change, for the sake of simplification, also includes information
1138 * elements appearing or disappearing from the beacon.
1139 *
1140 * Some hardware supports an "ignore list" instead, just make sure nothing
1141 * that was requested is on the ignore list, and include commonly changing
1142 * information element IDs in the ignore list, for example 11 (BSS load) and
1143 * the various vendor-assigned IEs with unknown contents (128, 129, 133-136,
1144 * 149, 150, 155, 156, 173, 176, 178, 179, 219); for forward compatibility
1145 * it could also include some currently unused IDs.
1146 *
1147 *
1148 * In addition to these capabilities, hardware should support notifying the
1149 * host of changes in the beacon RSSI. This is relevant to implement roaming
1150 * when no traffic is flowing (when traffic is flowing we see the RSSI of
1151 * the received data packets). This can consist in notifying the host when
1152 * the RSSI changes significantly or when it drops below or rises above
1153 * configurable thresholds. In the future these thresholds will also be
1154 * configured by mac80211 (which gets them from userspace) to implement
1155 * them as the roaming algorithm requires.
1156 *
1157 * If the hardware cannot implement this, the driver should ask it to
1158 * periodically pass beacon frames to the host so that software can do the
1159 * signal strength threshold checking.
1142 */ 1160 */
1143 1161
1144/** 1162/**
@@ -1298,10 +1316,6 @@ enum ieee80211_ampdu_mlme_action {
1298 * This function should never fail but returns a negative error code 1316 * This function should never fail but returns a negative error code
1299 * if it does. 1317 * if it does.
1300 * 1318 *
1301 * @config_interface: Handler for configuration requests related to interfaces
1302 * (e.g. BSSID changes.)
1303 * Returns a negative error code which will be seen in userspace.
1304 *
1305 * @bss_info_changed: Handler for configuration requests related to BSS 1319 * @bss_info_changed: Handler for configuration requests related to BSS
1306 * parameters that may vary during BSS's lifespan, and may affect low 1320 * parameters that may vary during BSS's lifespan, and may affect low
1307 * level driver (e.g. assoc/disassoc status, erp parameters). 1321 * level driver (e.g. assoc/disassoc status, erp parameters).
@@ -1330,11 +1344,14 @@ enum ieee80211_ampdu_mlme_action {
1330 * the scan state machine in stack. The scan must honour the channel 1344 * the scan state machine in stack. The scan must honour the channel
1331 * configuration done by the regulatory agent in the wiphy's 1345 * configuration done by the regulatory agent in the wiphy's
1332 * registered bands. The hardware (or the driver) needs to make sure 1346 * registered bands. The hardware (or the driver) needs to make sure
1333 * that power save is disabled. When the scan finishes, 1347 * that power save is disabled.
1334 * ieee80211_scan_completed() must be called; note that it also must 1348 * The @req ie/ie_len members are rewritten by mac80211 to contain the
1335 * be called when the scan cannot finish because the hardware is 1349 * entire IEs after the SSID, so that drivers need not look at these
1336 * turned off! Anything else is a bug! Returns a negative error code 1350 * at all but just send them after the SSID -- mac80211 includes the
1337 * which will be seen in userspace. 1351 * (extended) supported rates and HT information (where applicable).
1352 * When the scan finishes, ieee80211_scan_completed() must be called;
1353 * note that it also must be called when the scan cannot finish due to
1354 * any error unless this callback returned a negative error code.
1338 * 1355 *
1339 * @sw_scan_start: Notifier function that is called just before a software scan 1356 * @sw_scan_start: Notifier function that is called just before a software scan
1340 * is started. Can be NULL, if the driver doesn't need this notification. 1357 * is started. Can be NULL, if the driver doesn't need this notification.
@@ -1390,6 +1407,10 @@ enum ieee80211_ampdu_mlme_action {
1390 * is the first frame we expect to perform the action on. Notice 1407 * is the first frame we expect to perform the action on. Notice
1391 * that TX/RX_STOP can pass NULL for this parameter. 1408 * that TX/RX_STOP can pass NULL for this parameter.
1392 * Returns a negative error code on failure. 1409 * Returns a negative error code on failure.
1410 *
1411 * @rfkill_poll: Poll rfkill hardware state. If you need this, you also
1412 * need to set wiphy->rfkill_poll to %true before registration,
1413 * and need to call wiphy_rfkill_set_hw_state() in the callback.
1393 */ 1414 */
1394struct ieee80211_ops { 1415struct ieee80211_ops {
1395 int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); 1416 int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
@@ -1400,9 +1421,6 @@ struct ieee80211_ops {
1400 void (*remove_interface)(struct ieee80211_hw *hw, 1421 void (*remove_interface)(struct ieee80211_hw *hw,
1401 struct ieee80211_if_init_conf *conf); 1422 struct ieee80211_if_init_conf *conf);
1402 int (*config)(struct ieee80211_hw *hw, u32 changed); 1423 int (*config)(struct ieee80211_hw *hw, u32 changed);
1403 int (*config_interface)(struct ieee80211_hw *hw,
1404 struct ieee80211_vif *vif,
1405 struct ieee80211_if_conf *conf);
1406 void (*bss_info_changed)(struct ieee80211_hw *hw, 1424 void (*bss_info_changed)(struct ieee80211_hw *hw,
1407 struct ieee80211_vif *vif, 1425 struct ieee80211_vif *vif,
1408 struct ieee80211_bss_conf *info, 1426 struct ieee80211_bss_conf *info,
@@ -1441,6 +1459,8 @@ struct ieee80211_ops {
1441 int (*ampdu_action)(struct ieee80211_hw *hw, 1459 int (*ampdu_action)(struct ieee80211_hw *hw,
1442 enum ieee80211_ampdu_mlme_action action, 1460 enum ieee80211_ampdu_mlme_action action,
1443 struct ieee80211_sta *sta, u16 tid, u16 *ssn); 1461 struct ieee80211_sta *sta, u16 tid, u16 *ssn);
1462
1463 void (*rfkill_poll)(struct ieee80211_hw *hw);
1444}; 1464};
1445 1465
1446/** 1466/**
@@ -1572,6 +1592,20 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw);
1572 */ 1592 */
1573void ieee80211_free_hw(struct ieee80211_hw *hw); 1593void ieee80211_free_hw(struct ieee80211_hw *hw);
1574 1594
1595/**
1596 * ieee80211_restart_hw - restart hardware completely
1597 *
1598 * Call this function when the hardware was restarted for some reason
1599 * (hardware error, ...) and the driver is unable to restore its state
1600 * by itself. mac80211 assumes that at this point the driver/hardware
1601 * is completely uninitialised and stopped, it starts the process by
1602 * calling the ->start() operation. The driver will need to reset all
1603 * internal state that it has prior to calling this function.
1604 *
1605 * @hw: the hardware to restart
1606 */
1607void ieee80211_restart_hw(struct ieee80211_hw *hw);
1608
1575/* trick to avoid symbol clashes with the ieee80211 subsystem */ 1609/* trick to avoid symbol clashes with the ieee80211 subsystem */
1576void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, 1610void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb,
1577 struct ieee80211_rx_status *status); 1611 struct ieee80211_rx_status *status);
@@ -1775,24 +1809,6 @@ struct sk_buff *
1775ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif); 1809ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
1776 1810
1777/** 1811/**
1778 * ieee80211_get_hdrlen_from_skb - get header length from data
1779 *
1780 * Given an skb with a raw 802.11 header at the data pointer this function
1781 * returns the 802.11 header length in bytes (not including encryption
1782 * headers). If the data in the sk_buff is too short to contain a valid 802.11
1783 * header the function returns 0.
1784 *
1785 * @skb: the frame
1786 */
1787unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb);
1788
1789/**
1790 * ieee80211_hdrlen - get header length in bytes from frame control
1791 * @fc: frame control field in little-endian format
1792 */
1793unsigned int ieee80211_hdrlen(__le16 fc);
1794
1795/**
1796 * ieee80211_get_tkip_key - get a TKIP rc4 for skb 1812 * ieee80211_get_tkip_key - get a TKIP rc4 for skb
1797 * 1813 *
1798 * This function computes a TKIP rc4 key for an skb. It computes 1814 * This function computes a TKIP rc4 key for an skb. It computes