diff --git a/core/hdd/src/wlan_hdd_thermal.c b/core/hdd/src/wlan_hdd_thermal.c index fb09212f60..14f0e6546c 100644 --- a/core/hdd/src/wlan_hdd_thermal.c +++ b/core/hdd/src/wlan_hdd_thermal.c @@ -36,7 +36,7 @@ #include #include "wlan_fwol_ucfg_api.h" -static const struct nla_policy +const struct nla_policy wlan_hdd_thermal_mitigation_policy [QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_MAX + 1] = { [QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_VALUE] = {.type = NLA_U32}, diff --git a/core/hdd/src/wlan_hdd_thermal.h b/core/hdd/src/wlan_hdd_thermal.h index 39b01df01b..9e989554dd 100644 --- a/core/hdd/src/wlan_hdd_thermal.h +++ b/core/hdd/src/wlan_hdd_thermal.h @@ -25,6 +25,7 @@ #include #include +#include #ifdef FW_THERMAL_THROTTLE_SUPPORT @@ -40,12 +41,18 @@ wlan_hdd_cfg80211_set_thermal_mitigation_policy(struct wiphy *wiphy, */ bool wlan_hdd_thermal_config_support(void); -#define FEATURE_THERMAL_VENDOR_COMMANDS \ -{ \ - .info.vendor_id = QCA_NL80211_VENDOR_ID, \ - .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_THERMAL_CMD, \ - .flags = WIPHY_VENDOR_CMD_NEED_WDEV, \ - .doit = wlan_hdd_cfg80211_set_thermal_mitigation_policy \ +extern const struct nla_policy + wlan_hdd_thermal_mitigation_policy + [QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_MAX + 1]; + +#define FEATURE_THERMAL_VENDOR_COMMANDS \ +{ \ + .info.vendor_id = QCA_NL80211_VENDOR_ID, \ + .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_THERMAL_CMD, \ + .flags = WIPHY_VENDOR_CMD_NEED_WDEV, \ + .doit = wlan_hdd_cfg80211_set_thermal_mitigation_policy, \ + vendor_command_policy(wlan_hdd_thermal_mitigation_policy, \ + QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_MAX) \ }, #else #define FEATURE_THERMAL_VENDOR_COMMANDS