diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 258bbf45fc365..ad8e684965ba2 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -12621,7 +12621,7 @@ static int wlan_hdd_cfg80211_set_fast_roaming(struct wiphy *wiphy, QCA_ATTR_NUD_STATS_SET_MAX const struct nla_policy -qca_wlan_vendor_set_nud_stats[STATS_SET_MAX + 1] = { +qca_wlan_vendor_set_nud_stats_policy[STATS_SET_MAX + 1] = { [STATS_SET_START] = {.type = NLA_FLAG }, [STATS_GW_IPV4] = {.type = NLA_U32 }, [STATS_SET_DATA_PKT_INFO] = {.type = NLA_U32 }, @@ -13073,7 +13073,7 @@ static int __wlan_hdd_cfg80211_set_nud_stats(struct wiphy *wiphy, } err = wlan_cfg80211_nla_parse(tb, STATS_SET_MAX, data, data_len, - qca_wlan_vendor_set_nud_stats); + qca_wlan_vendor_set_nud_stats_policy); if (err) { hdd_err("STATS_SET_START ATTR"); return err; @@ -14943,14 +14943,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] = { WIPHY_VENDOR_CMD_NEED_RUNNING, .doit = wlan_hdd_cfg80211_ll_stats_ext_set_param }, - { - .info.vendor_id = QCA_NL80211_VENDOR_ID, - .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_NUD_STATS_SET, - .flags = WIPHY_VENDOR_CMD_NEED_WDEV | - WIPHY_VENDOR_CMD_NEED_NETDEV | - WIPHY_VENDOR_CMD_NEED_RUNNING, - .doit = wlan_hdd_cfg80211_set_nud_stats - }, + FEATURE_VENDOR_SUBCMD_NUD_STATS_SET { .info.vendor_id = QCA_NL80211_VENDOR_ID, .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_NUD_STATS_GET, diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h index c0e505d38d977..918b6210e08d6 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.h +++ b/core/hdd/src/wlan_hdd_cfg80211.h @@ -279,6 +279,22 @@ wlan_hdd_cfg80211_roam_metrics_handover(struct hdd_adapter *adapter, struct csr_roam_info *roam_info); #endif +extern const struct nla_policy + qca_wlan_vendor_set_nud_stats_policy + [QCA_ATTR_NUD_STATS_SET_MAX + 1]; + +#define FEATURE_VENDOR_SUBCMD_NUD_STATS_SET \ +{ \ + .info.vendor_id = QCA_NL80211_VENDOR_ID, \ + .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_NUD_STATS_SET, \ + .flags = WIPHY_VENDOR_CMD_NEED_WDEV | \ + WIPHY_VENDOR_CMD_NEED_NETDEV | \ + WIPHY_VENDOR_CMD_NEED_RUNNING, \ + .doit = wlan_hdd_cfg80211_set_nud_stats, \ + vendor_command_policy(qca_wlan_vendor_set_nud_stats_policy, \ + QCA_ATTR_NUD_STATS_SET_MAX) \ +}, + /** * hdd_cfg80211_wiphy_alloc() - Allocate wiphy *