bcm53xx: add initial bgmac patches
[openwrt.git] / target / linux / bcm53xx / patches-3.10 / 202-bgmac-make-bgmac-work-on-systems-without-nvram.patch
1 From e484cca2387df0878d55d8f3e8e4543aa668dd52 Mon Sep 17 00:00:00 2001
2 From: Hauke Mehrtens <hauke@hauke-m.de>
3 Date: Wed, 10 Jul 2013 17:55:34 +0200
4 Subject: [PATCH 17/18] bgmac: make bgmac work on systems without nvram
5
6 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 ---
8  drivers/net/ethernet/broadcom/bgmac.c |    4 ++++
9  1 file changed, 4 insertions(+)
10
11 --- a/drivers/net/ethernet/broadcom/bgmac.c
12 +++ b/drivers/net/ethernet/broadcom/bgmac.c
13 @@ -16,7 +16,11 @@
14  #include <linux/phy.h>
15  #include <linux/interrupt.h>
16  #include <linux/dma-mapping.h>
17 +#ifdef CONFIG_BCM47XX
18  #include <bcm47xx_nvram.h>
19 +#else
20 +#define bcm47xx_nvram_getenv(a, b, c) -1
21 +#endif
22  
23  static const struct bcma_device_id bgmac_bcma_tbl[] = {
24         BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_4706_MAC_GBIT, BCMA_ANY_REV, BCMA_ANY_CLASS),