OSDN Git Service

Start the Tx idle timer before sending out HCI command
authorLuke Zhang <lukez@codeaurora.org>
Tue, 29 Nov 2016 22:31:59 +0000 (14:31 -0800)
committerGerrit - the friendly Code Review server <code-review@localhost>
Wed, 30 Nov 2016 16:18:02 +0000 (08:18 -0800)
In order to prevent pending command timer from starting before Tx
idle timer holds the wake lock, we start Tx idle timer before sending
out command.

Change-Id: I97c7076840d45700739f56c01585aaec4aa5ca9d

hci/src/hci_layer.c

index 5217015..d004f63 100644 (file)
@@ -565,8 +565,6 @@ static void event_command_ready(fixed_queue_t *queue, UNUSED_ATTR void *context)
         low_power_manager->wake_assert();
     }
 
-    packet_fragmenter->fragment_and_dispatch(wait_entry->command);
-
     if (LPM_CONFIG_TX == lpm_config) {
         low_power_manager->start_idle_timer(false);
     }
@@ -574,6 +572,10 @@ static void event_command_ready(fixed_queue_t *queue, UNUSED_ATTR void *context)
         low_power_manager->transmit_done();
     }
 
+    packet_fragmenter->fragment_and_dispatch(wait_entry->command);
+
+
+
     update_command_response_timer();
   }
 }