From 8f5e980418c066ecf8c28206a8b7190d6e63476e Mon Sep 17 00:00:00 2001 From: mtaylor Date: Wed, 23 Jan 2008 18:53:34 +0000 Subject: [PATCH] From madwifi-dfs. If ieee80211_find_channel is passed 0 for flags, then omit flag comparisons from the search criteria. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3235 0192ed92-7a03-0410-a25b-9323aeb14dbd --- net80211/ieee80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net80211/ieee80211.c b/net80211/ieee80211.c index 85165b3..d2051a8 100644 --- a/net80211/ieee80211.c +++ b/net80211/ieee80211.c @@ -661,7 +661,8 @@ ieee80211_find_channel(struct ieee80211com *ic, int freq, int flags) for (i = 0; i < ic->ic_nchans; i++) { c = &ic->ic_channels[i]; if (c->ic_freq == freq && - (c->ic_flags & IEEE80211_CHAN_ALLTURBO) == flags) + (flags == 0 || + (c->ic_flags & IEEE80211_CHAN_ALLTURBO) == flags)) return c; } return NULL; -- 2.35.1