Experts,

I will drop a message to the ath9k-devel list for the fix,
but I suspect that it will be long before the fix actually
appears in the compat-wireless (or will not appear at all).

So I wrote an alternative script to do the same thing,
to circumvent my momentum/interest from going.

------
. /lib/ar71xx.sh

board=$(ar71xx_board_name)

ar922x_disable_gpio_jtag()                 
{                                          
        local regidx=0x4054                

        echo $regidx > /sys/kernel/debug/ieee80211/$1/ath9k/regidx
        regval=`cat /sys/kernel/debug/ieee80211/$1/ath9k/regval`
        regval=$((regval | 0x20000))       
        echo regval $regval                                                 
        echo $regval > /sys/kernel/debug/ieee80211/$1/ath9k/regval
}                                                    

if [ "${board}" == "wzr-hp-ag300h" ]; then
        ar922x_disable_gpio_jtag phy0
        ar922x_disable_gpio_jtag phy1
fi
------

I have tested it by inserting the code at the "done" case of
the set_state() function in /etc/diag.sh, but I believe there
are other more appropriate places and/or mechanism to invoke
this kind of script. It should be executed after the ath9k*.ko
modules are loaded.

I would like to hear ideas and pointers from the openwrt experts.

--- shinoda


On 2012/08/03, at 7:21, LEO Airwarosu Yoichi Shinoda wrote:

> 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

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

Reply via email to