Search Linux Wireless

Re: [PATCH] ssb: fix unaligned access to mac address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/09/2013 05:02 PM, Rafał Miłecki wrote:
2013/2/21 Larry Finger <Larry.Finger@xxxxxxxxxxxx>:
Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
---

V2: Add missing SPOFF


Tested-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>

I didn't confirm my issue to be related to this patch, but with recent
kernels my MAC has changed from
00:11:22:33:44:55
to
11:00:33:22:55:44

Larry: did you verify MAC didn't change for you?

I just checked it on PowerPC and it changed it the same way as yours did.

The problem is that the MAC is stored in the SPROM in big-endian order, thus the sequence

+       for (i = 0; i < 3; i++) {
+               *mac++ = in[i];
+               *mac++ = in[i] >> 8;
+       }

needs to be changed to

+       for (i = 0; i < 3; i++) {
+               *mac++ = in[i] >> 8;
+               *mac++ = in[i];
+       }

After that change, it is OK, at least on the PPC.

BTW, that patch is not yet in my copy of wireless-testing.

Larry

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux