]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
rtlwifi: rtl8192ee: Fix parsing of received packet
authorTroy Tan <troy_tan@realsil.com.cn>
Tue, 20 Jan 2015 17:01:24 +0000 (11:01 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Mar 2015 22:57:19 +0000 (14:57 -0800)
commit 92ff754240b892cbc16dee5aa080322f3db88b68 upstream.

The firmware supplies two kinds of packets via the RX mechanism. Besides the
normal data received over the air, these packets may contain bluetooth status
and other information. The present code fails to detect which kind of
information was received.

Signed-off-by: Troy Tan <troy_tan@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/rtlwifi/rtl8192ee/trx.c
drivers/net/wireless/rtlwifi/rtl8192ee/trx.h

index 147e2dd5fc15b94770e3451b2dbed86ebeec6d77..03def29efb7f151eff7bbd52e151e370af2f2d6a 100644 (file)
@@ -512,6 +512,10 @@ bool rtl92ee_rx_query_desc(struct ieee80211_hw *hw,
        struct ieee80211_hdr *hdr;
        u32 phystatus = GET_RX_DESC_PHYST(pdesc);
 
+       if (GET_RX_STATUS_DESC_RPT_SEL(pdesc) == 0)
+               status->packet_report_type = NORMAL_RX;
+       else
+               status->packet_report_type = C2H_PACKET;
        status->length = (u16)GET_RX_DESC_PKT_LEN(pdesc);
        status->rx_drvinfo_size = (u8)GET_RX_DESC_DRV_INFO_SIZE(pdesc) *
                                  RX_DRV_INFO_SIZE_UNIT;
index 6f9be1c7515c1c8e5d0c9221a88edfd7992e4690..8effef9b13dd68a846f7b416207191f9c0dde43a 100644 (file)
        LE_BITS_TO_4BYTE(__pdesc+8, 12, 4)
 #define GET_RX_DESC_RX_IS_QOS(__pdesc)                 \
        LE_BITS_TO_4BYTE(__pdesc+8, 16, 1)
+#define GET_RX_STATUS_DESC_RPT_SEL(__pdesc)            \
+       LE_BITS_TO_4BYTE(__pdesc+8, 28, 1)
 
 #define GET_RX_DESC_RXMCS(__pdesc)                     \
        LE_BITS_TO_4BYTE(__pdesc+12, 0, 7)