svn commit: r228837 - head/sys/dev/ath/ath_hal/ar5416
Adrian Chadd
adrian at FreeBSD.org
Fri Dec 23 09:09:10 UTC 2011
Author: adrian
Date: Fri Dec 23 09:09:10 2011
New Revision: 228837
URL: http://svn.freebsd.org/changeset/base/228837
Log:
Disable the code which hard-sets the LEDs on. This prevents the LED
state from correctly updating things.
The reference driver directly enables/disables the LED state as required,
rather than nailing it up like it currently is. That'll have to come
later by adding some further HAL methods.
Obtained from: Atheros
Modified:
head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Fri Dec 23 08:53:22 2011 (r228836)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Fri Dec 23 09:09:10 2011 (r228837)
@@ -73,11 +73,23 @@ ar5416SetLedState(struct ath_hal *ah, HA
AR_MAC_LED_ASSOC_NONE,
AR_MAC_LED_ASSOC_NONE,
};
+#if 0
uint32_t bits;
+#endif
if (AR_SREV_HOWL(ah))
return;
+ OS_REG_RMW_FIELD(ah, AR_MAC_LED,
+ AR_MAC_LED_ASSOC, ledbits[state & 0x7]);
+
+ /*
+ * For now, don't override the power/network LED
+ * "on" bits. The reference driver notes that some
+ * devices connect the LED pins to other functionality
+ * so we can't just leave this on by default.
+ */
+#if 0
bits = OS_REG_READ(ah, AR_MAC_LED);
bits = (bits &~ AR_MAC_LED_MODE)
| SM(AR_MAC_LED_MODE_POWON, AR_MAC_LED_MODE)
@@ -88,6 +100,7 @@ ar5416SetLedState(struct ath_hal *ah, HA
bits = (bits &~ AR_MAC_LED_ASSOC)
| SM(ledbits[state & 0x7], AR_MAC_LED_ASSOC);
OS_REG_WRITE(ah, AR_MAC_LED, bits);
+#endif
}
/*
More information about the svn-src-head
mailing list