ar71xx: support for D-LINK DIR-615 rev. E4
[openwrt.git] / target / linux / brcm47xx / patches-3.0 / 0023-bcma-use-randoom-mac-address-as-long-as-reading-it-o.patch
1 From e6730c06cfc827d715f43e9bd276ae939bb86af9 Mon Sep 17 00:00:00 2001
2 From: Hauke Mehrtens <hauke@hauke-m.de>
3 Date: Fri, 22 Jul 2011 17:11:51 +0200
4 Subject: [PATCH 23/26] bcma: use randoom mac address as long as reading it out does not work
5
6
7 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
8 ---
9 drivers/bcma/sprom.c | 5 ++++-
10 1 files changed, 4 insertions(+), 1 deletions(-)
11
12 --- a/drivers/bcma/sprom.c
13 +++ b/drivers/bcma/sprom.c
14 @@ -13,6 +13,7 @@
15 #include <linux/io.h>
16 #include <linux/dma-mapping.h>
17 #include <linux/slab.h>
18 +#include <linux/etherdevice.h>
19
20 #define SPOFF(offset) ((offset) / sizeof(u16))
21
22 @@ -214,8 +215,10 @@ int bcma_sprom_get(struct bcma_bus *bus)
23 if (!bus->drv_cc.core)
24 return -EOPNOTSUPP;
25
26 - if (!(bus->drv_cc.capabilities & BCMA_CC_CAP_SPROM))
27 + if (!(bus->drv_cc.capabilities & BCMA_CC_CAP_SPROM)) {
28 + random_ether_addr(bus->sprom.il0mac);
29 return -ENOENT;
30 + }
31
32 sprom = kcalloc(SSB_SPROMSIZE_WORDS_R4, sizeof(u16),
33 GFP_KERNEL);
This page took 0.046088 seconds and 5 git commands to generate.