adv_monitor: merge monitors with the same pattern
authorArchie Pusaka <apusaka@chromium.org>
Tue, 30 Mar 2021 04:12:33 +0000 (12:12 +0800)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:35 +0000 (19:08 +0530)
commitbf30e21a9970f4d3fbc1f84faf4c0ba8b3d62e92
tree4a563ca1ed121c563c93246e727d8c2878bc1d83
parente39ec493a4a38b5848e7a5a9fe7861992f6376db
adv_monitor: merge monitors with the same pattern

Some bluetooth chipset (e.g. Intel) doesn't support MSFT extension
monitors with the same pattern. In order to make them work, and also
to generally make their task easier, we merge monitors with the same
pattern in the userspace. Therefore, each monitor sent to the kernel
will all have different patterns.

If the merged monitor have different RSSI parameter, we would choose
the most lenient parameter of the two, since we can still do
additional filtering in the userspace. This way, we wouldn't miss any
information and can still get the benefit of offloading the filtering.

Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
src/adv_monitor.c