Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e13599d authored by Nate Jiang's avatar Nate Jiang
Browse files

Wifi: Add HAL API and implementation for instant mode filter

Bug: 203220137
Test: pass vts test
Change-Id: I7f4d9d4390ad69bcfdb2419c2e172c4df2d6863b
parent 50c001dd
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -27,6 +27,19 @@ import IWifiRttController;
 * Interface that represents a chip that must be configured as a single unit.
 */
interface IWifiChip extends @1.5::IWifiChip {
    /**
     * Usable Wifi channels filter masks.
     */
    enum UsableChannelFilter : @1.5::IWifiChip.UsableChannelFilter {
        /**
         * Filter Wifi channels that are supported for NAN3.1 Instant communication mode. This
         * filter should only be applied to NAN interface.
         * - If 5G is supported default discovery channel 149/44 is considered,
         * - If 5G is not supported then channel 6 has to be considered.
         */
        NAN_INSTANT_MODE = 1 << 2,
    };

    /**
     * Create a RTTController instance.
     *
+3 −0
Original line number Diff line number Diff line
@@ -433,6 +433,9 @@ uint32_t convertHidlUsableChannelFilterToLegacy(uint32_t hidl_filter_mask) {
    if (hidl_filter_mask & V1_5::IWifiChip::UsableChannelFilter::CONCURRENCY) {
        legacy_filter_mask |= legacy_hal::WIFI_USABLE_CHANNEL_FILTER_CONCURRENCY;
    }
    if (hidl_filter_mask & V1_6::IWifiChip::UsableChannelFilter::NAN_INSTANT_MODE) {
        legacy_filter_mask |= WIFI_USABLE_CHANNEL_FILTER_NAN_INSTANT_MODE;
    }
    return legacy_filter_mask;
}

+1 −1
Original line number Diff line number Diff line
@@ -715,7 +715,7 @@ Return<void> WifiChip::createRttController_1_6(const sp<IWifiIface>& bound_iface

Return<void> WifiChip::getUsableChannels_1_6(
        WifiBand band, hidl_bitfield<V1_5::WifiIfaceMode> ifaceModeMask,
        hidl_bitfield<V1_5::IWifiChip::UsableChannelFilter> filterMask,
        hidl_bitfield<V1_6::IWifiChip::UsableChannelFilter> filterMask,
        getUsableChannels_1_6_cb _hidl_cb) {
    return validateAndCall(this, WifiStatusCode::ERROR_WIFI_CHIP_INVALID,
                           &WifiChip::getUsableChannelsInternal_1_6, _hidl_cb, band, ifaceModeMask,
+1 −1
Original line number Diff line number Diff line
@@ -151,7 +151,7 @@ class WifiChip : public V1_6::IWifiChip {
    Return<void> setCountryCode(const hidl_array<int8_t, 2>& code,
                                setCountryCode_cb _hidl_cb) override;
    Return<void> getUsableChannels(WifiBand band, hidl_bitfield<V1_5::WifiIfaceMode> ifaceModeMask,
                                   hidl_bitfield<UsableChannelFilter> filterMask,
                                   hidl_bitfield<V1_5::IWifiChip::UsableChannelFilter> filterMask,
                                   getUsableChannels_cb _hidl_cb) override;
    Return<void> triggerSubsystemRestart(triggerSubsystemRestart_cb hidl_status_cb) override;
    Return<void> createRttController_1_6(const sp<IWifiIface>& bound_iface,
+1 −1
Original line number Diff line number Diff line
@@ -764,7 +764,7 @@ struct NanDataPathSecurityConfig {
    /**
     * Security Context Identifier attribute contains PMKID shall be included in NDP setup and
     * response messages. Security Context Identifier, Identifies the Security Context. When
     * security is enabled This field contains the 16 octet PMKID identifying the PMK used for
     * security is enabled this field contains the 16 octet PMKID identifying the PMK used for
     * setting up the Secure Data Path.
     */
    uint8_t[16] scid;