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)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 3 Feb 2015 13:10:24 +0000 (15:10 +0200)
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>
Cc: Stable <stable@vger.kernel.org> [V3.18]
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/rtlwifi/rtl8192ee/trx.c
drivers/net/wireless/rtlwifi/rtl8192ee/trx.h

index 04b91aade21d645ebc8bb340470488fac0151dca..2b60bdc7452ff392bc79c0930cfa1054c9abea92 100644 (file)
@@ -354,6 +354,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 48504c25fffbc80be57fde896eef9e09f1682bf7..5abb749b33e9c20c5b72b02a1afc868c5dfc1bb0 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)