1 /* 2 * Copyright (c) 2022, 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_hdd_wifi_pos_pasn.h 19 * 20 * WLAN Host Device Driver WIFI POSITION module PASN authentication 21 * feature interface definitions 22 * 23 */ 24 #ifndef __WLAN_HDD_WIFI_POS_PASN_H__ 25 #define __WLAN_HDD_WIFI_POS_PASN_H__ 26 #include "qdf_types.h" 27 #include "qdf_status.h" 28 #include "qca_vendor.h" 29 #include <net/cfg80211.h> 30 #include "wlan_hdd_object_manager.h" 31 32 #if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT) 33 34 extern const struct nla_policy 35 wifi_pos_pasn_auth_status_policy[QCA_WLAN_VENDOR_ATTR_MAX + 1]; 36 37 extern const struct nla_policy 38 wifi_pos_pasn_auth_policy[QCA_WLAN_VENDOR_ATTR_PASN_PEER_MAX + 1]; 39 40 extern const struct nla_policy 41 wifi_pos_pasn_set_ranging_ctx_policy[QCA_WLAN_VENDOR_ATTR_SECURE_RANGING_CTX_MAX + 1]; 42 43 int wlan_hdd_wifi_pos_send_pasn_auth_status(struct wiphy *wiphy, 44 struct wireless_dev *wdev, 45 const void *data, 46 int data_len); 47 48 #define FEATURE_WIFI_POS_11AZ_AUTH_COMMANDS \ 49 { \ 50 .info.vendor_id = QCA_NL80211_VENDOR_ID, \ 51 .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_PASN, \ 52 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV, \ 53 .doit = wlan_hdd_wifi_pos_send_pasn_auth_status, \ 54 vendor_command_policy(wifi_pos_pasn_auth_status_policy, \ 55 QCA_WLAN_VENDOR_ATTR_MAX) \ 56 }, 57 58 int 59 wlan_hdd_cfg80211_set_secure_ranging_context(struct wiphy *wiphy, 60 struct wireless_dev *wdev, 61 const void *data, int data_len); 62 63 #define FEATURE_WIFI_POS_SET_SECURE_RANGING_CONTEXT_COMMANDS \ 64 { \ 65 .info.vendor_id = QCA_NL80211_VENDOR_ID, \ 66 .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_SECURE_RANGING_CONTEXT, \ 67 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV, \ 68 .doit = wlan_hdd_cfg80211_set_secure_ranging_context, \ 69 vendor_command_policy(wifi_pos_pasn_set_ranging_ctx_policy, \ 70 QCA_WLAN_VENDOR_ATTR_SECURE_RANGING_CTX_MAX) \ 71 }, 72 #else 73 #define FEATURE_WIFI_POS_11AZ_AUTH_COMMANDS 74 #define FEATURE_WIFI_POS_SET_SECURE_RANGING_CONTEXT_COMMANDS 75 #endif /* WIFI_POS_CONVERGED && WLAN_FEATURE_RTT_11AZ_SUPPORT */ 76 #endif /* __WLAN_HDD_WIFI_POS_PASN_H__ */ 77