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

Commit 71f6f9fd authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "wil6210: enable AP/PCP power save"

parents faf89766 9d8eff77
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -2049,7 +2049,8 @@ static int _wil_cfg80211_start_ap(struct wiphy *wiphy,
	if (pbss)
		wmi_nettype = WMI_NETTYPE_P2P;

	wil_dbg_misc(wil, "start_ap: mid=%d, is_go=%d\n", vif->mid, is_go);
	wil_dbg_misc(wil, "start_ap: mid=%d, is_go=%d ap_ps=%d\n", vif->mid,
		     is_go, wil->ap_ps);
	if (is_go && !pbss) {
		wil_err(wil, "P2P GO must be in PBSS\n");
		return -ENOTSUPP;
@@ -2139,6 +2140,14 @@ static int _wil_cfg80211_start_ap(struct wiphy *wiphy,
	if (rc)
		goto err_bcast;

	if (test_bit(WMI_FW_CAPABILITY_AP_POWER_MANAGEMENT,
		     wil->fw_capabilities)) {
		enum wmi_ps_profile_type ps_profile = wil->ap_ps ?
			wil->ps_profile : WMI_PS_PROFILE_TYPE_PS_DISABLED;

		wil_ps_update(wil, ps_profile);
	}

	goto out; /* success */

err_bcast:
+1 −0
Original line number Diff line number Diff line
@@ -2639,6 +2639,7 @@ static const struct dbg_off dbg_wil_off[] = {
	WIL_FIELD(rx_buff_id_count, 0644,	doff_u32),
	WIL_FIELD(amsdu_en, 0644,	doff_u8),
	WIL_FIELD(force_edmg_channel, 0644,	doff_u8),
	WIL_FIELD(ap_ps, 0644, doff_u8),
	{},
};

+2 −0
Original line number Diff line number Diff line
@@ -1307,6 +1307,8 @@ void wil_refresh_fw_capabilities(struct wil6210_priv *wil)
	}

	update_supported_bands(wil);

	wil->ap_ps = test_bit(WIL_PLATFORM_CAPA_AP_PS, wil->platform_capa);
}

void wil_mbox_ring_le2cpus(struct wil6210_mbox_ring *r)
+1 −0
Original line number Diff line number Diff line
@@ -1041,6 +1041,7 @@ struct wil6210_priv {
	void *platform_handle;
	struct wil_platform_ops platform_ops;
	bool keep_radio_on_during_sleep;
	u8 ap_ps; /* AP mode power save enabled */

	struct pmc_ctx pmc;

+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ enum wil_platform_capa {
	WIL_PLATFORM_CAPA_T_PWR_ON_0 = 1,
	WIL_PLATFORM_CAPA_EXT_CLK = 2,
	WIL_PLATFORM_CAPA_SMMU = 3,
	WIL_PLATFORM_CAPA_AP_PS = 4,
	WIL_PLATFORM_CAPA_MAX,
};

Loading