stonez | 2d68648 | 2019-03-12 14:54:26 +0800 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2019 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 | /** |
| 20 | * DOC: wlan_hdd_mpta_helper.h |
| 21 | * |
| 22 | * Add Vendor subcommand QCA_NL80211_VENDOR_SUBCMD_MPTA_HELPER_CONFIG |
| 23 | */ |
| 24 | |
| 25 | #ifndef __WLAN_HDD_MPTA_HELPER_H |
| 26 | #define __WLAN_HDD_MPTA_HELPER_H |
| 27 | |
| 28 | #include "wlan_fw_offload_main.h" |
| 29 | |
| 30 | #ifdef FEATURE_MPTA_HELPER |
| 31 | #include <net/cfg80211.h> |
| 32 | |
| 33 | /** |
| 34 | * wlan_hdd_mpta_helper_enable() - enable/disable mpta helper |
| 35 | * according to cfg from INI |
| 36 | * @coex_cfg_params: pointer of coex config command params |
| 37 | * @config: pointer of BTC config items |
| 38 | * |
| 39 | * Return: 0 on success; error number otherwise. |
| 40 | * |
| 41 | */ |
| 42 | int |
| 43 | wlan_hdd_mpta_helper_enable(struct coex_config_params *coex_cfg_params, |
| 44 | struct wlan_fwol_coex_config *config); |
| 45 | |
| 46 | /** |
| 47 | * wlan_hdd_cfg80211_mpta_helper_config() - update |
| 48 | * tri-radio coex status by mpta helper |
| 49 | * @wiphy: wiphy device pointer |
| 50 | * @wdev: wireless device pointer |
| 51 | * @data: Vendor command data buffer |
| 52 | * @data_len: Buffer length |
| 53 | * |
| 54 | * Return: 0 on success; error number otherwise. |
| 55 | * |
| 56 | */ |
| 57 | int wlan_hdd_cfg80211_mpta_helper_config(struct wiphy *wiphy, |
| 58 | struct wireless_dev *wdev, |
| 59 | const void *data, |
| 60 | int data_len); |
| 61 | |
| 62 | #define FEATURE_MPTA_HELPER_COMMANDS \ |
| 63 | { \ |
| 64 | .info.vendor_id = QCA_NL80211_VENDOR_ID, \ |
| 65 | .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_MPTA_HELPER_CONFIG,\ |
| 66 | .flags = WIPHY_VENDOR_CMD_NEED_WDEV | \ |
| 67 | WIPHY_VENDOR_CMD_NEED_NETDEV | \ |
| 68 | WIPHY_VENDOR_CMD_NEED_RUNNING, \ |
| 69 | .doit = wlan_hdd_cfg80211_mpta_helper_config \ |
| 70 | }, |
| 71 | |
| 72 | #else /* FEATURE_MPTA_HELPER */ |
| 73 | #define FEATURE_MPTA_HELPER_COMMANDS |
| 74 | |
| 75 | static inline int |
| 76 | wlan_hdd_mpta_helper_enable(struct coex_config_params *coex_cfg_params, |
| 77 | struct wlan_fwol_coex_config *config) |
| 78 | { |
| 79 | return 0; |
| 80 | } |
| 81 | |
| 82 | #endif /* FEATURE_MPTA_HELPER */ |
| 83 | |
| 84 | #endif /* __WLAN_HDD_MPTA_HELPER_H */ |
| 85 | |