1 /* 2 * Copyright (c) 2020, The Linux Foundation. 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_gpio.h 19 * 20 * This Header file provide declaration for cfg80211 command handler API 21 */ 22 23 #ifndef __WLAN_CFG80211_GPIO_CFG_H__ 24 #define __WLAN_CFG80211_GPIO_CFG_H__ 25 26 #include <wlan_objmgr_cmn.h> 27 #include <qdf_types.h> 28 #include <net/cfg80211.h> 29 #include <qca_vendor.h> 30 31 #ifdef WLAN_FEATURE_GPIO_CFG 32 33 extern const struct nla_policy 34 wlan_cfg80211_gpio_config_policy 35 [QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_MAX + 1]; 36 37 /** 38 * wlan_cfg80211_start_gpio_config() - set GPIO config 39 * @psoc: pointer to psoc common object 40 * @data: Pointer to the data to be passed via vendor interface 41 * @data_len: Length of the data to be passed 42 * 43 * Return: Return the Success or Failure code 44 */ 45 int wlan_cfg80211_start_gpio_config(struct wiphy *wiphy, 46 struct wlan_objmgr_psoc *psoc, 47 const void *data, int data_len); 48 #else 49 static inline 50 int wlan_cfg80211_start_gpio_config(struct wiphy *wiphy, 51 struct wlan_objmgr_psoc *psoc, 52 const void *data, int data_len) 53 { 54 return 0; 55 } 56 #endif /* WLAN_FEATURE_GPIO_CFG */ 57 #endif /* __WLAN_CFG80211_GPIO_CFG_H__ */ 58