From: Larry Finger <Larry.Finger@lwfinger.net>
To: Semigod King <semigodking@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: mac80211 driver for RT3070 wifi card does not work on big-endian platform
Date: Thu, 08 Sep 2011 14:04:34 -0500 [thread overview]
Message-ID: <4E6911C2.2030309@lwfinger.net> (raw)
In-Reply-To: <CA+TXxM3EgGZmo1F9GS+-QNWfTTgWFD4XHvG31JH=kabrr=ES=A@mail.gmail.com>
On 09/08/2011 12:34 AM, Semigod King wrote:
> Greetings,
>
> I would like to report a bug to you. The same problem was reported to
> OpenWRT developers. But, they suggest me report it to linux wireless.
I do see a problem. Looking at one piece of your patch, we see
- rt2800_register_read_lock(rt2x00dev, EFUSE_DATA3,
- (u32 *)&rt2x00dev->eeprom[i]);
+ rt2800_register_read_lock(rt2x00dev, EFUSE_DATA3, ®);
+ *(u32 *)&rt2x00dev->eeprom[i] = le32_to_cpu(reg);
The last statement of rt2800_register_read_lock() does an le32_to_cpu()
conversion of the output value (3rd argument), but rt2x00dev->eeprom is le16,
which is why a double conversion le32 => be32 => le32 is needed. Your second
line should be
*(u32 *)&rt2x00dev->eeprom[i] = cpu_to_le32(reg);
That does the same thing, but makes it clearer what is happening.
I am having to rebuild the Ubuntu system on my Mac, which will take a while.
When that is done, I will be able to test.
Larry
next prev parent reply other threads:[~2011-09-09 0:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-08 5:34 mac80211 driver for RT3070 wifi card does not work on big-endian platform Semigod King
2011-09-08 15:12 ` Larry Finger
2011-09-08 19:04 ` Larry Finger [this message]
[not found] ` <CA+TXxM0EOBs2x+6jh=0uwDTMTUD+9ZXQ8W-ZR+=TjSARV3kAeQ@mail.gmail.com>
2011-09-09 13:55 ` Larry Finger
2011-09-09 17:30 ` Semigod King
2011-09-14 21:22 ` Larry Finger
2011-09-16 7:12 ` Semigod King
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=4E6911C2.2030309@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=linux-wireless@vger.kernel.org \
--cc=semigodking@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).