提交 8dab24ce 编写于 作者: A Andy Shevchenko 提交者: Greg Kroah-Hartman

staging: brcm80211: use '%pM' format to print MAC address

Signed-off-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
Cc: Nohee Ko <noheek@broadcom.com>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 d30dc9a2
...@@ -792,10 +792,7 @@ int BCMROMFN(bcm_ether_atoe) (char *p, struct ether_addr * ea) { ...@@ -792,10 +792,7 @@ int BCMROMFN(bcm_ether_atoe) (char *p, struct ether_addr * ea) {
char *bcm_ether_ntoa(const struct ether_addr *ea, char *buf) char *bcm_ether_ntoa(const struct ether_addr *ea, char *buf)
{ {
static const char template[] = "%02x:%02x:%02x:%02x:%02x:%02x"; snprintf(buf, 18, "%pM", ea->octet);
snprintf(buf, 18, template,
ea->octet[0] & 0xff, ea->octet[1] & 0xff, ea->octet[2] & 0xff,
ea->octet[3] & 0xff, ea->octet[4] & 0xff, ea->octet[5] & 0xff);
return (buf); return (buf);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册