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_BSS_TRANSITION_H 20 #define __WLAN_HDD_BSS_TRANSITION_H 21 22 /** 23 * DOC: wlan_hdd_bss_transition_h 24 * 25 * WLAN Host Device Driver BSS transition API specification 26 */ 27 28 #ifdef FEATURE_BSS_TRANSITION 29 /** 30 * wlan_hdd_cfg80211_fetch_bss_transition_status() - fetch bss transition status 31 * @wiphy: WIPHY structure pointer 32 * @wdev: Wireless device structure pointer 33 * @data: Pointer to the data received 34 * @data_len: Length of the data received 35 * 36 * This function is used to fetch transition status for candidate bss. The 37 * transition status is either accept or reason for reject. 38 * 39 * Return: 0 on success and errno on failure 40 */ 41 int 42 wlan_hdd_cfg80211_fetch_bss_transition_status(struct wiphy *wiphy, 43 struct wireless_dev *wdev, 44 const void *data, int data_len); 45 46 extern const struct nla_policy 47 btm_params_policy 48 [QCA_WLAN_VENDOR_ATTR_MAX + 1]; 49 50 extern const struct nla_policy 51 btm_cand_list_policy 52 [QCA_WLAN_VENDOR_ATTR_BTM_CANDIDATE_INFO_MAX + 1]; 53 54 #define FEATURE_BSS_TRANSITION_VENDOR_COMMANDS \ 55 { \ 56 .info.vendor_id = QCA_NL80211_VENDOR_ID, \ 57 .info.subcmd = \ 58 QCA_NL80211_VENDOR_SUBCMD_FETCH_BSS_TRANSITION_STATUS, \ 59 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | \ 60 WIPHY_VENDOR_CMD_NEED_NETDEV | \ 61 WIPHY_VENDOR_CMD_NEED_RUNNING, \ 62 .doit = wlan_hdd_cfg80211_fetch_bss_transition_status, \ 63 vendor_command_policy(btm_params_policy, \ 64 QCA_WLAN_VENDOR_ATTR_MAX) \ 65 }, 66 #else /* FEATURE_BSS_TRANSITION */ 67 #define FEATURE_BSS_TRANSITION_VENDOR_COMMANDS 68 #endif /* FEATURE_BSS_TRANSITION */ 69 70 #endif /* __WLAN_HDD_BSS_TRANSITION_H */ 71 72