[FS#807] 7620 external PA misdetected on DIR-810L

LEDE Bugs lede-bugs at lists.infradead.org
Thu May 25 12:08:49 PDT 2017


A new Flyspray task has been opened.  Details are below. 

User who did this - skids (skids) 

Attached to Project - LEDE Project
Summary - 7620 external PA misdetected on DIR-810L
Task Type - Bug Report
Category - Kernel
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Low
Priority - Very Low
Reported Version - Trunk
Due in Version - Undecided
Due Date - Undecided
Details -    
On a D-Link DIR810L rev A1 the code to use an external PA is activated, but there
appears to not be one, because when it activates the radio tx power goes
to almost nothing.  Preventing this code from activating restores the radios
to normal levels.

Here is the EEPROM found on this device side by side with the contents of
an EEPROM image found in D-LINK's "OSS" tree for this model (on the right).


/dev/mtd2                                                                        MT7620_AP_2T2R-4L_V15.BIN
00000000  20 76 05 01 00 0c 43 76  20 08 ff ff ff ff ff ff  | v....Cv .......|   20 76 05 01 00 11 22 00  01 c5 ff ff ff ff ff ff  | v....".........|
00000010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|   ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000020  ff ff ff ff ff ff ff ff  00 11 22 33 44 55 00 0c  |.........."3DU..|   ff ff ff ff ff ff ff ff  c0 a0 bb e3 b1 1c 00 11  |................|
00000030  43 76 20 66 22 0c 04 c0  ff ff 3f 01 55 77 a8 aa  |Cv f".....?.Uw..|   22 00 01 c7 22 0c 04 c0  ff ff 5a 01 55 77 a8 aa  |"...".....Z.Uw..|
00000040  8c 88 ff ff 0a 00 00 00  00 00 00 00 00 00 ff ff  |................|   8c 88 ff ff 0a 00 00 00  00 00 00 00 00 00 ff ff  |................|
00000050  82 ff 02 02 02 02 02 02  02 02 02 02 02 02 02 02  |................|   82 ff 14 14 14 14 14 14  14 14 15 16 17 18 19 19  |................|
00000060  03 03 03 03 03 03 03 03  03 03 03 03 03 03 80 ff  |................|   1a 1a 1a 1a 1a 1a 1b 1b  1b 1b 1b 1b 1c 1c 80 ff  |................|
00000070  ff ff 80 ff ff ff 00 00  ff ff ff ff ff ff ff ff  |................|   ff ff 80 ff ff ff 00 00  ff ff ff ff ff ff ff ff  |................|
00000080  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|   ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
000000d0  28 ff ff ff ff ff ff ff  ff ff ff ff ff ff 08 08  |(...............|   28 ff ff ff ff ff ff ff  ff ff ff ff ff ff 08 08  |(...............|
000000e0  06 06 02 00 06 06 02 00  06 06 02 00 06 06 02 00  |................|   06 06 02 00 06 06 02 00  06 06 02 00 06 06 02 00  |................|
000000f0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|   ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
(7610E section skipped)

Both have the same values for CONF1 (0xc004) and CONF2 (0xffff).

The chip ends up identified as RT6352 so it hits both if clauses
in the following section of code from LEDE Reboot SNAPSHOT r4151-0dcc36f:

        if (rt2x00_rt(rt2x00dev, RT3352) ||
            rt2x00_rt(rt2x00dev, RT6352)) {
                if (rt2x00_get_field16(eeprom,
                    EEPROM_NIC_CONF1_EXTERNAL_TX0_PA_3352))
                    __set_bit(CAPABILITY_EXTERNAL_PA_TX0,
                              &rt2x00dev->cap_flags);
                if (rt2x00_get_field16(eeprom,
                    EEPROM_NIC_CONF1_EXTERNAL_TX1_PA_3352))
                    __set_bit(CAPABILITY_EXTERNAL_PA_TX1,
                              &rt2x00dev->cap_flags);
        }

        rt2800_eeprom_read(rt2x00dev, EEPROM_NIC_CONF2, &eeprom);

        if (rt2x00_rt(rt2x00dev, RT6352) && eeprom != 0 && eeprom != 0xffff) {
                if (rt2x00_get_field16(eeprom,
                    EEPROM_NIC_CONF2_EXTERNAL_PA)) {
                    __set_bit(CAPABILITY_EXTERNAL_PA_TX0,
                              &rt2x00dev->cap_flags);
                    __set_bit(CAPABILITY_EXTERNAL_PA_TX1,
                              &rt2x00dev->cap_flags);
                }
        }

...the first section would turn the RT3352 version of this feature on.
The second would not, due to the 0xffff in CONF2.

So it appears the EEPROM is lying in this case, or the identification
as RT6352 is in error.

Not knowing where to access a bunch of EEPROMs from various devices,
I don't know what conditions to suggest to use for turning off
external PA on models like this, but I hope having my EEPROM dump helps 
figure that out.


More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=807



More information about the lede-bugs mailing list