serial: send entire command in one write if send_delay is 0 (chromium:13506)

Avoids additional USB latency and groups the whole command into one
USB packet.

BUG=chromium-os:13506
This commit is contained in:
Dan Williams
2011-04-08 15:42:28 -05:00
parent 2640baefa4
commit 273f4203d4
2 changed files with 21 additions and 8 deletions
+4 -1
View File
@@ -1112,7 +1112,10 @@ grab_port (MMModem *modem,
if (port && MM_IS_AT_SERIAL_PORT (port)) {
GRegex *regex;
g_object_set (port, MM_PORT_CARRIER_DETECT, FALSE, NULL);
g_object_set (port,
MM_PORT_CARRIER_DETECT, FALSE,
MM_SERIAL_PORT_SEND_DELAY, (guint64) 0,
NULL);
/* %NWSTATE: <rssi>,<mccmnc>,<tech>,<connected>,<regulation> */
regex = g_regex_new ("\\r\\n\\%NWSTATE: (\\d),(\\d+),\\s*([^,\\s]*)\\s*,(.+)\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);