- 19 12月, 2020 1 次提交
-
-
由 Abhishek Pandit-Subedi 提交于
Add a missing SUSPEND_SCAN_ENABLE in passive scan, remove the separate function for configuring le scan during suspend and update the request complete function to clear both enable and disable tasks. Fixes: dce0a4be ("Bluetooth: Set missing suspend task bits") Reviewed-by: NAlain Michaud <alainm@chromium.org> Signed-off-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 07 12月, 2020 8 次提交
-
-
由 Abhishek Pandit-Subedi 提交于
When suspending, mark SUSPEND_SCAN_ENABLE and SUSPEND_SCAN_DISABLE tasks correctly when either classic or le scanning is modified. Signed-off-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Signed-off-by: NHoward Chung <howardchung@google.com> Reviewed-by: NAlain Michaud <alainm@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Daniel Winkler 提交于
This patch takes the min/max intervals and tx power optionally provided in mgmt interface, stores them in the advertisement struct, and uses them when configuring the hci requests. While tx power is not used if extended advertising is unavailable, software rotation will use the min and max advertising intervals specified by the client. This change is validated manually by ensuring the min/max intervals are propagated to the controller on both hatch (extended advertising) and kukui (no extended advertising) chromebooks, and that tx power is propagated correctly on hatch. These tests are performed with multiple advertisements simultaneously. Reviewed-by: NSonny Sasaka <sonnysasaka@chromium.org> Signed-off-by: NDaniel Winkler <danielwinkler@google.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Howard Chung 提交于
This patch add a configurable parameter to switch off the interleave scan feature. Signed-off-by: NHoward Chung <howardchung@google.com> Reviewed-by: NAlain Michaud <alainm@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Howard Chung 提交于
This patch adds code to handle the active scan during interleave scan. The interleave scan will be canceled when users start active scan, and it will be restarted after active scan stopped. Signed-off-by: NHoward Chung <howardchung@google.com> Reviewed-by: NAlain Michaud <alainm@chromium.org> Reviewed-by: NManish Mandlik <mmandlik@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Howard Chung 提交于
This patch adds code to handle the system suspension during interleave scan. The interleave scan will be canceled when the system is going to sleep, and will be restarted after waking up. Signed-off-by: NHoward Chung <howardchung@google.com> Reviewed-by: NAlain Michaud <alainm@chromium.org> Reviewed-by: NManish Mandlik <mmandlik@chromium.org> Reviewed-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Reviewed-by: NMiao-chen Chou <mcchou@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Howard Chung 提交于
This patch implements the interleaving between allowlist scan and no-filter scan. It'll be used to save power when at least one monitor is registered and at least one pending connection or one device to be scanned for. The durations of the allowlist scan and the no-filter scan are controlled by MGMT command: Set Default System Configuration. The default values are set randomly for now. Signed-off-by: NHoward Chung <howardchung@google.com> Reviewed-by: NAlain Michaud <alainm@chromium.org> Reviewed-by: NManish Mandlik <mmandlik@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Luiz Augusto von Dentz 提交于
This renames get_adv_instance_scan_rsp to adv_instance_is_scannable and make it return a bool since it was not actually properly return the size of the scan response as one could expect. Signed-off-by: NLuiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Luiz Augusto von Dentz 提交于
Current code is actually failing on the following tests of mgmt-tester because get_adv_instance_scan_rsp_len did not account for flags that cause scan response data to be included resulting in non-scannable instance when in fact it should be scannable. Signed-off-by: NLuiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
- 11 11月, 2020 1 次提交
-
-
由 Howard Chung 提交于
This replaces the BT_DBG function to bt_dev_dbg as it is cleaner to show the controller index in the debug message. Signed-off-by: NHoward Chung <howardchung@google.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 09 11月, 2020 2 次提交
-
-
由 Sathish Narasimman 提交于
When adding device to white list the device is added to resolving list also. It has to be added only when HCI_ENABLE_LL_PRIVACY flag is set. HCI_ENABLE_LL_PRIVACY flag has to be tested before adding/deleting devices to resolving list. use_ll_privacy macro is used only to check if controller supports LL_Privacy. https://bugzilla.kernel.org/show_bug.cgi?id=209745 Fixes: 0eee35bd ("Bluetooth: Update resolving list when updating whitelist") Signed-off-by: NSathish Narasimman <sathish.narasimman@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Daniel Winkler 提交于
When an LE connection request is made, advertising is disabled and never resumed. When a client has an active advertisement, this is disruptive. This change adds resume logic for client-configured (non-directed) advertisements after the connection attempt. The patch was tested by registering an advertisement, initiating an LE connection from a remote peer, and verifying that the advertisement is re-activated after the connection is established. This is performed on Hatch and Kukui Chromebooks. Signed-off-by: NDaniel Winkler <danielwinkler@google.com> Reviewed-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 25 9月, 2020 1 次提交
-
-
由 Sathish Narasimman 提交于
During system powercycle when trying to get the random address hci_get_random_address set own_addr_type as 0x01. In which if we enable ll_privacy it is supposed to be 0x03. Signed-off-by: NSathish Narasimman <sathish.narasimman@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 20 9月, 2020 1 次提交
-
-
由 Howard Chung 提交于
Set scan parameters when there is at least one Advertisement monitor. Signed-off-by: NHoward Chung <howardchung@google.com> Reviewed-by: NAlain Michaud <alainm@chromium.org> Reviewed-by: NManish Mandlik <mmandlik@chromium.org> Reviewed-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Reviewed-by: NMiao-chen Chou <mcchou@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 15 9月, 2020 1 次提交
-
-
由 Daniel Winkler 提交于
Currently, the controller will continue advertising when the system enters suspend. This patch makes sure that all advertising instances are paused when entering suspend, and resumed when suspend exits. The Advertising and Suspend/Resume test suites were both run on this change on 4.19 kernel with both hardware offloaded multi-advertising and software rotated multi-advertising. In addition, a new test was added that performs the following steps: * Register 3 advertisements via bluez RegisterAdvertisement * Verify reception of all advertisements by remote peer * Enter suspend on DUT * Verify failure to receive all advertisements by remote peer * Exit suspend on DUT * Verify reception of all advertisements by remote peer Signed-off-by: NDaniel Winkler <danielwinkler@google.com> Reviewed-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 13 9月, 2020 1 次提交
-
-
由 Abhishek Pandit-Subedi 提交于
Only set extended scan response only when it exists. Otherwise, clear the scan response data. Per the core spec v5.2, Vol 4, Part E, 7.8.55 If the advertising set is non-scannable and the Host uses this command other than to discard existing data, the Controller shall return the error code Invalid HCI Command Parameters (0x12). On WCN3991, the controller correctly responds with Invalid Parameters when this is sent. That error causes __hci_req_hci_power_on to fail with -EINVAL and LE devices can't connect because background scanning isn't configured. Here is an hci trace of where this issue occurs during power on: < HCI Command: LE Set Extended Advertising Parameters (0x08|0x0036) plen 25 Handle: 0x00 Properties: 0x0010 Use legacy advertising PDUs: ADV_NONCONN_IND Min advertising interval: 181.250 msec (0x0122) Max advertising interval: 181.250 msec (0x0122) Channel map: 37, 38, 39 (0x07) Own address type: Random (0x01) Peer address type: Public (0x00) Peer address: 00:00:00:00:00:00 (OUI 00-00-00) Filter policy: Allow Scan Request from Any, Allow Connect... TX power: 127 dbm (0x7f) Primary PHY: LE 1M (0x01) Secondary max skip: 0x00 Secondary PHY: LE 1M (0x01) SID: 0x00 Scan request notifications: Disabled (0x00) > HCI Event: Command Complete (0x0e) plen 5 LE Set Extended Advertising Parameters (0x08|0x0036) ncmd 1 Status: Success (0x00) TX power (selected): 9 dbm (0x09) < HCI Command: LE Set Advertising Set Random Address (0x08|0x0035) plen 7 Advertising handle: 0x00 Advertising random address: 08:FD:55:ED:22:28 (OUI 08-FD-55) > HCI Event: Command Complete (0x0e) plen 4 LE Set Advertising Set Random Address (0x08|0x0035) ncmd Status: Success (0x00) < HCI Command: LE Set Extended Scan Response Data (0x08|0x0038) plen 35 Handle: 0x00 Operation: Complete scan response data (0x03) Fragment preference: Minimize fragmentation (0x01) Data length: 0x0d Name (short): Chromebook > HCI Event: Command Complete (0x0e) plen 4 LE Set Extended Scan Response Data (0x08|0x0038) ncmd 1 Status: Invalid HCI Command Parameters (0x12) Signed-off-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Reviewed-by: NDaniel Winkler <danielwinkler@google.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 31 7月, 2020 1 次提交
-
-
由 Alain Michaud 提交于
When an LE connection is requested and an RPA update is needed via hci_connect_le_scan, the default scanning parameters are used rather than the connect parameters. This leads to significant delays in the connection establishment process when using lower duty cycle scanning parameters. The patch simply looks at the pended connection list when trying to determine which scanning parameters should be used. Before: < HCI Command: LE Set Extended Scan Parameters (0x08|0x0041) plen 8 #378 [hci0] 1659.247156 Own address type: Public (0x00) Filter policy: Ignore not in white list (0x01) PHYs: 0x01 Entry 0: LE 1M Type: Passive (0x00) Interval: 367.500 msec (0x024c) Window: 37.500 msec (0x003c) After: < HCI Command: LE Set Extended Scan Parameters (0x08|0x0041) plen 8 #39 [hci0] 7.422109 Own address type: Public (0x00) Filter policy: Ignore not in white list (0x01) PHYs: 0x01 Entry 0: LE 1M Type: Passive (0x00) Interval: 60.000 msec (0x0060) Window: 60.000 msec (0x0060) Signed-off-by: NAlain Michaud <alainm@chromium.org> Reviewed-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Reviewed-by: NYu Liu <yudiliu@google.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 30 7月, 2020 5 次提交
-
-
由 Sathish Narasimman 提交于
This patch adds support to enable the use of RPA Address resolution using expermental feature mgmt command. Signed-off-by: NSathish Narasimman <sathish.narasimman@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Sathish Narasimman 提交于
In this patch if le_create_conn process is started restrict to disable address resolution and same is disabled during le_enh_connection_complete Signed-off-by: NSathish Narasimman <sathish.narasimman@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Sathish Narasimman 提交于
When address resolution is enabled and set_privacy is enabled let's use own address type as 0x03 Signed-off-by: NSathish Narasimman <sathish.narasimman@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Marcel Holtmann 提交于
When the whitelist is updated, then also update the entries of the resolving list for devices where IRKs are available. Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NSathish Narsimman <sathish.narasimman@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Marcel Holtmann 提交于
When the LL Privacy support is available, then as part of enabling or disabling passive background scanning, it is required to set up the controller based address resolution as well. Since only passive background scanning is utilizing the whitelist, the address resolution is now bound to the whitelist and passive background scanning. All other resolution can be easily done by the host stack. Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NSathish Narsimman <sathish.narasimman@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 15 7月, 2020 1 次提交
-
-
由 Daniel Winkler 提交于
Add functionality to disable and remove advertising instances, and use that functionality in MGMT add/remove advertising calls. Currently, advertising is globally-disabled, i.e. all instances are disabled together, even if hardware offloading is available. This patch adds functionality to disable and remove individual adv instances, solving two issues: 1. On new advertisement registration, a global disable was done, and then only the new instance was enabled. This meant only the newest instance was actually enabled. 2. On advertisement removal, the structure was removed, but the instance was never disabled or removed, which is incorrect with hardware offload support. Signed-off-by: NDaniel Winkler <danielwinkler@google.com> Reviewed-by: NShyh-In Hwang <josephsih@chromium.org> Reviewed-by: NAlain Michaud <alainm@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 08 7月, 2020 1 次提交
-
-
由 Miao-chen Chou 提交于
Even with one advertisement monitor in place, the scan policy should use the whitelist while the system is going to suspend to prevent waking by random advertisement. The following test was performed. - With a paired device, register one advertisement monitor, suspend the system and verify that the host was not awaken by random advertisements. Signed-off-by: NMiao-chen Chou <mcchou@chromium.org> Reviewed-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 07 7月, 2020 1 次提交
-
-
由 Alain Michaud 提交于
This patch fixes active scans to use the configured default parameters. Signed-off-by: NAlain Michaud <alainm@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 25 6月, 2020 1 次提交
-
-
由 Abhishek Pandit-Subedi 提交于
When restarting LE scanning, check if it's currently paused before enabling passive scanning. Signed-off-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 22 6月, 2020 1 次提交
-
-
由 Alain Michaud 提交于
When the extended advertisement feature is enabled, a hardcoded min and max interval of 0x8000 is used. This patch fixes this issue by using the configured min/max value. This was validated by setting min/max in main.conf and making sure the right setting is applied: < HCI Command: LE Set Extended Advertising Parameters (0x08|0x0036) plen 25 #93 [hci0] 10.953011 … Min advertising interval: 181.250 msec (0x0122) Max advertising interval: 181.250 msec (0x0122) … Signed-off-by: NAlain Michaud <alainm@chromium.org> Reviewed-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Reviewed-by: NDaniel Winkler <danielwinkler@google.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 18 6月, 2020 3 次提交
-
-
由 Miao-chen Chou 提交于
This calls hci_update_background_scan() when there is any update on the advertisement monitors. If there is at least one advertisement monitor, the filtering policy of scan parameters should be 0x00. This also reports device found mgmt events if there is at least one monitor. The following cases were tested with btmgmt advmon-* commands. (1) add a ADV monitor and observe that the passive scanning is triggered. (2) remove the last ADV monitor and observe that the passive scanning is terminated. (3) with a LE peripheral paired, repeat (1) and observe the passive scanning continues. (4) with a LE peripheral paired, repeat (2) and observe the passive scanning continues. (5) with a ADV monitor, suspend/resume the host and observe the passive scanning continues. Signed-off-by: NMiao-chen Chou <mcchou@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Abhishek Pandit-Subedi 提交于
Replace the wakeable boolean with flags in hci_conn_params and all users of this boolean. This will be used by the get/set device flags mgmt op. Signed-off-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Reviewed-by: NAlain Michaud <alainm@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Abhishek Pandit-Subedi 提交于
Since the classic device list now supports flags, convert the wakeable list into a flag on the existing device list. Signed-off-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Reviewed-by: NAlain Michaud <alainm@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
- 12 6月, 2020 1 次提交
-
-
由 Alain Michaud 提交于
This patch centralized the initialization of default parameters. This is required to allow clients to more easily customize the default system parameters. Signed-off-by: NAlain Michaud <alainm@chromium.org> Reviewed-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 04 6月, 2020 1 次提交
-
-
由 Manish Mandlik 提交于
Check current scan state by checking HCI_LE_SCAN flag and send scan disable command only if scan is already enabled. Signed-off-by: NManish Mandlik <mmandlik@google.com> Reviewed-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Reviewed-by: NAlain Michaud <alainm@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 13 5月, 2020 3 次提交
-
-
由 Abhishek Pandit-Subedi 提交于
Renamed BT_SUSPEND_COMPLETE to BT_SUSPEND_CONFIGURE_WAKE since it sets up the event filter and whitelist for wake-up. Signed-off-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Reviewed-by: NAlain Michaud <alainm@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Abhishek Pandit-Subedi 提交于
When a device is suspended, it doesn't need to be as responsive to connection events. Increase the interval to 640ms (creating a duty cycle of roughly 1.75%) so that passive scanning uses much less power (vs previous duty cycle of 18.75%). The new window + interval combination has been tested to work with HID devices (which are currently the only devices capable of wake up). Signed-off-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Abhishek Pandit-Subedi 提交于
The types for window and interval should be uint16, not uint8. Signed-off-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 11 5月, 2020 1 次提交
-
-
由 Tedd Ho-Jeong An 提交于
This patch fix the advertising handle is set to 0 regardless of actual instance value. The affected commands are LE Set Advertising Set Random Address, LE Set Extended Advertising Data, and LE Set Extended Scan Response Data commands. Signed-off-by: NTedd Ho-Jeong An <tedd.an@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 15 4月, 2020 1 次提交
-
-
由 Marcel Holtmann 提交于
When starting active scanning for discovery the whitelist is not needed to be used. So the filter_policy is 0x00. To make the core more readable use a variable name instead of just setting 0 as paramter. Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
- 18 3月, 2020 1 次提交
-
-
由 Dmitry Grinberg 提交于
BlueZ cancels adv when starting a scan, but does not cancel a scan when starting to adv. Neither is required, so this brings both to a consistent state (of not affecting each other). Some very rare (I've never seen one) BT 4.0 chips will fail to do both at once. Even this is ok since the command that will fail will be the second one, and thus the common sense logic of first-come-first-served is preserved for BLE requests. Signed-off-by: NDmitry Grinberg <dmitrygr@google.com> Signed-off-by: NManish Mandlik <mmandlik@google.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 12 3月, 2020 2 次提交
-
-
由 Abhishek Pandit-Subedi 提交于
To prevent spurious wake ups, we disable any discovery or advertising when we enter suspend and restore it when we exit suspend. While paused, we disable any management requests to modify discovery or advertising. Signed-off-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Abhishek Pandit-Subedi 提交于
To handle LE devices, we must first disable passive scanning and disconnect all connected devices. Once that is complete, we update the whitelist and re-enable scanning Signed-off-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-