Port over some GPIO and LED fixes.

* As a preparation for AR9287 GPIO support, add in the AR9287 GPIO mask.
* Fix the association mask values; these are post-shift values but were
  being shifted in twice. This resulted in some garbage being written
  in the wrong place and the link LED (at least on my d-link AR5416
  NIC) giving totally incorrect blink patterns.
This commit is contained in:
Adrian Chadd 2011-12-23 08:32:53 +00:00
parent 153bf8fbd3
commit e81f85f155

View File

@ -203,9 +203,9 @@
#define AR_MAC_LED_MODE_POWON 5 /* Power LED on (s/w control) */
#define AR_MAC_LED_MODE_NETON 6 /* Network LED on (s/w control) */
#define AR_MAC_LED_ASSOC 0x00000c00
#define AR_MAC_LED_ASSOC_NONE 0x00000000 /* STA is not associated or trying */
#define AR_MAC_LED_ASSOC_ACTIVE 0x00000400 /* STA is associated */
#define AR_MAC_LED_ASSOC_PEND 0x00000800 /* STA is trying to associate */
#define AR_MAC_LED_ASSOC_NONE 0x0 /* STA is not associated or trying */
#define AR_MAC_LED_ASSOC_ACTIVE 0x1 /* STA is associated */
#define AR_MAC_LED_ASSOC_PEND 0x2 /* STA is trying to associate */
#define AR_MAC_LED_ASSOC_S 10
#define AR_WA_UNTIE_RESET_EN 0x00008000 /* ena PCI reset to POR */
@ -504,6 +504,8 @@
#define AR928X_GPIO_IN_VAL_S 10
#define AR9285_GPIO_IN_VAL 0x00FFF000
#define AR9285_GPIO_IN_VAL_S 12
#define AR9287_GPIO_IN_VAL 0x003FF800
#define AR9287_GPIO_IN_VAL_S 11
#define AR_GPIO_OE_OUT_DRV 0x3 /* 2 bit mask shifted by 2*bitpos */
#define AR_GPIO_OE_OUT_DRV_NO 0x0 /* tristate */