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.h68
1 files changed, 36 insertions, 32 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index cdd7cea1fd4c..dd73b8c6746b 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -93,9 +93,11 @@ struct device;
93 * enum ieee80211_max_queues - maximum number of queues 93 * enum ieee80211_max_queues - maximum number of queues
94 * 94 *
95 * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues. 95 * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues.
96 * @IEEE80211_MAX_QUEUE_MAP: bitmap with maximum queues set
96 */ 97 */
97enum ieee80211_max_queues { 98enum ieee80211_max_queues {
98 IEEE80211_MAX_QUEUES = 16, 99 IEEE80211_MAX_QUEUES = 16,
100 IEEE80211_MAX_QUEUE_MAP = BIT(IEEE80211_MAX_QUEUES) - 1,
99}; 101};
100 102
101#define IEEE80211_INVAL_HW_QUEUE 0xff 103#define IEEE80211_INVAL_HW_QUEUE 0xff
@@ -1067,6 +1069,9 @@ enum ieee80211_vif_flags {
1067 * path needing to access it; even though the netdev carrier will always 1069 * path needing to access it; even though the netdev carrier will always
1068 * be off when it is %NULL there can still be races and packets could be 1070 * be off when it is %NULL there can still be races and packets could be
1069 * processed after it switches back to %NULL. 1071 * processed after it switches back to %NULL.
1072 * @debugfs_dir: debugfs dentry, can be used by drivers to create own per
1073 * interface debug files. Note that it will be NULL for the virtual
1074 * monitor interface (if that is requested.)
1070 * @drv_priv: data area for driver use, will always be aligned to 1075 * @drv_priv: data area for driver use, will always be aligned to
1071 * sizeof(void *). 1076 * sizeof(void *).
1072 */ 1077 */
@@ -1083,6 +1088,10 @@ struct ieee80211_vif {
1083 1088
1084 u32 driver_flags; 1089 u32 driver_flags;
1085 1090
1091#ifdef CONFIG_MAC80211_DEBUGFS
1092 struct dentry *debugfs_dir;
1093#endif
1094
1086 /* must be last */ 1095 /* must be last */
1087 u8 drv_priv[0] __aligned(sizeof(void *)); 1096 u8 drv_priv[0] __aligned(sizeof(void *));
1088}; 1097};
@@ -1946,14 +1955,14 @@ void ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb);
1946 * filter those response frames except in the case of frames that 1955 * filter those response frames except in the case of frames that
1947 * are buffered in the driver -- those must remain buffered to avoid 1956 * are buffered in the driver -- those must remain buffered to avoid
1948 * reordering. Because it is possible that no frames are released 1957 * reordering. Because it is possible that no frames are released
1949 * in this case, the driver must call ieee80211_sta_eosp_irqsafe() 1958 * in this case, the driver must call ieee80211_sta_eosp()
1950 * to indicate to mac80211 that the service period ended anyway. 1959 * to indicate to mac80211 that the service period ended anyway.
1951 * 1960 *
1952 * Finally, if frames from multiple TIDs are released from mac80211 1961 * Finally, if frames from multiple TIDs are released from mac80211
1953 * but the driver might reorder them, it must clear & set the flags 1962 * but the driver might reorder them, it must clear & set the flags
1954 * appropriately (only the last frame may have %IEEE80211_TX_STATUS_EOSP) 1963 * appropriately (only the last frame may have %IEEE80211_TX_STATUS_EOSP)
1955 * and also take care of the EOSP and MORE_DATA bits in the frame. 1964 * and also take care of the EOSP and MORE_DATA bits in the frame.
1956 * The driver may also use ieee80211_sta_eosp_irqsafe() in this case. 1965 * The driver may also use ieee80211_sta_eosp() in this case.
1957 */ 1966 */
1958 1967
1959/** 1968/**
@@ -2226,18 +2235,6 @@ enum ieee80211_roc_type {
2226 * MAC address of the device going away. 2235 * MAC address of the device going away.
2227 * Hence, this callback must be implemented. It can sleep. 2236 * Hence, this callback must be implemented. It can sleep.
2228 * 2237 *
2229 * @add_interface_debugfs: Drivers can use this callback to add debugfs files
2230 * when a vif is added to mac80211. This callback and
2231 * @remove_interface_debugfs should be within a CONFIG_MAC80211_DEBUGFS
2232 * conditional. @remove_interface_debugfs must be provided for cleanup.
2233 * This callback can sleep.
2234 *
2235 * @remove_interface_debugfs: Remove the debugfs files which were added using
2236 * @add_interface_debugfs. This callback must remove all debugfs entries
2237 * that were added because mac80211 only removes interface debugfs when the
2238 * interface is destroyed, not when it is removed from the driver.
2239 * This callback can sleep.
2240 *
2241 * @config: Handler for configuration requests. IEEE 802.11 code calls this 2238 * @config: Handler for configuration requests. IEEE 802.11 code calls this
2242 * function to change hardware configuration, e.g., channel. 2239 * function to change hardware configuration, e.g., channel.
2243 * This function should never fail but returns a negative error code 2240 * This function should never fail but returns a negative error code
@@ -2259,6 +2256,9 @@ enum ieee80211_roc_type {
2259 * See the section "Frame filtering" for more information. 2256 * See the section "Frame filtering" for more information.
2260 * This callback must be implemented and can sleep. 2257 * This callback must be implemented and can sleep.
2261 * 2258 *
2259 * @set_multicast_list: Configure the device's interface specific RX multicast
2260 * filter. This callback is optional. This callback must be atomic.
2261 *
2262 * @set_tim: Set TIM bit. mac80211 calls this function when a TIM bit 2262 * @set_tim: Set TIM bit. mac80211 calls this function when a TIM bit
2263 * must be set or cleared for a given STA. Must be atomic. 2263 * must be set or cleared for a given STA. Must be atomic.
2264 * 2264 *
@@ -2440,8 +2440,11 @@ enum ieee80211_roc_type {
2440 * @testmode_dump: Implement a cfg80211 test mode dump. The callback can sleep. 2440 * @testmode_dump: Implement a cfg80211 test mode dump. The callback can sleep.
2441 * 2441 *
2442 * @flush: Flush all pending frames from the hardware queue, making sure 2442 * @flush: Flush all pending frames from the hardware queue, making sure
2443 * that the hardware queues are empty. If the parameter @drop is set 2443 * that the hardware queues are empty. The @queues parameter is a bitmap
2444 * to %true, pending frames may be dropped. The callback can sleep. 2444 * of queues to flush, which is useful if different virtual interfaces
2445 * use different hardware queues; it may also indicate all queues.
2446 * If the parameter @drop is set to %true, pending frames may be dropped.
2447 * The callback can sleep.
2445 * 2448 *
2446 * @channel_switch: Drivers that need (or want) to offload the channel 2449 * @channel_switch: Drivers that need (or want) to offload the channel
2447 * switch operation for CSAs received from the AP may implement this 2450 * switch operation for CSAs received from the AP may implement this
@@ -2506,7 +2509,7 @@ enum ieee80211_roc_type {
2506 * setting the EOSP flag in the QoS header of the frames. Also, when the 2509 * setting the EOSP flag in the QoS header of the frames. Also, when the
2507 * service period ends, the driver must set %IEEE80211_TX_STATUS_EOSP 2510 * service period ends, the driver must set %IEEE80211_TX_STATUS_EOSP
2508 * on the last frame in the SP. Alternatively, it may call the function 2511 * on the last frame in the SP. Alternatively, it may call the function
2509 * ieee80211_sta_eosp_irqsafe() to inform mac80211 of the end of the SP. 2512 * ieee80211_sta_eosp() to inform mac80211 of the end of the SP.
2510 * This callback must be atomic. 2513 * This callback must be atomic.
2511 * @allow_buffered_frames: Prepare device to allow the given number of frames 2514 * @allow_buffered_frames: Prepare device to allow the given number of frames
2512 * to go out to the given station. The frames will be sent by mac80211 2515 * to go out to the given station. The frames will be sent by mac80211
@@ -2517,7 +2520,7 @@ enum ieee80211_roc_type {
2517 * them between the TIDs, it must set the %IEEE80211_TX_STATUS_EOSP flag 2520 * them between the TIDs, it must set the %IEEE80211_TX_STATUS_EOSP flag
2518 * on the last frame and clear it on all others and also handle the EOSP 2521 * on the last frame and clear it on all others and also handle the EOSP
2519 * bit in the QoS header correctly. Alternatively, it can also call the 2522 * bit in the QoS header correctly. Alternatively, it can also call the
2520 * ieee80211_sta_eosp_irqsafe() function. 2523 * ieee80211_sta_eosp() function.
2521 * The @tids parameter is a bitmap and tells the driver which TIDs the 2524 * The @tids parameter is a bitmap and tells the driver which TIDs the
2522 * frames will be on; it will at most have two bits set. 2525 * frames will be on; it will at most have two bits set.
2523 * This callback must be atomic. 2526 * This callback must be atomic.
@@ -2605,6 +2608,10 @@ struct ieee80211_ops {
2605 unsigned int changed_flags, 2608 unsigned int changed_flags,
2606 unsigned int *total_flags, 2609 unsigned int *total_flags,
2607 u64 multicast); 2610 u64 multicast);
2611 void (*set_multicast_list)(struct ieee80211_hw *hw,
2612 struct ieee80211_vif *vif, bool allmulti,
2613 struct netdev_hw_addr_list *mc_list);
2614
2608 int (*set_tim)(struct ieee80211_hw *hw, struct ieee80211_sta *sta, 2615 int (*set_tim)(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
2609 bool set); 2616 bool set);
2610 int (*set_key)(struct ieee80211_hw *hw, enum set_key_cmd cmd, 2617 int (*set_key)(struct ieee80211_hw *hw, enum set_key_cmd cmd,
@@ -2651,12 +2658,6 @@ struct ieee80211_ops {
2651 struct ieee80211_vif *vif, 2658 struct ieee80211_vif *vif,
2652 struct ieee80211_sta *sta, 2659 struct ieee80211_sta *sta,
2653 struct dentry *dir); 2660 struct dentry *dir);
2654 void (*add_interface_debugfs)(struct ieee80211_hw *hw,
2655 struct ieee80211_vif *vif,
2656 struct dentry *dir);
2657 void (*remove_interface_debugfs)(struct ieee80211_hw *hw,
2658 struct ieee80211_vif *vif,
2659 struct dentry *dir);
2660#endif 2661#endif
2661 void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 2662 void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
2662 enum sta_notify_cmd, struct ieee80211_sta *sta); 2663 enum sta_notify_cmd, struct ieee80211_sta *sta);
@@ -2691,7 +2692,7 @@ struct ieee80211_ops {
2691 struct netlink_callback *cb, 2692 struct netlink_callback *cb,
2692 void *data, int len); 2693 void *data, int len);
2693#endif 2694#endif
2694 void (*flush)(struct ieee80211_hw *hw, bool drop); 2695 void (*flush)(struct ieee80211_hw *hw, u32 queues, bool drop);
2695 void (*channel_switch)(struct ieee80211_hw *hw, 2696 void (*channel_switch)(struct ieee80211_hw *hw,
2696 struct ieee80211_channel_switch *ch_switch); 2697 struct ieee80211_channel_switch *ch_switch);
2697 int (*napi_poll)(struct ieee80211_hw *hw, int budget); 2698 int (*napi_poll)(struct ieee80211_hw *hw, int budget);
@@ -3857,14 +3858,17 @@ void ieee80211_sta_block_awake(struct ieee80211_hw *hw,
3857 * %IEEE80211_TX_STATUS_EOSP bit and call this function instead. 3858 * %IEEE80211_TX_STATUS_EOSP bit and call this function instead.
3858 * This applies for PS-Poll as well as uAPSD. 3859 * This applies for PS-Poll as well as uAPSD.
3859 * 3860 *
3860 * Note that there is no non-_irqsafe version right now as 3861 * Note that just like with _tx_status() and _rx() drivers must
3861 * it wasn't needed, but just like _tx_status() and _rx() 3862 * not mix calls to irqsafe/non-irqsafe versions, this function
3862 * must not be mixed in irqsafe/non-irqsafe versions, this 3863 * must not be mixed with those either. Use the all irqsafe, or
3863 * function must not be mixed with those either. Use the 3864 * all non-irqsafe, don't mix!
3864 * all irqsafe, or all non-irqsafe, don't mix! If you need 3865 *
3865 * the non-irqsafe version of this, you need to add it. 3866 * NB: the _irqsafe version of this function doesn't exist, no
3867 * driver needs it right now. Don't call this function if
3868 * you'd need the _irqsafe version, look at the git history
3869 * and restore the _irqsafe version!
3866 */ 3870 */
3867void ieee80211_sta_eosp_irqsafe(struct ieee80211_sta *pubsta); 3871void ieee80211_sta_eosp(struct ieee80211_sta *pubsta);
3868 3872
3869/** 3873/**
3870 * ieee80211_iter_keys - iterate keys programmed into the device 3874 * ieee80211_iter_keys - iterate keys programmed into the device