1 /* 2 * Copyright (c) 2012-2018,2020 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 #ifndef __WLAN_HDD_OTA_TEST_H 20 #define __WLAN_HDD_OTA_TEST_H 21 22 /** 23 * DOC: wlan_hdd_ota_test_h 24 * 25 * WLAN Host Device Driver OTA test API specification 26 */ 27 28 #ifdef FEATURE_OTA_TEST 29 30 extern const struct nla_policy qca_wlan_vendor_ota_test_policy[ 31 QCA_WLAN_VENDOR_ATTR_OTA_TEST_MAX + 1]; 32 33 /** 34 * wlan_hdd_cfg80211_set_ota_test () - Enable or disable OTA test 35 * @wiphy: Pointer to wireless phy 36 * @wdev: Pointer to wireless device 37 * @data: Pointer to data 38 * @data_len: Data length 39 * 40 * Return: 0 on success, negative errno on failure 41 */ 42 int wlan_hdd_cfg80211_set_ota_test(struct wiphy *wiphy, 43 struct wireless_dev *wdev, 44 const void *data, 45 int data_len); 46 47 #define FEATURE_OTA_TEST_VENDOR_COMMANDS \ 48 { \ 49 .info.vendor_id = QCA_NL80211_VENDOR_ID, \ 50 .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_OTA_TEST, \ 51 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | \ 52 WIPHY_VENDOR_CMD_NEED_NETDEV | \ 53 WIPHY_VENDOR_CMD_NEED_RUNNING, \ 54 .doit = wlan_hdd_cfg80211_set_ota_test, \ 55 vendor_command_policy(qca_wlan_vendor_ota_test_policy, \ 56 QCA_WLAN_VENDOR_ATTR_OTA_TEST_MAX)\ 57 }, 58 #else /* FEATURE_OTA_TEST */ 59 #define FEATURE_OTA_TEST_VENDOR_COMMANDS 60 #endif /* FEATURE_OTA_TEST */ 61 62 #endif /* __WLAN_HDD_OTA_TEST_H */ 63 64