qcacld-3.0: Add policy attribute to SPECTRAL_SCAN subcommands

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
commands as part of this change:
	QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_START
	QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_STOP
	QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_CONFIG

Change-Id: I2c7f4e6b41d341aac7b0984838c72f33a1e1ac5e
CRs-Fixed: 2634094
This commit is contained in:
Alan Chen 2020-03-03 12:13:11 -08:00 • committed by nshrivas
commit 00f4aa9f64
2 changed files with 11 additions and 4 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-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
@ -74,21 +74,27 @@ struct spectral_scan_msg_v {
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_START, \
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
WIPHY_VENDOR_CMD_NEED_NETDEV, \
.doit = wlan_hdd_cfg80211_spectral_scan_start \
.doit = wlan_hdd_cfg80211_spectral_scan_start, \
vendor_command_policy(spectral_scan_policy, \
QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_MAX) \
}, \
{ \
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_STOP, \
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
WIPHY_VENDOR_CMD_NEED_NETDEV, \
.doit = wlan_hdd_cfg80211_spectral_scan_stop \
.doit = wlan_hdd_cfg80211_spectral_scan_stop, \
vendor_command_policy(spectral_scan_policy, \
QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_MAX) \
}, \
{ \
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_CONFIG, \
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
WIPHY_VENDOR_CMD_NEED_NETDEV, \
.doit = wlan_hdd_cfg80211_spectral_scam_get_config \
.doit = wlan_hdd_cfg80211_spectral_scam_get_config, \
vendor_command_policy(spectral_scan_policy, \
QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_MAX) \
}, \
{ \
.info.vendor_id = QCA_NL80211_VENDOR_ID, \

View file

@ -29,6 +29,7 @@
#include <wlan_cfg80211.h>
#include <wlan_cfg80211_tdls.h>
#include <qca_vendor.h>
#include <wlan_cfg80211_spectral.h>
struct hdd_context;