svn commit: r298936 - head/sys/dev/iwm

Andriy Voskoboinyk avos at FreeBSD.org
Mon May 2 19:07:45 UTC 2016


Author: avos
Date: Mon May  2 19:07:44 2016
New Revision: 298936
URL: https://svnweb.freebsd.org/changeset/base/298936

Log:
  iwm: fix parameters for iwm_add_channel_band()
  
  It accepts <first index, max index + 1>, not
  <first index, number of entries>.
  
  Reported by:	adrian

Modified:
  head/sys/dev/iwm/if_iwm.c

Modified: head/sys/dev/iwm/if_iwm.c
==============================================================================
--- head/sys/dev/iwm/if_iwm.c	Mon May  2 18:48:37 2016	(r298935)
+++ head/sys/dev/iwm/if_iwm.c	Mon May  2 19:07:44 2016	(r298936)
@@ -1737,14 +1737,13 @@ iwm_init_channel_map(struct ieee80211com
 	/* 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);
 	}
 }
 


More information about the svn-src-head mailing list