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

Commit b705fb86 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "wil6210: set platform features based on FW capabilities"

parents 1f92ef5d 72d70e10
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -777,6 +777,7 @@ static void wil_collect_fw_info(struct wil6210_priv *wil)
void wil_refresh_fw_capabilities(struct wil6210_priv *wil)
{
	struct wiphy *wiphy = wil_to_wiphy(wil);
	int features;

	wil->keep_radio_on_during_sleep =
		test_bit(WIL_PLATFORM_CAPA_RADIO_ON_IN_SUSPEND,
@@ -790,6 +791,16 @@ void wil_refresh_fw_capabilities(struct wil6210_priv *wil)
		wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
	else
		wiphy->signal_type = CFG80211_SIGNAL_TYPE_UNSPEC;

	if (wil->platform_ops.set_features) {
		features = (test_bit(WMI_FW_CAPABILITY_REF_CLOCK_CONTROL,
				     wil->fw_capabilities) &&
			    test_bit(WIL_PLATFORM_CAPA_EXT_CLK,
				     wil->platform_capa)) ?
			BIT(WIL_PLATFORM_FEATURE_FW_EXT_CLK_CONTROL) : 0;

		wil->platform_ops.set_features(wil->platform_handle, features);
	}
}

void wil_mbox_ring_le2cpus(struct wil6210_mbox_ring *r)
+6 −0
Original line number Diff line number Diff line
@@ -27,6 +27,11 @@ enum wil_platform_event {
	WIL_PLATFORM_EVT_POST_SUSPEND = 4,
};

enum wil_platform_features {
	WIL_PLATFORM_FEATURE_FW_EXT_CLK_CONTROL = 0,
	WIL_PLATFORM_FEATURE_MAX,
};

enum wil_platform_capa {
	WIL_PLATFORM_CAPA_RADIO_ON_IN_SUSPEND = 0,
	WIL_PLATFORM_CAPA_T_PWR_ON_0 = 1,
@@ -45,6 +50,7 @@ struct wil_platform_ops {
	void (*uninit)(void *handle);
	int (*notify)(void *handle, enum wil_platform_event evt);
	int (*get_capa)(void *handle);
	void (*set_features)(void *handle, int features);
};

/**
+1 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ enum wmi_fw_capability {
	WMI_FW_CAPABILITY_RSSI_REPORTING		= 12,
	WMI_FW_CAPABILITY_SET_SILENT_RSSI_TABLE		= 13,
	WMI_FW_CAPABILITY_LO_POWER_CALIB_FROM_OTP	= 14,
	WMI_FW_CAPABILITY_REF_CLOCK_CONTROL		= 18,
	WMI_FW_CAPABILITY_MAX,
};