From f4627be10a757a032c6827e8c8a6d4d441cacf47 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Tue, 3 Mar 2020 12:35:38 -0800 Subject: [PATCH] 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 --- core/hdd/inc/wlan_hdd_mpta_helper.h | 9 +++++++-- core/hdd/src/wlan_hdd_mpta_helper.c | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_mpta_helper.h b/core/hdd/inc/wlan_hdd_mpta_helper.h index 4839558a61ee..1c6b524e58f0 100644 --- a/core/hdd/inc/wlan_hdd_mpta_helper.h +++ b/core/hdd/inc/wlan_hdd_mpta_helper.h @@ -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 */ diff --git a/core/hdd/src/wlan_hdd_mpta_helper.c b/core/hdd/src/wlan_hdd_mpta_helper.c index 726ecce26dcf..003df0c37afc 100644 --- a/core/hdd/src/wlan_hdd_mpta_helper.c +++ b/core/hdd/src/wlan_hdd_mpta_helper.c @@ -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 },