mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
qcacld-3.0: Add policy attribute to OEM_DATA
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_OEM_DATA
Change-Id: Idf44f40763aa967681a3e5e9df43f259b0254b61
CRs-Fixed: 2635048
This commit is contained in:
parent
8b270d2878
commit
e5ba8b0e36
2 changed files with 17 additions and 11 deletions
|
|
@ -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
|
||||
|
|
@ -261,14 +261,20 @@ int wlan_hdd_cfg80211_oem_data_handler(struct wiphy *wiphy,
|
|||
struct wireless_dev *wdev,
|
||||
const void *data, int data_len);
|
||||
|
||||
#define FEATURE_OEM_DATA_VENDOR_COMMANDS \
|
||||
{ \
|
||||
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
|
||||
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_OEM_DATA, \
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_RUNNING, \
|
||||
.doit = wlan_hdd_cfg80211_oem_data_handler \
|
||||
extern const struct nla_policy
|
||||
oem_data_attr_policy
|
||||
[QCA_WLAN_VENDOR_ATTR_OEM_DATA_PARAMS_MAX + 1];
|
||||
|
||||
#define FEATURE_OEM_DATA_VENDOR_COMMANDS \
|
||||
{ \
|
||||
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
|
||||
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_OEM_DATA, \
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_RUNNING, \
|
||||
.doit = wlan_hdd_cfg80211_oem_data_handler, \
|
||||
vendor_command_policy(oem_data_attr_policy, \
|
||||
QCA_WLAN_VENDOR_ATTR_OEM_DATA_PARAMS_MAX) \
|
||||
},
|
||||
#else
|
||||
#define FEATURE_OEM_DATA_VENDOR_COMMANDS
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -1118,7 +1118,7 @@ int oem_deactivate_service(void)
|
|||
#endif
|
||||
|
||||
#ifdef FEATURE_OEM_DATA
|
||||
static const struct nla_policy
|
||||
const struct nla_policy
|
||||
oem_data_attr_policy[QCA_WLAN_VENDOR_ATTR_OEM_DATA_PARAMS_MAX + 1] = {
|
||||
[QCA_WLAN_VENDOR_ATTR_OEM_DATA_CMD_DATA] = {
|
||||
.type = NLA_BINARY,
|
||||
|
|
|
|||
Loading…
Reference in a new issue