diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 438979c65a2a..4338b11f416f 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -14851,7 +14851,9 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] = { .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV | WIPHY_VENDOR_CMD_NEED_RUNNING, - .doit = wlan_hdd_cfg80211_ll_stats_ext_set_param + .doit = wlan_hdd_cfg80211_ll_stats_ext_set_param, + vendor_command_policy(qca_wlan_vendor_ll_ext_policy, + QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_MAX) }, FEATURE_VENDOR_SUBCMD_NUD_STATS_SET { diff --git a/core/hdd/src/wlan_hdd_hw_capability.h b/core/hdd/src/wlan_hdd_hw_capability.h index 0cbdc071a54a..0e051c23ee8a 100644 --- a/core/hdd/src/wlan_hdd_hw_capability.h +++ b/core/hdd/src/wlan_hdd_hw_capability.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2019-2020 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 @@ -42,14 +42,15 @@ int wlan_hdd_cfg80211_get_hw_capability(struct wiphy *wiphy, const void *data, int data_len); -#define FEATURE_HW_CAPABILITY_COMMANDS \ -{ \ - .info.vendor_id = QCA_NL80211_VENDOR_ID, \ - .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_HW_CAPABILITY,\ - .flags = WIPHY_VENDOR_CMD_NEED_WDEV | \ - WIPHY_VENDOR_CMD_NEED_NETDEV | \ - WIPHY_VENDOR_CMD_NEED_RUNNING, \ - .doit = wlan_hdd_cfg80211_get_hw_capability \ +#define FEATURE_HW_CAPABILITY_COMMANDS \ +{ \ + .info.vendor_id = QCA_NL80211_VENDOR_ID, \ + .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_HW_CAPABILITY, \ + .flags = WIPHY_VENDOR_CMD_NEED_WDEV | \ + WIPHY_VENDOR_CMD_NEED_NETDEV | \ + WIPHY_VENDOR_CMD_NEED_RUNNING, \ + .doit = wlan_hdd_cfg80211_get_hw_capability, \ + vendor_command_policy(VENDOR_CMD_RAW_DATA, 0) \ }, #else /* FEATURE_HW_CAPABILITY */ #define FEATURE_HW_CAPABILITY_COMMANDS diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 2312ae756857..aa7ca1d2b09b 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -2383,15 +2383,42 @@ void wlan_hdd_cfg80211_link_layer_stats_ext_callback(hdd_handle_t ctx, hdd_exit(); } -static const struct nla_policy +const struct nla_policy qca_wlan_vendor_ll_ext_policy[QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_MAX + 1] = { [QCA_WLAN_VENDOR_ATTR_LL_STATS_CFG_PERIOD] = { .type = NLA_U32 }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_CFG_THRESHOLD] = { + .type = NLA_U32 + }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_PS_CHG] = { + .type = NLA_U32 + }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TID] = { + .type = NLA_U32 + }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_NUM_MSDU] = { + .type = NLA_U32 + }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_STATUS] = { + .type = NLA_U32 + }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_PS_STATE] = { + .type = NLA_U32 + }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_MAC_ADDRESS] = { + .type = NLA_U32 + }, [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_GLOBAL] = { .type = NLA_U32 }, - [QCA_WLAN_VENDOR_ATTR_LL_STATS_CFG_THRESHOLD] = { + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_EVENT_MODE] = { + .type = NLA_U32 + }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_IFACE_ID] = { + .type = NLA_U32 + }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_ID] = { .type = NLA_U32 }, [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_BITMAP] = { @@ -2406,6 +2433,18 @@ qca_wlan_vendor_ll_ext_policy[QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_MAX + 1] = { [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_SIGNAL_BITMAP] = { .type = NLA_U32 }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_NUM] = { + .type = NLA_U32 + }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_CHANNEL_NUM] = { + .type = NLA_U32 + }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_CCA_BSS] = { + .type = NLA_U32 + }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER] = { + .type = NLA_U32 + }, [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_MSDU] = { .type = NLA_U32 }, @@ -2433,6 +2472,15 @@ qca_wlan_vendor_ll_ext_policy[QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_MAX + 1] = { [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_NO_BACK] = { .type = NLA_U32 }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_AGGR_NUM] = { + .type = NLA_U32 + }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_SUCC_MCS_NUM] = { + .type = NLA_U32 + }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_FAIL_MCS_NUM] = { + .type = NLA_U32 + }, [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_AGGR] = { .type = NLA_U32 }, @@ -2442,6 +2490,9 @@ qca_wlan_vendor_ll_ext_policy[QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_MAX + 1] = { [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_FAIL_MCS] = { .type = NLA_U32 }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_DELAY_ARRAY_SIZE] = { + .type = NLA_U32 + }, [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_DELAY] = { .type = NLA_U32 }, @@ -2469,6 +2520,12 @@ qca_wlan_vendor_ll_ext_policy[QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_MAX + 1] = { [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MPDU_DISCARD] = { .type = NLA_U32 }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_AGGR_NUM] = { + .type = NLA_U32 + }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MCS_NUM] = { + .type = NLA_U32 + }, [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MCS] = { .type = NLA_U32 }, @@ -2493,6 +2550,9 @@ qca_wlan_vendor_ll_ext_policy[QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_MAX + 1] = { [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_TIME] = { .type = NLA_U32 }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_TIME] = { + .type = NLA_U32 + }, [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_BUSY] = { .type = NLA_U32 }, @@ -2511,12 +2571,24 @@ qca_wlan_vendor_ll_ext_policy[QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_MAX + 1] = { [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_OUT_BSS_TIME] = { .type = NLA_U32 }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_ANT_NUM] = { + .type = NLA_U32 + }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_SIGNAL] = { + .type = NLA_U32 + }, [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_ANT_SNR] = { .type = NLA_U32 }, [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_ANT_NF] = { .type = NLA_U32 }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_IFACE_RSSI_BEACON] = { + .type = NLA_U32 + }, + [QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_IFACE_SNR_BEACON] = { + .type = NLA_U32 + }, }; /** diff --git a/core/hdd/src/wlan_hdd_stats.h b/core/hdd/src/wlan_hdd_stats.h index 88a9b587e053..cca299f7b016 100644 --- a/core/hdd/src/wlan_hdd_stats.h +++ b/core/hdd/src/wlan_hdd_stats.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2020 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 @@ -39,6 +39,8 @@ #define WLAN_HDD_TGT_NOISE_FLOOR_DBM (-96) +extern const struct nla_policy qca_wlan_vendor_ll_ext_policy[ + QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_MAX + 1]; /** * struct index_vht_data_rate_type - vht data rate type * @beacon_rate_index: Beacon rate index