qcacld-3.0: Add policy attribute to SUBCMD_THERMAL_CMD

According to new changes in kernel 5.2 version onwards, driver has to
provide the policy for a NL command to be verified against while
registering wiphy to the kernel.

To satisfy kernel 5.2 requirement add policy to following vendor
command as part of this change:
	QCA_NL80211_VENDOR_SUBCMD_THERMAL_CMD

Change-Id: Ia5a5e62b3fe086c3fab58d92d12898f525f774b8
CRs-Fixed: 2631242
This commit is contained in:
Rajeev Kumar
2020-02-27 14:20:30 -08:00
committed by nshrivas
parent 8b6b07db0a
commit dd2a53d62c
2 changed files with 14 additions and 7 deletions

View File

@@ -36,7 +36,7 @@
#include <qca_vendor.h> #include <qca_vendor.h>
#include "wlan_fwol_ucfg_api.h" #include "wlan_fwol_ucfg_api.h"
static const struct nla_policy const struct nla_policy
wlan_hdd_thermal_mitigation_policy wlan_hdd_thermal_mitigation_policy
[QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_MAX + 1] = { [QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_MAX + 1] = {
[QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_VALUE] = {.type = NLA_U32}, [QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_VALUE] = {.type = NLA_U32},

View File

@@ -25,6 +25,7 @@
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <net/cfg80211.h> #include <net/cfg80211.h>
#include <qca_vendor.h>
#ifdef FW_THERMAL_THROTTLE_SUPPORT #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); bool wlan_hdd_thermal_config_support(void);
#define FEATURE_THERMAL_VENDOR_COMMANDS \ extern const struct nla_policy
{ \ wlan_hdd_thermal_mitigation_policy
.info.vendor_id = QCA_NL80211_VENDOR_ID, \ [QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_MAX + 1];
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_THERMAL_CMD, \
.flags = WIPHY_VENDOR_CMD_NEED_WDEV, \ #define FEATURE_THERMAL_VENDOR_COMMANDS \
.doit = wlan_hdd_cfg80211_set_thermal_mitigation_policy \ { \
.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 #else
#define FEATURE_THERMAL_VENDOR_COMMANDS #define FEATURE_THERMAL_VENDOR_COMMANDS