From 22f705057482747bd4b7c5f3e9d60a12a4558257 Mon Sep 17 00:00:00 2001 From: Ahmed ElArabawy Date: Sat, 4 Jan 2020 11:05:32 -0800 Subject: [PATCH] Wifi: Add support for mapping DSCP to Wifi AC This commit adds the needed enum and methods to handle the mapping of DSCP into wifi access categories. Bug: 141500691 Bug: 141550272 Test: Manual Change-Id: If532a6dc34f4a2c61fc4601cb1b83d2fec053ea5 --- include/hardware_legacy/wifi_hal.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/hardware_legacy/wifi_hal.h b/include/hardware_legacy/wifi_hal.h index 6d87802..5dabeb6 100644 --- a/include/hardware_legacy/wifi_hal.h +++ b/include/hardware_legacy/wifi_hal.h @@ -110,6 +110,13 @@ typedef enum { WIFI_ERROR_BUSY = -10, } wifi_error; +typedef enum { + WIFI_ACCESS_CATEGORY_BEST_EFFORT = 0, + WIFI_ACCESS_CATEGORY_BACKGROUND = 1, + WIFI_ACCESS_CATEGORY_VIDEO = 2, + WIFI_ACCESS_CATEGORY_VOICE = 3 +} wifi_access_category; + typedef unsigned char byte; typedef unsigned char u8; typedef signed char s8; @@ -246,6 +253,10 @@ wifi_error wifi_set_nodfs_flag(wifi_interface_handle handle, u32 nodfs); wifi_error wifi_select_tx_power_scenario(wifi_interface_handle handle, wifi_power_scenario scenario); wifi_error wifi_reset_tx_power_scenario(wifi_interface_handle handle); wifi_error wifi_set_latency_mode(wifi_interface_handle handle, wifi_latency_mode mode); +wifi_error wifi_map_dscp_access_category(wifi_handle handle, + uint32_t start, uint32_t end, + uint32_t access_category); +wifi_error wifi_reset_dscp_mapping(wifi_handle handle); /** * Wifi HAL Thermal Mitigation API @@ -533,6 +544,10 @@ typedef struct { wifi_error (*wifi_set_thermal_mitigation_mode)(wifi_handle handle, wifi_thermal_mode mode, u32 completion_window); + wifi_error (*wifi_map_dscp_access_category)(wifi_handle handle, + u32 start, u32 end, + u32 access_category); + wifi_error (*wifi_reset_dscp_mapping)(wifi_handle handle); wifi_error (*wifi_virtual_interface_create)(wifi_handle handle, const char* ifname, wifi_interface_type iface_type);