Changeset 35531


Ignore:
Timestamp:
2013-02-09T13:53:52+01:00 (5 years ago)
Author:
juhosg
Message:

AA: ar71xx: Routerboard 751 Mac Address Offset Fix

Backport of r35519.

We utilize many Routerboard 751's and discovered that our latest batch
of RB751's would not initialize the wireless radio. We have determined
Mikrotik has changed where the mac address was located inside hardconfig.
As such we utilize "routerboot_find_tag" to find the location of the mac
address. We should remove "RB751_MAC_ADDRESS_OFFSET" as it is ambiguous
by machine manufacturing date. The newer batch of RB751's that we received
had a RB751_MAC_ADDRESS_OFFSET 0x10.

Signed-off-by: Davey Hutchison <dhutchison@…>
Signed-off-by: Gabor Juhos <juhosg@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/attitude_adjustment/target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c

    r33994 r35531  
    283283#define RB751_HARDCONFIG        0x1f00b000 
    284284#define RB751_HARDCONFIG_SIZE   0x1000 
    285 #define RB751_MAC_ADDRESS_OFFSET 0xE80 
    286285 
    287286static void __init rb751_wlan_setup(void) 
     
    291290        u16 tag_len; 
    292291        u8 *tag; 
     292        u16 mac_len; 
     293        u8 *mac; 
    293294        int err; 
    294295 
     
    315316        } 
    316317 
    317         ap91_pci_init(NULL, hardconfig + RB751_MAC_ADDRESS_OFFSET); 
     318        err = routerboot_find_tag(hardconfig, RB751_HARDCONFIG_SIZE, 
     319                                 RB_ID_MAC_ADDRESS_PACK, &mac, &mac_len); 
     320        if (err) { 
     321                pr_err("rb75x: no mac address found\n"); 
     322                return; 
     323        } 
     324 
     325        ap91_pci_init(NULL, mac); 
    318326} 
    319327 
Note: See TracChangeset for help on using the changeset viewer.