1 From dd2f835ae8a634794c4bf6b7fce1f778ae925e25 Mon Sep 17 00:00:00 2001
2 From: Arne Fitzenreiter <arne_f@ipfire.org>
3 Date: Sun, 18 Mar 2018 10:55:00 +0100
4 Subject: [PATCH 120/144] xradio: report mic fails to kernel and correct iv
7 Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
9 drivers/net/wireless/xradio/rx.c | 9 ++++-----
10 1 file changed, 4 insertions(+), 5 deletions(-)
12 diff --git a/rx.c b/rx.c
13 index 271632c96baa..5a2466edf534 100644
16 @@ -269,7 +269,8 @@ void xradio_rx_cb(struct xradio_vif *priv,
17 /* Firmware strips ICV in case of MIC failure. */
18 if (arg->status == WSM_STATUS_MICFAILURE) {
20 - hdr->flag |= RX_FLAG_IV_STRIPPED;
21 + hdr->flag |= RX_FLAG_IV_STRIPPED |
25 if (skb->len < hdrlen + iv_len + icv_len) {
26 @@ -285,10 +286,8 @@ void xradio_rx_cb(struct xradio_vif *priv,
27 skb->data + skb->len-icv_len+8, 4);
28 skb_trim(skb, skb->len - 8);
29 hdr->flag |= RX_FLAG_MMIC_STRIPPED;
30 - } else if (unlikely(WSM_RX_STATUS_ENCRYPTION(arg->flags) ==
31 - WSM_RX_STATUS_WAPI)) {
32 - /* Protocols not defined in mac80211 should be
33 - stripped/crypted in driver/firmware */
35 + if (hdr->flag & RX_FLAG_IV_STRIPPED) {
36 /* Remove IV, ICV and MIC */
37 skb_trim(skb, skb->len - icv_len);
38 memmove(skb->data + iv_len, skb->data, hdrlen);