remote talking to AR9271

bruce m beach brucembeach at gmail.com
Fri Feb 26 19:33:15 PST 2016


Hello Oleksij


Heres another one.

./magpie_fw_dev/target/init/magpie.c line 126

#if MAGPIE_ENABLE_WLAN == 0
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                hif_handle = HIF_init(0);

Presumably MAGPIE_ENABLE_WLAN has never been set to 0, so
the code never got compiled, hence no compile time error.

Do you want me to bump my 1 item pending to 2 items pending
or do you want to just delete the 'aaaaaaaa' out of hand?

Bruce


On 2/25/16, bruce m beach <brucembeach at gmail.com> wrote:
>> Yea, looks buggy :) Can you provide a patch for this? Make
>> github pull request.
>
>
>   Yes. I want to look at it for a few days but it looks
> completely harmless. The code in question:
>
>     init.c:
>             A_PRINTF("Cold reboot initiated.");  <-- notice this
>     #if defined(PROJECT_MAGPIE)
>            iowrite32(WATCH_DOG_MAGIC_PATTERN_ADDR, 0);
>     #elif defined(PROJECT_K2)
>            iowrite32(MAGPIE_REG_RST_STATUS_ADDR, 0);
>     #endif /* #if defined(PROJECT_MAGPIE) */
>             A_USB_JUMP_BOOT();
>
> never gets executed, doesn't belong in the routine
> anyway(exception_reset()), and likely is correctly executed in
>
>     usb_api_main_patch.c:
>
>     void cold_reboot(void)
>     {
>             A_PRINTF("Cold reboot initiated.");    <-- notice this
>             iowrite32(MAGPIE_REG_RST_STATUS_ADDR, 0);
>             A_USB_JUMP_BOOT();
>     }
>
> so in the end the offending code will just get deleted. As I
> say I'll look at it for a few days, fix it and then do the
> pull request. And just for information
> MAGPIE_REG_RST_STATUS_ADDR and the K2 reset status register are
> identical address's.
>
> bruce
>
>
> On 2/24/16, Oleksij Rempel <linux at rempel-privat.de> wrote:
>> Hi Bruce,
>>
>> Am 25.02.2016 um 05:19 schrieb bruce m beach:
>>> Hello Oleksij
>>>
>>>> Complete SOC documentations is missing. We have only wifi
>>>> part of it.  I created some doc here:
>>>> https://github.com/qca/open-ath9k-htc-firmware/wiki/usb-regs
>>>> https://github.com/qca/open-ath9k-htc-firmware/wiki/usb-related-issues
>>>> https://github.com/qca/open-ath9k-htc-firmware/wiki/HTC
>>>
>>>
>>>   Thanks for you reply. All these things I looked at, but at
>>> the moment and for the last several months I've really been
>>> working on the build tree which hopefully I'll be finished
>>> in a month or so and can finally do some codeing. (I do have
>>> a usb user space module at this point that will send data to
>>> the 9271 but it is in an unfinished state). Right now I
>>> noticed something about the preprocessor statements in init.c
>>> which puzzles me. The only way I could see it was to copy
>>> init.c to another file and delete everything except the
>>> preprocessor statements, since the final #endif is 328 lines
>>> below the #if defined(PROJECT_MAGPIE) of interest. Below is
>>> the code section of interest:
>>>
>>>     #if defined(PROJECT_MAGPIE)         // outer #if
>>>       ....
>>>         #if defined(PROJECT_MAGPIE) // inner
>>>         #elif defined(PROJECT_K2)
>>>         #endif /* #if defined(PROJECT_MAGPIE) */ //inner
>>>
>>>         #if SYSTEM_MODULE_PRINT
>>>         #else
>>>         #endif
>>>
>>>         #if defined(_ROM_)
>>>         #endif
>>>        ....
>>>        ....
>>>     #endif                              // end of outer #if
>>>
>>> Notice that if PROJECT_MAGPIE is defined the
>>>     #elif defined(PROJECT_K2)
>>> will not get executed, but if PROJECT_MAGPIE is not defined the
>>> #elif defined(PROJECT_K2) will still not get executed since
>>> it is inside the  outer #if defined(PROJECT_MAGPIE) block. If I cut
>>> the whole block out a
>>>
>>> diff -s  htc_9271.fw htc_9271.fw.git
>>>
>>> from my tree to the git tree are still identical.
>>
>> Yea, looks buggy :)
>> Can you provide a patch for this? Make github pull request.
>>
>>>
>>> Bruce
>>>
>>> btw I can't make out who is
>>>    ath9k_htc_fw-request at lists.infradead.org
>>>    should I not be sending to
>>>    ath9k_htc_fw at lists.infradead.org ?
>>
>>
>> ath9k_htc_fw at lists.infradead.org is the proper one.
>>
>> --
>> Regards,
>> Oleksij
>>
>>
>



More information about the ath9k_htc_fw mailing list