Commit c740a18f authored by Aloka Dixit's avatar Aloka Dixit Committed by Kalle Valo

wifi: ath12k: skip sending vdev down for channel switch

Remove the unnecessary WMI vdev down operation as firmware
internally does so already as part of WMI vdev restart.
Repeated vdev down results in a firmware crash during channel
switch operation when multiple BSSID advertisements are enabled:
ath12k_pci 0000:06:00.0: firmware crashed: MHI_CB_SYS_ERROR
ath12k_pci 0000:06:00.0: failed to send WMI_VDEV_SET_PARAM_CMDID
ath12k_pci 0000:06:00.0: failed to set vdev 5 HE MU mode: -108 param_value 7b
ath12k_pci 0000:06:00.0: failed to set he mode vdev 5
ath12k_pci 0000:06:00.0: failed to restart vdev 5: -108
ath12k_pci 0000:06:00.0: failed to send WMI_VDEV_SET_PARAM_CMDID
ath12k_pci 0000:06:00.0: failed to set vdev 4 HE MU mode: -108 param_value 7b
ath12k_pci 0000:06:00.0: failed to set he mode vdev 4
ath12k_pci 0000:06:00.0: failed to restart vdev 4: -108
ath12k_pci 0000:06:00.0: failed to send WMI_VDEV_SET_PARAM_CMDID

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Signed-off-by: default avatarAloka Dixit <quic_alokad@quicinc.com>
Acked-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240508202912.11902-10-quic_alokad@quicinc.com
parent f27fbd76
......@@ -7364,9 +7364,10 @@ ath12k_mac_update_vif_chan(struct ath12k *ar,
lockdep_assert_held(&ar->conf_mutex);
for (i = 0; i < n_vifs; i++) {
arvif = ath12k_vif_to_arvif(vifs[i].vif);
vif = vifs[i].vif;
arvif = ath12k_vif_to_arvif(vif);
if (vifs[i].vif->type == NL80211_IFTYPE_MONITOR)
if (vif->type == NL80211_IFTYPE_MONITOR)
monitor_vif = true;
ath12k_dbg(ab, ATH12K_DBG_MAC,
......@@ -7377,30 +7378,6 @@ ath12k_mac_update_vif_chan(struct ath12k *ar,
vifs[i].old_ctx->def.width,
vifs[i].new_ctx->def.width);
if (WARN_ON(!arvif->is_started))
continue;
if (WARN_ON(!arvif->is_up))
continue;
ret = ath12k_wmi_vdev_down(ar, arvif->vdev_id);
if (ret) {
ath12k_warn(ab, "failed to down vdev %d: %d\n",
arvif->vdev_id, ret);
continue;
}
}
/* All relevant vdevs are downed and associated channel resources
* should be available for the channel switch now.
*/
/* TODO: Update ar->rx_channel */
for (i = 0; i < n_vifs; i++) {
vif = vifs[i].vif;
arvif = ath12k_vif_to_arvif(vif);
if (WARN_ON(!arvif->is_started))
continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment