All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Joe Perches <joe@perches.com>, Hauke Mehrtens <hauke@hauke-m.de>,
	linville@tuxdriver.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] ssb: fix unaligned access to mac address
Date: Sat, 09 Mar 2013 17:31:53 -0600	[thread overview]
Message-ID: <513BC669.7090209@lwfinger.net> (raw)
In-Reply-To: <CACna6rzQNo9CBrg08y6y+bf3009_EuL5f2UqOXVLKSoE_q7BRQ@mail.gmail.com>

On 03/09/2013 05:02 PM, Rafał Miłecki wrote:
> 2013/2/21 Larry Finger <Larry.Finger@lwfinger.net>:
>>> Signed-off-by: Joe Perches <joe@perches.com>
>>> ---
>>>
>>> V2: Add missing SPOFF
>>
>>
>> Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
>
> 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


  reply	other threads:[~2013-03-09 23:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-16 13:25 [PATCH] ssb: fix unaligned access to mac address Hauke Mehrtens
2013-02-18 10:10 ` Johannes Berg
2013-02-18 16:09 ` Rafał Miłecki
2013-02-20 17:31   ` Joe Perches
2013-02-20 17:56     ` Larry Finger
2013-02-20 18:29       ` Joe Perches
2013-02-20 19:17         ` Hauke Mehrtens
2013-02-20 20:11           ` Joe Perches
2013-02-21  3:34             ` Larry Finger
2013-03-09 23:02               ` Rafał Miłecki
2013-03-09 23:31                 ` Larry Finger [this message]
2013-03-09 23:56                 ` Larry Finger
2013-03-10 11:36                   ` Rafał Miłecki
2013-03-10 17:35                     ` Larry Finger
2013-03-10 20:57                       ` Rafał Miłecki
2013-02-20 20:16           ` [PATCH 2/2] ssb: Convert ssb_printk to ssb_<level> Joe Perches
2013-02-20 19:07       ` [PATCH] ssb: fix unaligned access to mac address Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=513BC669.7090209@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=hauke@hauke-m.de \
    --cc=joe@perches.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=zajec5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.