aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_core.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 631327dc7fed..19e44533fb01 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2193,10 +2193,17 @@ static inline void hci_sched_acl(struct hci_dev *hdev)
2193 2193
2194 while (hdev->acl_cnt && 2194 while (hdev->acl_cnt &&
2195 (chan = hci_chan_sent(hdev, ACL_LINK, &quote))) { 2195 (chan = hci_chan_sent(hdev, ACL_LINK, &quote))) {
2196 while (quote-- && (skb = skb_dequeue(&chan->data_q))) { 2196 u32 priority = (skb_peek(&chan->data_q))->priority;
2197 while (quote-- && (skb = skb_peek(&chan->data_q))) {
2197 BT_DBG("chan %p skb %p len %d priority %u", chan, skb, 2198 BT_DBG("chan %p skb %p len %d priority %u", chan, skb,
2198 skb->len, skb->priority); 2199 skb->len, skb->priority);
2199 2200
2201 /* Stop if priority has changed */
2202 if (skb->priority < priority)
2203 break;
2204
2205 skb = skb_dequeue(&chan->data_q);
2206
2200 hci_conn_enter_active_mode(chan->conn, 2207 hci_conn_enter_active_mode(chan->conn,
2201 bt_cb(skb)->force_active); 2208 bt_cb(skb)->force_active);
2202 2209
@@ -2278,10 +2285,17 @@ static inline void hci_sched_le(struct hci_dev *hdev)
2278 2285
2279 cnt = hdev->le_pkts ? hdev->le_cnt : hdev->acl_cnt; 2286 cnt = hdev->le_pkts ? hdev->le_cnt : hdev->acl_cnt;
2280 while (cnt && (chan = hci_chan_sent(hdev, LE_LINK, &quote))) { 2287 while (cnt && (chan = hci_chan_sent(hdev, LE_LINK, &quote))) {
2281 while (quote-- && (skb = skb_dequeue(&chan->data_q))) { 2288 u32 priority = (skb_peek(&chan->data_q))->priority;
2289 while (quote-- && (skb = skb_peek(&chan->data_q))) {
2282 BT_DBG("chan %p skb %p len %d priority %u", chan, skb, 2290 BT_DBG("chan %p skb %p len %d priority %u", chan, skb,
2283 skb->len, skb->priority); 2291 skb->len, skb->priority);
2284 2292
2293 /* Stop if priority has changed */
2294 if (skb->priority < priority)
2295 break;
2296
2297 skb = skb_dequeue(&chan->data_q);
2298
2285 hci_send_frame(skb); 2299 hci_send_frame(skb);
2286 hdev->le_last_tx = jiffies; 2300 hdev->le_last_tx = jiffies;
2287 2301