Search Linux Wireless

Re: [PATCH 13/14] rtlwifi: rtl8192cu: Add routine trx

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

 



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
--
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 Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux