linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: John W Linville <linville@tuxdriver.com>,
	george0505@realtek.com, chaoming_li@realsil.com.cn,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH 13/14] rtlwifi: rtl8192cu: Add routine trx
Date: Fri, 18 Feb 2011 08:34:55 -0600	[thread overview]
Message-ID: <4D5E838F.1020707@lwfinger.net> (raw)
In-Reply-To: <20110218112633.GA2270@redhat.com>

On 02/18/2011 05:26 AM, Stanislaw Gruszka wrote:
> On Thu, Feb 17, 2011 at 03:19:05PM -0600, Larry Finger wrote:
>> +static enum rtl_desc_qsel _rtl8192cu_mq_to_descq(struct ieee80211_hw *hw,
>> +					 u16 fc, u16 mac80211_queue_index)
>> +{
>> +	enum rtl_desc_qsel qsel;
>> +	struct rtl_priv *rtlpriv = rtl_priv(hw);
>> +
>> +	if (unlikely(ieee80211_is_beacon(fc))) {
>> +		qsel = QSLT_BEACON;
>> +		goto out;
>> +	}
>> +	if (ieee80211_is_mgmt(fc)) {
> [snip]
>> +	u16 fc = le16_to_cpu(hdr->frame_control);
>> +	enum rtl_desc_qsel fw_qsel = _rtl8192cu_mq_to_descq(hw, fc,
>
> We have that bug on all over the code, ieee80211_is_* expect le16 value
> whereas we pass cpu endian value. Driver is completely broken on that
> respect, it will not work on big endian machines.
>
> What should be done is use "sparse" (i.e. make C=1) and fix all
> endian bugs. That will not assure driver will work on BE machines,
> but at least we will fix obvious bugs.

Thanks for the comment. Unfortunately, sparse (C=2) does not find this error. 
That test had been done and was clean. After reading your comment, I went back 
to Documentation/sparse.txt and found the magic CF="-D__CHECK_ENDIAN__" 
argument. This argument results in multiple warnings that will be fixed for V2.

Do you have any suggestions regarding an inexpensive BE platform that I might 
acquire for testing? Ideally, this box would have the capability to support PCIe 
mini cards as well as USB.

Larry

  reply	other threads:[~2011-02-18 14:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-17 21:19 [PATCH 13/14] rtlwifi: rtl8192cu: Add routine trx Larry Finger
2011-02-18 11:26 ` Stanislaw Gruszka
2011-02-18 14:34   ` Larry Finger [this message]
2011-02-18 14:50     ` Johannes Berg
2011-02-18 16:44   ` Larry Finger
2011-02-21  9:50     ` Stanislaw Gruszka

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=4D5E838F.1020707@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=chaoming_li@realsil.com.cn \
    --cc=george0505@realtek.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=sgruszka@redhat.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).