diff --git a/core/hdd/inc/wlan_hdd_fw_state.h b/core/hdd/inc/wlan_hdd_fw_state.h index b28de4b2d8f4..4b5c4fded279 100644 --- a/core/hdd/inc/wlan_hdd_fw_state.h +++ b/core/hdd/inc/wlan_hdd_fw_state.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 @@ -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 diff --git a/core/hdd/inc/wlan_hdd_he.h b/core/hdd/inc/wlan_hdd_he.h index e19db708e51a..05d7d06c431b 100644 --- a/core/hdd/inc/wlan_hdd_he.h +++ b/core/hdd/inc/wlan_hdd_he.h @@ -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 diff --git a/core/hdd/inc/wlan_hdd_spectralscan.h b/core/hdd/inc/wlan_hdd_spectralscan.h index 5cf4b48c2ec8..09db17b15fc4 100644 --- a/core/hdd/inc/wlan_hdd_spectralscan.h +++ b/core/hdd/inc/wlan_hdd_spectralscan.h @@ -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) \ }, /** diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 638e0eb0ae0d..168b85bb410d 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -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 diff --git a/core/hdd/src/wlan_hdd_rssi_monitor.h b/core/hdd/src/wlan_hdd_rssi_monitor.h index 4350a5e4db23..4cb3dde1114d 100644 --- a/core/hdd/src/wlan_hdd_rssi_monitor.h +++ b/core/hdd/src/wlan_hdd_rssi_monitor.h @@ -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 */ diff --git a/core/hdd/src/wlan_hdd_sar_limits.h b/core/hdd/src/wlan_hdd_sar_limits.h index 40180047e614..b4411ff2d9b1 100644 --- a/core/hdd/src/wlan_hdd_sar_limits.h +++ b/core/hdd/src/wlan_hdd_sar_limits.h @@ -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