staging: brcm80211: use '%pM' format to print MAC address
authorAndy Shevchenko <andy.shevchenko@gmail.com>
Mon, 13 Sep 2010 08:40:27 +0000 (11:40 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 14 Sep 2010 15:25:15 +0000 (08:25 -0700)
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Nohee Ko <noheek@broadcom.com>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/util/bcmutils.c

index 364f837fb0809ad4462fdde2bb3ae3170b14476f..c6c63a8bd10621123187b4ed6078f751714cf5d5 100644 (file)
@@ -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)
 {
-       static const char template[] = "%02x:%02x:%02x:%02x:%02x:%02x";
-       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);
+       snprintf(buf, 18, "%pM", ea->octet);
        return (buf);
 }