qcacld-3.0: Add policy attribute to SUBCMD_CONFIGURE_TDLS

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_CONFIGURE_TDLS

Change-Id: I181d9d5c4160847d4d1be98f2ce5fa2627b3972a
CRs-Fixed: 2634233
This commit is contained in:
Srinivas Girigowda 2020-03-03 16:12:02 -08:00 • committed by nshrivas
commit c58548360f
3 changed files with 22 additions and 13 deletions

View file

@ -23,10 +23,28 @@
* WLAN Host Device Driver TDLS include file
*/
#include "qca_vendor.h"
struct hdd_context;
#ifdef FEATURE_WLAN_TDLS
extern const struct nla_policy
wlan_hdd_tdls_mode_configuration_policy
[QCA_WLAN_VENDOR_ATTR_TDLS_CONFIG_MAX + 1];
#define FEATURE_TDLS_VENDOR_COMMANDS \
{ \
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_CONFIGURE_TDLS, \
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
WIPHY_VENDOR_CMD_NEED_NETDEV | \
WIPHY_VENDOR_CMD_NEED_RUNNING, \
.doit = wlan_hdd_cfg80211_configure_tdls_mode, \
vendor_command_policy(wlan_hdd_tdls_mode_configuration_policy, \
QCA_WLAN_VENDOR_ATTR_TDLS_CONFIG_MAX) \
},
/* Bit mask flag for tdls_option to FW */
#define ENA_TDLS_OFFCHAN (1 << 0) /* TDLS Off Channel support */
#define ENA_TDLS_BUFFER_STA (1 << 1) /* TDLS Buffer STA support */
@ -185,6 +203,8 @@ void hdd_init_tdls_config(struct tdls_start_params *tdls_cfg);
void hdd_config_tdls_with_band_switch(struct hdd_context *hdd_ctx);
#else
#define FEATURE_TDLS_VENDOR_COMMANDS
static inline int wlan_hdd_tdls_antenna_switch(struct hdd_context *hdd_ctx,
struct hdd_adapter *adapter,
uint32_t mode)

View file

@ -14904,18 +14904,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] = {
.doit = wlan_hdd_cfg80211_set_fast_roaming
},
FEATURE_DISA_VENDOR_COMMANDS
#ifdef FEATURE_WLAN_TDLS
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
.info.subcmd =
QCA_NL80211_VENDOR_SUBCMD_CONFIGURE_TDLS,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
.doit = wlan_hdd_cfg80211_configure_tdls_mode
},
#endif
FEATURE_TDLS_VENDOR_COMMANDS
FEATURE_SAR_LIMITS_VENDOR_COMMANDS
BCN_RECV_FEATURE_VENDOR_COMMANDS

View file

@ -153,7 +153,7 @@ static const struct nla_policy
.type = NLA_U32},
};
static const struct nla_policy
const struct nla_policy
wlan_hdd_tdls_mode_configuration_policy
[QCA_WLAN_VENDOR_ATTR_TDLS_CONFIG_MAX + 1] = {
[QCA_WLAN_VENDOR_ATTR_TDLS_CONFIG_TRIGGER_MODE] = {