Fix : Multiple advertising feature was not working 34/153434/1
authorSeungyoun Ju <sy39.ju@samsung.com>
Wed, 20 Sep 2017 03:58:03 +0000 (12:58 +0900)
committerSeungyoun Ju <sy39.ju@samsung.com>
Thu, 28 Sep 2017 10:23:25 +0000 (19:23 +0900)
[Problem] Multiple advertising feature was not working
[Cause & Measure] Advertising slot was not initialized because BT
 chipset supported slot count is over the defined maximum. Platform can
 support the large number of slots if BT chipset can. So we don't need
 to define maximum value of slots. This patch removes the maximum value
 of slots.
[Checking Method] Turn on Bluetooth and check advertising slot's
 initialization.

bt-service-event-receiver.c: __bt_adapter_property_changed_event(847) > name = adv_inst_max
bt-service-event-receiver.c: __bt_adapter_property_changed_event(849) > Value = 17
bt-service-adapter-le.c: _bt_update_le_feature_support(134) > (slot_num > BT_ADV_MULTI_MAX) return
bt-service-event-receiver.c: __bt_adapter_property_changed_event(851) > Fail to update LE feature info

Change-Id: I93e020908636627c9cf0b6ac1377e71126717dd0
Signed-off-by: Seungyoun Ju <sy39.ju@samsung.com>
bt-service/bt-service-adapter-le.c

index d6567b1..01aaad0 100644 (file)
@@ -39,7 +39,6 @@
 #define BT_ADV_FILTER_POLICY_DEFAULT   0x00
 #define BT_ADV_TYPE_DEFAULT    0x00
 #define BT_ADV_FILTER_POLICY_ALLOW_SCAN_CONN_WL_ONLY   0x03
-#define BT_ADV_MULTI_MAX   16
 
 typedef struct {
        int adv_inst_max;
@@ -107,7 +106,6 @@ gboolean _bt_update_le_feature_support(const char *item, const char *value)
 
                slot_num = atoi(value);
                retv_if(slot_num < 0, FALSE);
-               retv_if(slot_num > BT_ADV_MULTI_MAX, FALSE);
 
                if (slot_num != le_feature_info.adv_inst_max) {
                        __bt_free_le_adv_slot();