aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-04-09 18:25:59 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-04-09 18:25:59 +0000
commit1b6ea1dadba8a00f8aafbc50ec7620651f0c10af (patch)
treea42f7ecefbd3b326adfc0fc80cf86e73c5739fa3 /target
parente8c16f6d84a573e0038607b4626a5a85a9a7ec97 (diff)
downloadmaster-187ad058-1b6ea1dadba8a00f8aafbc50ec7620651f0c10af.tar.gz
master-187ad058-1b6ea1dadba8a00f8aafbc50ec7620651f0c10af.tar.bz2
master-187ad058-1b6ea1dadba8a00f8aafbc50ec7620651f0c10af.zip
atheros: fix up empty radio data mac address (based on patch from #8601)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26555 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/atheros/patches-2.6.37/100-board.patch9
1 files changed, 8 insertions, 1 deletions
diff --git a/target/linux/atheros/patches-2.6.37/100-board.patch b/target/linux/atheros/patches-2.6.37/100-board.patch
index 97d51f4798..b72d32109c 100644
--- a/target/linux/atheros/patches-2.6.37/100-board.patch
+++ b/target/linux/atheros/patches-2.6.37/100-board.patch
@@ -85,7 +85,7 @@
+obj-$(CONFIG_ATHEROS_AR2315) += ar2315.o
--- /dev/null
+++ b/arch/mips/ar231x/board.c
-@@ -0,0 +1,251 @@
+@@ -0,0 +1,258 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
@@ -225,6 +225,7 @@
+ u8 *bcfg, *rcfg;
+ u8 *board_data;
+ u8 *radio_data;
++ u8 *mac_addr;
+ u32 offset;
+
+ ar231x_board.config = NULL;
@@ -282,6 +283,12 @@
+ rcfg_size = BOARD_CONFIG_BUFSZ - offset;
+ memcpy(radio_data, rcfg, rcfg_size);
+
++ mac_addr = &radio_data[0x1d * 2];
++ if (is_broadcast_ether_addr(mac_addr)) {
++ printk(KERN_INFO "Radio MAC is blank; using board-data\n");
++ memcpy(mac_addr, ar231x_board.config->wlan0_mac, ETH_ALEN);
++ }
++
+ return 0;
+}
+