From 20fba52b0562067bf78fc560a8b74ccaac696120 Mon Sep 17 00:00:00 2001 From: Rin Cat Date: Sat, 21 Sep 2019 06:16:49 -0400 Subject: [PATCH] Linux 5.3 compat: vendor command policy for 5.6.1 --- os_dep/linux/rtw_cfgvendor.c | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/os_dep/linux/rtw_cfgvendor.c b/os_dep/linux/rtw_cfgvendor.c index 7649d27..ffa9bd1 100644 --- a/os_dep/linux/rtw_cfgvendor.c +++ b/os_dep/linux/rtw_cfgvendor.c @@ -1919,6 +1919,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = { .subcmd = WIFI_SUBCMD_SET_RSSI_MONITOR }, .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV, + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0) + .policy = VENDOR_CMD_RAW_DATA, + #endif .doit = rtw_cfgvendor_set_rssi_monitor }, #endif /* CONFIG_RTW_CFGVEDNOR_RSSIMONITOR */ @@ -1929,6 +1932,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = { .subcmd = LOGGER_START_LOGGING }, .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV, + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0) + .policy = VENDOR_CMD_RAW_DATA, + #endif .doit = rtw_cfgvendor_logger_start_logging }, { @@ -1937,6 +1943,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = { .subcmd = LOGGER_GET_FEATURE }, .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV, + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0) + .policy = VENDOR_CMD_RAW_DATA, + #endif .doit = rtw_cfgvendor_logger_get_feature }, { @@ -1945,6 +1954,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = { .subcmd = LOGGER_GET_VER }, .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV, + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0) + .policy = VENDOR_CMD_RAW_DATA, + #endif .doit = rtw_cfgvendor_logger_get_version }, { @@ -1953,6 +1965,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = { .subcmd = LOGGER_GET_RING_STATUS }, .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV, + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0) + .policy = VENDOR_CMD_RAW_DATA, + #endif .doit = rtw_cfgvendor_logger_get_ring_status }, { @@ -1961,6 +1976,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = { .subcmd = LOGGER_GET_RING_DATA }, .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV, + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0) + .policy = VENDOR_CMD_RAW_DATA, + #endif .doit = rtw_cfgvendor_logger_get_ring_data }, { @@ -1969,6 +1987,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = { .subcmd = LOGGER_TRIGGER_MEM_DUMP }, .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV, + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0) + .policy = VENDOR_CMD_RAW_DATA, + #endif .doit = rtw_cfgvendor_logger_get_firmware_memory_dump }, { @@ -1977,6 +1998,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = { .subcmd = LOGGER_START_PKT_FATE_MONITORING }, .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV, + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0) + .policy = VENDOR_CMD_RAW_DATA, + #endif .doit = rtw_cfgvendor_logger_start_pkt_fate_monitoring }, { @@ -1985,6 +2009,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = { .subcmd = LOGGER_GET_TX_PKT_FATES }, .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV, + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0) + .policy = VENDOR_CMD_RAW_DATA, + #endif .doit = rtw_cfgvendor_logger_get_tx_pkt_fates }, { @@ -1993,6 +2020,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = { .subcmd = LOGGER_GET_RX_PKT_FATES }, .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV, + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0) + .policy = VENDOR_CMD_RAW_DATA, + #endif .doit = rtw_cfgvendor_logger_get_rx_pkt_fates }, #endif /* CONFIG_RTW_CFGVENDOR_WIFI_LOGGER */ @@ -2004,6 +2034,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = { .subcmd = WIFI_SUBCMD_SET_PNO_RANDOM_MAC_OUI }, .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV, + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0) + .policy = VENDOR_CMD_RAW_DATA, + #endif .doit = rtw_cfgvendor_set_rand_mac_oui }, #endif @@ -2013,6 +2046,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = { .subcmd = WIFI_SUBCMD_NODFS_SET }, .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV, + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0) + .policy = VENDOR_CMD_RAW_DATA, + #endif .doit = rtw_cfgvendor_set_nodfs_flag }, @@ -2022,6 +2058,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = { .subcmd = WIFI_SUBCMD_SET_COUNTRY_CODE }, .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV, + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0) + .policy = VENDOR_CMD_RAW_DATA, + #endif .doit = rtw_cfgvendor_set_country }, { @@ -2030,6 +2069,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = { .subcmd = WIFI_SUBCMD_CONFIG_ND_OFFLOAD }, .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV, + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0) + .policy = VENDOR_CMD_RAW_DATA, + #endif .doit = rtw_cfgvendor_set_nd_offload }, #endif /* CONFIG_RTW_WIFI_HAL */