From: Andrei Otcheretianski Date: Thu, 17 Oct 2013 08:52:17 +0000 (+0200) Subject: nl80211: fix channel switch parsing X-Git-Tag: v3.13-rc1~105^2~23^2^2~6^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d0a361a5b3f5aa28778a0c336de5a911fc0cd678;p=profile%2Fcommon%2Fkernel-common.git 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 [reword commit message] Signed-off-by: Johannes Berg --- diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index c49f0af..8ced6bc 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) return -EINVAL; /* only important for AP, IBSS and mesh create IEs internally */ - if (need_new_beacon && - (!info->attrs[NL80211_ATTR_CSA_IES] || - !info->attrs[NL80211_ATTR_CSA_C_OFF_BEACON])) + if (need_new_beacon && !info->attrs[NL80211_ATTR_CSA_IES]) return -EINVAL; params.count = nla_get_u32(info->attrs[NL80211_ATTR_CH_SWITCH_COUNT]);