diff options
author | Sameer Thalappil <sameert@codeaurora.org> | 2017-09-21 13:45:05 -0700 |
---|---|---|
committer | snandini <snandini@codeaurora.org> | 2017-09-21 15:44:55 -0700 |
commit | 6fae8835e8ac35368d81e83ea1917273e4b6a331 (patch) | |
tree | 3e7152128d6ea30062233c3d0d448ea4745339b2 | |
parent | b24ef70cf3c5b7a85c567b6720e3049b4c3cfd1d (diff) | |
download | qcacld-6fae8835e8ac35368d81e83ea1917273e4b6a331.tar.gz |
Revert "qcacld-3.0: save the cc source to platform driver"
This reverts commit Change-Id: Ib245d1db47955a8f70ec7444fa2996390ee3a3fc
icnss_utils is supposed to be removed on mainline, and all driver
changes should refer cnss_utils. CNSS2 and ICNSS should share
cnss_utils.
CRs-Fixed: 2114328
Change-Id: I05fa89051076091b02045f4853f3b9eb594a667a
-rw-r--r-- | core/cds/src/cds_reg_service.c | 16 | ||||
-rw-r--r-- | core/hdd/src/wlan_hdd_regulatory.c | 10 | ||||
-rw-r--r-- | core/pld/inc/pld_common.h | 8 | ||||
-rw-r--r-- | core/pld/src/pld_common.c | 37 | ||||
-rw-r--r-- | core/pld/src/pld_pcie.h | 53 | ||||
-rw-r--r-- | core/pld/src/pld_sdio.h | 54 | ||||
-rw-r--r-- | core/pld/src/pld_snoc.h | 51 |
7 files changed, 3 insertions, 226 deletions
diff --git a/core/cds/src/cds_reg_service.c b/core/cds/src/cds_reg_service.c index 32b5cc31a4..655174e773 100644 --- a/core/cds/src/cds_reg_service.c +++ b/core/cds/src/cds_reg_service.c @@ -32,7 +32,6 @@ ============================================================================*/ #include <net/cfg80211.h> -#include "pld_common.h" #include "qdf_types.h" #include "qdf_trace.h" #include "cds_api.h" @@ -629,12 +628,6 @@ QDF_STATUS cds_get_reg_domain_from_country_code(v_REGDOMAIN_t *reg_domain_ptr, const uint8_t *country_alpha2, enum country_src source) { - hdd_context_t *hdd_ctx; - - hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); - if (wlan_hdd_validate_context(hdd_ctx)) - return false; - if (NULL == reg_domain_ptr) { QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, "Invalid reg domain pointer"); @@ -658,16 +651,9 @@ QDF_STATUS cds_get_reg_domain_from_country_code(v_REGDOMAIN_t *reg_domain_ptr, return QDF_STATUS_SUCCESS; } - if (SOURCE_11D == source || SOURCE_USERSPACE == source) { - if (SOURCE_USERSPACE == source) - pld_set_cc_source(hdd_ctx->parent_dev, - PLD_SOURCE_USER); - else - pld_set_cc_source(hdd_ctx->parent_dev, - PLD_SOURCE_11D); + if (SOURCE_11D == source || SOURCE_USERSPACE == source) regulatory_hint_user(country_alpha2, NL80211_USER_REG_HINT_USER); - } return QDF_STATUS_SUCCESS; } diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c index 595e7887c6..79e7f4df7e 100644 --- a/core/hdd/src/wlan_hdd_regulatory.c +++ b/core/hdd/src/wlan_hdd_regulatory.c @@ -30,7 +30,7 @@ * * hdd regulatory implementation */ -#include "pld_common.h" + #include "qdf_types.h" #include "qdf_trace.h" #include "cds_reg_service.h" @@ -690,8 +690,6 @@ void hdd_reg_notifier(struct wiphy *wiphy, if (NL80211_REGDOM_SET_BY_CORE == request->initiator) { hdd_ctx->reg.cc_src = SOURCE_CORE; - pld_set_cc_source(hdd_ctx->parent_dev, - PLD_SOURCE_CORE); sme_set_cc_src(hdd_ctx->hHal, SOURCE_CORE); if (is_wiphy_custom_regulatory(wiphy)) reset = true; @@ -700,11 +698,7 @@ void hdd_reg_notifier(struct wiphy *wiphy, sme_set_cc_src(hdd_ctx->hHal, SOURCE_DRIVER); } else { sme_set_cc_src(hdd_ctx->hHal, SOURCE_USERSPACE); - if (pld_get_cc_source(hdd_ctx->parent_dev) - == PLD_SOURCE_11D) - hdd_ctx->reg.cc_src = SOURCE_11D; - else - hdd_ctx->reg.cc_src = SOURCE_USERSPACE; + hdd_ctx->reg.cc_src = SOURCE_USERSPACE; hdd_restore_custom_reg_settings(wiphy, request->alpha2, &reset); diff --git a/core/pld/inc/pld_common.h b/core/pld/inc/pld_common.h index d58d604b54..c013d81c99 100644 --- a/core/pld/inc/pld_common.h +++ b/core/pld/inc/pld_common.h @@ -79,12 +79,6 @@ enum pld_bus_width_type { PLD_BUS_WIDTH_HIGH }; -enum pld_cc_src { - PLD_SOURCE_CORE, - PLD_SOURCE_11D, - PLD_SOURCE_USER -}; - #define PLD_MAX_FILE_NAME NAME_MAX /** @@ -536,8 +530,6 @@ void *pld_smmu_get_mapping(struct device *dev); int pld_smmu_map(struct device *dev, phys_addr_t paddr, uint32_t *iova_addr, size_t size); unsigned int pld_socinfo_get_serial_number(struct device *dev); -void pld_set_cc_source(struct device *dev, enum pld_cc_src cc_source); -enum pld_cc_src pld_get_cc_source(struct device *dev); int pld_is_qmi_disable(struct device *dev); int pld_force_assert_target(struct device *dev); bool pld_is_fw_dump_skipped(struct device *dev); diff --git a/core/pld/src/pld_common.c b/core/pld/src/pld_common.c index ca63937379..768555c58b 100644 --- a/core/pld/src/pld_common.c +++ b/core/pld/src/pld_common.c @@ -1467,40 +1467,3 @@ bool pld_is_fw_dump_skipped(struct device *dev) } return ret; } - -void pld_set_cc_source(struct device *dev, enum pld_cc_src cc_source) -{ - enum pld_bus_type type = pld_get_bus_type(dev); - - switch (type) { - case PLD_BUS_TYPE_SNOC: - pld_snoc_set_cc_source(cc_source); - break; - case PLD_BUS_TYPE_PCIE: - pld_pcie_set_cc_source(cc_source); - break; - case PLD_BUS_TYPE_SDIO: - pld_sdio_set_cc_source(cc_source); - break; - default: - pr_err("Invalid device type %d\n", type); - break; - } -} - -enum pld_cc_src pld_get_cc_source(struct device *dev) -{ - enum pld_bus_type type = pld_get_bus_type(dev); - - switch (type) { - case PLD_BUS_TYPE_SNOC: - return pld_snoc_get_cc_source(); - case PLD_BUS_TYPE_PCIE: - return pld_pcie_get_cc_source(); - case PLD_BUS_TYPE_SDIO: - return pld_sdio_get_cc_source(); - default: - pr_err("Invalid device type %d\n", type); - return CNSS_SOURCE_CORE; - } -} diff --git a/core/pld/src/pld_pcie.h b/core/pld/src/pld_pcie.h index 53658dacfd..abfc639539 100644 --- a/core/pld/src/pld_pcie.h +++ b/core/pld/src/pld_pcie.h @@ -119,15 +119,6 @@ static inline int pld_pcie_wlan_pm_control(bool vote) #endif #ifndef CONFIG_PLD_PCIE_CNSS -static inline void pld_pcie_set_cc_source(enum pld_cc_src cc_source) -{ - return; -} -static inline enum pld_cc_src pld_pcie_get_cc_source(void) -{ - return PLD_SOURCE_CORE; -} - static inline int pld_pcie_get_fw_files_for_target(struct pld_fw_files *pfw_files, u32 target_type, u32 target_version) @@ -200,50 +191,6 @@ int pld_pcie_get_fw_files_for_target(struct pld_fw_files *pfw_files, int pld_pcie_get_platform_cap(struct pld_platform_cap *cap); void pld_pcie_set_driver_status(enum pld_driver_status status); -static inline void pld_pcie_set_cc_source(enum pld_cc_src cc_source) -{ - enum cnss_cc_src cc; - switch (cc_source) { - case PLD_SOURCE_CORE: - cc = CNSS_SOURCE_CORE; - break; - case PLD_SOURCE_11D: - cc = CNSS_SOURCE_11D; - break; - case PLD_SOURCE_USER: - cc = CNSS_SOURCE_USER; - break; - default: - cc = CNSS_SOURCE_CORE; - break; - } - cnss_set_cc_source(cc); -} - -static inline enum pld_cc_src pld_pcie_get_cc_source(void) -{ - enum cnss_cc_src cc; - enum pld_cc_src cc_source; - - cc = cnss_get_cc_source(); - switch (cc) { - case CNSS_SOURCE_CORE: - cc_source = PLD_SOURCE_CORE; - break; - case CNSS_SOURCE_11D: - cc_source = PLD_SOURCE_11D; - break; - case CNSS_SOURCE_USER: - cc_source = PLD_SOURCE_USER; - break; - default: - cc_source = PLD_SOURCE_CORE; - break; - } - - return cc_source; -} - static inline void pld_pcie_link_down(void) { cnss_wlan_pci_link_down(); diff --git a/core/pld/src/pld_sdio.h b/core/pld/src/pld_sdio.h index e876c6311f..07ae0de3a7 100644 --- a/core/pld/src/pld_sdio.h +++ b/core/pld/src/pld_sdio.h @@ -121,61 +121,7 @@ static inline void pld_sdio_device_self_recovery(struct device *dev) { cnss_common_device_self_recovery(dev); } - -static inline void pld_sdio_set_cc_source(enum pld_cc_src cc_source) -{ - enum cnss_cc_src cc; - - switch (cc_source) { - case PLD_SOURCE_CORE: - cc = CNSS_SOURCE_CORE; - break; - case PLD_SOURCE_11D: - cc = CNSS_SOURCE_11D; - break; - case PLD_SOURCE_USER: - cc = CNSS_SOURCE_USER; - break; - default: - cc = CNSS_SOURCE_CORE; - break; - } - cnss_set_cc_source(cc); -} -static inline enum pld_cc_src pld_sdio_get_cc_source(void) -{ - enum cnss_cc_src cc; - enum pld_cc_src cc_source; - - cc = cnss_get_cc_source(); - switch (cc) { - case CNSS_SOURCE_CORE: - cc_source = PLD_SOURCE_CORE; - break; - case CNSS_SOURCE_11D: - cc_source = PLD_SOURCE_11D; - break; - case CNSS_SOURCE_USER: - cc_source = PLD_SOURCE_USER; - break; - default: - cc_source = PLD_SOURCE_CORE; - break; - } - - return cc_source; -} #else -static inline void pld_sdio_set_cc_source(enum pld_cc_src cc_source) -{ - return; -} - -static inline enum pld_cc_src pld_sdio_get_cc_source(void) -{ - return PLD_SOURCE_CORE; -} - static inline void *pld_sdio_get_virt_ramdump_mem(struct device *dev, unsigned long *size) { diff --git a/core/pld/src/pld_snoc.h b/core/pld/src/pld_snoc.h index a69ea6a854..e96a8a67d6 100644 --- a/core/pld/src/pld_snoc.h +++ b/core/pld/src/pld_snoc.h @@ -34,15 +34,6 @@ #include "pld_internal.h" #ifndef CONFIG_PLD_SNOC_ICNSS -static inline void pld_snoc_set_cc_source(enum pld_cc_src cc_source) -{ - return; -} -static inline enum pld_cc_src pld_snoc_get_cc_source(void) -{ - `return PLD_SOURCE_CORE; -} - static inline int pld_snoc_register_driver(void) { return 0; @@ -215,47 +206,5 @@ static inline int pld_snoc_set_fw_log_mode(u8 fw_log_mode) { return icnss_set_fw_log_mode(fw_log_mode); } -static inline void pld_snoc_set_cc_source(enum pld_cc_src cc_source) -{ - enum cnss_cc_src cc; - switch (cc_source) { - case PLD_SOURCE_CORE: - cc = CNSS_SOURCE_CORE; - break; - case PLD_SOURCE_11D: - cc = CNSS_SOURCE_11D; - break; - case PLD_SOURCE_USER: - cc = CNSS_SOURCE_USER; - break; - default: - cc = CNSS_SOURCE_CORE; - break; - } - icnss_set_cc_source(cc); -} -static inline enum pld_cc_src pld_snoc_get_cc_source(void) -{ - enum cnss_cc_src cc; - enum pld_cc_src cc_source; - - cc = icnss_get_cc_source(); - switch (cc) { - case CNSS_SOURCE_CORE: - cc_source = PLD_SOURCE_CORE; - break; - case CNSS_SOURCE_11D: - cc_source = PLD_SOURCE_11D; - break; - case CNSS_SOURCE_USER: - cc_source = PLD_SOURCE_USER; - break; - default: - cc_source = PLD_SOURCE_CORE; - break; - } - - return cc_source; -} #endif #endif |