diff --git a/core/hdd/src/wlan_hdd_active_tos.c b/core/hdd/src/wlan_hdd_active_tos.c index 3fec47eb87df..3f9d59cded9b 100644 --- a/core/hdd/src/wlan_hdd_active_tos.c +++ b/core/hdd/src/wlan_hdd_active_tos.c @@ -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 @@ -55,7 +55,7 @@ static int limit_off_chan_tbl[QCA_WLAN_AC_ALL][HDD_MAX_OFF_CHAN_ENTRIES] = { { HDD_AC_VO_BIT, HDD_MAX_OFF_CHAN_TIME_FOR_VO }, }; -static const struct nla_policy +const struct nla_policy wlan_hdd_set_limit_off_channel_param_policy [QCA_WLAN_VENDOR_ATTR_ACTIVE_TOS_MAX + 1] = { [QCA_WLAN_VENDOR_ATTR_ACTIVE_TOS] = {.type = NLA_U8 }, diff --git a/core/hdd/src/wlan_hdd_active_tos.h b/core/hdd/src/wlan_hdd_active_tos.h index 80f39c4ac2e9..08ac79d76bdf 100644 --- a/core/hdd/src/wlan_hdd_active_tos.h +++ b/core/hdd/src/wlan_hdd_active_tos.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2018, 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 @@ -43,14 +43,20 @@ int wlan_hdd_cfg80211_set_limit_offchan_param(struct wiphy *wiphy, struct wireless_dev *wdev, const void *data, int data_len); -#define FEATURE_ACTIVE_TOS_VENDOR_COMMANDS \ -{ \ - .info.vendor_id = QCA_NL80211_VENDOR_ID, \ - .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_ACTIVE_TOS, \ - .flags = WIPHY_VENDOR_CMD_NEED_WDEV | \ - WIPHY_VENDOR_CMD_NEED_NETDEV | \ - WIPHY_VENDOR_CMD_NEED_RUNNING, \ - .doit = wlan_hdd_cfg80211_set_limit_offchan_param \ +extern const struct nla_policy + wlan_hdd_set_limit_off_channel_param_policy + [QCA_WLAN_VENDOR_ATTR_ACTIVE_TOS_MAX + 1]; + +#define FEATURE_ACTIVE_TOS_VENDOR_COMMANDS \ +{ \ + .info.vendor_id = QCA_NL80211_VENDOR_ID, \ + .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_ACTIVE_TOS, \ + .flags = WIPHY_VENDOR_CMD_NEED_WDEV | \ + WIPHY_VENDOR_CMD_NEED_NETDEV | \ + WIPHY_VENDOR_CMD_NEED_RUNNING, \ + .doit = wlan_hdd_cfg80211_set_limit_offchan_param, \ + vendor_command_policy(wlan_hdd_set_limit_off_channel_param_policy, \ + QCA_WLAN_VENDOR_ATTR_ACTIVE_TOS_MAX) \ }, #else /* FEATURE_ACTIVE_TOS */ #define FEATURE_ACTIVE_TOS_VENDOR_COMMANDS