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

Commit 1195e1ba authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes If36f952e,Ida25d842,I622d82ad,I0c606d0e

* changes:
  Initialize Controller Values
  HCI: AdvertisingType and AdvertisingEventType
  HCI: Change name to LeScanningFilterPolicy
  LeAdvertisingManager: Remove random address
parents fb17a214 0472eb19
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ class SimpleHalTest(GdBaseTestClass):

            self.send_dut_hci_command(
                hci_packets.LeSetExtendedScanParametersBuilder(hci_packets.AddressType.RANDOM_DEVICE_ADDRESS,
                                                               hci_packets.LeSetScanningFilterPolicy.ACCEPT_ALL, 1,
                                                               hci_packets.LeScanningFilterPolicy.ACCEPT_ALL, 1,
                                                               [phy_scan_params]))
            self.send_dut_hci_command(
                hci_packets.LeSetExtendedScanEnableBuilder(hci_packets.Enable.ENABLED,
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ class DirectHciTest(GdBaseTestClass):

        self.dut_hci.send_command_with_complete(
            hci_packets.LeSetExtendedScanParametersBuilder(hci_packets.AddressType.RANDOM_DEVICE_ADDRESS,
                                                           hci_packets.LeSetScanningFilterPolicy.ACCEPT_ALL, 1,
                                                           hci_packets.LeScanningFilterPolicy.ACCEPT_ALL, 1,
                                                           [phy_scan_params]))
        self.dut_hci.send_command_with_complete(
            hci_packets.LeSetExtendedScanEnableBuilder(hci_packets.Enable.ENABLED,
+1 −4
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ class LeAdvertisingManagerTest(GdBaseTestClass):
            scan_parameters.le_scan_window = 20
            self.enqueue_hci_command(
                hci_packets.LeSetExtendedScanParametersBuilder(hci_packets.AddressType.RANDOM_DEVICE_ADDRESS,
                                                               hci_packets.LeSetScanningFilterPolicy.ACCEPT_ALL, 1,
                                                               hci_packets.LeScanningFilterPolicy.ACCEPT_ALL, 1,
                                                               [scan_parameters]), True)
            self.enqueue_hci_command(
                hci_packets.LeSetExtendedScanEnableBuilder(hci_packets.Enable.ENABLED,
@@ -76,13 +76,10 @@ class LeAdvertisingManagerTest(GdBaseTestClass):
            gap_data = le_advertising_facade.GapDataMsg(data=bytes(gap_name.Serialize()))
            config = le_advertising_facade.AdvertisingConfig(
                advertisement=[gap_data],
                random_address=common.BluetoothAddress(address=bytes(b'0D:05:04:03:02:01')),
                interval_min=512,
                interval_max=768,
                event_type=le_advertising_facade.AdvertisingEventType.ADV_IND,
                address_type=common.RANDOM_DEVICE_ADDRESS,
                peer_address_type=common.PUBLIC_DEVICE_OR_IDENTITY_ADDRESS,
                peer_address=common.BluetoothAddress(address=bytes(b'A6:A5:A4:A3:A2:A1')),
                channel_map=7,
                filter_policy=le_advertising_facade.AdvertisingFilterPolicy.ALL_DEVICES)
            request = le_advertising_facade.CreateAdvertiserRequest(config=config)
+0 −3
Original line number Diff line number Diff line
@@ -81,13 +81,10 @@ class LeScanningManagerTest(GdBaseTestClass):
            gap_data = le_advertising_facade.GapDataMsg(data=bytes(gap_name.Serialize()))
            config = le_advertising_facade.AdvertisingConfig(
                advertisement=[gap_data],
                random_address=common.BluetoothAddress(address=bytes(b'A6:A5:A4:A3:A2:A1')),
                interval_min=512,
                interval_max=768,
                event_type=le_advertising_facade.AdvertisingEventType.ADV_IND,
                address_type=common.RANDOM_DEVICE_ADDRESS,
                peer_address_type=common.PUBLIC_DEVICE_OR_IDENTITY_ADDRESS,
                peer_address=common.BluetoothAddress(address=bytes(b'0C:05:04:03:02:01')),
                channel_map=7,
                filter_policy=le_advertising_facade.AdvertisingFilterPolicy.ALL_DEVICES)
            request = le_advertising_facade.CreateAdvertiserRequest(config=config)
+9 −0
Original line number Diff line number Diff line
@@ -80,16 +80,25 @@ struct Controller::impl {
    if (is_supported(OpCode::LE_READ_MAXIMUM_DATA_LENGTH)) {
      hci_->EnqueueCommand(LeReadMaximumDataLengthBuilder::Create(),
                           handler->BindOnceOn(this, &Controller::impl::le_read_maximum_data_length_handler));
    } else {
      le_maximum_data_length_.supported_max_rx_octets_ = 0;
      le_maximum_data_length_.supported_max_rx_time_ = 0;
      le_maximum_data_length_.supported_max_tx_octets_ = 0;
      le_maximum_data_length_.supported_max_tx_time_ = 0;
    }
    if (is_supported(OpCode::LE_READ_MAXIMUM_ADVERTISING_DATA_LENGTH)) {
      hci_->EnqueueCommand(
          LeReadMaximumAdvertisingDataLengthBuilder::Create(),
          handler->BindOnceOn(this, &Controller::impl::le_read_maximum_advertising_data_length_handler));
    } else {
      le_maximum_advertising_data_length_ = 31;
    }
    if (is_supported(OpCode::LE_READ_NUMBER_OF_SUPPORTED_ADVERTISING_SETS)) {
      hci_->EnqueueCommand(
          LeReadNumberOfSupportedAdvertisingSetsBuilder::Create(),
          handler->BindOnceOn(this, &Controller::impl::le_read_number_of_supported_advertising_sets_handler));
    } else {
      le_number_supported_advertising_sets_ = 1;
    }

    hci_->EnqueueCommand(LeGetVendorCapabilitiesBuilder::Create(),
Loading