From: mtaylor Date: Wed, 23 Jan 2008 18:53:34 +0000 (+0000) Subject: From madwifi-dfs. If ieee80211_find_channel is passed 0 for flags, then omit flag... X-Git-Url: http://git.ozo.com/?a=commitdiff_plain;h=8f5e980418c066ecf8c28206a8b7190d6e63476e;p=madwifi%2F.git 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 --- 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;