[PATCH] cfg80211: fix signed macaddress in sysfs
authorDavid Lamparter <lists@diac24.net>
Sun, 3 Jun 2007 22:06:51 +0000 (00:06 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 11 Jun 2007 21:47:41 +0000 (17:47 -0400)
Fix signedness mixup making mac addresses show up strangely
(like 00:11:22:33:44:ffffffaa) in /sys/class/ieee80211/*/macaddress.

Signed-off-by: David Lamparter <equinox@diac24.net>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/sysfs.c

index 3ebae14429636b017cdd2420b68a17f71ee1a11b..88aaacd9f82275a3266b67165bb9a470d8069f4c 100644 (file)
@@ -33,7 +33,7 @@ static ssize_t _show_permaddr(struct device *dev,
                              struct device_attribute *attr,
                              char *buf)
 {
-       char *addr = dev_to_rdev(dev)->wiphy.perm_addr;
+       unsigned char *addr = dev_to_rdev(dev)->wiphy.perm_addr;
 
        return sprintf(buf, "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
                       addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);