ath11k: fix fw crash due to peer get authorized before key install
authorKarthikeyan Periyasamy <quic_periyasa@quicinc.com>
Fri, 12 Nov 2021 08:03:40 +0000 (10:03 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 15 Nov 2021 09:14:58 +0000 (11:14 +0200)
commit85f36923be47b6990215ad444545a6a85133a0c6
treed1496bbca4524c794de3800a90cc16d5f2183b4f
parentc802b6d7815d7c3f556efea28d0b79ef57ebcfd4
ath11k: fix fw crash due to peer get authorized before key install

Firmware expects host to authorize the peer after the successful key
install. But host authorize the peer before the key install, this trigger
the firmware assert which leads to Q6 crash. To avoid this Q6 crash, host
should authorize the peer after the key install. So introduce is_authorized
in peer object to identify that peer is authorize or not. When
IEEE80211_STA_CONTROL_PORT flag is unset, peer move to authorize state
before the vdev up. When the same flag is set then peer move to authorize
state after vdev up. So added authorise check in ath11k_bss_assoc() to
handle the earlier state transition case. Also added the WMI authorize
procedure in ath11k_mac_op_sta_state() to handle the non-earlier state
transition case.

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01492-QCAHKSWPL_SILICONZ-1

Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1636554200-12345-1-git-send-email-quic_periyasa@quicinc.com
drivers/net/wireless/ath/ath11k/mac.c
drivers/net/wireless/ath/ath11k/peer.h