Skip to content
Snippets Groups Projects
Commit d16f7093 authored by Alexander Clouter's avatar Alexander Clouter Committed by Ralf Baechle
Browse files

MIPS: AR7: rewrite of cpmac_get_mac()


Shamelessly stealing wisdom from pasemi_mac.c, I found char2hex() could
be replaced with a single call to sscanf(), looks cleaner to me at
least.  The result is 100 bytes trimmed off the size of a compiled
cpmac_get_mac() and as an extra bonus it grumbles and gracefully fails
over to using random_ether_addr() when an attempt to parse an invalid
MAC address is made.

Signed-off-by: default avatarAlexander Clouter <alex@digriz.org.uk>
To: linux-mips@linux-mips.org
Cc: florian@openwrt.org
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 0d590504
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment