]> git.ipfire.org Git - people/mlorenz/ipfire-2.x.git/blob - src/patches/xradio/report-mic-fails-to-kernel-and-correct-iv-str.patch
linux: Re-add accidentially dropped download URL
[people/mlorenz/ipfire-2.x.git] / src / patches / xradio / report-mic-fails-to-kernel-and-correct-iv-str.patch
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
5 stripping.
6
7 Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
8 ---
9 drivers/net/wireless/xradio/rx.c | 9 ++++-----
10 1 file changed, 4 insertions(+), 5 deletions(-)
11
12 diff --git a/rx.c b/rx.c
13 index 271632c96baa..5a2466edf534 100644
14 --- a/rx.c
15 +++ b/rx.c
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) {
19 icv_len = 0;
20 - hdr->flag |= RX_FLAG_IV_STRIPPED;
21 + hdr->flag |= RX_FLAG_IV_STRIPPED |
22 + RX_FLAG_MMIC_ERROR;
23 }
24
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 */
34 + }
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);
39 --
40 2.31.0
41