diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2014-02-20 15:36:23 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-02-21 09:37:46 +0100 |
commit | 6658ab80fd4ef940fc2366ddb66690a15ea69c18 (patch) | |
tree | 9f86aa5fbd6a73e965d1e99e5e737a0181541b6d | |
parent | cfg80211: remove radar requirements check from cfg80211_can_use_iftype_chan() (diff) | |
download | linux-6658ab80fd4ef940fc2366ddb66690a15ea69c18.tar.xz linux-6658ab80fd4ef940fc2366ddb66690a15ea69c18.zip |
mac80211: ibss: handle cfg80211_chandef_dfs_required() error codes
Error codes returned by cfg80211_chandef_dfs_required() are ignored
when trying to join an IBSS. Fix this by printing an error and
returning.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/mac80211/ibss.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 4453e2725e40..e458ca0dffec 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c @@ -283,6 +283,11 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, err = cfg80211_chandef_dfs_required(sdata->local->hw.wiphy, &chandef); + if (err < 0) { + sdata_info(sdata, + "Failed to join IBSS, invalid chandef\n"); + return; + } if (err > 0) { if (!ifibss->userspace_handles_dfs) { sdata_info(sdata, |