qcacld-3.0: Add policy attribute to SUBCMD_COEX_CONFIG

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_COEX_CONFIG

Change-Id: I865ec470e1b24d1e4c5094648435ea7020a01af8
CRs-Fixed: 2634095
This commit is contained in:
Rajeev Kumar 2020-03-03 12:18:41 -08:00 • committed by nshrivas
commit b15cacfbfc
2 changed files with 16 additions and 11 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2019-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
@ -31,7 +31,7 @@
#include "osif_sync.h"
#include "wlan_fwol_ucfg_api.h"
static const struct nla_policy
const struct nla_policy
coex_config_three_way_policy[QCA_VENDOR_ATTR_COEX_CONFIG_THREE_WAY_MAX + 1] = {
[QCA_VENDOR_ATTR_COEX_CONFIG_THREE_WAY_CONFIG_TYPE] = {
.type = NLA_U32},

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2019-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
@ -41,14 +41,19 @@ int wlan_hdd_cfg80211_set_coex_config(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data, int data_len);
#define FEATURE_COEX_CONFIG_COMMANDS \
{ \
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_COEX_CONFIG,\
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
WIPHY_VENDOR_CMD_NEED_NETDEV | \
WIPHY_VENDOR_CMD_NEED_RUNNING, \
.doit = wlan_hdd_cfg80211_set_coex_config \
extern const struct nla_policy
coex_config_three_way_policy[QCA_VENDOR_ATTR_COEX_CONFIG_THREE_WAY_MAX + 1];
#define FEATURE_COEX_CONFIG_COMMANDS \
{ \
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_COEX_CONFIG, \
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
WIPHY_VENDOR_CMD_NEED_NETDEV | \
WIPHY_VENDOR_CMD_NEED_RUNNING, \
.doit = wlan_hdd_cfg80211_set_coex_config, \
vendor_command_policy(coex_config_three_way_policy, \
QCA_VENDOR_ATTR_COEX_CONFIG_THREE_WAY_MAX) \
},
#else /* FEATURE_COEX_CONFIG */
#define FEATURE_COEX_CONFIG_COMMANDS