mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-28 05:19:20 +02:00
31a40f97ef
* add new patches for bcm4716 SoC * add support for serial flash on bcma bus git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27723 3c298f89-4303-0410-b956-a3cf2f4a3e73
34 lines
981 B
Diff
34 lines
981 B
Diff
From 6dd27601bee9b3c26cdb67246b6da51dd696ac34 Mon Sep 17 00:00:00 2001
|
|
From: Hauke Mehrtens <hauke@hauke-m.de>
|
|
Date: Fri, 22 Jul 2011 17:11:51 +0200
|
|
Subject: [PATCH 22/22] bcma: use randoom mac address as long as reading it out does not work
|
|
|
|
|
|
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))
|
|
|
|
@@ -144,8 +145,10 @@ int bcma_sprom_get(struct bcma_bus *bus)
|
|
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);
|