Author: avos
Date: Mon Jan 28 01:19:43 2019
New Revision: 343510
URL: https://svnweb.freebsd.org/changeset/base/343510

Log:
  MFC r343342:
  net80211: turn channel mode check into assertion.
  
  There is may be only 11b channel (since chanflags[] table
  maps MODE_AUTO to the corresponding 11b channel flags).

Modified:
  stable/12/sys/net80211/ieee80211_scan_sta.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/net80211/ieee80211_scan_sta.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/sys/net80211/ieee80211_scan_sta.c
==============================================================================
--- stable/12/sys/net80211/ieee80211_scan_sta.c Mon Jan 28 01:12:20 2019        
(r343509)
+++ stable/12/sys/net80211/ieee80211_scan_sta.c Mon Jan 28 01:19:43 2019        
(r343510)
@@ -496,12 +496,15 @@ add_channels(struct ieee80211vap *vap,
                if (c == NULL || isexcluded(vap, c))
                        continue;
                if (mode == IEEE80211_MODE_AUTO) {
+                       KASSERT(IEEE80211_IS_CHAN_B(c),
+                           ("%s: wrong channel for 'auto' mode %u / %u\n",
+                           __func__, c->ic_freq, c->ic_flags));
+
                        /*
                         * XXX special-case 11b/g channels so we select
                         *     the g channel if both are present.
                         */
-                       if (IEEE80211_IS_CHAN_B(c) &&
-                           (cg = find11gchannel(ic, i, c->ic_freq)) != NULL)
+                       if ((cg = find11gchannel(ic, i, c->ic_freq)) != NULL)
                                c = cg;
                }
                ss->ss_chans[ss->ss_last++] = c;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to