qcacld-3.0: Add policy attribute to ACTIVE_TOS

According to new changes in kernel 5.4 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.4 requirement add policy to following vendor
command as part of this change:
	QCA_NL80211_VENDOR_SUBCMD_ACTIVE_TOS

Change-Id: I915ec5494ef16e7cc5b8c42d814c512a925ef469
CRs-Fixed: 2634120
This commit is contained in:
Alan Chen 2020-03-03 12:57:48 -08:00 committed by nshrivas
parent 5757292dd8
commit 097ad5283b
2 changed files with 17 additions and 11 deletions

View File

@ -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 },

View File

@ -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