svn commit: r321507 - head/sys/dev/iwm
Adrian Chadd
adrian at FreeBSD.org
Wed Jul 26 05:26:03 UTC 2017
Author: adrian
Date: Wed Jul 26 05:26:01 2017
New Revision: 321507
URL: https://svnweb.freebsd.org/changeset/base/321507
Log:
[iwm] if_iwm - Use chan list from ieee80211_scan_state for scan, not ic_channels.
* Limiting the channel list with "ifconfig wlan0 chanlist ..." now will
actually set the list of channels scanned by iwm.
Tested:
* Intel 7260, STA mode, setting chanlist to 1-14 and 36-254, and indeed it does what
it should!
Modified:
head/sys/dev/iwm/if_iwm_scan.c
Modified: head/sys/dev/iwm/if_iwm_scan.c
==============================================================================
--- head/sys/dev/iwm/if_iwm_scan.c Wed Jul 26 05:01:46 2017 (r321506)
+++ head/sys/dev/iwm/if_iwm_scan.c Wed Jul 26 05:26:01 2017 (r321507)
@@ -307,15 +307,13 @@ iwm_mvm_lmac_scan_fill_channels(struct iwm_softc *sc,
int j;
for (nchan = j = 0;
- j < ic->ic_nchans && nchan < sc->ucode_capa.n_scan_channels; j++) {
- c = &ic->ic_channels[j];
- /* For 2GHz, only populate 11b channels */
- /* For 5GHz, only populate 11a channels */
+ j < ss->ss_last && nchan < sc->ucode_capa.n_scan_channels; j++) {
+ c = ss->ss_chans[j];
/*
* Catch other channels, in case we have 900MHz channels or
* something in the chanlist.
*/
- if (iwm_mvm_scan_skip_channel(c)) {
+ if (!IEEE80211_IS_CHAN_2GHZ(c) && !IEEE80211_IS_CHAN_5GHZ(c)) {
IWM_DPRINTF(sc, IWM_DEBUG_RESET | IWM_DEBUG_EEPROM,
"%s: skipping channel (freq=%d, ieee=%d, flags=0x%08x)\n",
__func__, c->ic_freq, c->ic_ieee, c->ic_flags);
@@ -346,20 +344,19 @@ iwm_mvm_umac_scan_fill_channels(struct iwm_softc *sc,
struct iwm_scan_channel_cfg_umac *chan, int n_ssids)
{
struct ieee80211com *ic = &sc->sc_ic;
+ struct ieee80211_scan_state *ss = ic->ic_scan;
struct ieee80211_channel *c;
uint8_t nchan;
int j;
for (nchan = j = 0;
- j < ic->ic_nchans && nchan < sc->ucode_capa.n_scan_channels; j++) {
- c = &ic->ic_channels[j];
- /* For 2GHz, only populate 11b channels */
- /* For 5GHz, only populate 11a channels */
+ j < ss->ss_last && nchan < sc->ucode_capa.n_scan_channels; j++) {
+ c = ss->ss_chans[j];
/*
* Catch other channels, in case we have 900MHz channels or
* something in the chanlist.
*/
- if (iwm_mvm_scan_skip_channel(c)) {
+ if (!IEEE80211_IS_CHAN_2GHZ(c) && !IEEE80211_IS_CHAN_5GHZ(c)) {
IWM_DPRINTF(sc, IWM_DEBUG_RESET | IWM_DEBUG_EEPROM,
"%s: skipping channel (freq=%d, ieee=%d, flags=0x%08x)\n",
__func__, c->ic_freq, c->ic_ieee, c->ic_flags);
@@ -726,7 +723,7 @@ iwm_mvm_lmac_scan(struct iwm_softc *sc)
if (iwm_mvm_rrm_scan_needed(sc))
req->scan_flags |= htole32(IWM_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED);
- req->flags = iwm_mvm_scan_rxon_flags(&sc->sc_ic.ic_channels[0]);
+ req->flags = iwm_mvm_scan_rxon_flags(sc->sc_ic.ic_scan->ss_chans[0]);
req->filter_flags =
htole32(IWM_MAC_FILTER_ACCEPT_GRP | IWM_MAC_FILTER_IN_BEACON);
More information about the svn-src-all
mailing list