]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: ath12k: use arvif instead of link_conf in ath12k_mac_set_key()
authorAditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
Tue, 4 Feb 2025 17:05:11 +0000 (22:35 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:13:31 +0000 (11:13 +0200)
commite8e61136e861cb946f1c5ed40f23cc34c2f9e7cc
tree0d6a735eeafc31ed4dc0e8c395353b81acf74c0f
parent6516e57991079bb2a57d713a8839452f72ac1062
wifi: ath12k: use arvif instead of link_conf in ath12k_mac_set_key()

[ Upstream commit 00e4dc11695d48322780812b503314682659e98b ]

Currently, in ath12k_mac_set_key(), if sta is not present, the address is
retrieved from link_conf's bssid or addr member, depending on the interface
type.

When operating as an ML station and during shutdown, link_conf will not be
available. This can result in the following error:

ath12k_pci 0004:01:00.0: unable to access bss link conf in set key for vif AA:BB:CC:DD:EE:FF link 1

The primary purpose of accessing link_conf is to obtain the address for
finding the peer. However, since arvif is always valid in this call, it can
be used instead.

Add change to use arvif instead of link_conf.

A subsequent change will expose this issue but since tear down will give
error, this is included first.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1.97421.5 # Nicolas Escande

Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Signed-off-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
Tested-by: Nicolas Escande <nico.escande@gmail.com>
Link: https://patch.msgid.link/20250204-unlink_link_arvif_from_chanctx-v2-5-764fb5973c1a@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath12k/mac.c