1 /* 2 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17 /** 18 * DOC: wlan_cfg80211_afc.h 19 * 20 * This Header file provide declaration for cfg80211 vendor command handler API 21 * and structures. 22 */ 23 24 #ifndef __WLAN_CFG80211_AFC_H__ 25 #define __WLAN_CFG80211_AFC_H__ 26 27 #include <wlan_objmgr_cmn.h> 28 #include <qdf_types.h> 29 #include <net/cfg80211.h> 30 #include <qca_vendor.h> 31 #include <wlan_reg_ucfg_api.h> 32 33 #ifdef CONFIG_AFC_SUPPORT 34 35 extern const struct nla_policy 36 wlan_cfg80211_afc_response_policy[QCA_WLAN_VENDOR_ATTR_AFC_RESP_MAX + 1]; 37 38 /** 39 * wlan_cfg80211_vendor_afc_response() - To handle vendor AFC response command 40 * @psoc: Pointer to PSOC object 41 * @pdev: Pointer to PDEV object 42 * @data: Pointer to the data received via the vendor interface 43 * @data_len: Length of the data to be passed 44 * 45 * Return: 0 on success, negative errno on failure 46 */ 47 int wlan_cfg80211_vendor_afc_response(struct wlan_objmgr_psoc *psoc, 48 struct wlan_objmgr_pdev *pdev, 49 const void *data, 50 int data_len); 51 52 /** 53 * wlan_cfg80211_afc_send_request() - To handle AFC request from 54 * regulatory AFC component. 55 * @pdev: Pointer to PDEV object 56 * @afc_req: Pointer to AFC request 57 * 58 * Return: 0 on success, negative errno on failure 59 */ 60 int wlan_cfg80211_afc_send_request(struct wlan_objmgr_pdev *pdev, 61 struct wlan_afc_host_request *afc_req); 62 63 /** 64 * wlan_cfg80211_afc_send_update_complete() - To handle AFC update complete 65 * event from regulatory AFC component. 66 * @pdev: Pointer to PDEV object 67 * @afc_evt: Pointer to AFC power update complete event 68 * 69 * Return: 0 on success, negative errno on failure 70 */ 71 int 72 wlan_cfg80211_afc_send_update_complete(struct wlan_objmgr_pdev *pdev, 73 struct reg_fw_afc_power_event *afc_evt); 74 #endif 75 #endif 76