Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH] cfg80211: fix signed macaddress in sysfs
       [not found] <20070603220651.GA22070@charon.n2.diac24.net>
@ 2007-06-04 11:40 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2007-06-04 11:40 UTC (permalink / raw)
  To: David Lamparter
  Cc: linux-wireless, John W. Linville, Michael Wu, David S. Miller,
	netdev

[-- Attachment #1: Type: text/plain, Size: 1199 bytes --]

On Mon, 2007-06-04 at 00:06 +0200, David Lamparter wrote:
> Fix signedness mixup making mac addresses show up strangely
> (like 00:11:22:33:44:ffffffaa) in /sys/class/ieee80211/*/macaddress.

Huh, my mistake, patch looks good. Do we care for this in .22 still?

Acked-by: Johannes Berg <johannes@sipsolutions.net>


> Signed-off-by: David Lamparter <equinox@diac24.net>
> ---
> 
>  net/wireless/sysfs.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/wireless/sysfs.c b/net/wireless/sysfs.c
> index 7844be4..374d16d 100644
> --- a/net/wireless/sysfs.c
> +++ b/net/wireless/sysfs.c
> @@ -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]);

This probably should also use MAC_FMT/MAC_ARG, hah. Oh well, I'll fix it
up later.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] cfg80211: fix signed macaddress in sysfs
       [not found] ` <20070612011616.GC20422-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
@ 2007-06-12  1:17   ` John W. Linville
  0 siblings, 0 replies; 2+ messages in thread
From: John W. Linville @ 2007-06-12  1:17 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA

From: David Lamparter <lists-cEeocvCgqOOsTnJN9+BGXg@public.gmane.org>

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-cEeocvCgqOOsTnJN9+BGXg@public.gmane.org>
Acked-by: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
Signed-off-by: John W. Linville <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
---
 net/wireless/sysfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/wireless/sysfs.c b/net/wireless/sysfs.c
index 3ebae14..88aaacd 100644
--- a/net/wireless/sysfs.c
+++ b/net/wireless/sysfs.c
@@ -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]);
-- 
1.5.0.6

-- 
John W. Linville
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-12  1:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20070603220651.GA22070@charon.n2.diac24.net>
2007-06-04 11:40 ` [PATCH] cfg80211: fix signed macaddress in sysfs Johannes Berg
2007-06-12  1:16 mac80211 fixes for 2.6.22 John W. Linville
     [not found] ` <20070612011616.GC20422-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
2007-06-12  1:17   ` [PATCH] cfg80211: fix signed macaddress in sysfs John W. Linville

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox