Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15eb4216 authored by Ashutosh Kumar's avatar Ashutosh Kumar
Browse files

ath10k: skip vdev down command before vdev restart for wcn3990



Vdev restart command triggers a vdev down and vdev stop in the
firmware. We do not need to send vdev down before sending vdev
restart to the firmware.

Skip vdev down command before we send the vdev restart command
for wcn3990 in the case of change in the channel context.

CRs-Fixed: 2079703
Change-Id: Idb611ec9ae8d40c7f7c3fe6efe853bf4c60d3123
Signed-off-by: default avatarAshutosh Kumar <askuma@codeaurora.org>
parent 347dbf72
Loading
Loading
Loading
Loading
+29 −10
Original line number Diff line number Diff line
@@ -7168,7 +7168,19 @@ ath10k_mac_update_vif_chan(struct ath10k *ar,

		if (WARN_ON(!arvif->is_up))
			continue;
		if (QCA_REV_WCN3990(ar)) {
			/* In the case of wcn3990 WLAN module we send
			 * vdev restart only, no need to send vdev down.
			 */

			ret = ath10k_vdev_restart(arvif, &vifs[i].new_ctx->def);
			if (ret) {
				ath10k_warn(ar,
					    "failed to restart vdev %d: %d\n",
					    arvif->vdev_id, ret);
				continue;
			}
		} else {
			ret = ath10k_wmi_vdev_down(ar, arvif->vdev_id);
			if (ret) {
				ath10k_warn(ar, "failed to down vdev %d: %d\n",
@@ -7176,6 +7188,7 @@ ath10k_mac_update_vif_chan(struct ath10k *ar,
				continue;
			}
		}
	}

	/* All relevant vdevs are downed and associated channel resources
	 * should be available for the channel switch now.
@@ -7204,12 +7217,18 @@ ath10k_mac_update_vif_chan(struct ath10k *ar,
			ath10k_warn(ar, "failed to update prb tmpl during csa: %d\n",
				    ret);

		if (!QCA_REV_WCN3990(ar)) {
			/* In case of other than wcn3990 WLAN module we
			 * send vdev down and vdev restart to the firmware.
			 */

			ret = ath10k_vdev_restart(arvif, &vifs[i].new_ctx->def);
			if (ret) {
				ath10k_warn(ar, "failed to restart vdev %d: %d\n",
					    arvif->vdev_id, ret);
				continue;
			}
		}

		ret = ath10k_wmi_vdev_up(arvif->ar, arvif->vdev_id, arvif->aid,
					 arvif->bssid);