From f325f1fe601d61b4f9e2af82bda595965b2c39ba Mon Sep 17 00:00:00 2001 From: Naga Date: Wed, 28 Feb 2018 19:34:43 +0530 Subject: [PATCH] qcacmn: Add support for cp stats in os_if Add framework for cp stats cfg80211 command handlers CRs-Fixed: 2192386 Change-Id: Ief2a9f3f7d1f26722f9db09fcab674270d1859a1 --- .../cp_stats/inc/wlan_cfg80211_ic_cp_stats.h | 92 +++++++++++++++++++ .../cp_stats/src/wlan_cfg80211_ic_cp_stats.c | 38 ++++++++ 2 files changed, 130 insertions(+) create mode 100644 os_if/linux/cp_stats/inc/wlan_cfg80211_ic_cp_stats.h create mode 100644 os_if/linux/cp_stats/src/wlan_cfg80211_ic_cp_stats.c diff --git a/os_if/linux/cp_stats/inc/wlan_cfg80211_ic_cp_stats.h b/os_if/linux/cp_stats/inc/wlan_cfg80211_ic_cp_stats.h new file mode 100644 index 000000000000..6df240799aa5 --- /dev/null +++ b/os_if/linux/cp_stats/inc/wlan_cfg80211_ic_cp_stats.h @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2018 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/** + * DOC: wlan_cfg80211_ic_cp_stats.h + * + * This Header file provide declaration for cfg80211 command handler API + * registered cp stats and specific with ic + */ + +#ifndef __WLAN_CFG80211_IC_CP_STATS_H__ +#define __WLAN_CFG80211_IC_CP_STATS_H__ + +#ifdef QCA_SUPPORT_CP_STATS +#include +#include +#include +#include + +/** + * wlan_cfg80211_register_cp_stats_cmd_handler() - api to register cfg80211 + * command handler for cp_stats + * @pdev: Pointer to pdev + * @idx: Index in function table + * @handler: Pointer to function handler + * + * Return: void + */ +void wlan_cfg80211_register_cp_stats_cmd_handler + (struct wlan_objmgr_pdev *pdev, + int idx, void *handler); + +/** + * wlan_cfg80211_unregister_cp_stats_cmd_handler() - api to unregister cfg80211 + * command handler for cp_stats + * @pdev: Pointer to pdev + * @idx: Index in function table + * @handler: Pointer to function handler + * + * Return: void + */ +void wlan_cfg80211_unregister_cp_stats_cmd_handler + (struct wlan_objmgr_pdev *pdev, + int idx, void *handler); + +/** + * wlan_cfg80211_cp_stats_get_atf_stats() - api to get atf stats + * @wiphy: Pointer to wireless phy + * @wdev: Pointer to wireless device + * @data: Pointer to data + * @data_len: Length of @data + * + * Return: Return: 0 on success, negative errno on failure + */ +int wlan_cfg80211_cp_stats_get_atf_stats + (struct wiphy *wiphy, + struct wlan_objmgr_pdev *pdev, + const void *data, + int data_len); + +/** + * wlan_cfg80211_cp_stats_get_vow_ext_stats() - api to get vow stats + * @wiphy: Pointer to wireless phy + * @wdev: Pointer to wireless device + * @data: Pointer to data + * @data_len: Length of @data + * + * Return: Return: 0 on success, negative errno on failure + */ +int wlan_cfg80211_cp_stats_get_vow_ext_stats + (struct wiphy *wiphy, + struct wlan_objmgr_pdev *pdev, + const void *data, + int data_len); + +#endif /* QCA_SUPPORT_CP_STATS */ +#endif /* __WLAN_CFG80211_IC_CP_STATS_H__ */ diff --git a/os_if/linux/cp_stats/src/wlan_cfg80211_ic_cp_stats.c b/os_if/linux/cp_stats/src/wlan_cfg80211_ic_cp_stats.c new file mode 100644 index 000000000000..5c8c1166dafd --- /dev/null +++ b/os_if/linux/cp_stats/src/wlan_cfg80211_ic_cp_stats.c @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2018 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/** + * DOC: wlan_cfg80211_ic_cp_stats.c + * + * This file provide definitions to cp stats supported cfg80211 cmd handlers + */ +#include + +int wlan_cfg80211_cp_stats_get_atf_stats(struct wiphy *wiphy, + struct wlan_objmgr_pdev *pdev, + const void *data, int data_len) +{ + return 0; +} + +int wlan_cfg80211_cp_stats_get_vow_ext_stats(struct wiphy *wiphy, + struct wlan_objmgr_pdev *pdev, + const void *data, int data_len) +{ + return 0; +}