Commit 6658ab80 authored by Luciano Coelho's avatar Luciano Coelho Committed by Johannes Berg

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: default avatarLuciano Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 7b2106ae
...@@ -283,6 +283,11 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, ...@@ -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, err = cfg80211_chandef_dfs_required(sdata->local->hw.wiphy,
&chandef); &chandef);
if (err < 0) {
sdata_info(sdata,
"Failed to join IBSS, invalid chandef\n");
return;
}
if (err > 0) { if (err > 0) {
if (!ifibss->userspace_handles_dfs) { if (!ifibss->userspace_handles_dfs) {
sdata_info(sdata, sdata_info(sdata,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment