From 8575b631287904571f709e03cba9934529c85a22 Mon Sep 17 00:00:00 2001 From: Jianmin Zhu Date: Fri, 7 Aug 2020 12:59:36 +0800 Subject: [PATCH] qcacmn: Add API in regulatory to receive channel avoid cmd Enable AUTORFI-3223 LTE coex with remote telematics unit: When Telematics unit (modem) is not located on the SOC as Wi-Fi chip, the OEM's system can still get LTE channel info from the modem and pass it to Wi-Fi driver from an OEM app. This request is to provide an API from Wi-Fi layer to OEM's app to receive the LTE coex channels, After wlan driver received this info, channel avoidance algorithm will run and SAP will adjust Wi-FI channel accordingly. Add API in regulatory to receive channel avoid cmd from os_if/upper layer. Change-Id: I0099b2ef69eba30ad0fc9bca448225ab283ed6b7 CRs-Fixed: 2750727 --- umac/regulatory/dispatcher/inc/wlan_reg_ucfg_api.h | 12 ++++++++++++ umac/regulatory/dispatcher/src/wlan_reg_ucfg_api.c | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/umac/regulatory/dispatcher/inc/wlan_reg_ucfg_api.h b/umac/regulatory/dispatcher/inc/wlan_reg_ucfg_api.h index 640d53644267..4583f0d7b9f5 100644 --- a/umac/regulatory/dispatcher/inc/wlan_reg_ucfg_api.h +++ b/umac/regulatory/dispatcher/inc/wlan_reg_ucfg_api.h @@ -329,6 +329,18 @@ enum country_src ucfg_reg_get_cc_and_src(struct wlan_objmgr_psoc *psoc, void ucfg_reg_unit_simulate_ch_avoid(struct wlan_objmgr_psoc *psoc, struct ch_avoid_ind_type *ch_avoid); +/** + * ucfg_reg_ch_avoid () - Send channel avoid cmd to regulatory + * @psoc: psoc ptr + * @ch_avoid: ch_avoid_ind_type ranges + * + * This function send channel avoid cmd to regulatory from os_if/upper layer + * + * Return: void + */ +void ucfg_reg_ch_avoid(struct wlan_objmgr_psoc *psoc, + struct ch_avoid_ind_type *ch_avoid); + /** * ucfg_reg_11d_vdev_delete_update() - update vdev delete to regulatory * @vdev: vdev ptr diff --git a/umac/regulatory/dispatcher/src/wlan_reg_ucfg_api.c b/umac/regulatory/dispatcher/src/wlan_reg_ucfg_api.c index 0ca077df8a94..3be545f80ecf 100644 --- a/umac/regulatory/dispatcher/src/wlan_reg_ucfg_api.c +++ b/umac/regulatory/dispatcher/src/wlan_reg_ucfg_api.c @@ -253,6 +253,12 @@ void ucfg_reg_unit_simulate_ch_avoid(struct wlan_objmgr_psoc *psoc, reg_process_ch_avoid_event(psoc, ch_avoid); } +void ucfg_reg_ch_avoid(struct wlan_objmgr_psoc *psoc, + struct ch_avoid_ind_type *ch_avoid) +{ + reg_process_ch_avoid_event(psoc, ch_avoid); +} + QDF_STATUS ucfg_reg_11d_vdev_delete_update(struct wlan_objmgr_vdev *vdev) { return reg_11d_vdev_delete_update(vdev);