From 843ead088f87e5e766084646370e981f176eb323 Mon Sep 17 00:00:00 2001 From: Richard Lowe Date: Tue, 6 Feb 2018 02:44:43 +0000 Subject: 9418 iwn: rate array in struct iwn_ks_txpower should have size IWN_RIDX_MAX+1 Reviewed by: Marcel Telka Reviewed by: Robert Mustacchi Reviewed by: Andy Fiddaman Approved by: Dan McDonald --- usr/src/uts/common/io/iwn/if_iwn.c | 2 +- usr/src/uts/common/io/iwn/if_iwnvar.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'usr/src') diff --git a/usr/src/uts/common/io/iwn/if_iwn.c b/usr/src/uts/common/io/iwn/if_iwn.c index 716794b20d..9e07f2b8e2 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 @@ iwn_kstat_init_4965(struct iwn_softc *sc) 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 fcf32f49a3..fd90fa1436 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 @@ struct iwn_softc { #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_softc { 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 iwn_ks_txpower { struct { kstat_named_t rf_gain; kstat_named_t dsp_gain; - } rate[IWN_RIDX_MAX]; + } rate[IWN_RIDX_MAX + 1]; } txchain[2]; }; -- cgit v1.2.3