summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaul Zhang <paulz@codeaurora.org>2017-05-23 13:27:04 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-05-24 05:53:23 -0700
commite184fd8d1558c4bd5d9ea71650d73b2cdeb504f3 (patch)
tree18e17c3cd6ab206c9330303428828af3364b0268 /include
parent60be71604a84d2e047215cb702d6324379a353bb (diff)
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: 2051651 Change-Id: I335a046a886ac3ce35cf96eb71231bfe75d33c60 Signed-off-by: Paul Zhang <paulz@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/cnss.h10
-rw-r--r--include/soc/qcom/icnss.h9
2 files changed, 17 insertions, 2 deletions
diff --git a/include/net/cnss.h b/include/net/cnss.h
index be58e32e6c7a..d6f27759af17 100644
--- a/include/net/cnss.h
+++ b/include/net/cnss.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -187,6 +187,12 @@ extern int cnss_pcie_set_wlan_mac_address(const u8 *in, uint32_t len);
extern u8 *cnss_get_wlan_mac_address(struct device *dev, uint32_t *num);
extern int cnss_sdio_set_wlan_mac_address(const u8 *in, uint32_t len);
+enum cnss_cc_src {
+ CNSS_SOURCE_CORE,
+ CNSS_SOURCE_11D,
+ CNSS_SOURCE_USER
+};
+
enum {
CNSS_RESET_SOC = 0,
CNSS_RESET_SUBSYS_COUPLED,
@@ -250,4 +256,6 @@ extern u8 *cnss_common_get_wlan_mac_address(struct device *dev, uint32_t *num);
extern int cnss_power_up(struct device *dev);
extern int cnss_power_down(struct device *dev);
extern int cnss_sdio_configure_spdt(bool state);
+extern void cnss_set_cc_source(enum cnss_cc_src cc_source);
+extern enum cnss_cc_src cnss_get_cc_source(void);
#endif /* _NET_CNSS_H_ */
diff --git a/include/soc/qcom/icnss.h b/include/soc/qcom/icnss.h
index 7ef984afc442..b434da092b8e 100644
--- a/include/soc/qcom/icnss.h
+++ b/include/soc/qcom/icnss.h
@@ -23,6 +23,12 @@ enum icnss_uevent {
ICNSS_UEVENT_FW_DOWN,
};
+enum cnss_cc_src {
+ CNSS_SOURCE_CORE,
+ CNSS_SOURCE_11D,
+ CNSS_SOURCE_USER
+};
+
struct icnss_uevent_fw_down_data {
bool crashed;
};
@@ -144,5 +150,6 @@ extern bool icnss_is_fw_ready(void);
extern int icnss_set_wlan_mac_address(const u8 *in, const uint32_t len);
extern u8 *icnss_get_wlan_mac_address(struct device *dev, uint32_t *num);
extern int icnss_trigger_recovery(struct device *dev);
-
+extern void cnss_set_cc_source(enum cnss_cc_src cc_source);
+extern enum cnss_cc_src cnss_get_cc_source(void);
#endif /* _ICNSS_WLAN_H_ */