qcacld-3.0: Add policy attribute to MPTA_HELPER_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_MPTA_HELPER_CONFIG

Change-Id: Id83ee15ec7eb43103e44505f44fb9ff48cb23f74
CRs-Fixed: 2634109
This commit is contained in:
Rajeev Kumar
2020-03-03 12:35:38 -08:00
committed by nshrivas
parent ba1d641b44
commit f4627be10a
2 changed files with 9 additions and 4 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
@@ -59,6 +59,9 @@ int wlan_hdd_cfg80211_mpta_helper_config(struct wiphy *wiphy,
const void *data,
int data_len);
extern const struct nla_policy
qca_wlan_vendor_mpta_helper_attr[QCA_MPTA_HELPER_VENDOR_ATTR_MAX + 1];
#define FEATURE_MPTA_HELPER_COMMANDS \
{ \
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
@@ -66,7 +69,9 @@ int wlan_hdd_cfg80211_mpta_helper_config(struct wiphy *wiphy,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
WIPHY_VENDOR_CMD_NEED_NETDEV | \
WIPHY_VENDOR_CMD_NEED_RUNNING, \
.doit = wlan_hdd_cfg80211_mpta_helper_config \
.doit = wlan_hdd_cfg80211_mpta_helper_config, \
vendor_command_policy(qca_wlan_vendor_mpta_helper_attr, \
QCA_MPTA_HELPER_VENDOR_ATTR_MAX) \
},
#else /* FEATURE_MPTA_HELPER */

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
@@ -29,7 +29,7 @@
#include "wlan_osif_request_manager.h"
#include "osif_sync.h"
static const struct nla_policy
const struct nla_policy
qca_wlan_vendor_mpta_helper_attr[QCA_MPTA_HELPER_VENDOR_ATTR_MAX + 1] = {
[QCA_MPTA_HELPER_VENDOR_ATTR_ZIGBEE_STATE] = {.type = NLA_U32 },
[QCA_MPTA_HELPER_VENDOR_ATTR_INT_WLAN_DURATION] = {.type = NLA_U32 },