Commit a87a9110 authored by Kalle Valo's avatar Kalle Valo
Browse files

wifi: ath11k: print a warning when crypto_alloc_shash() fails



Christoph reported that ath11k failed to initialise when michael_mic.ko
module was not installed. To make it easier to notice that case print a
warning when crypto_alloc_shash() fails.

Compile tested only.

Reported-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/all/20221130133016.GC3055@lst.de/


Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230405090425.1351-1-kvalo@kernel.org
parent 06c58473
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3106,8 +3106,11 @@ int ath11k_peer_rx_frag_setup(struct ath11k *ar, const u8 *peer_mac, int vdev_id
	int i;

	tfm = crypto_alloc_shash("michael_mic", 0, 0);
	if (IS_ERR(tfm))
	if (IS_ERR(tfm)) {
		ath11k_warn(ab, "failed to allocate michael_mic shash: %ld\n",
			    PTR_ERR(tfm));
		return PTR_ERR(tfm);
	}

	spin_lock_bh(&ab->base_lock);