summaryrefslogtreecommitdiffstats
path: root/sys/dev/iwm/if_iwm.c
diff options
context:
space:
mode:
authoravos <avos@FreeBSD.org>2016-05-02 19:07:44 +0000
committeravos <avos@FreeBSD.org>2016-05-02 19:07:44 +0000
commit42681e6ccf3c8e4c9934a203a1d1c696efce05da (patch)
treed2825dbb26f8e6b220c74d2df56ff8ce6036592e /sys/dev/iwm/if_iwm.c
parent287935aef430e781437ba491aa9cc67bfc15c8ab (diff)
downloadFreeBSD-src-42681e6ccf3c8e4c9934a203a1d1c696efce05da.zip
FreeBSD-src-42681e6ccf3c8e4c9934a203a1d1c696efce05da.tar.gz
iwm: fix parameters for iwm_add_channel_band()
It accepts <first index, max index + 1>, not <first index, number of entries>. Reported by: adrian
Diffstat (limited to 'sys/dev/iwm/if_iwm.c')
-rw-r--r--sys/dev/iwm/if_iwm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c
index eabcf75..220d5a0 100644
--- a/sys/dev/iwm/if_iwm.c
+++ b/sys/dev/iwm/if_iwm.c
@@ -1737,14 +1737,13 @@ iwm_init_channel_map(struct ieee80211com *ic, int maxchans, int *nchans,
/* 14: 11b channel only. */
clrbit(bands, IEEE80211_MODE_11G);
iwm_add_channel_band(sc, chans, maxchans, nchans,
- IWM_NUM_2GHZ_CHANNELS - 1, 1, bands);
+ IWM_NUM_2GHZ_CHANNELS - 1, IWM_NUM_2GHZ_CHANNELS, bands);
if (data->sku_cap_band_52GHz_enable) {
memset(bands, 0, sizeof(bands));
setbit(bands, IEEE80211_MODE_11A);
iwm_add_channel_band(sc, chans, maxchans, nchans,
- IWM_NUM_2GHZ_CHANNELS,
- nitems(iwm_nvm_channels) - IWM_NUM_2GHZ_CHANNELS, bands);
+ IWM_NUM_2GHZ_CHANNELS, nitems(iwm_nvm_channels), bands);
}
}
OpenPOWER on IntegriCloud