summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/wil6210/txrx_edma.c
diff options
context:
space:
mode:
authorDedy Lansky <dlansky@codeaurora.org>2018-07-24 10:44:23 +0300
committerKalle Valo <kvalo@codeaurora.org>2018-07-31 10:59:41 +0300
commite15af41c05eda216a43b9e7a22c2399e0ad720ff (patch)
tree2b91ff0144ff6decff1c354ac5cc91959541dafe /drivers/net/wireless/ath/wil6210/txrx_edma.c
parent1bd82ee09aeae74c9f68e6f4147132a3e30e721e (diff)
downloadlinux-e15af41c05eda216a43b9e7a22c2399e0ad720ff.tar.xz
wil6210: drop Rx packets with L2 error indication from HW
Due to recent change in FW, driver will be notified of corrupted Rx packets (e.g. MIC error). Drop such packets before they are delivered to network stack. Signed-off-by: Dedy Lansky <dlansky@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/txrx_edma.c')
-rw-r--r--drivers/net/wireless/ath/wil6210/txrx_edma.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/wil6210/txrx_edma.c b/drivers/net/wireless/ath/wil6210/txrx_edma.c
index 194034779b9f..b5d399f1c1c7 100644
--- a/drivers/net/wireless/ath/wil6210/txrx_edma.c
+++ b/drivers/net/wireless/ath/wil6210/txrx_edma.c
@@ -795,14 +795,15 @@ static int wil_check_bar(struct wil6210_priv *wil, void *msg, int cid,
return -EAGAIN;
}
-static int wil_rx_edma_check_errors(struct wil6210_priv *wil, void *msg,
- struct wil_net_stats *stats,
- struct sk_buff *skb)
+static int wil_rx_error_check_edma(struct wil6210_priv *wil,
+ struct sk_buff *skb,
+ struct wil_net_stats *stats)
{
int error;
int l2_rx_status;
int l3_rx_status;
int l4_rx_status;
+ void *msg = wil_skb_rxstatus(skb);
error = wil_rx_status_get_error(msg);
if (!error) {
@@ -865,7 +866,6 @@ static struct sk_buff *wil_sring_reap_rx_edma(struct wil6210_priv *wil,
struct wil_net_stats *stats = NULL;
u16 dmalen;
int cid;
- int rc;
bool eop, headstolen;
int delta;
u8 dr_bit;
@@ -937,13 +937,6 @@ again:
goto skipping;
}
- /* Check and treat errors reported by HW */
- rc = wil_rx_edma_check_errors(wil, msg, stats, skb);
- if (rc) {
- rxdata->skipping = true;
- goto skipping;
- }
-
if (unlikely(dmalen > sz)) {
wil_err(wil, "Rx size too large: %d bytes!\n", dmalen);
stats->rx_large_frame++;
@@ -1593,6 +1586,7 @@ void wil_init_txrx_ops_edma(struct wil6210_priv *wil)
wil->txrx_ops.get_reorder_params = wil_get_reorder_params_edma;
wil->txrx_ops.get_netif_rx_params = wil_get_netif_rx_params_edma;
wil->txrx_ops.rx_crypto_check = wil_rx_crypto_check_edma;
+ wil->txrx_ops.rx_error_check = wil_rx_error_check_edma;
wil->txrx_ops.is_rx_idle = wil_is_rx_idle_edma;
wil->txrx_ops.rx_fini = wil_rx_fini_edma;
}