Handle not_supported case of BLE batching 25/233625/1
authorDeokhyun Kim <dukan.kim@samsung.com>
Thu, 14 May 2020 05:30:29 +0000 (14:30 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Mon, 18 May 2020 01:22:56 +0000 (10:22 +0900)
Change-Id: I0b08db175fda9a662ee532067ebf5f537cca8aff
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
src/adapter.c

index d77f37f..8aaa81d 100644 (file)
@@ -5873,7 +5873,10 @@ static void get_le_batching_available_pkts_complete(
 
        if (status != MGMT_STATUS_SUCCESS) {
                error("mgmt fail: %s (0x%02x)", mgmt_errstr(status), status);
-               reply = btd_error_failed(request->msg, mgmt_errstr(status));
+               if (status == MGMT_STATUS_UNKNOWN_COMMAND)
+                       reply = btd_error_not_supported(request->msg);
+               else
+                       reply = btd_error_failed(request->msg, mgmt_errstr(status));
                goto done;
        }
 
@@ -5954,7 +5957,10 @@ static void set_le_batching_enable_complete(
        DBG("");
        if (status != MGMT_STATUS_SUCCESS) {
                error("mgmt fail: %s (0x%02x)", mgmt_errstr(status), status);
-               reply = btd_error_failed(request->msg, mgmt_errstr(status));
+               if (status == MGMT_STATUS_UNKNOWN_COMMAND)
+                       reply = btd_error_not_supported(request->msg);
+               else
+                       reply = btd_error_failed(request->msg, mgmt_errstr(status));
                goto done;
        }
 
@@ -5990,7 +5996,10 @@ static void set_le_batching_param_complete(
 
        if (status != MGMT_STATUS_SUCCESS) {
                error("mgmt fail: %s (0x%02x)", mgmt_errstr(status), status);
-               reply = btd_error_failed(request->msg, mgmt_errstr(status));
+               if (status == MGMT_STATUS_UNKNOWN_COMMAND)
+                       reply = btd_error_not_supported(request->msg);
+               else
+                       reply = btd_error_failed(request->msg, mgmt_errstr(status));
                goto done;
        }