mac80211: ath11k: sync with ath-next
[openwrt/staging/nbd.git] / package / kernel / mac80211 / patches / ath11k / 0059-wifi-ath11k-print-a-warning-when-crypto_alloc_shash-.patch
1 From a87a9110ac0dcbfd9458b6665c141fa1c16a669d Mon Sep 17 00:00:00 2001
2 From: Kalle Valo <quic_kvalo@quicinc.com>
3 Date: Wed, 5 Apr 2023 12:04:25 +0300
4 Subject: [PATCH] wifi: ath11k: print a warning when crypto_alloc_shash() fails
5
6 Christoph reported that ath11k failed to initialise when michael_mic.ko
7 module was not installed. To make it easier to notice that case print a
8 warning when crypto_alloc_shash() fails.
9
10 Compile tested only.
11
12 Reported-by: Christoph Hellwig <hch@lst.de>
13 Link: https://lore.kernel.org/all/20221130133016.GC3055@lst.de/
14 Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
15 Link: https://lore.kernel.org/r/20230405090425.1351-1-kvalo@kernel.org
16 ---
17 drivers/net/wireless/ath/ath11k/dp_rx.c | 5 ++++-
18 1 file changed, 4 insertions(+), 1 deletion(-)
19
20 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c
21 +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
22 @@ -3106,8 +3106,11 @@ int ath11k_peer_rx_frag_setup(struct ath
23 int i;
24
25 tfm = crypto_alloc_shash("michael_mic", 0, 0);
26 - if (IS_ERR(tfm))
27 + if (IS_ERR(tfm)) {
28 + ath11k_warn(ab, "failed to allocate michael_mic shash: %ld\n",
29 + PTR_ERR(tfm));
30 return PTR_ERR(tfm);
31 + }
32
33 spin_lock_bh(&ab->base_lock);
34