diff --git a/target_if/regulatory/inc/target_if_reg_lte.h b/target_if/regulatory/inc/target_if_reg_lte.h index 567bbc36df6c..3683b8e0c8ef 100644 --- a/target_if/regulatory/inc/target_if_reg_lte.h +++ b/target_if/regulatory/inc/target_if_reg_lte.h @@ -32,7 +32,7 @@ #include "wmi_unified_api.h" #include "wmi_unified_reg_api.h" -#ifdef CONFIG_LTE_COEX +#ifdef LTE_COEX /** * tgt_if_regulatory_register_ch_avoid_event_handler() - Register avoid channel * list event handler diff --git a/target_if/regulatory/src/target_if_reg_lte.c b/target_if/regulatory/src/target_if_reg_lte.c index efe2a908fba7..7d674070c913 100644 --- a/target_if/regulatory/src/target_if_reg_lte.c +++ b/target_if/regulatory/src/target_if_reg_lte.c @@ -22,7 +22,7 @@ * This file contains regulatory target LTE interface */ -#ifdef CONFIG_LTE_COEX +#ifdef LTE_COEX #include "target_if_reg_lte.h" diff --git a/umac/regulatory/core/src/reg_build_chan_list.c b/umac/regulatory/core/src/reg_build_chan_list.c index 714b92cfe844..95f13ed5dbd4 100644 --- a/umac/regulatory/core/src/reg_build_chan_list.c +++ b/umac/regulatory/core/src/reg_build_chan_list.c @@ -26,12 +26,12 @@ #include #include #include "reg_priv_objs.h" -#include "reg_getset.h" +#include "reg_utils.h" #include "reg_callbacks.h" #include "reg_services_common.h" #include "reg_db.h" #include "reg_db_parser.h" -#include "reg_host_11d.h" +#include "reg_offload_11d_scan.h" #include #include "reg_build_chan_list.h" #include diff --git a/umac/regulatory/core/src/reg_callbacks.c b/umac/regulatory/core/src/reg_callbacks.c index 97f1151e6ff5..7aa601f6e623 100644 --- a/umac/regulatory/core/src/reg_callbacks.c +++ b/umac/regulatory/core/src/reg_callbacks.c @@ -26,7 +26,7 @@ #include #include #include "reg_priv_objs.h" -#include "reg_getset.h" +#include "reg_utils.h" #include #include "reg_callbacks.h" #include "reg_services_common.h" diff --git a/umac/regulatory/core/src/reg_db_parser.c b/umac/regulatory/core/src/reg_db_parser.c index 31037fbb43ad..9d17ba5e6118 100644 --- a/umac/regulatory/core/src/reg_db_parser.c +++ b/umac/regulatory/core/src/reg_db_parser.c @@ -30,7 +30,7 @@ #include #include #include "reg_priv_objs.h" -#include "reg_getset.h" +#include "reg_utils.h" QDF_STATUS reg_is_country_code_valid(uint8_t *alpha2) { diff --git a/umac/regulatory/core/src/reg_host_11d.c b/umac/regulatory/core/src/reg_host_11d.c index 2b01ea99af6e..ecaeb6cd9f9c 100644 --- a/umac/regulatory/core/src/reg_host_11d.c +++ b/umac/regulatory/core/src/reg_host_11d.c @@ -20,13 +20,11 @@ * DOC: Add host 11d scan utility functions */ -#include -#include #include #include -#include + #include "reg_priv_objs.h" -#include "reg_getset.h" + #include "reg_host_11d.h" #include "reg_services_common.h" @@ -174,388 +172,3 @@ QDF_STATUS reg_11d_host_scan_deinit(struct wlan_objmgr_psoc *psoc) return QDF_STATUS_SUCCESS; } - -QDF_STATUS reg_set_11d_country(struct wlan_objmgr_pdev *pdev, - uint8_t *country) -{ - struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; - struct set_country country_code; - struct wlan_objmgr_psoc *psoc; - struct cc_regdmn_s rd; - QDF_STATUS status; - struct wlan_lmac_if_reg_tx_ops *tx_ops; - uint8_t pdev_id; - - if (!country) { - reg_err("country code is NULL"); - return QDF_STATUS_E_INVAL; - } - - pdev_id = wlan_objmgr_pdev_get_pdev_id(pdev); - - psoc = wlan_pdev_get_psoc(pdev); - psoc_priv_obj = reg_get_psoc_obj(psoc); - if (!psoc_priv_obj) { - reg_err("psoc reg component is NULL"); - return QDF_STATUS_E_INVAL; - } - - if (!qdf_mem_cmp(psoc_priv_obj->cur_country, country, REG_ALPHA2_LEN)) { - reg_debug("country is not different"); - return QDF_STATUS_SUCCESS; - } - - reg_info("programming new 11d country:%c%c to firmware", - country[0], country[1]); - - qdf_mem_copy(country_code.country, country, REG_ALPHA2_LEN + 1); - country_code.pdev_id = pdev_id; - - psoc_priv_obj->new_11d_ctry_pending[pdev_id] = true; - - if (psoc_priv_obj->offload_enabled) { - tx_ops = reg_get_psoc_tx_ops(psoc); - if (tx_ops->set_country_code) { - tx_ops->set_country_code(psoc, &country_code); - } else { - reg_err("country set fw handler not present"); - psoc_priv_obj->new_11d_ctry_pending[pdev_id] = false; - return QDF_STATUS_E_FAULT; - } - status = QDF_STATUS_SUCCESS; - } else { - qdf_mem_copy(rd.cc.alpha, country, REG_ALPHA2_LEN + 1); - rd.flags = ALPHA_IS_SET; - reg_program_chan_list(pdev, &rd); - status = QDF_STATUS_SUCCESS; - } - - return status; -} - -/** - * reg_send_11d_flush_cbk() - release 11d psoc reference - * @msg: Pointer to scheduler message. - * - * Return: QDF_STATUS - */ -static QDF_STATUS reg_send_11d_flush_cbk(struct scheduler_msg *msg) -{ - struct wlan_objmgr_psoc *psoc = msg->bodyptr; - - wlan_objmgr_psoc_release_ref(psoc, WLAN_REGULATORY_SB_ID); - - return QDF_STATUS_SUCCESS; -} - -/** - * reg_send_11d_msg_cbk() - Send start/stop 11d scan message. - * @msg: Pointer to scheduler message. - * - * Return: QDF_STATUS - */ -static QDF_STATUS reg_send_11d_msg_cbk(struct scheduler_msg *msg) -{ - struct wlan_objmgr_psoc *psoc = msg->bodyptr; - struct wlan_lmac_if_reg_tx_ops *tx_ops; - struct reg_start_11d_scan_req start_req; - struct reg_stop_11d_scan_req stop_req; - struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; - - tx_ops = reg_get_psoc_tx_ops(psoc); - - psoc_priv_obj = reg_get_psoc_obj(psoc); - if (!psoc_priv_obj) { - reg_err("psoc priv obj is NULL"); - return QDF_STATUS_E_FAILURE; - } - - if (psoc_priv_obj->enable_11d_supp) { - start_req.vdev_id = psoc_priv_obj->vdev_id_for_11d_scan; - start_req.scan_period_msec = psoc_priv_obj->scan_11d_interval; - start_req.start_interval_msec = 0; - reg_debug("sending start msg"); - tx_ops->start_11d_scan(psoc, &start_req); - } else { - stop_req.vdev_id = psoc_priv_obj->vdev_id_for_11d_scan; - reg_debug("sending stop msg"); - tx_ops->stop_11d_scan(psoc, &stop_req); - } - - wlan_objmgr_psoc_release_ref(psoc, WLAN_REGULATORY_SB_ID); - return QDF_STATUS_SUCCESS; -} - -/** - * reg_sched_11d_msg() - Schedules 11d scan message. - * @psoc: soc context - */ -static QDF_STATUS reg_sched_11d_msg(struct wlan_objmgr_psoc *psoc) -{ - struct scheduler_msg msg = {0}; - QDF_STATUS status; - - status = wlan_objmgr_psoc_try_get_ref(psoc, WLAN_REGULATORY_SB_ID); - if (QDF_IS_STATUS_ERROR(status)) { - reg_err("error taking psoc ref cnt"); - return status; - } - - msg.bodyptr = psoc; - msg.callback = reg_send_11d_msg_cbk; - msg.flush_callback = reg_send_11d_flush_cbk; - - status = scheduler_post_message(QDF_MODULE_ID_REGULATORY, - QDF_MODULE_ID_REGULATORY, - QDF_MODULE_ID_TARGET_IF, &msg); - if (QDF_IS_STATUS_ERROR(status)) { - wlan_objmgr_psoc_release_ref(psoc, WLAN_REGULATORY_SB_ID); - reg_err("scheduler msg posting failed"); - } - - return status; -} - -void reg_run_11d_state_machine(struct wlan_objmgr_psoc *psoc) -{ - bool temp_11d_support; - struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; - bool world_mode; - - psoc_priv_obj = reg_get_psoc_obj(psoc); - if (!psoc_priv_obj) { - reg_err("reg psoc private obj is NULL"); - return; - } - - world_mode = reg_is_world_alpha2(psoc_priv_obj->cur_country); - - temp_11d_support = psoc_priv_obj->enable_11d_supp; - if ((psoc_priv_obj->enable_11d_in_world_mode) && (world_mode)) - psoc_priv_obj->enable_11d_supp = true; - else if (((psoc_priv_obj->user_ctry_set) && - (psoc_priv_obj->user_ctry_priority)) || - (psoc_priv_obj->master_vdev_cnt)) - psoc_priv_obj->enable_11d_supp = false; - else - psoc_priv_obj->enable_11d_supp = - psoc_priv_obj->enable_11d_supp_original; - - reg_debug("inside 11d state machine:tmp %d 11d_supp %d org %d set %d pri %d cnt %d vdev %d", - temp_11d_support, - psoc_priv_obj->enable_11d_supp, - psoc_priv_obj->enable_11d_supp_original, - psoc_priv_obj->user_ctry_set, - psoc_priv_obj->user_ctry_priority, - psoc_priv_obj->master_vdev_cnt, - psoc_priv_obj->vdev_id_for_11d_scan); - - if (temp_11d_support != psoc_priv_obj->enable_11d_supp) { - if (psoc_priv_obj->is_11d_offloaded) - reg_sched_11d_msg(psoc); - else - reg_11d_host_scan(psoc_priv_obj); - } -} - -QDF_STATUS reg_11d_vdev_created_update(struct wlan_objmgr_vdev *vdev) -{ - struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; - struct wlan_objmgr_pdev *parent_pdev; - struct wlan_objmgr_psoc *parent_psoc; - uint32_t vdev_id; - enum QDF_OPMODE op_mode; - uint8_t i; - - op_mode = wlan_vdev_mlme_get_opmode(vdev); - - parent_pdev = wlan_vdev_get_pdev(vdev); - parent_psoc = wlan_pdev_get_psoc(parent_pdev); - - psoc_priv_obj = reg_get_psoc_obj(parent_psoc); - if (!psoc_priv_obj) { - reg_err("reg psoc private obj is NULL"); - return QDF_STATUS_E_FAULT; - } - - if ((op_mode == QDF_STA_MODE) || - (op_mode == QDF_P2P_DEVICE_MODE) || - (op_mode == QDF_P2P_CLIENT_MODE)) { - vdev_id = wlan_vdev_get_id(vdev); - if (!psoc_priv_obj->vdev_cnt_11d) { - psoc_priv_obj->vdev_id_for_11d_scan = vdev_id; - reg_debug("running 11d state machine, opmode %d", - op_mode); - reg_run_11d_state_machine(parent_psoc); - } - - for (i = 0; i < MAX_STA_VDEV_CNT; i++) { - if (psoc_priv_obj->vdev_ids_11d[i] == INVALID_VDEV_ID) { - psoc_priv_obj->vdev_ids_11d[i] = vdev_id; - break; - } - } - psoc_priv_obj->vdev_cnt_11d++; - } - - if ((op_mode == QDF_P2P_GO_MODE) || (op_mode == QDF_SAP_MODE)) { - reg_debug("running 11d state machine, opmode %d", op_mode); - psoc_priv_obj->master_vdev_cnt++; - reg_run_11d_state_machine(parent_psoc); - } - - return QDF_STATUS_SUCCESS; -} - -QDF_STATUS reg_11d_vdev_delete_update(struct wlan_objmgr_vdev *vdev) -{ - struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; - struct wlan_objmgr_pdev *parent_pdev; - struct wlan_objmgr_psoc *parent_psoc; - enum QDF_OPMODE op_mode; - uint32_t vdev_id; - uint8_t i; - - if (!vdev) { - reg_err("vdev is NULL"); - return QDF_STATUS_E_INVAL; - } - op_mode = wlan_vdev_mlme_get_opmode(vdev); - - parent_pdev = wlan_vdev_get_pdev(vdev); - parent_psoc = wlan_pdev_get_psoc(parent_pdev); - - psoc_priv_obj = reg_get_psoc_obj(parent_psoc); - if (!psoc_priv_obj) { - reg_err("reg psoc private obj is NULL"); - return QDF_STATUS_E_FAULT; - } - - if ((op_mode == QDF_P2P_GO_MODE) || (op_mode == QDF_SAP_MODE)) { - psoc_priv_obj->master_vdev_cnt--; - reg_debug("run 11d state machine, deleted opmode %d", - op_mode); - reg_run_11d_state_machine(parent_psoc); - return QDF_STATUS_SUCCESS; - } - - if ((op_mode == QDF_STA_MODE) || (op_mode == QDF_P2P_DEVICE_MODE) || - (op_mode == QDF_P2P_CLIENT_MODE)) { - vdev_id = wlan_vdev_get_id(vdev); - for (i = 0; i < MAX_STA_VDEV_CNT; i++) { - if (psoc_priv_obj->vdev_ids_11d[i] == vdev_id) { - psoc_priv_obj->vdev_ids_11d[i] = - INVALID_VDEV_ID; - psoc_priv_obj->vdev_cnt_11d--; - break; - } - } - - if ((psoc_priv_obj->vdev_id_for_11d_scan != vdev_id) || - !psoc_priv_obj->vdev_cnt_11d) - return QDF_STATUS_SUCCESS; - - for (i = 0; i < MAX_STA_VDEV_CNT; i++) { - if (psoc_priv_obj->vdev_ids_11d[i] == INVALID_VDEV_ID) - continue; - psoc_priv_obj->vdev_id_for_11d_scan = - psoc_priv_obj->vdev_ids_11d[i]; - psoc_priv_obj->enable_11d_supp = false; - reg_debug("running 11d state machine, vdev %d", - psoc_priv_obj->vdev_id_for_11d_scan); - reg_run_11d_state_machine(parent_psoc); - break; - } - } - - return QDF_STATUS_SUCCESS; -} - -bool reg_is_11d_scan_inprogress(struct wlan_objmgr_psoc *psoc) -{ - struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; - - psoc_priv_obj = reg_get_psoc_obj(psoc); - if (!psoc_priv_obj) { - reg_err("reg psoc private obj is NULL"); - return false; - } - - return psoc_priv_obj->enable_11d_supp; -} - -QDF_STATUS reg_save_new_11d_country(struct wlan_objmgr_psoc *psoc, - uint8_t *country) -{ - struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; - struct wlan_lmac_if_reg_tx_ops *tx_ops; - struct set_country country_code; - uint8_t pdev_id; - - psoc_priv_obj = reg_get_psoc_obj(psoc); - if (!psoc_priv_obj) { - reg_err("reg psoc private obj is NULL"); - - return QDF_STATUS_E_FAILURE; - } - - pdev_id = psoc_priv_obj->def_pdev_id; - psoc_priv_obj->new_11d_ctry_pending[pdev_id] = true; - qdf_mem_copy(country_code.country, country, REG_ALPHA2_LEN + 1); - country_code.pdev_id = pdev_id; - - if (psoc_priv_obj->offload_enabled) { - tx_ops = reg_get_psoc_tx_ops(psoc); - if (tx_ops->set_country_code) { - tx_ops->set_country_code(psoc, &country_code); - } else { - reg_err("country set handler is not present"); - psoc_priv_obj->new_11d_ctry_pending[pdev_id] = false; - return QDF_STATUS_E_FAULT; - } - } - - return QDF_STATUS_SUCCESS; -} - -bool reg_11d_enabled_on_host(struct wlan_objmgr_psoc *psoc) -{ - struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; - - psoc_priv_obj = reg_get_psoc_obj(psoc); - if (!psoc_priv_obj) { - reg_err("reg psoc private obj is NULL"); - return QDF_STATUS_E_FAILURE; - } - - return (psoc_priv_obj->enable_11d_supp && - !psoc_priv_obj->is_11d_offloaded); -} - -QDF_STATUS reg_set_11d_offloaded(struct wlan_objmgr_psoc *psoc, bool val) -{ - struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; - - psoc_priv_obj = reg_get_psoc_obj(psoc); - if (!psoc_priv_obj) { - reg_err("psoc reg component is NULL"); - return QDF_STATUS_E_FAILURE; - } - - psoc_priv_obj->is_11d_offloaded = val; - reg_debug("set is_11d_offloaded %d", val); - return QDF_STATUS_SUCCESS; -} - -bool reg_is_11d_offloaded(struct wlan_objmgr_psoc *psoc) -{ - struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; - - psoc_priv_obj = reg_get_psoc_obj(psoc); - if (!psoc_priv_obj) { - reg_err("reg psoc private obj is NULL"); - return false; - } - - return psoc_priv_obj->is_11d_offloaded; -} diff --git a/umac/regulatory/core/src/reg_host_11d.h b/umac/regulatory/core/src/reg_host_11d.h index 9b1575ba54c4..6d6a3b1e88d6 100644 --- a/umac/regulatory/core/src/reg_host_11d.h +++ b/umac/regulatory/core/src/reg_host_11d.h @@ -54,82 +54,6 @@ QDF_STATUS reg_11d_host_scan_init(struct wlan_objmgr_psoc *psoc); * Return: QDF_STATUS_SUCCESS - in case of success */ QDF_STATUS reg_11d_host_scan_deinit(struct wlan_objmgr_psoc *psoc); - -/** - * reg_run_11d_state_machine() - 11d state machine function. - * @psoc: soc context - */ -void reg_run_11d_state_machine(struct wlan_objmgr_psoc *psoc); - -/** - * reg_set_11d_country() - Set the 11d regulatory country - * @pdev: pdev device for country information - * @country: country value - * - * Return: QDF_STATUS - */ -QDF_STATUS reg_set_11d_country(struct wlan_objmgr_pdev *pdev, uint8_t *country); - -/** - * reg_is_11d_scan_inprogress() - Check 11d scan is supported - * @psoc: psoc ptr - * - * Return: true if 11d scan supported, else false. - */ -bool reg_is_11d_scan_inprogress(struct wlan_objmgr_psoc *psoc); - -/** - * reg_save_new_11d_country() - Save the 11d new country - * @psoc: psoc for country information - * @country: country value - * - * Return: QDF_STATUS - */ -QDF_STATUS reg_save_new_11d_country(struct wlan_objmgr_psoc *psoc, - uint8_t *country); - -/** - * reg_is_11d_offloaded() - whether 11d offloaded supported or not - * @psoc: psoc ptr - * - * Return: bool - */ -bool reg_is_11d_offloaded(struct wlan_objmgr_psoc *psoc); - -/** - * reg_11d_enabled_on_host() - know whether 11d enabled on host - * @psoc: psoc ptr - * - * Return: bool - */ -bool reg_11d_enabled_on_host(struct wlan_objmgr_psoc *psoc); - -/** - * reg_11d_vdev_created_update() - vdev obj create callback - * @vdev: vdev pointer - * - * updates 11d state when a vdev is created. - * - * Return: Success or Failure - */ -QDF_STATUS reg_11d_vdev_created_update(struct wlan_objmgr_vdev *vdev); - -/** - * reg_11d_vdev_delete_update() - update 11d state upon vdev delete - * @vdev: vdev pointer - * - * Return: Success or Failure - */ -QDF_STATUS reg_11d_vdev_delete_update(struct wlan_objmgr_vdev *vdev); - -/** - * reg_set_11d_offloaded() - Set 11d offloaded flag - * @psoc: psoc ptr - * @val: 11d offloaded value - * - * Return: QDF_STATUS - */ -QDF_STATUS reg_set_11d_offloaded(struct wlan_objmgr_psoc *psoc, bool val); #else static inline QDF_STATUS reg_11d_host_scan( @@ -147,54 +71,5 @@ static inline QDF_STATUS reg_11d_host_scan_deinit(struct wlan_objmgr_psoc *psoc) { return QDF_STATUS_SUCCESS; } - -static inline void reg_run_11d_state_machine(struct wlan_objmgr_psoc *psoc) -{ -} - -static inline QDF_STATUS reg_set_11d_country(struct wlan_objmgr_pdev *pdev, - uint8_t *country) -{ - return QDF_STATUS_SUCCESS; -} - -static inline bool reg_is_11d_scan_inprogress(struct wlan_objmgr_psoc *psoc) -{ - return false; -} - -static inline QDF_STATUS reg_save_new_11d_country(struct wlan_objmgr_psoc *psoc, - uint8_t *country) -{ - return QDF_STATUS_SUCCESS; -} - -static inline bool reg_is_11d_offloaded(struct wlan_objmgr_psoc *psoc) -{ - return false; -} - -static inline bool reg_11d_enabled_on_host(struct wlan_objmgr_psoc *psoc) -{ - return false; -} - -static inline QDF_STATUS reg_11d_vdev_delete_update( - struct wlan_objmgr_vdev *vdev) -{ - return QDF_STATUS_SUCCESS; -} - -static inline QDF_STATUS reg_11d_vdev_created_update( - struct wlan_objmgr_vdev *vdev) -{ - return QDF_STATUS_SUCCESS; -} - -static inline QDF_STATUS reg_set_11d_offloaded(struct wlan_objmgr_psoc *psoc, - bool val) -{ - return QDF_STATUS_SUCCESS; -} #endif #endif diff --git a/umac/regulatory/core/src/reg_lte.c b/umac/regulatory/core/src/reg_lte.c index 71bc2fee7964..20a1e7d35e87 100644 --- a/umac/regulatory/core/src/reg_lte.c +++ b/umac/regulatory/core/src/reg_lte.c @@ -34,7 +34,7 @@ #include "reg_callbacks.h" #include "reg_lte.h" -#ifdef CONFIG_LTE_COEX +#ifdef LTE_COEX /** * reg_process_ch_avoid_freq() - Update unsafe frequencies in psoc_priv_obj * @psoc: pointer to psoc object diff --git a/umac/regulatory/core/src/reg_lte.h b/umac/regulatory/core/src/reg_lte.h index fea7f9965f6e..1f3288192cee 100644 --- a/umac/regulatory/core/src/reg_lte.h +++ b/umac/regulatory/core/src/reg_lte.h @@ -23,7 +23,7 @@ * LTE functions */ -#ifdef CONFIG_LTE_COEX +#ifdef LTE_COEX /** * reg_process_ch_avoid_event() - Process channel avoid event * @psoc: psoc for country information diff --git a/umac/regulatory/core/src/reg_offload_11d_scan.c b/umac/regulatory/core/src/reg_offload_11d_scan.c new file mode 100644 index 000000000000..6ff3665bb69b --- /dev/null +++ b/umac/regulatory/core/src/reg_offload_11d_scan.c @@ -0,0 +1,420 @@ +/* + * Copyright (c) 2018-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 + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/** + * DOC: Add 11d utility functions + */ + +#include +#include +#include +#include +#include +#include "reg_priv_objs.h" +#include "reg_utils.h" +#include "reg_services_common.h" +#include "reg_offload_11d_scan.h" +#include "reg_host_11d.h" + +#ifdef TARGET_11D_SCAN + +QDF_STATUS reg_set_11d_country(struct wlan_objmgr_pdev *pdev, + uint8_t *country) +{ + struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; + struct set_country country_code; + struct wlan_objmgr_psoc *psoc; + struct cc_regdmn_s rd; + QDF_STATUS status; + struct wlan_lmac_if_reg_tx_ops *tx_ops; + uint8_t pdev_id; + + if (!country) { + reg_err("country code is NULL"); + return QDF_STATUS_E_INVAL; + } + + pdev_id = wlan_objmgr_pdev_get_pdev_id(pdev); + + psoc = wlan_pdev_get_psoc(pdev); + psoc_priv_obj = reg_get_psoc_obj(psoc); + if (!psoc_priv_obj) { + reg_err("psoc reg component is NULL"); + return QDF_STATUS_E_INVAL; + } + + if (!qdf_mem_cmp(psoc_priv_obj->cur_country, country, REG_ALPHA2_LEN)) { + reg_debug("country is not different"); + return QDF_STATUS_SUCCESS; + } + + reg_info("programming new 11d country:%c%c to firmware", + country[0], country[1]); + + qdf_mem_copy(country_code.country, country, REG_ALPHA2_LEN + 1); + country_code.pdev_id = pdev_id; + + psoc_priv_obj->new_11d_ctry_pending[pdev_id] = true; + + if (psoc_priv_obj->offload_enabled) { + tx_ops = reg_get_psoc_tx_ops(psoc); + if (tx_ops->set_country_code) { + tx_ops->set_country_code(psoc, &country_code); + } else { + reg_err("country set fw handler not present"); + psoc_priv_obj->new_11d_ctry_pending[pdev_id] = false; + return QDF_STATUS_E_FAULT; + } + status = QDF_STATUS_SUCCESS; + } else { + qdf_mem_copy(rd.cc.alpha, country, REG_ALPHA2_LEN + 1); + rd.flags = ALPHA_IS_SET; + reg_program_chan_list(pdev, &rd); + status = QDF_STATUS_SUCCESS; + } + + return status; +} + +/** + * reg_send_11d_flush_cbk() - release 11d psoc reference + * @msg: Pointer to scheduler message. + * + * Return: QDF_STATUS + */ +static QDF_STATUS reg_send_11d_flush_cbk(struct scheduler_msg *msg) +{ + struct wlan_objmgr_psoc *psoc = msg->bodyptr; + + wlan_objmgr_psoc_release_ref(psoc, WLAN_REGULATORY_SB_ID); + + return QDF_STATUS_SUCCESS; +} + +/** + * reg_send_11d_msg_cbk() - Send start/stop 11d scan message. + * @msg: Pointer to scheduler message. + * + * Return: QDF_STATUS + */ +static QDF_STATUS reg_send_11d_msg_cbk(struct scheduler_msg *msg) +{ + struct wlan_objmgr_psoc *psoc = msg->bodyptr; + struct wlan_lmac_if_reg_tx_ops *tx_ops; + struct reg_start_11d_scan_req start_req; + struct reg_stop_11d_scan_req stop_req; + struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; + + tx_ops = reg_get_psoc_tx_ops(psoc); + + psoc_priv_obj = reg_get_psoc_obj(psoc); + if (!psoc_priv_obj) { + reg_err("psoc priv obj is NULL"); + return QDF_STATUS_E_FAILURE; + } + + if (psoc_priv_obj->enable_11d_supp) { + start_req.vdev_id = psoc_priv_obj->vdev_id_for_11d_scan; + start_req.scan_period_msec = psoc_priv_obj->scan_11d_interval; + start_req.start_interval_msec = 0; + reg_debug("sending start msg"); + tx_ops->start_11d_scan(psoc, &start_req); + } else { + stop_req.vdev_id = psoc_priv_obj->vdev_id_for_11d_scan; + reg_debug("sending stop msg"); + tx_ops->stop_11d_scan(psoc, &stop_req); + } + + wlan_objmgr_psoc_release_ref(psoc, WLAN_REGULATORY_SB_ID); + return QDF_STATUS_SUCCESS; +} + +/** + * reg_sched_11d_msg() - Schedules 11d scan message. + * @psoc: soc context + */ +static QDF_STATUS reg_sched_11d_msg(struct wlan_objmgr_psoc *psoc) +{ + struct scheduler_msg msg = {0}; + QDF_STATUS status; + + status = wlan_objmgr_psoc_try_get_ref(psoc, WLAN_REGULATORY_SB_ID); + if (QDF_IS_STATUS_ERROR(status)) { + reg_err("error taking psoc ref cnt"); + return status; + } + + msg.bodyptr = psoc; + msg.callback = reg_send_11d_msg_cbk; + msg.flush_callback = reg_send_11d_flush_cbk; + + status = scheduler_post_message(QDF_MODULE_ID_REGULATORY, + QDF_MODULE_ID_REGULATORY, + QDF_MODULE_ID_TARGET_IF, &msg); + if (QDF_IS_STATUS_ERROR(status)) { + wlan_objmgr_psoc_release_ref(psoc, WLAN_REGULATORY_SB_ID); + reg_err("scheduler msg posting failed"); + } + + return status; +} + +void reg_run_11d_state_machine(struct wlan_objmgr_psoc *psoc) +{ + bool temp_11d_support; + struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; + bool world_mode; + + psoc_priv_obj = reg_get_psoc_obj(psoc); + if (!psoc_priv_obj) { + reg_err("reg psoc private obj is NULL"); + return; + } + + world_mode = reg_is_world_alpha2(psoc_priv_obj->cur_country); + + temp_11d_support = psoc_priv_obj->enable_11d_supp; + if ((psoc_priv_obj->enable_11d_in_world_mode) && (world_mode)) + psoc_priv_obj->enable_11d_supp = true; + else if (((psoc_priv_obj->user_ctry_set) && + (psoc_priv_obj->user_ctry_priority)) || + (psoc_priv_obj->master_vdev_cnt)) + psoc_priv_obj->enable_11d_supp = false; + else + psoc_priv_obj->enable_11d_supp = + psoc_priv_obj->enable_11d_supp_original; + + reg_debug("inside 11d state machine:tmp %d 11d_supp %d org %d set %d pri %d cnt %d vdev %d", + temp_11d_support, + psoc_priv_obj->enable_11d_supp, + psoc_priv_obj->enable_11d_supp_original, + psoc_priv_obj->user_ctry_set, + psoc_priv_obj->user_ctry_priority, + psoc_priv_obj->master_vdev_cnt, + psoc_priv_obj->vdev_id_for_11d_scan); + + if (temp_11d_support != psoc_priv_obj->enable_11d_supp) { + if (psoc_priv_obj->is_11d_offloaded) + reg_sched_11d_msg(psoc); + else + reg_11d_host_scan(psoc_priv_obj); + } +} + +QDF_STATUS reg_11d_vdev_created_update(struct wlan_objmgr_vdev *vdev) +{ + struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; + struct wlan_objmgr_pdev *parent_pdev; + struct wlan_objmgr_psoc *parent_psoc; + uint32_t vdev_id; + enum QDF_OPMODE op_mode; + uint8_t i; + + op_mode = wlan_vdev_mlme_get_opmode(vdev); + + parent_pdev = wlan_vdev_get_pdev(vdev); + parent_psoc = wlan_pdev_get_psoc(parent_pdev); + + psoc_priv_obj = reg_get_psoc_obj(parent_psoc); + if (!psoc_priv_obj) { + reg_err("reg psoc private obj is NULL"); + return QDF_STATUS_E_FAULT; + } + + if ((op_mode == QDF_STA_MODE) || + (op_mode == QDF_P2P_DEVICE_MODE) || + (op_mode == QDF_P2P_CLIENT_MODE)) { + vdev_id = wlan_vdev_get_id(vdev); + if (!psoc_priv_obj->vdev_cnt_11d) { + psoc_priv_obj->vdev_id_for_11d_scan = vdev_id; + reg_debug("running 11d state machine, opmode %d", + op_mode); + reg_run_11d_state_machine(parent_psoc); + } + + for (i = 0; i < MAX_STA_VDEV_CNT; i++) { + if (psoc_priv_obj->vdev_ids_11d[i] == INVALID_VDEV_ID) { + psoc_priv_obj->vdev_ids_11d[i] = vdev_id; + break; + } + } + psoc_priv_obj->vdev_cnt_11d++; + } + + if ((op_mode == QDF_P2P_GO_MODE) || (op_mode == QDF_SAP_MODE)) { + reg_debug("running 11d state machine, opmode %d", op_mode); + psoc_priv_obj->master_vdev_cnt++; + reg_run_11d_state_machine(parent_psoc); + } + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS reg_11d_vdev_delete_update(struct wlan_objmgr_vdev *vdev) +{ + struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; + struct wlan_objmgr_pdev *parent_pdev; + struct wlan_objmgr_psoc *parent_psoc; + enum QDF_OPMODE op_mode; + uint32_t vdev_id; + uint8_t i; + + if (!vdev) { + reg_err("vdev is NULL"); + return QDF_STATUS_E_INVAL; + } + op_mode = wlan_vdev_mlme_get_opmode(vdev); + + parent_pdev = wlan_vdev_get_pdev(vdev); + parent_psoc = wlan_pdev_get_psoc(parent_pdev); + + psoc_priv_obj = reg_get_psoc_obj(parent_psoc); + if (!psoc_priv_obj) { + reg_err("reg psoc private obj is NULL"); + return QDF_STATUS_E_FAULT; + } + + if ((op_mode == QDF_P2P_GO_MODE) || (op_mode == QDF_SAP_MODE)) { + psoc_priv_obj->master_vdev_cnt--; + reg_debug("run 11d state machine, deleted opmode %d", + op_mode); + reg_run_11d_state_machine(parent_psoc); + return QDF_STATUS_SUCCESS; + } + + if ((op_mode == QDF_STA_MODE) || (op_mode == QDF_P2P_DEVICE_MODE) || + (op_mode == QDF_P2P_CLIENT_MODE)) { + vdev_id = wlan_vdev_get_id(vdev); + for (i = 0; i < MAX_STA_VDEV_CNT; i++) { + if (psoc_priv_obj->vdev_ids_11d[i] == vdev_id) { + psoc_priv_obj->vdev_ids_11d[i] = + INVALID_VDEV_ID; + psoc_priv_obj->vdev_cnt_11d--; + break; + } + } + + if ((psoc_priv_obj->vdev_id_for_11d_scan != vdev_id) || + !psoc_priv_obj->vdev_cnt_11d) + return QDF_STATUS_SUCCESS; + + for (i = 0; i < MAX_STA_VDEV_CNT; i++) { + if (psoc_priv_obj->vdev_ids_11d[i] == INVALID_VDEV_ID) + continue; + psoc_priv_obj->vdev_id_for_11d_scan = + psoc_priv_obj->vdev_ids_11d[i]; + psoc_priv_obj->enable_11d_supp = false; + reg_debug("running 11d state machine, vdev %d", + psoc_priv_obj->vdev_id_for_11d_scan); + reg_run_11d_state_machine(parent_psoc); + break; + } + } + + return QDF_STATUS_SUCCESS; +} + +bool reg_is_11d_scan_inprogress(struct wlan_objmgr_psoc *psoc) +{ + struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; + + psoc_priv_obj = reg_get_psoc_obj(psoc); + if (!psoc_priv_obj) { + reg_err("reg psoc private obj is NULL"); + return false; + } + + return psoc_priv_obj->enable_11d_supp; +} + +QDF_STATUS reg_save_new_11d_country(struct wlan_objmgr_psoc *psoc, + uint8_t *country) +{ + struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; + struct wlan_lmac_if_reg_tx_ops *tx_ops; + struct set_country country_code; + uint8_t pdev_id; + + psoc_priv_obj = reg_get_psoc_obj(psoc); + if (!psoc_priv_obj) { + reg_err("reg psoc private obj is NULL"); + + return QDF_STATUS_E_FAILURE; + } + + pdev_id = psoc_priv_obj->def_pdev_id; + psoc_priv_obj->new_11d_ctry_pending[pdev_id] = true; + qdf_mem_copy(country_code.country, country, REG_ALPHA2_LEN + 1); + country_code.pdev_id = pdev_id; + + if (psoc_priv_obj->offload_enabled) { + tx_ops = reg_get_psoc_tx_ops(psoc); + if (tx_ops->set_country_code) { + tx_ops->set_country_code(psoc, &country_code); + } else { + reg_err("country set handler is not present"); + psoc_priv_obj->new_11d_ctry_pending[pdev_id] = false; + return QDF_STATUS_E_FAULT; + } + } + + return QDF_STATUS_SUCCESS; +} + +bool reg_11d_enabled_on_host(struct wlan_objmgr_psoc *psoc) +{ + struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; + + psoc_priv_obj = reg_get_psoc_obj(psoc); + if (!psoc_priv_obj) { + reg_err("reg psoc private obj is NULL"); + return QDF_STATUS_E_FAILURE; + } + + return (psoc_priv_obj->enable_11d_supp && + !psoc_priv_obj->is_11d_offloaded); +} + +QDF_STATUS reg_set_11d_offloaded(struct wlan_objmgr_psoc *psoc, bool val) +{ + struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; + + psoc_priv_obj = reg_get_psoc_obj(psoc); + if (!psoc_priv_obj) { + reg_err("psoc reg component is NULL"); + return QDF_STATUS_E_FAILURE; + } + + psoc_priv_obj->is_11d_offloaded = val; + reg_debug("set is_11d_offloaded %d", val); + return QDF_STATUS_SUCCESS; +} + +bool reg_is_11d_offloaded(struct wlan_objmgr_psoc *psoc) +{ + struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; + + psoc_priv_obj = reg_get_psoc_obj(psoc); + if (!psoc_priv_obj) { + reg_err("reg psoc private obj is NULL"); + return false; + } + + return psoc_priv_obj->is_11d_offloaded; +} +#endif diff --git a/umac/regulatory/core/src/reg_offload_11d_scan.h b/umac/regulatory/core/src/reg_offload_11d_scan.h new file mode 100644 index 000000000000..ad1e64c91f61 --- /dev/null +++ b/umac/regulatory/core/src/reg_offload_11d_scan.h @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2018-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 + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/** + * DOC: Add 11d utility functions + */ + +#ifdef TARGET_11D_SCAN +/** + * reg_run_11d_state_machine() - 11d state machine function. + * @psoc: soc context + */ +void reg_run_11d_state_machine(struct wlan_objmgr_psoc *psoc); + +/** + * reg_set_11d_country() - Set the 11d regulatory country + * @pdev: pdev device for country information + * @country: country value + * + * Return: QDF_STATUS + */ +QDF_STATUS reg_set_11d_country(struct wlan_objmgr_pdev *pdev, uint8_t *country); + +/** + * reg_is_11d_scan_inprogress() - Check 11d scan is supported + * @psoc: psoc ptr + * + * Return: true if 11d scan supported, else false. + */ +bool reg_is_11d_scan_inprogress(struct wlan_objmgr_psoc *psoc); + +/** + * reg_save_new_11d_country() - Save the 11d new country + * @psoc: psoc for country information + * @country: country value + * + * Return: QDF_STATUS + */ +QDF_STATUS reg_save_new_11d_country(struct wlan_objmgr_psoc *psoc, + uint8_t *country); + +/** + * reg_is_11d_offloaded() - whether 11d offloaded supported or not + * @psoc: psoc ptr + * + * Return: bool + */ +bool reg_is_11d_offloaded(struct wlan_objmgr_psoc *psoc); + +/** + * reg_11d_enabled_on_host() - know whether 11d enabled on host + * @psoc: psoc ptr + * + * Return: bool + */ +bool reg_11d_enabled_on_host(struct wlan_objmgr_psoc *psoc); + +/** + * reg_11d_vdev_created_update() - vdev obj create callback + * @vdev: vdev pointer + * + * updates 11d state when a vdev is created. + * + * Return: Success or Failure + */ +QDF_STATUS reg_11d_vdev_created_update(struct wlan_objmgr_vdev *vdev); + +/** + * reg_11d_vdev_delete_update() - update 11d state upon vdev delete + * @vdev: vdev pointer + * + * Return: Success or Failure + */ +QDF_STATUS reg_11d_vdev_delete_update(struct wlan_objmgr_vdev *vdev); + +/** + * reg_set_11d_offloaded() - Set 11d offloaded flag + * @psoc: psoc ptr + * @val: 11d offloaded value + * + * Return: QDF_STATUS + */ +QDF_STATUS reg_set_11d_offloaded(struct wlan_objmgr_psoc *psoc, bool val); + +#else + +static inline void reg_run_11d_state_machine(struct wlan_objmgr_psoc *psoc) +{ +} + +static inline QDF_STATUS reg_set_11d_country(struct wlan_objmgr_pdev *pdev, + uint8_t *country) +{ + return QDF_STATUS_SUCCESS; +} + +static inline bool reg_is_11d_scan_inprogress(struct wlan_objmgr_psoc *psoc) +{ + return false; +} + +static inline QDF_STATUS reg_save_new_11d_country(struct wlan_objmgr_psoc *psoc, + uint8_t *country) +{ + return QDF_STATUS_SUCCESS; +} + +static inline bool reg_is_11d_offloaded(struct wlan_objmgr_psoc *psoc) +{ + return false; +} + +static inline bool reg_11d_enabled_on_host(struct wlan_objmgr_psoc *psoc) +{ + return false; +} + +static inline QDF_STATUS reg_11d_vdev_created_update( + struct wlan_objmgr_vdev *vdev) +{ + return QDF_STATUS_SUCCESS; +} + +static inline QDF_STATUS reg_11d_vdev_delete_update( + struct wlan_objmgr_vdev *vdev) +{ + return QDF_STATUS_SUCCESS; +} + +static inline QDF_STATUS reg_set_11d_offloaded(struct wlan_objmgr_psoc *psoc, + bool val) +{ + return QDF_STATUS_SUCCESS; +} +#endif diff --git a/umac/regulatory/core/src/reg_opclass.c b/umac/regulatory/core/src/reg_opclass.c index 429487636c4a..bb4ed4831e4d 100644 --- a/umac/regulatory/core/src/reg_opclass.c +++ b/umac/regulatory/core/src/reg_opclass.c @@ -26,7 +26,7 @@ #include #include #include "reg_priv_objs.h" -#include "reg_getset.h" +#include "reg_utils.h" #include "reg_db.h" #include "reg_db_parser.h" #include "reg_host_11d.h" diff --git a/umac/regulatory/core/src/reg_priv_objs.c b/umac/regulatory/core/src/reg_priv_objs.c index 5c8e67453f64..07cf6a79bf3e 100644 --- a/umac/regulatory/core/src/reg_priv_objs.c +++ b/umac/regulatory/core/src/reg_priv_objs.c @@ -28,7 +28,7 @@ #include #include #include "reg_priv_objs.h" -#include "reg_getset.h" +#include "reg_utils.h" #include "reg_services_common.h" #include "reg_build_chan_list.h" #include "reg_host_11d.h" diff --git a/umac/regulatory/core/src/reg_services_common.c b/umac/regulatory/core/src/reg_services_common.c index 780d30ad32ac..a291d9cf9b24 100644 --- a/umac/regulatory/core/src/reg_services_common.c +++ b/umac/regulatory/core/src/reg_services_common.c @@ -26,7 +26,7 @@ #include #include #include "reg_priv_objs.h" -#include "reg_getset.h" +#include "reg_utils.h" #include "reg_callbacks.h" #include "reg_services_common.h" #include diff --git a/umac/regulatory/core/src/reg_getset.c b/umac/regulatory/core/src/reg_utils.c similarity index 99% rename from umac/regulatory/core/src/reg_getset.c rename to umac/regulatory/core/src/reg_utils.c index 220c8962b02d..a9c15b66fa43 100644 --- a/umac/regulatory/core/src/reg_getset.c +++ b/umac/regulatory/core/src/reg_utils.c @@ -17,7 +17,7 @@ */ /** - * DOC: reg_getset.c + * DOC: reg_utils.c * This file defines the APIs to set and get the regulatory variables. */ @@ -26,7 +26,7 @@ #include #include #include "reg_priv_objs.h" -#include "reg_getset.h" +#include "reg_utils.h" #include "reg_callbacks.h" #include "reg_db.h" #include "reg_db_parser.h" diff --git a/umac/regulatory/core/src/reg_getset.h b/umac/regulatory/core/src/reg_utils.h similarity index 99% rename from umac/regulatory/core/src/reg_getset.h rename to umac/regulatory/core/src/reg_utils.h index 205f5547e277..b05098b87316 100644 --- a/umac/regulatory/core/src/reg_getset.h +++ b/umac/regulatory/core/src/reg_utils.h @@ -18,12 +18,12 @@ */ /** - * DOC: reg_getset.h + * DOC: reg_utils.h * This file provides prototypes for setting and getting regulatory variables. */ -#ifndef __REG_GETSET_H_ -#define __REG_GETSET_H_ +#ifndef __REG_UTILS_H_ +#define __REG_UTILS_H_ #ifdef WLAN_FEATURE_DSRC #define REG_DSRC_START_FREQ channel_map[MIN_DSRC_CHANNEL].center_freq diff --git a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c index c4e3b4d91803..7176ec1c55f2 100644 --- a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c +++ b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c @@ -31,14 +31,14 @@ #include #include #include "../../core/src/reg_priv_objs.h" -#include "../../core/src/reg_getset.h" +#include "../../core/src/reg_utils.h" #include "../../core/src/reg_services_common.h" #include "../../core/src/reg_db.h" #include "../../core/src/reg_db_parser.h" #include <../../core/src/reg_build_chan_list.h> #include <../../core/src/reg_opclass.h> #include <../../core/src/reg_callbacks.h> -#include <../../core/src/reg_host_11d.h> +#include <../../core/src/reg_offload_11d_scan.h> #include /** diff --git a/umac/regulatory/dispatcher/src/wlan_reg_tgt_api.c b/umac/regulatory/dispatcher/src/wlan_reg_tgt_api.c index e84db49f344b..190fee0f9cda 100644 --- a/umac/regulatory/dispatcher/src/wlan_reg_tgt_api.c +++ b/umac/regulatory/dispatcher/src/wlan_reg_tgt_api.c @@ -29,11 +29,11 @@ #include #include #include <../../core/src/reg_priv_objs.h> -#include <../../core/src/reg_getset.h> +#include <../../core/src/reg_utils.h> #include <../../core/src/reg_services_common.h> #include <../../core/src/reg_lte.h> #include <../../core/src/reg_build_chan_list.h> -#include <../../core/src/reg_host_11d.h> +#include <../../core/src/reg_offload_11d_scan.h> /** * tgt_process_master_chan_list() - process master channel list diff --git a/umac/regulatory/dispatcher/src/wlan_reg_ucfg_api.c b/umac/regulatory/dispatcher/src/wlan_reg_ucfg_api.c index bfcd9eba2b9c..801dfefafc7b 100644 --- a/umac/regulatory/dispatcher/src/wlan_reg_ucfg_api.c +++ b/umac/regulatory/dispatcher/src/wlan_reg_ucfg_api.c @@ -26,10 +26,10 @@ #include #include #include <../../core/src/reg_priv_objs.h> -#include <../../core/src/reg_getset.h> +#include <../../core/src/reg_utils.h> #include <../../core/src/reg_services_common.h> #include <../../core/src/reg_lte.h> -#include <../../core/src/reg_host_11d.h> +#include <../../core/src/reg_offload_11d_scan.h> #include <../../core/src/reg_build_chan_list.h> #include <../../core/src/reg_callbacks.h> #include