aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2010-05-19 12:17:12 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-06-02 16:13:27 -0400
commit252aa631f88080920a7083ac5a5844ffc5463629 (patch)
treee1482e9cf7c7230acb9ed33c8a24687e48dc7aa1 /net/mac80211/mlme.c
parent4f424867dd4752d457458fec29ca57ce5d7dc4ac (diff)
downloadkernel_samsung_smdk4412-252aa631f88080920a7083ac5a5844ffc5463629.zip
kernel_samsung_smdk4412-252aa631f88080920a7083ac5a5844ffc5463629.tar.gz
kernel_samsung_smdk4412-252aa631f88080920a7083ac5a5844ffc5463629.tar.bz2
cfg80211: make action channel type optional
When sending action frames, we want to verify that we do that on the correct channel. However, checking the channel type in addition can get in the way, since the channel type could change on the fly during an association, and it's not useful to have the channel type anyway since it has no effect on the transmission. Therefore, make it optional to specify so that if wanted, it can still be checked, but is not required. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 31e3386..29c3a75 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2308,6 +2308,7 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
int ieee80211_mgd_action(struct ieee80211_sub_if_data *sdata,
struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type,
+ bool channel_type_valid,
const u8 *buf, size_t len, u64 *cookie)
{
struct ieee80211_local *local = sdata->local;
@@ -2315,9 +2316,11 @@ int ieee80211_mgd_action(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb;
/* Check that we are on the requested channel for transmission */
- if ((chan != local->tmp_channel ||
- channel_type != local->tmp_channel_type) &&
- (chan != local->oper_channel ||
+ if (chan != local->tmp_channel &&
+ chan != local->oper_channel)
+ return -EBUSY;
+ if (channel_type_valid &&
+ (channel_type != local->tmp_channel_type &&
channel_type != local->_oper_channel_type))
return -EBUSY;