diff options
author | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-02-18 23:08:26 +0000 |
---|---|---|
committer | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-02-18 23:08:26 +0000 |
commit | 035f06d698fda6b5864d9665c4f657215dbf1e3e (patch) | |
tree | 397b1a30db8f78e15b86821f7268ad2211b00a8a /target/linux/brcm47xx/patches-3.2/197-MIPS-BCM47XX-fix-signature-of-nvram_parse_macaddr.patch | |
parent | 7005c79799cf4dc2fd5c528dba2ae9940b04bf33 (diff) |
brcm47xx: sprom for nvram parsing
This adds support for parsing sprom form nvram for sprom version form 1 to 9.
It also adds sprom from nvram support for devices on the bcma bus.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30638 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/patches-3.2/197-MIPS-BCM47XX-fix-signature-of-nvram_parse_macaddr.patch')
-rw-r--r-- | target/linux/brcm47xx/patches-3.2/197-MIPS-BCM47XX-fix-signature-of-nvram_parse_macaddr.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.2/197-MIPS-BCM47XX-fix-signature-of-nvram_parse_macaddr.patch b/target/linux/brcm47xx/patches-3.2/197-MIPS-BCM47XX-fix-signature-of-nvram_parse_macaddr.patch new file mode 100644 index 0000000000..ade9bcb755 --- /dev/null +++ b/target/linux/brcm47xx/patches-3.2/197-MIPS-BCM47XX-fix-signature-of-nvram_parse_macaddr.patch @@ -0,0 +1,23 @@ +From c330338212785092aab7a266f24b52c132775463 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens <hauke@hauke-m.de> +Date: Sat, 18 Feb 2012 15:00:36 +0100 +Subject: [PATCH 197/202] MIPS: BCM47XX: fix signature of nvram_parse_macaddr + +Explicitly enforce an char array of 6 bytes for the mac address. + +Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> +--- + arch/mips/include/asm/mach-bcm47xx/nvram.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +--- a/arch/mips/include/asm/mach-bcm47xx/nvram.h ++++ b/arch/mips/include/asm/mach-bcm47xx/nvram.h +@@ -37,7 +37,7 @@ struct nvram_header { + + extern int nvram_getenv(char *name, char *val, size_t val_len); + +-static inline void nvram_parse_macaddr(char *buf, u8 *macaddr) ++static inline void nvram_parse_macaddr(char *buf, u8 macaddr[6]) + { + if (strchr(buf, ':')) + sscanf(buf, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &macaddr[0], |