Commit 3b199a58 authored by Baochen Qiang's avatar Baochen Qiang Committed by Jeff Johnson
Browse files

Reapply "wifi: ath11k: restore country code during resume"



This reverts commit d3e154d7.

With non-WoWLAN suspend support brought back, commit 7f0343b7 ("wifi:
ath11k: restore country code during resume") needs to be brought back
as well.

Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30

Tested-by: default avatarMuhammad Usama Anjum <usama.anjum@collabora.com>
Tested-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarBaochen Qiang <quic_bqiang@quicinc.com>
Link: https://patch.msgid.link/20250328-ath11k-bring-hibernation-back-v3-6-23405ae23431@quicinc.com


Signed-off-by: default avatarJeff Johnson <jeff.johnson@oss.qualcomm.com>
parent 32d93b51
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -1185,6 +1185,7 @@ EXPORT_SYMBOL(ath11k_core_resume_early);

static int ath11k_core_resume_default(struct ath11k_base *ab)
{
	struct ath11k *ar;
	long time_left;
	int ret;

@@ -1195,6 +1196,20 @@ static int ath11k_core_resume_default(struct ath11k_base *ab)
		return -ETIMEDOUT;
	}

	/* So far only single_pdev_only devices can reach here,
	 * so it is valid to handle the first, and the only, pdev.
	 */
	ar = ab->pdevs[0].ar;
	if (ab->hw_params.current_cc_support &&
	    ar->alpha2[0] != 0 && ar->alpha2[1] != 0) {
		ret = ath11k_reg_set_cc(ar);
		if (ret) {
			ath11k_warn(ab, "failed to set country code during resume: %d\n",
				    ret);
			return ret;
		}
	}

	ret = ath11k_dp_rx_pktlog_start(ab);
	if (ret)
		ath11k_warn(ab, "failed to start rx pktlog during resume: %d\n",