⬢ DragonFlyBSD Kernel Audit
DF-4734 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/netif/ath/ath_hal/ar5210/ar5210_xmit.c
+++ b/sys/dev/netif/ath/ath_hal/ar5210/ar5210_xmit.c
@@ -177,7 +177,8 @@
 		return AH_TRUE;
 
 	/* Set turbo mode / base mode parameters on or off */
-	if (IEEE80211_IS_CHAN_TURBO(chan)) {
+	/* NB: chan can be NULL during attach (mirrors ar5211/ar5212) */
+	if (chan != AH_NULL && IEEE80211_IS_CHAN_TURBO(chan)) {
 		OS_REG_WRITE(ah, AR_SLOT_TIME, INIT_SLOT_TIME_TURBO);
 		OS_REG_WRITE(ah, AR_TIME_OUT, INIT_ACK_CTS_TIMEOUT_TURBO);
 		OS_REG_WRITE(ah, AR_USEC, INIT_TRANSMIT_LATENCY_TURBO);