diff options
author | Kumar Anand <kumaranand@google.com> | 2021-02-10 16:22:31 -0800 |
---|---|---|
committer | Kumar Anand <kumaranand@google.com> | 2021-02-16 14:06:01 -0800 |
commit | aea86e089a4f77bc75c1629f070a257bcd6813a8 (patch) | |
tree | 91a88335917b2f338ce389156efb18bbb3743107 /wifi/1.5/default/hidl_struct_util.cpp | |
parent | 6deecc5ff90a57a62c24e8ff2e96c18ac325560a (diff) |
Wifi: Filter usable channels by Coex, Concurrency
Add ability to filter usable channel due to coex &
concurrency limitations. List of usable channels could
be limited due to coex restrictions and also due to
concurrency limitations & connection state.
Bug: 160212907
Test: VTS - VtsHalWifiV1_5TargetTest
Change-Id: Ic36b792b93fc4a6e328b9bc606a5286b8c1fd690
Diffstat (limited to 'wifi/1.5/default/hidl_struct_util.cpp')
-rw-r--r-- | wifi/1.5/default/hidl_struct_util.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/wifi/1.5/default/hidl_struct_util.cpp b/wifi/1.5/default/hidl_struct_util.cpp index 7cee4cd868..3c69da5c18 100644 --- a/wifi/1.5/default/hidl_struct_util.cpp +++ b/wifi/1.5/default/hidl_struct_util.cpp @@ -445,6 +445,20 @@ uint32_t convertLegacyWifiInterfaceModeToHidl(uint32_t legacy_iface_mask) { return hidl_iface_mask; } +uint32_t convertHidlUsableChannelFilterToLegacy(uint32_t hidl_filter_mask) { + uint32_t legacy_filter_mask = 0; + if (hidl_filter_mask & + IWifiChip::UsableChannelFilter::CELLULAR_COEXISTENCE) { + legacy_filter_mask |= + legacy_hal::WIFI_USABLE_CHANNEL_FILTER_CELLULAR_COEXISTENCE; + } + if (hidl_filter_mask & IWifiChip::UsableChannelFilter::CONCURRENCY) { + legacy_filter_mask |= + legacy_hal::WIFI_USABLE_CHANNEL_FILTER_CONCURRENCY; + } + return legacy_filter_mask; +} + bool convertLegacyWifiUsableChannelToHidl( const legacy_hal::wifi_usable_channel& legacy_usable_channel, V1_5::WifiUsableChannel* hidl_usable_channel) { |