diff options
author | Andrei Otcheretianski <andrei.otcheretianski@intel.com> | 2013-10-17 04:52:17 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-10-28 10:13:04 -0400 |
commit | d0a361a5b3f5aa28778a0c336de5a911fc0cd678 (patch) | |
tree | 92ccaa881a4479a17bfb1f55ab92b1f1b6a4d4b5 | |
parent | 0bb861e6be624111e9f85ade89b9e7548c5eb968 (diff) |
nl80211: fix channel switch parsing
The nl80211 attribute NL80211_ATTR_CSA_C_OFF_BEACON should be nested
inside NL80211_ATTR_CSA_IES, but commit ee4bc9e75811d2c0cb5f2a2fc5b5
("nl80211: enable IBSS support for channel switch announcements")
added a check in the outer message attributes.
Fix channel switch calls by removing the erroneus condition.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
[reword commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/wireless/nl80211.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index c49f0af61d5e..8ced6bc29f4a 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -5713,9 +5713,7 @@ static int nl80211_channel_switch(struct sk_buff *skb, struct genl_info *info) | |||
5713 | return -EINVAL; | 5713 | return -EINVAL; |
5714 | 5714 | ||
5715 | /* only important for AP, IBSS and mesh create IEs internally */ | 5715 | /* only important for AP, IBSS and mesh create IEs internally */ |
5716 | if (need_new_beacon && | 5716 | if (need_new_beacon && !info->attrs[NL80211_ATTR_CSA_IES]) |
5717 | (!info->attrs[NL80211_ATTR_CSA_IES] || | ||
5718 | !info->attrs[NL80211_ATTR_CSA_C_OFF_BEACON])) | ||
5719 | return -EINVAL; | 5717 | return -EINVAL; |
5720 | 5718 | ||
5721 | params.count = nla_get_u32(info->attrs[NL80211_ATTR_CH_SWITCH_COUNT]); | 5719 | params.count = nla_get_u32(info->attrs[NL80211_ATTR_CH_SWITCH_COUNT]); |