9418 iwn: rate array in struct iwn_ks_txpower should have size IWN_RIDX_MAX+1
Reviewed by: Marcel Telka <marcel@telka.sk>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
Approved by: Dan McDonald <danmcd@joyent.com>
diff --git a/usr/src/uts/common/io/iwn/if_iwn.c b/usr/src/uts/common/io/iwn/if_iwn.c
index 716794b..9e07f2b 100644
--- a/usr/src/uts/common/io/iwn/if_iwn.c
+++ b/usr/src/uts/common/io/iwn/if_iwn.c
@@ -597,7 +597,7 @@
 		kstat_named_init(&sc->sc_txpower->txchain[i].tcomp,
 		    tmp, KSTAT_DATA_LONG);
 
-		for (r = 0; r != IWN_RIDX_MAX; r++) {
+		for (r = 0; r <= IWN_RIDX_MAX; r++) {
 			(void) snprintf(tmp, KSTAT_STRLEN - 1,
 			    "Ant %d Rate %d RF gain", i, r);
 			kstat_named_init(
diff --git a/usr/src/uts/common/io/iwn/if_iwnvar.h b/usr/src/uts/common/io/iwn/if_iwnvar.h
index fcf32f4..fd90fa1 100644
--- a/usr/src/uts/common/io/iwn/if_iwnvar.h
+++ b/usr/src/uts/common/io/iwn/if_iwnvar.h
@@ -207,7 +207,7 @@
 #define	IWN_FLAG_LAZY_RESUME	(1 << 23)
 #define	IWN_FLAG_STOP_CALIB_TO	(1 << 24)
 
-	uint8_t 		hw_type;
+	uint8_t			hw_type;
 
 	struct iwn_ops		ops;
 	const char		*fwname;
@@ -244,7 +244,7 @@
 	struct iwn_rx_ring	rxq;
 
 	ddi_acc_handle_t	sc_regh;
-	void 			*sc_ih;
+	void			*sc_ih;
 	ddi_acc_handle_t	sc_pcih;
 	uint_t			sc_intr_pri;
 	int			sc_intr_cap;
@@ -400,7 +400,7 @@
 		struct {
 			kstat_named_t	rf_gain;
 			kstat_named_t	dsp_gain;
-		} rate[IWN_RIDX_MAX];
+		} rate[IWN_RIDX_MAX + 1];
 	} txchain[2];
 };