Message ID | 1392906986-12275-5-git-send-email-luca@coelho.fi (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Thu, 2014-02-20 at 16:36 +0200, Luciano Coelho wrote: > From: Luciano Coelho <luciano.coelho@intel.com> > > Error codes returned by cfg80211_chandef_dfs_required() are ignored > when trying to join an IBSS. Fix this by printing an error and > returning. Applied. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 9c84b75..b558468 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,