ath11k: Don't check arvif->is_started before sending management frames
authorBaochen Qiang <quic_bqiang@quicinc.com>
Mon, 9 May 2022 11:57:31 +0000 (14:57 +0300)
committerKalle Valo <quic_kvalo@quicinc.com>
Tue, 10 May 2022 16:32:07 +0000 (19:32 +0300)
commit355333a217541916576351446b5832fec7930566
treeb794cda9ba244c505744b31bfec66a6adc1d6502
parent3a5627b94222c3abc7e65486e2d2c0cc0a35c140
ath11k: Don't check arvif->is_started before sending management frames

Commit 66307ca04057 ("ath11k: fix mgmt_tx_wmi cmd sent to FW for
deleted vdev") wants both of below two conditions are true before
sending management frames:

1: ar->allocated_vdev_map & (1LL << arvif->vdev_id)
2: arvif->is_started

Actually the second one is not necessary because with the first one
we can make sure the vdev is present.

Also use ar->conf_mutex to synchronize vdev delete and mgmt. TX.

This issue is found in case of Passpoint scenario where ath11k
needs to send action frames before vdev is started.

Fix it by removing the second condition.

Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1

Fixes: 66307ca04057 ("ath11k: fix mgmt_tx_wmi cmd sent to FW for deleted vdev")
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220506013614.1580274-3-quic_bqiang@quicinc.com
drivers/net/wireless/ath/ath11k/mac.c