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.h50
1 files changed, 42 insertions, 8 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index d4e09a06b4a2..5ed93f4406a8 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -73,6 +73,21 @@
73 */ 73 */
74 74
75/** 75/**
76 * DOC: mac80211 workqueue
77 *
78 * mac80211 provides its own workqueue for drivers and internal mac80211 use.
79 * The workqueue is a single threaded workqueue and can only be accessed by
80 * helpers for sanity checking. Drivers must ensure all work added onto the
81 * mac80211 workqueue should be cancelled on the driver stop() callback.
82 *
83 * mac80211 will flushed the workqueue upon interface removal and during
84 * suspend.
85 *
86 * All work performed on the mac80211 workqueue must not acquire the RTNL lock.
87 *
88 */
89
90/**
76 * enum ieee80211_max_queues - maximum number of queues 91 * enum ieee80211_max_queues - maximum number of queues
77 * 92 *
78 * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues. 93 * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues.
@@ -913,12 +928,6 @@ enum ieee80211_hw_flags {
913 * 928 *
914 * @conf: &struct ieee80211_conf, device configuration, don't use. 929 * @conf: &struct ieee80211_conf, device configuration, don't use.
915 * 930 *
916 * @workqueue: single threaded workqueue available for driver use,
917 * allocated by mac80211 on registration and flushed when an
918 * interface is removed.
919 * NOTICE: All work performed on this workqueue must not
920 * acquire the RTNL lock.
921 *
922 * @priv: pointer to private area that was allocated for driver use 931 * @priv: pointer to private area that was allocated for driver use
923 * along with this structure. 932 * along with this structure.
924 * 933 *
@@ -954,7 +963,6 @@ enum ieee80211_hw_flags {
954struct ieee80211_hw { 963struct ieee80211_hw {
955 struct ieee80211_conf conf; 964 struct ieee80211_conf conf;
956 struct wiphy *wiphy; 965 struct wiphy *wiphy;
957 struct workqueue_struct *workqueue;
958 const char *rate_control_algorithm; 966 const char *rate_control_algorithm;
959 void *priv; 967 void *priv;
960 u32 flags; 968 u32 flags;
@@ -1301,7 +1309,8 @@ enum ieee80211_ampdu_mlme_action {
1301 * is disabled. This should turn off the hardware (at least 1309 * is disabled. This should turn off the hardware (at least
1302 * it must turn off frame reception.) 1310 * it must turn off frame reception.)
1303 * May be called right after add_interface if that rejects 1311 * May be called right after add_interface if that rejects
1304 * an interface. 1312 * an interface. If you added any work onto the mac80211 workqueue
1313 * you should ensure to cancel it on this callback.
1305 * Must be implemented. 1314 * Must be implemented.
1306 * 1315 *
1307 * @add_interface: Called when a netdevice attached to the hardware is 1316 * @add_interface: Called when a netdevice attached to the hardware is
@@ -1928,6 +1937,31 @@ void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw,
1928 void *data); 1937 void *data);
1929 1938
1930/** 1939/**
1940 * ieee80211_queue_work - add work onto the mac80211 workqueue
1941 *
1942 * Drivers and mac80211 use this to add work onto the mac80211 workqueue.
1943 * This helper ensures drivers are not queueing work when they should not be.
1944 *
1945 * @hw: the hardware struct for the interface we are adding work for
1946 * @work: the work we want to add onto the mac80211 workqueue
1947 */
1948void ieee80211_queue_work(struct ieee80211_hw *hw, struct work_struct *work);
1949
1950/**
1951 * ieee80211_queue_delayed_work - add work onto the mac80211 workqueue
1952 *
1953 * Drivers and mac80211 use this to queue delayed work onto the mac80211
1954 * workqueue.
1955 *
1956 * @hw: the hardware struct for the interface we are adding work for
1957 * @dwork: delayable work to queue onto the mac80211 workqueue
1958 * @delay: number of jiffies to wait before queueing
1959 */
1960void ieee80211_queue_delayed_work(struct ieee80211_hw *hw,
1961 struct delayed_work *dwork,
1962 unsigned long delay);
1963
1964/**
1931 * ieee80211_start_tx_ba_session - Start a tx Block Ack session. 1965 * ieee80211_start_tx_ba_session - Start a tx Block Ack session.
1932 * @hw: pointer as obtained from ieee80211_alloc_hw(). 1966 * @hw: pointer as obtained from ieee80211_alloc_hw().
1933 * @ra: receiver address of the BA session recipient 1967 * @ra: receiver address of the BA session recipient