summaryrefslogtreecommitdiffstats
path: root/include/linux/nl80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-11-25 10:02:29 +0100
committerJohn W. Linville <linville@tuxdriver.com>2010-11-29 15:24:35 -0500
commitf7ca38dfe58c20cb1aa2ed9643187e8b194b5bae (patch)
tree42db54588fd5fa769a16def75708117903577b40 /include/linux/nl80211.h
parent9a67d761b39614c0495dcab9a204e21a9f4c4d31 (diff)
downloadlinux-stable-f7ca38dfe58c20cb1aa2ed9643187e8b194b5bae.tar.gz
linux-stable-f7ca38dfe58c20cb1aa2ed9643187e8b194b5bae.tar.bz2
linux-stable-f7ca38dfe58c20cb1aa2ed9643187e8b194b5bae.zip
nl80211/cfg80211: extend mgmt-tx API for off-channel
With p2p, it is sometimes necessary to transmit a frame (typically an action frame) on another channel than the current channel. Enable this through the CMD_FRAME API, and allow it to wait for a response. A new command allows that wait to be aborted. However, allow userspace to specify whether or not it wants to allow off-channel TX, it may actually want to use the same channel only. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux/nl80211.h')
-rw-r--r--include/linux/nl80211.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index d706bf3badc8..5cfa579df476 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -358,11 +358,16 @@
* user space application). %NL80211_ATTR_FRAME is used to specify the
* frame contents (including header). %NL80211_ATTR_WIPHY_FREQ (and
* optionally %NL80211_ATTR_WIPHY_CHANNEL_TYPE) is used to indicate on
- * which channel the frame is to be transmitted or was received. This
- * channel has to be the current channel (remain-on-channel or the
- * operational channel). When called, this operation returns a cookie
- * (%NL80211_ATTR_COOKIE) that will be included with the TX status event
- * pertaining to the TX request.
+ * which channel the frame is to be transmitted or was received. If this
+ * channel is not the current channel (remain-on-channel or the
+ * operational channel) the device will switch to the given channel and
+ * transmit the frame, optionally waiting for a response for the time
+ * specified using %NL80211_ATTR_DURATION. When called, this operation
+ * returns a cookie (%NL80211_ATTR_COOKIE) that will be included with the
+ * TX status event pertaining to the TX request.
+ * @NL80211_CMD_FRAME_WAIT_CANCEL: When an off-channel TX was requested, this
+ * command may be used with the corresponding cookie to cancel the wait
+ * time if it is known that it is no longer necessary.
* @NL80211_CMD_ACTION: Alias for @NL80211_CMD_FRAME for backward compatibility.
* @NL80211_CMD_FRAME_TX_STATUS: Report TX status of a management frame
* transmitted with %NL80211_CMD_FRAME. %NL80211_ATTR_COOKIE identifies
@@ -493,6 +498,8 @@ enum nl80211_commands {
NL80211_CMD_SET_CHANNEL,
NL80211_CMD_SET_WDS_PEER,
+ NL80211_CMD_FRAME_WAIT_CANCEL,
+
/* add new commands above here */
/* used to define NL80211_CMD_MAX below */
@@ -828,6 +835,12 @@ enum nl80211_commands {
*
* @NL80211_ATTR_MCAST_RATE: Multicast tx rate (in 100 kbps) for IBSS
*
+ * @NL80211_ATTR_OFFCHANNEL_TX_OK: For management frame TX, the frame may be
+ * transmitted on another channel when the channel given doesn't match
+ * the current channel. If the current channel doesn't match and this
+ * flag isn't set, the frame will be rejected. This is also used as an
+ * nl80211 capability flag.
+ *
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
*/
@@ -1002,6 +1015,8 @@ enum nl80211_attrs {
NL80211_ATTR_MCAST_RATE,
+ NL80211_ATTR_OFFCHANNEL_TX_OK,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,