Message ID | 20230330211855.102798-1-hdegoede@redhat.com |
---|---|
State | Superseded |
Headers | show |
Series | [BlueZ] adapter: Use regular discovery for filters which only have discoverable set | expand |
This is automated email and please do not reply to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series: PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=735586 ---Test result--- Test Summary: CheckPatch PASS 0.42 seconds GitLint FAIL 0.51 seconds BuildEll PASS 26.36 seconds BluezMake PASS 778.89 seconds MakeCheck PASS 11.29 seconds MakeDistcheck PASS 151.60 seconds CheckValgrind PASS 243.65 seconds CheckSmatch PASS 326.73 seconds bluezmakeextell PASS 97.95 seconds IncrementalBuild PASS 624.12 seconds ScanBuild PASS 988.96 seconds Details ############################## Test: GitLint - FAIL Desc: Run gitlint Output: [BlueZ] adapter: Use regular discovery for filters which only have discoverable set WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search 1: T1 Title exceeds max length (83>80): "[BlueZ] adapter: Use regular discovery for filters which only have discoverable set" 27: B3 Line contains hard tab characters (\t): " Name: Bluetooth 3.0 Keyboard" 28: B3 Line contains hard tab characters (\t): " Alias: Bluetooth 3.0 Keyboard" 29: B3 Line contains hard tab characters (\t): " Class: 0x00000540" 30: B3 Line contains hard tab characters (\t): " Icon: input-keyboard" 31: B3 Line contains hard tab characters (\t): " Paired: yes" 32: B3 Line contains hard tab characters (\t): " Bonded: yes" 33: B3 Line contains hard tab characters (\t): " Trusted: yes" 34: B3 Line contains hard tab characters (\t): " Blocked: no" 35: B3 Line contains hard tab characters (\t): " Connected: yes" 36: B3 Line contains hard tab characters (\t): " WakeAllowed: yes" 37: B3 Line contains hard tab characters (\t): " LegacyPairing: yes" 38: B3 Line contains hard tab characters (\t): " UUID: Service Discovery Serve.. (00001000-0000-1000-8000-00805f9b34fb)" 39: B3 Line contains hard tab characters (\t): " UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)" 40: B3 Line contains hard tab characters (\t): " UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)" 41: B3 Line contains hard tab characters (\t): " Modalias: bluetooth:v05ACp022Cd011B" 44: B3 Line contains hard tab characters (\t): " Name: Bluetooth Mouse" 45: B3 Line contains hard tab characters (\t): " Alias: Bluetooth Mouse" 46: B3 Line contains hard tab characters (\t): " Class: 0x00002580" 47: B3 Line contains hard tab characters (\t): " Icon: input-mouse" 48: B3 Line contains hard tab characters (\t): " Paired: yes" 49: B3 Line contains hard tab characters (\t): " Bonded: yes" 50: B3 Line contains hard tab characters (\t): " Trusted: yes" 51: B3 Line contains hard tab characters (\t): " Blocked: no" 52: B3 Line contains hard tab characters (\t): " Connected: yes" 53: B3 Line contains hard tab characters (\t): " WakeAllowed: yes" 54: B3 Line contains hard tab characters (\t): " LegacyPairing: no" 55: B3 Line contains hard tab characters (\t): " UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)" 56: B3 Line contains hard tab characters (\t): " UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)" 57: B3 Line contains hard tab characters (\t): " Modalias: usb:v0103p0204d001E" --- Regards, Linux Bluetooth
diff --git a/src/adapter.c b/src/adapter.c index 7947160a6..cc7f891d9 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -2192,6 +2192,7 @@ static int merge_discovery_filters(struct btd_adapter *adapter, int *rssi, bool empty_uuid = false; bool has_regular_discovery = false; bool has_filtered_discovery = false; + uint8_t adapter_scan_type = get_scan_type(adapter); for (l = adapter->discovery_list; l != NULL; l = g_slist_next(l)) { struct discovery_client *client = l->data; @@ -2202,6 +2203,20 @@ static int merge_discovery_filters(struct btd_adapter *adapter, int *rssi, continue; } + /* + * Detect empty filter with only discoverable + * (which does not require a kernel filter) set. + */ + if (item->uuids == NULL && + item->pathloss == DISTANCE_VAL_INVALID && + item->rssi == DISTANCE_VAL_INVALID && + item->type == adapter_scan_type && + item->duplicate == false && + item->pattern == NULL) { + has_regular_discovery = true; + continue; + } + has_filtered_discovery = true; *transport |= item->type; @@ -2251,7 +2266,7 @@ static int merge_discovery_filters(struct btd_adapter *adapter, int *rssi, * It there is both regular and filtered scan running, then * clear whole fitler to report all devices. */ - *transport = get_scan_type(adapter); + *transport = adapter_scan_type; *rssi = HCI_RSSI_INVALID; g_slist_free(*uuids); *uuids = NULL;