Set a default LE(LL) TX packet length to maximum
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-adapter.c
index 1ce4ca3..16af447 100644 (file)
@@ -43,6 +43,8 @@
 #include "bt-service-main.h"
 #include "bt-service-avrcp.h"
 #include "bt-service-device.h"
+#include "bt-service-adapter-le.h"
+
 #ifdef TIZEN_DPM_ENABLE
 #include "bt-service-dpm.h"
 #endif
@@ -615,7 +617,11 @@ static int __bt_set_le_enabled(void)
 
        /* Update Bluetooth Status to notify other modules */
        if (vconf_set_int(VCONFKEY_BT_LE_STATUS, VCONFKEY_BT_LE_STATUS_ON) != 0)
-               BT_ERR("Set vconf failed\n");
+               BT_ERR("Set vconf failed");
+
+       /* set packet length to max size to enable packet length extension */
+       if (BLUETOOTH_ERROR_NONE != _bt_le_set_max_packet_len())
+               BT_ERR("Fail to set max packet length");
 
        if (_bt_eventsystem_set_value(SYS_EVENT_BT_STATE, EVT_KEY_BT_LE_STATE,
                                                EVT_VAL_BT_LE_ON) != ES_R_OK)