aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2014-02-20 16:36:23 +0200
committerJohannes Berg <johannes.berg@intel.com>2014-02-21 09:37:46 +0100
commit6658ab80fd4ef940fc2366ddb66690a15ea69c18 (patch)
tree9f86aa5fbd6a73e965d1e99e5e737a0181541b6d
parent7b2106aea2638948806df248215b14efd84c5ffc (diff)
downloadmac80211-next-csa-6658ab80fd4ef940fc2366ddb66690a15ea69c18.tar.gz
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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 4453e2725e407..e458ca0dffec1 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,