diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-11-25 04:02:29 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-29 15:24:35 -0500 |
commit | f7ca38dfe58c20cb1aa2ed9643187e8b194b5bae (patch) | |
tree | 42db54588fd5fa769a16def75708117903577b40 /net/mac80211/cfg.c | |
parent | 9a67d761b39614c0495dcab9a204e21a9f4c4d31 (diff) |
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 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 0c544074479e..aac2d7de828e 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1552,9 +1552,9 @@ static int ieee80211_cancel_remain_on_channel(struct wiphy *wiphy, | |||
1552 | } | 1552 | } |
1553 | 1553 | ||
1554 | static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev, | 1554 | static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev, |
1555 | struct ieee80211_channel *chan, | 1555 | struct ieee80211_channel *chan, bool offchan, |
1556 | enum nl80211_channel_type channel_type, | 1556 | enum nl80211_channel_type channel_type, |
1557 | bool channel_type_valid, | 1557 | bool channel_type_valid, unsigned int wait, |
1558 | const u8 *buf, size_t len, u64 *cookie) | 1558 | const u8 *buf, size_t len, u64 *cookie) |
1559 | { | 1559 | { |
1560 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 1560 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
@@ -1565,6 +1565,9 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev, | |||
1565 | u32 flags = IEEE80211_TX_INTFL_NL80211_FRAME_TX | | 1565 | u32 flags = IEEE80211_TX_INTFL_NL80211_FRAME_TX | |
1566 | IEEE80211_TX_CTL_REQ_TX_STATUS; | 1566 | IEEE80211_TX_CTL_REQ_TX_STATUS; |
1567 | 1567 | ||
1568 | if (offchan) | ||
1569 | return -EOPNOTSUPP; | ||
1570 | |||
1568 | /* Check that we are on the requested channel for transmission */ | 1571 | /* Check that we are on the requested channel for transmission */ |
1569 | if (chan != local->tmp_channel && | 1572 | if (chan != local->tmp_channel && |
1570 | chan != local->oper_channel) | 1573 | chan != local->oper_channel) |