diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2014-02-20 16:36:23 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-02-21 09:37:46 +0100 |
commit | 6658ab80fd4ef940fc2366ddb66690a15ea69c18 (patch) | |
tree | 9f86aa5fbd6a73e965d1e99e5e737a0181541b6d /net/mac80211/ibss.c | |
parent | 7b2106aea2638948806df248215b14efd84c5ffc (diff) | |
download | op-kernel-dev-6658ab80fd4ef940fc2366ddb66690a15ea69c18.zip op-kernel-dev-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>
Diffstat (limited to 'net/mac80211/ibss.c')
-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 4453e27..e458ca0 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, |