Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 245311
b: refs/heads/master
c: 9cbda72
h: refs/heads/master
i:
  245309: 56938f3
  245307: 10c5e56
  245303: a66caa8
  245295: eb4651e
  245279: fb07fd3
  245247: ba530f0
v: v3
  • Loading branch information
Hauke Mehrtens authored and Ralf Baechle committed May 19, 2011
1 parent 64e2e92 commit dd0ad0e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 41790fd51f71f3744a5d142cc5369eebab8817a0
refs/heads/master: 9cbda726bb283d60cd4f34a3a9da8b5b48a46b0f
12 changes: 10 additions & 2 deletions trunk/arch/mips/include/asm/mach-bcm47xx/nvram.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,16 @@ extern int nvram_getenv(char *name, char *val, size_t val_len);

static inline void nvram_parse_macaddr(char *buf, u8 *macaddr)
{
sscanf(buf, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &macaddr[0], &macaddr[1],
&macaddr[2], &macaddr[3], &macaddr[4], &macaddr[5]);
if (strchr(buf, ':'))
sscanf(buf, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &macaddr[0],
&macaddr[1], &macaddr[2], &macaddr[3], &macaddr[4],
&macaddr[5]);
else if (strchr(buf, '-'))
sscanf(buf, "%hhx-%hhx-%hhx-%hhx-%hhx-%hhx", &macaddr[0],
&macaddr[1], &macaddr[2], &macaddr[3], &macaddr[4],
&macaddr[5]);
else
printk(KERN_WARNING "Can not parse mac address: %s\n", buf);
}

#endif

0 comments on commit dd0ad0e

Please sign in to comment.