Bluetooth: conn: Switch order of tx_notify & tx_queue

In case both conn->tx_notify and conn->tx_queue have data in them we
should first process the notify queue and only then new outgoing
packets.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-07-06 12:27:11 +03:00 committed by Johan Hedberg
commit baf4f0c912

View file

@ -1303,14 +1303,14 @@ int bt_conn_prepare_events(struct k_poll_event events[])
k_poll_event_init(&events[ev_count], k_poll_event_init(&events[ev_count],
K_POLL_TYPE_FIFO_DATA_AVAILABLE, K_POLL_TYPE_FIFO_DATA_AVAILABLE,
K_POLL_MODE_NOTIFY_ONLY, K_POLL_MODE_NOTIFY_ONLY,
&conn->tx_queue); &conn->tx_notify);
events[ev_count++].tag = BT_EVENT_CONN_TX_QUEUE; events[ev_count++].tag = BT_EVENT_CONN_TX_NOTIFY;
k_poll_event_init(&events[ev_count], k_poll_event_init(&events[ev_count],
K_POLL_TYPE_FIFO_DATA_AVAILABLE, K_POLL_TYPE_FIFO_DATA_AVAILABLE,
K_POLL_MODE_NOTIFY_ONLY, K_POLL_MODE_NOTIFY_ONLY,
&conn->tx_notify); &conn->tx_queue);
events[ev_count++].tag = BT_EVENT_CONN_TX_NOTIFY; events[ev_count++].tag = BT_EVENT_CONN_TX_QUEUE;
} }
return ev_count; return ev_count;