From f70b864ede31e0a3fd7afd7129895dec518052d7 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Mon, 12 Mar 2018 23:24:05 +0900 Subject: Add wifi_read_packet_filter() to the legacy wifi hal This is used to implement readApfPacketFilterData() for legacy wifi drivers. Test: builds! Change-Id: I562911cc064efec747629628df4eab8128449b51 --- include/hardware_legacy/wifi_hal.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hardware_legacy/wifi_hal.h b/include/hardware_legacy/wifi_hal.h index ab343c7..cdf6b48 100644 --- a/include/hardware_legacy/wifi_hal.h +++ b/include/hardware_legacy/wifi_hal.h @@ -453,6 +453,9 @@ typedef struct {     */ wifi_error (*wifi_set_packet_filter)(wifi_interface_handle handle, const u8 *program, u32 len); + wifi_error (*wifi_read_packet_filter)(wifi_interface_handle handle, + u32 src_offset, u8 *host_dst, + u32 length); wifi_error (*wifi_get_roaming_capabilities)(wifi_interface_handle handle, wifi_roaming_capabilities *caps); wifi_error (*wifi_enable_firmware_roaming)(wifi_interface_handle handle, -- cgit v1.2.3 From cdb3eb1a56e8a94f500731e720e6ceefa6d6eb69 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Fri, 29 Jun 2018 17:39:14 -0700 Subject: audio policy: remove special notifications handling in call Not needed anymore as this is handled by NotificationManager Test: make Change-Id: Ice8101407ca0c22c4eb886203817cd139c0e8cd3 --- include/hardware_legacy/AudioSystemLegacy.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/hardware_legacy/AudioSystemLegacy.h b/include/hardware_legacy/AudioSystemLegacy.h index 524e798..8227037 100644 --- a/include/hardware_legacy/AudioSystemLegacy.h +++ b/include/hardware_legacy/AudioSystemLegacy.h @@ -338,9 +338,6 @@ public: static bool isBluetoothScoDevice(audio_devices device) { return audio_is_bluetooth_sco_device((audio_devices_t)device); } - static bool isLowVisibility(stream_type stream) { - return audio_is_low_visibility((audio_stream_type_t)stream); - } static bool isValidFormat(uint32_t format) { return audio_is_valid_format((audio_format_t) format); } -- cgit v1.2.3 From dc1658a9fc3e06aa71278af2a7c83d4ce1334d4e Mon Sep 17 00:00:00 2001 From: Ahmed ElArabawy Date: Thu, 4 Oct 2018 09:26:11 -0700 Subject: Wifi: Support setting latency mode This commit adds the enum and prototype to enable setting of wifi latency mode. Bug: 34905427 Test: Unit test Test: ./hardware/interfaces/wifi/1.3/default/tests/runtests.sh Test: VTS test Test: run vts -m VtsHalWifiV1_3TargetTest Change-Id: I846fd5f41b740be9ebf2efb16be87d456b573b2a --- include/hardware_legacy/wifi_hal.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/hardware_legacy/wifi_hal.h b/include/hardware_legacy/wifi_hal.h index cdf6b48..f093f11 100644 --- a/include/hardware_legacy/wifi_hal.h +++ b/include/hardware_legacy/wifi_hal.h @@ -47,6 +47,11 @@ typedef enum { WIFI_POWER_SCENARIO_ON_BODY_CELL_ON = 4, } wifi_power_scenario; +typedef enum { + WIFI_LATENCY_MODE_NORMAL = 0, + WIFI_LATENCY_MODE_LOW = 1, +} wifi_latency_mode; + /* * enum wlan_mac_band - Band information corresponding to the WLAN MAC. */ @@ -153,6 +158,7 @@ void wifi_get_error_info(wifi_error err, const char **msg); // return a pointer #define WIFI_FEATURE_SCAN_RAND 0x2000000 // Support MAC & Probe Sequence Number randomization #define WIFI_FEATURE_SET_TX_POWER_LIMIT 0x4000000 // Support Tx Power Limit setting #define WIFI_FEATURE_USE_BODY_HEAD_SAR 0x8000000 // Support Using Body/Head Proximity for SAR +#define WIFI_FEATURE_SET_LATENCY_MODE 0x40000000 // Support Latency mode setting // Add more features here @@ -215,6 +221,7 @@ wifi_error wifi_reset_iface_event_handler(wifi_request_id id, wifi_interface_han 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); typedef struct rx_data_cnt_details_t { int rx_unicast_cnt; /*Total rx unicast packet which woke up host */ @@ -464,6 +471,8 @@ typedef struct { wifi_roaming_config *roaming_config); wifi_error (*wifi_set_radio_mode_change_handler)(wifi_request_id id, wifi_interface_handle iface, wifi_radio_mode_change_handler eh); + wifi_error (*wifi_set_latency_mode)(wifi_interface_handle iface, + wifi_latency_mode mode); } wifi_hal_fn; wifi_error init_wifi_vendor_hal_func_table(wifi_hal_fn *fn); #ifdef __cplusplus -- cgit v1.2.3 From c499510957eeeefffe5547e3d8bc6f27b82d40af Mon Sep 17 00:00:00 2001 From: Peng Xu Date: Mon, 14 Jan 2019 10:18:07 -0800 Subject: Add NDPE attribute config and enable support Add NDPE attribute config and enable support so that the framework can decide the usage of it. Bug: 113149569 Bug: 112586769 Test: (ACTS) act.py ThroughputTest:test_iperf_max_ndi_aware_only_passphrases Test: (CTS) atest SingleDeviceTest Change-Id: I0c93ba53fa7de3e346ab0913d04bd670a528ec4e --- include/hardware_legacy/wifi_nan.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/include/hardware_legacy/wifi_nan.h b/include/hardware_legacy/wifi_nan.h index b1c216f..334e37a 100644 --- a/include/hardware_legacy/wifi_nan.h +++ b/include/hardware_legacy/wifi_nan.h @@ -42,7 +42,7 @@ typedef u32 NanDataPathId; #define NAN_MAC_ADDR_LEN 6 #define NAN_MAJOR_VERSION 2 #define NAN_MINOR_VERSION 0 -#define NAN_MICRO_VERSION 0 +#define NAN_MICRO_VERSION 1 #define NAN_MAX_SOCIAL_CHANNELS 3 /* NAN Maximum Lengths */ @@ -388,6 +388,7 @@ typedef struct { bool is_ndp_security_supported; u32 max_sdea_service_specific_info_len; u32 max_subscribe_address; + u32 ndpe_attr_supported; } NanCapabilities; /* @@ -1023,6 +1024,15 @@ typedef struct { */ u8 config_dw_early_termination; u32 enable_dw_termination; + /* + Indicate whether to use NDPE attribute to bring-up TCP/IP connection. + If config_ndpe_attr is not configured, the default behavior is + not using NDPE attr, and the capability is not advertised. + 0 - Not use + 1 - Use + */ + u8 config_ndpe_attr; + u32 use_ndpe_attr; } NanEnableRequest; /* @@ -1499,6 +1509,15 @@ typedef struct { */ u8 config_dw_early_termination; u32 enable_dw_termination; + /* + Indicate whether to use NDPE attribute to bring-up TCP/IP connection + If config_ndpe_attr is not configured, the default behavior is + not using NDPE attr, and the capability is not advertised. + 0 - Not use + 1 - Use + */ + u8 config_ndpe_attr; + u32 use_ndpe_attr; } NanConfigRequest; /* -- cgit v1.2.3 From a922b0809f42e6e7d44a698c83b8f6c9acce1696 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Fri, 14 Dec 2018 14:45:51 +0800 Subject: p2p: synchronize p2p random MAC feature flag from driver. P2P random MAC needs the driver to support changing MAC address. Bug: 118904478 Test: manual test * Enter WiFI Direct Page * check the feature is enabled in logcat * WifiP2pService: Supported feature: P2P MAC randomization * check p2p0 MAC address is randomized. Change-Id: Iadae3cf74722d29014caffe7080e0efa44a7659e --- include/hardware_legacy/wifi_hal.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hardware_legacy/wifi_hal.h b/include/hardware_legacy/wifi_hal.h index f093f11..ec29ec2 100644 --- a/include/hardware_legacy/wifi_hal.h +++ b/include/hardware_legacy/wifi_hal.h @@ -159,6 +159,7 @@ void wifi_get_error_info(wifi_error err, const char **msg); // return a pointer #define WIFI_FEATURE_SET_TX_POWER_LIMIT 0x4000000 // Support Tx Power Limit setting #define WIFI_FEATURE_USE_BODY_HEAD_SAR 0x8000000 // Support Using Body/Head Proximity for SAR #define WIFI_FEATURE_SET_LATENCY_MODE 0x40000000 // Support Latency mode setting +#define WIFI_FEATURE_P2P_RAND_MAC 0x80000000 // Support Support P2P MAC randomization // Add more features here -- cgit v1.2.3 From fc49b8693e86fbb01d9703050bbf1c144d974519 Mon Sep 17 00:00:00 2001 From: Ahmed ElArabawy Date: Tue, 5 Mar 2019 18:18:40 -0800 Subject: Wifi: Add ether_type to sending offloaded packet This commit is part of the addition of the ether_type as an argument to the legacy hal function to send an offloaded packet. Bug: 122487582 Test: Manual Test: Make sure code builds properly Change-Id: I5c56acb74f5724ac3d6199433c7632177bfc9704 --- include/hardware_legacy/wifi_hal.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/hardware_legacy/wifi_hal.h b/include/hardware_legacy/wifi_hal.h index ec29ec2..60fc6bf 100644 --- a/include/hardware_legacy/wifi_hal.h +++ b/include/hardware_legacy/wifi_hal.h @@ -365,8 +365,9 @@ typedef struct { wifi_error (*wifi_set_lcr) (wifi_request_id id, wifi_interface_handle iface, wifi_lcr_information *lcr); wifi_error (*wifi_start_sending_offloaded_packet)(wifi_request_id id, - wifi_interface_handle iface, u8 *ip_packet, u16 ip_packet_len, - u8 *src_mac_addr, u8 *dst_mac_addr, u32 period_msec); + wifi_interface_handle iface, u16 ether_type, u8 *ip_packet, + u16 ip_packet_len, u8 *src_mac_addr, u8 *dst_mac_addr, + u32 period_msec); wifi_error (*wifi_stop_sending_offloaded_packet)(wifi_request_id id, wifi_interface_handle iface); wifi_error (*wifi_start_rssi_monitoring)(wifi_request_id id, wifi_interface_handle -- cgit v1.2.3 From 151427c297f064449dfa9c591f736fc9240f215c Mon Sep 17 00:00:00 2001 From: Ahmed ElArabawy Date: Tue, 26 Mar 2019 22:53:41 -0700 Subject: Wifi: Update the wifi_sar_scenario enum This commit updates the enum for wifi_sar_scenario. Bug: 112205428 Test: Compiles (just a header file change) Change-Id: If01d0daf5e535e8fdca6eeab115f6c409cc38c46 --- include/hardware_legacy/wifi_hal.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hardware_legacy/wifi_hal.h b/include/hardware_legacy/wifi_hal.h index ec29ec2..aa28c1a 100644 --- a/include/hardware_legacy/wifi_hal.h +++ b/include/hardware_legacy/wifi_hal.h @@ -40,11 +40,14 @@ typedef enum { /* Pre selected Power scenarios to be applied from BDF file */ typedef enum { + WIFI_POWER_SCENARIO_INVALID = -2, + WIFI_POWER_SCENARIO_DEFAULT = -1, WIFI_POWER_SCENARIO_VOICE_CALL = 0, WIFI_POWER_SCENARIO_ON_HEAD_CELL_OFF = 1, WIFI_POWER_SCENARIO_ON_HEAD_CELL_ON = 2, WIFI_POWER_SCENARIO_ON_BODY_CELL_OFF = 3, WIFI_POWER_SCENARIO_ON_BODY_CELL_ON = 4, + WIFI_POWER_SCENARIO_ON_BODY_BT = 5, } wifi_power_scenario; typedef enum { -- cgit v1.2.3 From ed29afb0b60bb6592d31dc76103944cdff670689 Mon Sep 17 00:00:00 2001 From: Ahmed ElArabawy Date: Tue, 2 Apr 2019 14:20:12 -0700 Subject: Wifi: Add ether type to sending offloaded packet In current implementation, the ether type used for offloaded packets is always hardcoded to IPv4 in lower layers. This commit adds support to specify ether type of offloaded packets from user space. Bug: 122487582 Test: Manual Change-Id: I1ca7391bd70ecebaf0591e0eafe08b79383538c5 --- include/hardware_legacy/wifi_offload.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hardware_legacy/wifi_offload.h b/include/hardware_legacy/wifi_offload.h index f0326f1..835614e 100644 --- a/include/hardware_legacy/wifi_offload.h +++ b/include/hardware_legacy/wifi_offload.h @@ -16,7 +16,8 @@ extern "C" * Send specified keep alive packet periodically. */ wifi_error wifi_start_sending_offloaded_packet(wifi_request_id id, wifi_interface_handle iface, - u8 *ip_packet, u16 ip_packet_len, u8 *src_mac_addr, u8 *dst_mac_addr, u32 period_msec); + u16 ether_type, u8 *ip_packet, u16 ip_packet_len, u8 *src_mac_addr, u8 *dst_mac_addr, + u32 period_msec); /** * Stop sending keep alive packet. -- cgit v1.2.3