mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
qcacld-3.0: Add dummy vendor command policy attribute
Kernel 5.2+ is checking vendor policy attribute even for GET commands. Add dummy policy attribute to following GET vendor commands: QCA_NL80211_VENDOR_SUBCMD_GET_HE_CAPABILITIES QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_DIAG_STATS QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_CAP_INFO QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_STATUS QCA_NL80211_VENDOR_SUBCMD_NUD_STATS_GET QCA_NL80211_VENDOR_SUBCMD_MONITOR_RSSI QCA_NL80211_VENDOR_SUBCMD_GET_SAR_LIMITS QCA_NL80211_VENDOR_SUBCMD_GET_FW_STATE Change-Id: I354b2de86909142ed3db0fb4a4d1545ac2b37d55 CRs-Fixed: 2639687
This commit is contained in:
parent
c2003a4640
commit
3c7aab4c49
6 changed files with 59 additions and 50 deletions
|
|
@ -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,13 +41,14 @@ int wlan_hdd_cfg80211_get_fw_state(struct wiphy *wiphy,
|
|||
const void *data,
|
||||
int data_len);
|
||||
|
||||
#define FEATURE_FW_STATE_COMMANDS \
|
||||
{ \
|
||||
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
|
||||
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_FW_STATE, \
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV, \
|
||||
.doit = wlan_hdd_cfg80211_get_fw_state \
|
||||
#define FEATURE_FW_STATE_COMMANDS \
|
||||
{ \
|
||||
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
|
||||
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_FW_STATE, \
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV, \
|
||||
.doit = wlan_hdd_cfg80211_get_fw_state, \
|
||||
vendor_command_policy(VENDOR_CMD_RAW_DATA, 0) \
|
||||
},
|
||||
#else /* FEATURE_FW_STATE */
|
||||
#define FEATURE_FW_STATE_COMMANDS
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -116,13 +116,14 @@ int hdd_update_he_cap_in_cfg(struct hdd_context *hdd_ctx);
|
|||
int wlan_hdd_cfg80211_get_he_cap(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev, const void *data,
|
||||
int data_len);
|
||||
#define FEATURE_11AX_VENDOR_COMMANDS \
|
||||
{ \
|
||||
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
|
||||
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_HE_CAPABILITIES, \
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV, \
|
||||
.doit = wlan_hdd_cfg80211_get_he_cap \
|
||||
#define FEATURE_11AX_VENDOR_COMMANDS \
|
||||
{ \
|
||||
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
|
||||
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_HE_CAPABILITIES, \
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV, \
|
||||
.doit = wlan_hdd_cfg80211_get_he_cap, \
|
||||
vendor_command_policy(VENDOR_CMD_RAW_DATA, 0) \
|
||||
},
|
||||
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -68,9 +68,9 @@ struct spectral_scan_msg_v {
|
|||
uint32_t sub_version;
|
||||
};
|
||||
|
||||
#define FEATURE_SPECTRAL_SCAN_VENDOR_COMMANDS \
|
||||
{ \
|
||||
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
|
||||
#define FEATURE_SPECTRAL_SCAN_VENDOR_COMMANDS \
|
||||
{ \
|
||||
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
|
||||
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_START, \
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV, \
|
||||
|
|
@ -99,23 +99,26 @@ struct spectral_scan_msg_v {
|
|||
{ \
|
||||
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
|
||||
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_DIAG_STATS, \
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV, \
|
||||
.doit = wlan_hdd_cfg80211_spectral_scan_get_diag_stats \
|
||||
}, \
|
||||
{ \
|
||||
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV, \
|
||||
.doit = wlan_hdd_cfg80211_spectral_scan_get_diag_stats, \
|
||||
vendor_command_policy(VENDOR_CMD_RAW_DATA, 0) \
|
||||
}, \
|
||||
{ \
|
||||
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
|
||||
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_CAP_INFO, \
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV, \
|
||||
.doit = wlan_hdd_cfg80211_spectral_scan_get_cap_info \
|
||||
}, \
|
||||
{ \
|
||||
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
|
||||
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_STATUS, \
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV, \
|
||||
.doit = wlan_hdd_cfg80211_spectral_scan_get_status \
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV, \
|
||||
.doit = wlan_hdd_cfg80211_spectral_scan_get_cap_info, \
|
||||
vendor_command_policy(VENDOR_CMD_RAW_DATA, 0) \
|
||||
}, \
|
||||
{ \
|
||||
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
|
||||
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_STATUS, \
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV, \
|
||||
.doit = wlan_hdd_cfg80211_spectral_scan_get_status, \
|
||||
vendor_command_policy(VENDOR_CMD_RAW_DATA, 0) \
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -14810,7 +14810,8 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] = {
|
|||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV |
|
||||
WIPHY_VENDOR_CMD_NEED_RUNNING,
|
||||
.doit = wlan_hdd_cfg80211_get_nud_stats
|
||||
.doit = wlan_hdd_cfg80211_get_nud_stats,
|
||||
vendor_command_policy(VENDOR_CMD_RAW_DATA, 0)
|
||||
},
|
||||
|
||||
FEATURE_BSS_TRANSITION_VENDOR_COMMANDS
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2018,2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2018, 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
|
||||
|
|
@ -57,20 +57,22 @@ wlan_hdd_cfg80211_monitor_rssi(struct wiphy *wiphy, struct wireless_dev *wdev,
|
|||
void hdd_rssi_threshold_breached(hdd_handle_t hdd_handle,
|
||||
struct rssi_breach_event *data);
|
||||
|
||||
#define FEATURE_RSSI_MONITOR_VENDOR_EVENTS \
|
||||
[QCA_NL80211_VENDOR_SUBCMD_MONITOR_RSSI_INDEX] = { \
|
||||
.vendor_id = QCA_NL80211_VENDOR_ID, \
|
||||
.subcmd = QCA_NL80211_VENDOR_SUBCMD_MONITOR_RSSI \
|
||||
#define FEATURE_RSSI_MONITOR_VENDOR_EVENTS \
|
||||
[QCA_NL80211_VENDOR_SUBCMD_MONITOR_RSSI_INDEX] = { \
|
||||
.vendor_id = QCA_NL80211_VENDOR_ID, \
|
||||
.subcmd = QCA_NL80211_VENDOR_SUBCMD_MONITOR_RSSI \
|
||||
},
|
||||
|
||||
#define FEATURE_RSSI_MONITOR_VENDOR_COMMANDS \
|
||||
{ \
|
||||
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
|
||||
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_MONITOR_RSSI, \
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_RUNNING, \
|
||||
.doit = wlan_hdd_cfg80211_monitor_rssi \
|
||||
#define FEATURE_RSSI_MONITOR_VENDOR_COMMANDS \
|
||||
{ \
|
||||
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
|
||||
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_MONITOR_RSSI, \
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_RUNNING, \
|
||||
.doit = wlan_hdd_cfg80211_monitor_rssi, \
|
||||
vendor_command_policy(moitor_rssi_policy, \
|
||||
QCA_WLAN_VENDOR_ATTR_RSSI_MONITORING_MAX) \
|
||||
},
|
||||
|
||||
#else /* FEATURE_RSSI_MONITOR */
|
||||
|
|
|
|||
|
|
@ -169,7 +169,8 @@ int wlan_hdd_cfg80211_get_sar_power_limits(struct wiphy *wiphy,
|
|||
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_SAR_LIMITS, \
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_RUNNING, \
|
||||
.doit = wlan_hdd_cfg80211_get_sar_power_limits \
|
||||
.doit = wlan_hdd_cfg80211_get_sar_power_limits, \
|
||||
vendor_command_policy(VENDOR_CMD_RAW_DATA, 0) \
|
||||
},
|
||||
#else /* FEATURE_SAR_LIMITS */
|
||||
#define FEATURE_SAR_LIMITS_VENDOR_COMMANDS
|
||||
|
|
|
|||
Loading…
Reference in a new issue