On 2016/01/13 15:23, Stefan Sperling wrote:
> This is the real fix, for all drivers.
> I messed this up while removing turbo mode.

Aargh, I read and re-read those lines in particular and didn't spot it!

So compared to the "pre turbo removal" code it's essentially this:

@@ -767,13 +750,10 @@ ieee80211_setmode(struct ieee80211com *i
        for (i = 0; i <= IEEE80211_CHAN_MAX; i++) {
                c = &ic->ic_channels[i];
                if (mode == IEEE80211_MODE_AUTO) {
-                       /* ignore turbo channels for autoselect */
-                       if ((c->ic_flags &~ IEEE80211_CHAN_TURBO) != 0)
+                       if (c->ic_flags != 0)
                                break;
                } else if ((c->ic_flags & modeflags) == modeflags)
                        break;
        }
        if (i > IEEE80211_CHAN_MAX) {
                DPRINTF(("no channels found for mode %u\n", mode));
@@ -787,13 +767,10 @@ ieee80211_setmode(struct ieee80211com *i
        for (i = 0; i <= IEEE80211_CHAN_MAX; i++) {
                c = &ic->ic_channels[i];
                if (mode == IEEE80211_MODE_AUTO) {
-                       /* take anything but pure turbo channels */
-                       if ((c->ic_flags &~ IEEE80211_CHAN_TURBO) != 0)
+                       if (c->ic_flags != 0)
                                setbit(ic->ic_chan_active, i);
                } else if ((c->ic_flags & modeflags) == modeflags)
                        setbit(ic->ic_chan_active, i);
        }

....

This looks correct to me.

Reply via email to