From madwifi-dfs. If ieee80211_find_channel is passed 0 for flags, then omit flag...
authormtaylor <mtaylor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 23 Jan 2008 18:53:34 +0000 (18:53 +0000)
committermtaylor <mtaylor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 23 Jan 2008 18:53:34 +0000 (18:53 +0000)
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3235 0192ed92-7a03-0410-a25b-9323aeb14dbd

net80211/ieee80211.c

index 85165b3e3d11c9704bae6de0f921eb64bee341cf..d2051a81ee40bc755837d133cc812c40eefbb7af 100644 (file)
@@ -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;