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

Commit b1bfcd6f authored by Paul Zhang's avatar Paul Zhang
Browse files

cnss: save the cc source to platform driver



There is a design limitation in host driver. Driver
sends regulatory_hint_user for both user-space and
11d country to kernel. So when wiphy re-registration
happens, kernel tells the source as USER even for 11d.
And per driver logic the 11d needs to be disabled
if INI gCountryCodePriority is set.

To mitigate this issue, storing the country source
in the platform driver.

CRs-Fixed: 2036118
Change-Id: I39f95b5928f6dcc7342a369e16c0ae77f56a4a1b
Signed-off-by: default avatarPaul Zhang <paulz@codeaurora.org>
parent becfd28d
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -68,6 +68,8 @@ static struct cnss_dfs_nol_info {
	u16 dfs_nol_info_len;
} dfs_nol_info;

static enum cnss_cc_src cnss_cc_source = SOURCE_CORE;

int cnss_set_wlan_unsafe_channel(u16 *unsafe_ch_list, u16 ch_count)
{
	mutex_lock(&unsafe_channel_list_lock);
@@ -406,6 +408,18 @@ int cnss_get_fw_files_for_target(struct cnss_fw_files *pfw_files,
}
EXPORT_SYMBOL(cnss_get_fw_files_for_target);

void cnss_set_cc_source(enum cnss_cc_src cc_source)
{
	cnss_cc_source = cc_source;
}
EXPORT_SYMBOL(cnss_set_cc_source);

enum cnss_cc_src cnss_get_cc_source(void)
{
	return cnss_cc_source;
}
EXPORT_SYMBOL(cnss_get_cc_source);

const char *cnss_wlan_get_evicted_data_file(void)
{
	return FW_FILES_QCA6174_FW_3_0.evicted_data;
+8 −0
Original line number Diff line number Diff line
@@ -30,6 +30,12 @@ enum cnss_bus_width_type {
	CNSS_BUS_WIDTH_HIGH
};

enum cnss_cc_src {
	SOURCE_CORE,
	SOURCE_11D,
	SOURCE_USER
};

/* FW image files */
struct cnss_fw_files {
	char image_file[CNSS_MAX_FILE_NAME];
@@ -175,6 +181,8 @@ extern int cnss_is_auto_suspend_allowed(const char *caller_func);

extern int cnss_pm_runtime_request(struct device *dev, enum
		cnss_runtime_request request);
extern void cnss_set_cc_source(enum cnss_cc_src cc_source);
extern enum cnss_cc_src cnss_get_cc_source(void);
#endif

extern void cnss_pm_wake_lock_init(struct wakeup_source *ws, const char *name);