brcm63xx: reduce the number of Ethernet DMA channels from 16 to 8
[openwrt.git] / target / linux / brcm63xx / patches-3.9 / 426-hcs_mac_addr_pool.patch
1 --- a/arch/mips/bcm63xx/nvram.c
2 +++ b/arch/mips/bcm63xx/nvram.c
3 @@ -45,6 +45,7 @@ void __init bcm63xx_nvram_init(void *add
4  {
5         unsigned int check_len;
6         u32 crc, expected_crc;
7 +       u8 hcs_mac_addr[ETH_ALEN] = { 0x00, 0x10, 0x18, 0xff, 0xff, 0xff };
8  
9         /* extract nvram data */
10         memcpy(&nvram, addr, sizeof(nvram));
11 @@ -65,6 +66,15 @@ void __init bcm63xx_nvram_init(void *add
12         if (crc != expected_crc)
13                 pr_warn("nvram checksum failed, contents may be invalid (expected %08x, got %08x)\n",
14                         expected_crc, crc);
15 +
16 +       /* Cable modems have a different NVRAM which is embedded in the eCos
17 +        * firmware and not easily extractible, give at least a MAC address
18 +        * pool.
19 +        */
20 +       if (BCMCPU_IS_3368()) {
21 +               memcpy(nvram.mac_addr_base, hcs_mac_addr, ETH_ALEN);
22 +               nvram.mac_addr_count = 2;
23 +       }
24  }
25  
26  u8 *bcm63xx_nvram_get_name(void)