2011-08-05 04:04:54 +08:00
|
|
|
From e6730c06cfc827d715f43e9bd276ae939bb86af9 Mon Sep 17 00:00:00 2001
|
2011-07-23 00:30:42 +08:00
|
|
|
From: Hauke Mehrtens <hauke@hauke-m.de>
|
|
|
|
Date: Fri, 22 Jul 2011 17:11:51 +0200
|
2011-08-05 04:04:54 +08:00
|
|
|
Subject: [PATCH 23/26] bcma: use randoom mac address as long as reading it out does not work
|
2011-07-23 00:30:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|
|
|
---
|
|
|
|
drivers/bcma/sprom.c | 5 ++++-
|
|
|
|
1 files changed, 4 insertions(+), 1 deletions(-)
|
|
|
|
|
|
|
|
--- a/drivers/bcma/sprom.c
|
|
|
|
+++ b/drivers/bcma/sprom.c
|
|
|
|
@@ -13,6 +13,7 @@
|
|
|
|
#include <linux/io.h>
|
|
|
|
#include <linux/dma-mapping.h>
|
|
|
|
#include <linux/slab.h>
|
|
|
|
+#include <linux/etherdevice.h>
|
|
|
|
|
|
|
|
#define SPOFF(offset) ((offset) / sizeof(u16))
|
|
|
|
|
2011-12-20 07:33:03 +08:00
|
|
|
@@ -214,8 +215,10 @@ int bcma_sprom_get(struct bcma_bus *bus)
|
2011-07-23 00:30:42 +08:00
|
|
|
if (!bus->drv_cc.core)
|
|
|
|
return -EOPNOTSUPP;
|
|
|
|
|
|
|
|
- if (!(bus->drv_cc.capabilities & BCMA_CC_CAP_SPROM))
|
|
|
|
+ if (!(bus->drv_cc.capabilities & BCMA_CC_CAP_SPROM)) {
|
|
|
|
+ random_ether_addr(bus->sprom.il0mac);
|
|
|
|
return -ENOENT;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
sprom = kcalloc(SSB_SPROMSIZE_WORDS_R4, sizeof(u16),
|
|
|
|
GFP_KERNEL);
|