diff options
author | Jes Sorensen <Jes.Sorensen@redhat.com> | 2016-03-01 01:05:36 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-03-10 16:29:17 +0300 |
commit | e975b87cafd24d943f395823b1a000d1389f48ef (patch) | |
tree | 20b211f141538c50ea2e07161690d985607e349f /drivers/net/wireless | |
parent | 4c683607145d22c872d6b473c5f5465f8459c5de (diff) | |
download | linux-e975b87cafd24d943f395823b1a000d1389f48ef.tar.xz |
rtl8xxxu: Do not parse RX descriptor info for C2H packets
C2H events are delivered as RX packets on 8723bu/8192eu. When
receiving a C2H event, do not parse the rest of the RX descriptor as
the info isn't valid.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c index 927fd3b13ae3..76793e9a9542 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c @@ -7324,7 +7324,6 @@ static int rtl8723bu_parse_rx_desc(struct rtl8xxxu_priv *priv, (struct rtl8723bu_rx_desc *)skb->data; struct rtl8723au_phy_stats *phy_stats; int drvinfo_sz, desc_shift; - int rx_type; skb_pull(skb, sizeof(struct rtl8723bu_rx_desc)); @@ -7334,6 +7333,12 @@ static int rtl8723bu_parse_rx_desc(struct rtl8xxxu_priv *priv, desc_shift = rx_desc->shift; skb_pull(skb, drvinfo_sz + desc_shift); + if (rx_desc->rpt_sel) { + struct device *dev = &priv->udev->dev; + dev_dbg(dev, "%s: C2H packet\n", __func__); + return RX_TYPE_C2H; + } + rx_status->mactime = le32_to_cpu(rx_desc->tsfl); rx_status->flag |= RX_FLAG_MACTIME_START; @@ -7351,15 +7356,7 @@ static int rtl8723bu_parse_rx_desc(struct rtl8xxxu_priv *priv, rx_status->rate_idx = rx_desc->rxmcs; } - if (rx_desc->rpt_sel) { - struct device *dev = &priv->udev->dev; - dev_dbg(dev, "%s: C2H packet\n", __func__); - rx_type = RX_TYPE_C2H; - } else { - rx_type = RX_TYPE_DATA_PKT; - } - - return rx_type; + return RX_TYPE_DATA_PKT; } static void rtl8723bu_handle_c2h(struct rtl8xxxu_priv *priv, |