--- old/usr/src/uts/common/io/arn/arn_ani.c	2016-06-29 14:08:27.027599720 -0400
+++ new/usr/src/uts/common/io/arn/arn_ani.c	2016-06-29 14:08:27.070831665 -0400
@@ -134,7 +134,7 @@
 			REG_CLR_BIT(ah, AR_PHY_SFCORR_LOW,
 			    AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);
 
-		if (!on != aniState->ofdmWeakSigDetectOff) {
+		if ((!on) != aniState->ofdmWeakSigDetectOff) {
 			if (on)
 				ahp->ah_stats.ast_ani_ofdmon++;
 			else
--- old/usr/src/uts/common/io/arn/arn_beacon.c	2016-06-29 14:08:27.992913998 -0400
+++ new/usr/src/uts/common/io/arn/arn_beacon.c	2016-06-29 14:08:28.020440976 -0400
@@ -29,42 +29,6 @@
 #include "arn_core.h"
 
 /*
- * This function will modify certain transmit queue properties depending on
- * the operating mode of the station (AP or AdHoc).  Parameters are AIFS
- * settings and channel width min/max
- */
-
-static int
-/* LINTED E_STATIC_UNUSED */
-arn_beaconq_config(struct arn_softc *sc)
-{
-	struct ath_hal *ah = sc->sc_ah;
-	struct ath9k_tx_queue_info qi;
-
-	(void) ath9k_hw_get_txq_props(ah, sc->sc_beaconq, &qi);
-	if (sc->sc_ah->ah_opmode == ATH9K_M_HOSTAP) {
-		/* Always burst out beacon and CAB traffic. */
-		qi.tqi_aifs = 1;
-		qi.tqi_cwmin = 0;
-		qi.tqi_cwmax = 0;
-	} else {
-		/* Adhoc mode; important thing is to use 2x cwmin. */
-		qi.tqi_aifs = sc->sc_beacon_qi.tqi_aifs;
-		qi.tqi_cwmin = 2*sc->sc_beacon_qi.tqi_cwmin;
-		qi.tqi_cwmax = sc->sc_beacon_qi.tqi_cwmax;
-	}
-
-	if (!ath9k_hw_set_txq_props(ah, sc->sc_beaconq, &qi)) {
-		arn_problem("unable to update h/w beacon queue parameters\n");
-		return (0);
-	} else {
-		/* push to h/w */
-		(void) ath9k_hw_resettxqueue(ah, sc->sc_beaconq);
-		return (1);
-	}
-}
-
-/*
  * Associates the beacon frame buffer with a transmit descriptor.  Will set
  * up all required antenna switch parameters, rate codes, and channel flags.
  * Beacons are always sent out at the lowest rate, and are not retried.
@@ -152,7 +116,6 @@
 #ifdef ARN_IBSS
 static void
 arn_beacon_start_adhoc(struct arn_softc *sc)
-
 {
 	struct ath_buf *bf = list_head(&sc->sc_bcbuf_list);
 	struct ieee80211_node *in = bf->bf_in;
@@ -257,7 +220,6 @@
 
 void
 arn_beacon_config(struct arn_softc *sc)
-
 {
 	struct ath_beacon_config conf;
 	ieee80211com_t *ic = (ieee80211com_t *)sc;
@@ -333,7 +295,7 @@
 	 */
 	if (sleepduration > intval) {
 		bs.bs_bmissthreshold = conf.listen_interval *
-			ATH_DEFAULT_BMISS_LIMIT / 2;
+		    ATH_DEFAULT_BMISS_LIMIT / 2;
 	} else {
 		bs.bs_bmissthreshold = DIV_ROUND_UP(conf.bmiss_timeout, intval);
 		if (bs.bs_bmissthreshold > 15)
--- old/usr/src/uts/common/io/arn/arn_calib.c	2016-06-29 14:08:28.807306539 -0400
+++ new/usr/src/uts/common/io/arn/arn_calib.c	2016-06-29 14:08:28.835156280 -0400
@@ -724,13 +724,6 @@
 	int16_t nf, nfThresh;
 	int16_t nfarray[NUM_NF_READINGS] = { 0 };
 	struct ath9k_nfcal_hist *h;
-	/* LINTED E_FUNC_SET_NOT_USED */
-	uint8_t chainmask;
-
-	if (AR_SREV_9280(ah))
-		chainmask = 0x1B;
-	else
-		chainmask = 0x3F;
 
 	chan->channelFlags &= (~CHANNEL_CW_INT);
 	if (REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF) {
--- old/usr/src/uts/common/io/arn/arn_eeprom.c	2016-06-29 14:08:29.759719466 -0400
+++ new/usr/src/uts/common/io/arn/arn_eeprom.c	2016-06-29 14:08:29.787898620 -0400
@@ -471,7 +471,7 @@
 		integer = swab32(eep->modalHeader.antCtrlCommon);
 		eep->modalHeader.antCtrlCommon = integer;
 
-		for (i = 0; i < AR5416_MAX_CHAINS; i++) {
+		for (i = 0; i < AR5416_EEP4K_MAX_CHAINS; i++) {
 			integer = swab32(eep->modalHeader.antCtrlChain[i]);
 			eep->modalHeader.antCtrlChain[i] = integer;
 		}
--- old/usr/src/uts/common/io/arn/arn_hw.h	2016-06-29 14:08:30.958567208 -0400
+++ new/usr/src/uts/common/io/arn/arn_hw.h	2016-06-29 14:08:30.985908374 -0400
@@ -472,7 +472,7 @@
 #define	AR5416_EEP4K_MAX_CHAINS					1
 
 enum eeprom_param {
-	EEP_NFTHRESH_5,
+	EEP_NFTHRESH_5 = 0,
 	EEP_NFTHRESH_2,
 	EEP_MAC_MSW,
 	EEP_MAC_MID,
@@ -494,7 +494,10 @@
 	EEP_OL_PWRCTRL,
 	EEP_RC_CHAIN_MASK,
 	EEP_DAC_HPWR_5G,
-	EEP_FRAC_N_5G
+	EEP_FRAC_N_5G,
+	EEP_MAC_0 = AR_EEPROM_MAC(0),
+	EEP_MAC_1 = AR_EEPROM_MAC(1),
+	EEP_MAC_2 = AR_EEPROM_MAC(2)
 };
 
 enum ar5416_rates {
--- old/usr/src/uts/common/io/arn/arn_main.c	2016-06-29 14:08:31.868520619 -0400
+++ new/usr/src/uts/common/io/arn/arn_main.c	2016-06-29 14:08:31.896785926 -0400
@@ -502,52 +502,6 @@
 	return (DDI_SUCCESS);
 }
 
-static struct ath_rate_table *
-/* LINTED E_STATIC_UNUSED */
-arn_get_ratetable(struct arn_softc *sc, uint32_t mode)
-{
-	struct ath_rate_table *rate_table = NULL;
-
-	switch (mode) {
-	case IEEE80211_MODE_11A:
-		rate_table = sc->hw_rate_table[ATH9K_MODE_11A];
-		break;
-	case IEEE80211_MODE_11B:
-		rate_table = sc->hw_rate_table[ATH9K_MODE_11B];
-		break;
-	case IEEE80211_MODE_11G:
-		rate_table = sc->hw_rate_table[ATH9K_MODE_11G];
-		break;
-#ifdef ARB_11N
-	case IEEE80211_MODE_11NA_HT20:
-		rate_table = sc->hw_rate_table[ATH9K_MODE_11NA_HT20];
-		break;
-	case IEEE80211_MODE_11NG_HT20:
-		rate_table = sc->hw_rate_table[ATH9K_MODE_11NG_HT20];
-		break;
-	case IEEE80211_MODE_11NA_HT40PLUS:
-		rate_table = sc->hw_rate_table[ATH9K_MODE_11NA_HT40PLUS];
-		break;
-	case IEEE80211_MODE_11NA_HT40MINUS:
-		rate_table = sc->hw_rate_table[ATH9K_MODE_11NA_HT40MINUS];
-		break;
-	case IEEE80211_MODE_11NG_HT40PLUS:
-		rate_table = sc->hw_rate_table[ATH9K_MODE_11NG_HT40PLUS];
-		break;
-	case IEEE80211_MODE_11NG_HT40MINUS:
-		rate_table = sc->hw_rate_table[ATH9K_MODE_11NG_HT40MINUS];
-		break;
-#endif
-	default:
-		ARN_DBG((ARN_DBG_FATAL, "arn: arn_get_ratetable(): "
-		    "invalid mode %u\n", mode));
-		return (NULL);
-	}
-
-	return (rate_table);
-
-}
-
 static void
 arn_setcurmode(struct arn_softc *sc, enum wireless_mode mode)
 {
@@ -976,7 +930,6 @@
  */
 static void
 arn_ani_calibrate(void *arg)
-
 {
 	ieee80211com_t *ic = (ieee80211com_t *)arg;
 	struct arn_softc *sc = (struct arn_softc *)ic;
@@ -1017,7 +970,7 @@
 		if ((timestamp - sc->sc_ani.sc_resetcal_timer) >=
 		    ATH_RESTART_CALINTERVAL) {
 			ath9k_hw_reset_calvalid(ah, ah->ah_curchan,
-						&sc->sc_ani.sc_caldone);
+			    &sc->sc_ani.sc_caldone);
 			if (sc->sc_ani.sc_caldone)
 				sc->sc_ani.sc_resetcal_timer = timestamp;
 		}
@@ -2628,8 +2581,6 @@
 #define	ATH9K_HT_CAP_MAXRXAMPDU_65536 0x3	/* 2 ^ 16 */
 #define	ATH9K_HT_CAP_MPDUDENSITY_8 0x6		/* 8 usec */
 
-	/* LINTED E_FUNC_SET_NOT_USED */
-	uint8_t tx_streams;
 	uint8_t rx_streams;
 
 	arn_ht_conf *ht_info = &sc->sc_ht_conf;
@@ -2646,7 +2597,6 @@
 
 	/* set up supported mcs set */
 	(void) memset(&ht_info->rx_mcs_mask, 0, sizeof (ht_info->rx_mcs_mask));
-	tx_streams = ISP2(sc->sc_ah->ah_caps.tx_chainmask) ? 1 : 2;
 	rx_streams = ISP2(sc->sc_ah->ah_caps.rx_chainmask) ? 1 : 2;
 
 	ht_info->rx_mcs_mask[0] = 0xff;
@@ -3501,7 +3451,7 @@
 
 static struct modldrv arn_modldrv = {
 	&mod_driverops, /* Type of module.  This one is a driver */
-	"arn-Atheros 9000 series driver:2.0", /* short description */
+	"Atheros 9000 series driver", /* short description */
 	&arn_dev_ops /* driver specific ops */
 };
 
--- old/usr/src/uts/common/io/arn/arn_xmit.c	2016-06-29 14:08:33.182830857 -0400
+++ new/usr/src/uts/common/io/arn/arn_xmit.c	2016-06-29 14:08:33.210472643 -0400
@@ -289,7 +289,6 @@
 arn_tid_drain(struct arn_softc *sc,
     struct ath_txq *txq,
     struct ath_atx_tid *tid)
-
 {
 	struct ath_buf *bf;
 
@@ -1147,49 +1146,6 @@
 }
 #endif /* ARN_TX_AGGREGATION */
 
-/*
- * ath_pkt_dur - compute packet duration (NB: not NAV)
- * rix - rate index
- * pktlen - total bytes (delims + data + fcs + pads + pad delims)
- * width  - 0 for 20 MHz, 1 for 40 MHz
- * half_gi - to use 4us v/s 3.6 us for symbol time
- */
-
-static uint32_t
-/* LINTED E_STATIC_UNUSED */
-arn_pkt_duration(struct arn_softc *sc, uint8_t rix, struct ath_buf *bf,
-    int width, int half_gi, boolean_t shortPreamble)
-{
-	struct ath_rate_table *rate_table = sc->sc_currates;
-	uint32_t nbits, nsymbits, duration, nsymbols;
-	uint8_t rc;
-	int streams, pktlen;
-
-	pktlen = bf_isaggr(bf) ? bf->bf_al : bf->bf_frmlen;
-	rc = rate_table->info[rix].ratecode;
-
-	/* for legacy rates, use old function to compute packet duration */
-	if (!IS_HT_RATE(rc))
-		return (ath9k_hw_computetxtime(sc->sc_ah, rate_table, pktlen,
-		    rix, shortPreamble));
-
-	/* find number of symbols: PLCP + data */
-	nbits = (pktlen << 3) + OFDM_PLCP_BITS;
-	nsymbits = bits_per_symbol[HT_RC_2_MCS(rc)][width];
-	nsymbols = (nbits + nsymbits - 1) / nsymbits;
-
-	if (!half_gi)
-		duration = SYMBOL_TIME(nsymbols);
-	else
-		duration = SYMBOL_TIME_HALFGI(nsymbols);
-
-	/* addup duration for legacy/ht training and signal fields */
-	streams = HT_RC_2_STREAMS(rc);
-	duration += L_STF + L_LTF + L_SIG + HT_SIG + HT_STF + HT_LTF(streams);
-
-	return (duration);
-}
-
 static struct ath_buf *
 arn_tx_get_buffer(struct arn_softc *sc)
 {
@@ -1332,8 +1288,8 @@
 /* Rate module function to set rate related fields in tx descriptor */
 static void
 ath_buf_set_rate(struct arn_softc *sc,
-struct ath_buf *bf,
-struct ieee80211_frame *wh)
+    struct ath_buf *bf,
+    struct ieee80211_frame *wh)
 {
 	struct ath_hal *ah = sc->sc_ah;
 	struct ath_rate_table *rt;
--- old/usr/src/uts/intel/arn/Makefile	2016-06-29 14:08:34.398372531 -0400
+++ new/usr/src/uts/intel/arn/Makefile	2016-06-29 14:08:34.426875346 -0400
@@ -62,10 +62,8 @@
 LINTTAGS        += -erroff=E_BAD_PTR_CAST_ALIGN
 
 CERRWARN	+= -_gcc=-Wno-unused-variable
-CERRWARN	+= -_gcc=-Wno-unused-function
 CERRWARN	+= -_gcc=-Wno-uninitialized
 CERRWARN	+= -_gcc=-Wno-char-subscripts
-CERRWARN	+= -_gcc=-Wno-empty-body
 
 #
 #	Default build targets.
