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_ACTIVE_TOS_H 20 #define __WLAN_HDD_ACTIVE_TOS_H 21 22 /** 23 * DOC: wlan_hdd_active_tos_h 24 * 25 * WLAN Host Device Driver ACTIVE TOS API specification 26 */ 27 28 #ifdef FEATURE_ACTIVE_TOS 29 /** 30 * wlan_hdd_cfg80211_set_limit_offchan_param() - set limit off-channel cmd 31 * parameters 32 * @wiphy: pointer to wireless wiphy structure. 33 * @wdev: pointer to wireless_dev structure. 34 * @data: pointer to limit off-channel command parameters. 35 * @data_len: the length in byte of limit off-channel command parameters. 36 * 37 * This is called when application wants to limit the off channel time due to 38 * active voip traffic. 39 * 40 * Return: An error code or 0 on success. 41 */ 42 int wlan_hdd_cfg80211_set_limit_offchan_param(struct wiphy *wiphy, 43 struct wireless_dev *wdev, 44 const void *data, int data_len); 45 46 extern const struct nla_policy 47 wlan_hdd_set_limit_off_channel_param_policy 48 [QCA_WLAN_VENDOR_ATTR_ACTIVE_TOS_MAX + 1]; 49 50 #define FEATURE_ACTIVE_TOS_VENDOR_COMMANDS \ 51 { \ 52 .info.vendor_id = QCA_NL80211_VENDOR_ID, \ 53 .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_ACTIVE_TOS, \ 54 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | \ 55 WIPHY_VENDOR_CMD_NEED_NETDEV | \ 56 WIPHY_VENDOR_CMD_NEED_RUNNING, \ 57 .doit = wlan_hdd_cfg80211_set_limit_offchan_param, \ 58 vendor_command_policy(wlan_hdd_set_limit_off_channel_param_policy, \ 59 QCA_WLAN_VENDOR_ATTR_ACTIVE_TOS_MAX) \ 60 }, 61 #else /* FEATURE_ACTIVE_TOS */ 62 #define FEATURE_ACTIVE_TOS_VENDOR_COMMANDS 63 #endif /* FEATURE_ACTIVE_TOS */ 64 65 #endif /* __WLAN_HDD_ACTIVE_TOS_H */ 66 67