On 2012/08/01, at 15:45, LEO Airwarosu Yoichi Shinoda wrote:

> WZR-HP-AG300H
> - Current /etc/diag.sh does not support boot/init progress
>  indication.
> 
> - Wmac leds REQUIRES phy initialization (by means of wifi
>  command execution) to start working. After the first
>  phy initialization, they continue to work fine.


Okay, after playing around with files under
compat-wireless/driver/net/wireless/ath/ath9k
using numerous printk()s, I tracked down the problem down
to ath9k_hw_reset(), where

if (AR_SREV_9280_20_OR_LATER(ah))
   REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL, AR_GPIO_JTAG_DISABLE);

is executed. After this register write, wmac leds start to work.

By replicating these lines at the end of ath9k_hw_post_init(),
which is executed during the attach phase, and where it looked
most appropriate for an ath9k_hw novice, I could successfully
manipulate all leds on the wmacs without bringing up corresponding
interfaces.

Being without technical reference manuals for the wmac,
I wonder why something called INPUT has anything to do
with outputs, and wonder if I can disable the gpio jtag
functionality when the wmac is attached.
But nevertheless, I now have a working image.

So, what should I do next? Report to the ath9k-devel list and
ask for technically correct patch?

BTW, my current patch is as follows if someone is interested.

--- 
build_dir/linux-ar71xx_generic/compat-wireless-2012-07-16/drivers/net/wireless/ath/ath9k/hw.c-orig
  2012-07-28 13:12:14.387929391 +0900
+++ 
build_dir/linux-ar71xx_generic/compat-wireless-2012-07-16/drivers/net/wireless/ath/ath9k/hw.c
       2012-08-03 07:08:04.019333507 +0900
@@ -578,6 +578,9 @@
                ath9k_hw_ani_init(ah);
        }
 
+       if (AR_SREV_9280_20_OR_LATER(ah))
+               REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL, AR_GPIO_JTAG_DISABLE);
+
        return 0;
 }

--- shinoda



_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to