diff --git a/Kbuild b/Kbuild index 24cc5fe449..418ee5517c 100644 --- a/Kbuild +++ b/Kbuild @@ -1045,6 +1045,8 @@ TARGET_IF_INC := -I$(WLAN_COMMON_INC)/target_if/core/inc \ TARGET_IF_OBJ := $(TARGET_IF_DIR)/core/src/target_if_main.o \ $(TARGET_IF_DIR)/regulatory/src/target_if_reg.o \ + $(TARGET_IF_DIR)/regulatory/src/target_if_reg_lte.o \ + $(TARGET_IF_DIR)/regulatory/src/target_if_reg_11d.o \ $(TARGET_IF_DIR)/init_deinit/src/init_cmd_api.o \ $(TARGET_IF_DIR)/init_deinit/src/init_deinit_lmac.o \ $(TARGET_IF_DIR)/init_deinit/src/init_event_handler.o \ @@ -1311,12 +1313,18 @@ REG_CORE_OBJ_DIR := $(WLAN_COMMON_ROOT)/$(REGULATORY_CORE_SRC_DIR) REG_DISPATCHER_OBJ_DIR := $(WLAN_COMMON_ROOT)/$(REG_DISPATCHER_SRC_DIR) REGULATORY_INC := -I$(WLAN_COMMON_INC)/$(REGULATORY_CORE_INC_DIR) REGULATORY_INC += -I$(WLAN_COMMON_INC)/$(REG_DISPATCHER_INC_DIR) -REGULATORY_OBJS := $(REG_CORE_OBJ_DIR)/reg_db.o \ - $(REG_CORE_OBJ_DIR)/reg_services.o \ - $(REG_CORE_OBJ_DIR)/reg_db_parser.o \ - $(REG_DISPATCHER_OBJ_DIR)/wlan_reg_services_api.o \ - $(REG_DISPATCHER_OBJ_DIR)/wlan_reg_tgt_api.o \ - $(REG_DISPATCHER_OBJ_DIR)/wlan_reg_ucfg_api.o +REGULATORY_OBJS := $(REG_CORE_OBJ_DIR)/reg_build_chan_list.o \ + $(REG_CORE_OBJ_DIR)/reg_callbacks.o \ + $(REG_CORE_OBJ_DIR)/reg_db.o \ + $(REG_CORE_OBJ_DIR)/reg_db_parser.o \ + $(REG_CORE_OBJ_DIR)/reg_getset.o \ + $(REG_CORE_OBJ_DIR)/reg_lte.o \ + $(REG_CORE_OBJ_DIR)/reg_opclass.o \ + $(REG_CORE_OBJ_DIR)/reg_priv_objs.o \ + $(REG_DISPATCHER_OBJ_DIR)/wlan_reg_services_api.o \ + $(REG_CORE_OBJ_DIR)/reg_services_common.o \ + $(REG_DISPATCHER_OBJ_DIR)/wlan_reg_tgt_api.o \ + $(REG_DISPATCHER_OBJ_DIR)/wlan_reg_ucfg_api.o ifeq ($(CONFIG_HOST_11D_SCAN), y) REGULATORY_OBJS += $(REG_CORE_OBJ_DIR)/reg_host_11d.o endif @@ -2458,6 +2466,12 @@ cppflags-$(CONFIG_WLAN_NUD_TRACKING) += -DWLAN_NUD_TRACKING #Flag to enable set and get disable channel list feature cppflags-$(CONFIG_DISABLE_CHANNEL_LIST) += -DDISABLE_CHANNEL_LIST +#Flag to enable/disable LTE COEX support +cppflags-$(CONFIG_CONFIG_LTE_COEX) += -DCONFIG_LTE_COEX + +#Flag to enable/disable HOST_OPCLASS +cppflags-$(CONFIG_HOST_OPCLASS) += -DHOST_OPCLASS + #Flag to enable Dynamic Voltage WDCVS (Config Voltage Mode) cppflags-$(CONFIG_WLAN_DYNAMIC_CVM) += -DFEATURE_WLAN_DYNAMIC_CVM diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c index 3ccd40db94..47b0d6de58 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c @@ -1489,8 +1489,9 @@ QDF_STATUS policy_mgr_valid_sap_conc_channel_check( wlan_reg_is_passive_or_disable_ch(pm_ctx->pdev, channel) || !(policy_mgr_sta_sap_scc_on_lte_coex_chan(psoc) || policy_mgr_is_safe_channel(psoc, channel)) || - (!reg_is_etsi13_srd_chan_allowed_master_mode(pm_ctx->pdev) - && reg_is_etsi13_srd_chan(pm_ctx->pdev, channel))) { + (!wlan_reg_is_etsi13_srd_chan_allowed_master_mode( + pm_ctx->pdev) && + wlan_reg_is_etsi13_srd_chan(pm_ctx->pdev, channel))) { if (wlan_reg_is_dfs_ch(pm_ctx->pdev, channel) && sta_sap_scc_on_dfs_chan) { policy_mgr_debug("STA SAP SCC is allowed on DFS channel"); diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c index 569a75b5fc..acd9086c0b 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -1844,8 +1844,8 @@ void policy_mgr_set_weight_of_dfs_passive_channels_to_zero( policy_mgr_debug("Set weight of DFS/passive channels to 0"); for (i = 0; i < orig_channel_count; i++) { - channel_state = reg_get_channel_state(pm_ctx->pdev, - pcl_channels[i]); + channel_state = wlan_reg_get_channel_state(pm_ctx->pdev, + pcl_channels[i]); if ((channel_state == CHANNEL_STATE_DISABLE) || (channel_state == CHANNEL_STATE_INVALID)) /* Set weight of inactive channels to 0 */ @@ -2789,14 +2789,14 @@ enum policy_mgr_conc_next_action */ switch (num_connections) { case 1: - band1 = reg_chan_to_band(pm_conc_connection_list[0].chan); + band1 = wlan_reg_chan_to_band(pm_conc_connection_list[0].chan); if (band1 == BAND_2G) return PM_DBS; else return PM_NOP; case 2: - band1 = reg_chan_to_band(pm_conc_connection_list[0].chan); - band2 = reg_chan_to_band(pm_conc_connection_list[1].chan); + band1 = wlan_reg_chan_to_band(pm_conc_connection_list[0].chan); + band2 = wlan_reg_chan_to_band(pm_conc_connection_list[1].chan); if ((band1 == BAND_2G) || (band2 == BAND_2G)) { if (!hw_mode.dbs_cap) @@ -2821,9 +2821,9 @@ enum policy_mgr_conc_next_action } else return PM_NOP; case 3: - band1 = reg_chan_to_band(pm_conc_connection_list[0].chan); - band2 = reg_chan_to_band(pm_conc_connection_list[1].chan); - band3 = reg_chan_to_band(pm_conc_connection_list[2].chan); + band1 = wlan_reg_chan_to_band(pm_conc_connection_list[0].chan); + band2 = wlan_reg_chan_to_band(pm_conc_connection_list[1].chan); + band3 = wlan_reg_chan_to_band(pm_conc_connection_list[2].chan); if ((band1 == BAND_2G) || (band2 == BAND_2G) || (band3 == BAND_2G)) { @@ -2912,8 +2912,8 @@ enum policy_mgr_conc_next_action next_action = PM_NOP; break; case 2: - band1 = reg_chan_to_band(pm_conc_connection_list[0].chan); - band2 = reg_chan_to_band(pm_conc_connection_list[1].chan); + band1 = wlan_reg_chan_to_band(pm_conc_connection_list[0].chan); + band2 = wlan_reg_chan_to_band(pm_conc_connection_list[1].chan); if ((band1 == band2) && (hw_mode.dbs_cap)) next_action = PM_SINGLE_MAC_UPGRADE; else if ((band1 != band2) && (!hw_mode.dbs_cap)) @@ -2924,9 +2924,9 @@ enum policy_mgr_conc_next_action break; case 3: - band1 = reg_chan_to_band(pm_conc_connection_list[0].chan); - band2 = reg_chan_to_band(pm_conc_connection_list[1].chan); - band3 = reg_chan_to_band(pm_conc_connection_list[2].chan); + band1 = wlan_reg_chan_to_band(pm_conc_connection_list[0].chan); + band2 = wlan_reg_chan_to_band(pm_conc_connection_list[1].chan); + band3 = wlan_reg_chan_to_band(pm_conc_connection_list[2].chan); if (((band1 == band2) && (band2 == band3)) && (hw_mode.dbs_cap)) { next_action = PM_SINGLE_MAC_UPGRADE; diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c index 3895e70175..ecc3891737 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -3351,11 +3351,11 @@ void policy_mgr_trim_acs_channel_list(struct wlan_objmgr_psoc *psoc, org_ch_list[i]; } } else if (band_mask == 2) { - if ((reg_get_channel_state(pm_ctx->pdev, ch_5g) == + if ((wlan_reg_get_channel_state(pm_ctx->pdev, ch_5g) == CHANNEL_STATE_DFS) && policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(psoc)) ch_list[ch_list_count++] = ch_5g; - else if (!(reg_get_channel_state(pm_ctx->pdev, ch_5g) == + else if (!(wlan_reg_get_channel_state(pm_ctx->pdev, ch_5g) == CHANNEL_STATE_DFS)) ch_list[ch_list_count++] = ch_5g; for (i = 0; i < *org_ch_list_count; i++) { @@ -3530,7 +3530,7 @@ bool policy_mgr_is_valid_for_channel_switch(struct wlan_objmgr_psoc *psoc, sap_count = policy_mgr_mode_specific_connection_count(psoc, PM_SAP_MODE, NULL); - state = reg_get_channel_state(pm_ctx->pdev, channel); + state = wlan_reg_get_channel_state(pm_ctx->pdev, channel); policy_mgr_debug("sta_sap_scc_on_dfs_chan %u, sap_count %u, channel %u, state %u", sta_sap_scc_on_dfs_chan, sap_count, channel, state); diff --git a/components/tdls/core/src/wlan_tdls_cmds_process.c b/components/tdls/core/src/wlan_tdls_cmds_process.c index a27c040ef6..6eb228d3ac 100644 --- a/components/tdls/core/src/wlan_tdls_cmds_process.c +++ b/components/tdls/core/src/wlan_tdls_cmds_process.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -21,6 +21,12 @@ * * TDLS north bound commands implementation */ +#include +#include +#include +#include +#include +#include #include #include #include "wlan_tdls_main.h" diff --git a/configs/default_defconfig b/configs/default_defconfig index 9af7c5f7bf..a94b85e16f 100644 --- a/configs/default_defconfig +++ b/configs/default_defconfig @@ -579,6 +579,15 @@ CONFIG_WLAN_WBUFF := y #Flag to enable set and get disable channel list feature CONFIG_DISABLE_CHANNEL_LIST :=y +#Flag to enable LTE COEX feature +CONFIG_CONFIG_LTE_COEX := y + +#Flag to enable/disable HOST 11d scan +CONFIG_HOST_11D_SCAN :=y + +#Flag to enable HOST OPCLASS feature +CONFIG_HOST_OPCLASS := y + #Flag to enable Dynamic Voltage WDCVS (Config Voltage Mode) CONFIG_WLAN_DYNAMIC_CVM := y diff --git a/core/cds/inc/cds_api.h b/core/cds/inc/cds_api.h index 74bf5b0a25..15ea5da072 100644 --- a/core/cds/inc/cds_api.h +++ b/core/cds/inc/cds_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -36,6 +36,7 @@ #include #include "qdf_platform.h" #include "qdf_cpuhp.h" +#include #include "reg_services_public_struct.h" #include #include diff --git a/core/cds/inc/cds_regdomain.h b/core/cds/inc/cds_regdomain.h index 50d91f65d5..1d46e63dff 100644 --- a/core/cds/inc/cds_regdomain.h +++ b/core/cds/inc/cds_regdomain.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2011, 2014-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -62,6 +62,7 @@ #ifndef __CDS_REGDOMAIN_H #define __CDS_REGDOMAIN_H +#include #include #define MIN_TX_PWR_CAP 8 diff --git a/core/cds/src/cds_reg_service.c b/core/cds/src/cds_reg_service.c index c658fdc9ff..5c93ada641 100644 --- a/core/cds/src/cds_reg_service.c +++ b/core/cds/src/cds_reg_service.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -24,6 +24,7 @@ #include "qdf_types.h" #include "qdf_trace.h" +#include #include "wlan_reg_services_api.h" #include "cds_reg_service.h" #include "cds_ieee80211_common_i.h" diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index ef477fa97f..0125a717d4 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -1033,7 +1033,7 @@ int wlan_hdd_send_hang_reason_event(struct hdd_context *hdd_ctx, */ int wlan_hdd_get_adjacent_chan(uint8_t chan, bool upper) { - enum channel_enum ch_idx = reg_get_chan_enum(chan); + enum channel_enum ch_idx = wlan_reg_get_chan_enum(chan); if (ch_idx == INVALID_CHANNEL) return -EINVAL; @@ -1100,11 +1100,11 @@ int wlan_hdd_send_avoid_freq_for_dnbs(struct hdd_context *hdd_ctx, uint8_t op_ch } if (WLAN_REG_IS_24GHZ_CH(op_chan)) { - min_chan = REG_MIN_24GHZ_CH_NUM; - max_chan = REG_MAX_24GHZ_CH_NUM; - } else if WLAN_REG_IS_5GHZ_CH(op_chan) { - min_chan = REG_MIN_5GHZ_CH_NUM; - max_chan = REG_MAX_5GHZ_CH_NUM; + min_chan = WLAN_REG_MIN_24GHZ_CH_NUM; + max_chan = WLAN_REG_MAX_24GHZ_CH_NUM; + } else if (WLAN_REG_IS_5GHZ_CH(op_chan)) { + min_chan = WLAN_REG_MIN_5GHZ_CH_NUM; + max_chan = WLAN_REG_MAX_5GHZ_CH_NUM; } else { hdd_err("invalid channel:%d", op_chan); return -EINVAL; @@ -8603,7 +8603,7 @@ static int hdd_validate_avoid_freq_chanlist( ch_idx <= channel_list-> avoid_freq_range[range_idx].end_freq; ch_idx++) { - if (INVALID_CHANNEL == reg_get_chan_enum(ch_idx)) + if (INVALID_CHANNEL == wlan_reg_get_chan_enum(ch_idx)) continue; for (unsafe_channel_index = 0; unsafe_channel_index < unsafe_channel_count; diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 36c049d7ca..67a86d3a99 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -86,6 +86,7 @@ #include "wlan_crypto_global_api.h" #include "wlan_action_oui_ucfg_api.h" #include "nan_ucfg_api.h" +#include #define ACS_SCAN_EXPIRY_TIMEOUT_S 4 @@ -4508,7 +4509,7 @@ int wlan_hdd_restore_channels(struct hdd_context *hdd_ctx, } for (i = 0; i < cache_chann->num_channels; i++) { - freq = reg_chan_to_freq( + freq = wlan_reg_chan_to_freq( hdd_ctx->pdev, cache_chann->channel_info[i].channel_num); if (!freq) @@ -4580,8 +4581,8 @@ static int wlan_hdd_disable_channels(struct hdd_context *hdd_ctx) } for (i = 0; i < cache_chann->num_channels; i++) { - freq = reg_chan_to_freq(hdd_ctx->pdev, - cache_chann-> + freq = wlan_reg_chan_to_freq(hdd_ctx->pdev, + cache_chann-> channel_info[i].channel_num); if (!freq) continue; @@ -4594,7 +4595,7 @@ static int wlan_hdd_disable_channels(struct hdd_context *hdd_ctx) * the channels */ cache_chann->channel_info[i].reg_status = - reg_get_channel_state( + wlan_reg_get_channel_state( hdd_ctx->pdev, rf_channel); cache_chann->channel_info[i].wiphy_status = @@ -5916,13 +5917,13 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy, /* if sta_sap_scc_on_dfs_chan ini is set, DFS master capability is * assumed disabled in the driver. */ - if ((reg_get_channel_state(hdd_ctx->pdev, channel) == + if ((wlan_reg_get_channel_state(hdd_ctx->pdev, channel) == CHANNEL_STATE_DFS) && sta_sap_scc_on_dfs_chan && !sta_cnt) { hdd_err("SAP not allowed on DFS channel!!"); return -EINVAL; } - if (!reg_is_etsi13_srd_chan_allowed_master_mode(hdd_ctx->pdev) && - reg_is_etsi13_srd_chan(hdd_ctx->pdev, channel)) { + if (!wlan_reg_is_etsi13_srd_chan_allowed_master_mode(hdd_ctx->pdev) && + wlan_reg_is_etsi13_srd_chan(hdd_ctx->pdev, channel)) { hdd_err("SAP not allowed on SRD channel."); return -EINVAL; } diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index d191852343..946d4dd928 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -2493,8 +2493,8 @@ static QDF_STATUS sap_fsm_state_starting(struct sap_context *sap_ctx, QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, FL("ap_ctx->ch_params.ch_width %d, channel %d"), sap_ctx->ch_params.ch_width, - reg_get_channel_state(mac_ctx->pdev, - sap_ctx->channel)); + wlan_reg_get_channel_state(mac_ctx->pdev, + sap_ctx->channel)); /* * The upper layers have been informed that AP is up and