0059-wifi-ath11k-print-a-warning-when-crypto_alloc_shash-.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  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. Christoph reported that ath11k failed to initialise when michael_mic.ko
  6. module was not installed. To make it easier to notice that case print a
  7. warning when crypto_alloc_shash() fails.
  8. Compile tested only.
  9. Reported-by: Christoph Hellwig <hch@lst.de>
  10. Link: https://lore.kernel.org/all/20221130133016.GC3055@lst.de/
  11. Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
  12. Link: https://lore.kernel.org/r/20230405090425.1351-1-kvalo@kernel.org
  13. ---
  14. drivers/net/wireless/ath/ath11k/dp_rx.c | 5 ++++-
  15. 1 file changed, 4 insertions(+), 1 deletion(-)
  16. --- a/drivers/net/wireless/ath/ath11k/dp_rx.c
  17. +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
  18. @@ -3106,8 +3106,11 @@ int ath11k_peer_rx_frag_setup(struct ath
  19. int i;
  20. tfm = crypto_alloc_shash("michael_mic", 0, 0);
  21. - if (IS_ERR(tfm))
  22. + if (IS_ERR(tfm)) {
  23. + ath11k_warn(ab, "failed to allocate michael_mic shash: %ld\n",
  24. + PTR_ERR(tfm));
  25. return PTR_ERR(tfm);
  26. + }
  27. spin_lock_bh(&ab->base_lock);