1 /* 2 * Copyright (c) 2018 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 /** 20 * DOC: declares driver FTM functions interfacing with linux kernel 21 */ 22 23 #ifndef _WLAN_CFG80211_FTM_H_ 24 #define _WLAN_CFG80211_FTM_H_ 25 26 /** 27 * enum wlan_cfg80211_ftm_attr - FTM Netlink attributes 28 * @WLAN_CFG80211_FTM_ATTR_INVALID: attribute is invalid 29 * @WLAN_CFG80211_FTM_ATTR_CMD: attribute type is FTM command 30 * @WLAN_CFG80211_FTM_ATTR_DATA: attribute type is data 31 * 32 * @WLAN_CFG80211_FTM_ATTR_MAX: Max number of attributes 33 */ 34 enum wlan_cfg80211_ftm_attr { 35 WLAN_CFG80211_FTM_ATTR_INVALID = 0, 36 WLAN_CFG80211_FTM_ATTR_CMD = 1, 37 WLAN_CFG80211_FTM_ATTR_DATA = 2, 38 39 /* keep last */ 40 WLAN_CFG80211_FTM_ATTR_MAX, 41 }; 42 43 /** 44 * enum wlan_cfg80211_ftm_cmd - FTM command types 45 * @WLAN_CFG80211_FTM_CMD_WLAN_FTM: command is of type FTM 46 */ 47 enum wlan_cfg80211_ftm_cmd { 48 WLAN_CFG80211_FTM_CMD_WLAN_FTM = 0, 49 }; 50 51 #define WLAN_FTM_DATA_MAX_LEN 2048 52 53 /** 54 * wlan_cfg80211_ftm_testmode_cmd() - process cfg80211 testmode command 55 * @pdev: pdev object 56 * @data: ftm testmode command data of type void 57 * @len: length of the data 58 * 59 * Return: 0 on success or -Eerrno otherwise 60 */ 61 int wlan_cfg80211_ftm_testmode_cmd(struct wlan_objmgr_pdev *pdev, 62 void *data, uint32_t len); 63 64 /** 65 * wlan_cfg80211_ftm_rx_event() - handle the received ftm event 66 * @pdev: pdev object 67 * @data: ftm event data 68 * @len: length of the data 69 * 70 * Return: QDF_STATUS_SUCCESS on success or QDF_STATUS_E errno otherwise 71 */ 72 QDF_STATUS wlan_cfg80211_ftm_rx_event(struct wlan_objmgr_pdev *pdev, 73 uint8_t *data, uint32_t len); 74 75 #endif 76