Bluetooth: prioritize the interrupt channel in hidp
authorGustavo F. Padovan <padovan@profusion.mobi>
Thu, 6 Oct 2011 21:02:13 +0000 (18:02 -0300)
committerGustavo F. Padovan <padovan@profusion.mobi>
Fri, 7 Oct 2011 02:15:04 +0000 (23:15 -0300)
Interrupt channel has low latency requiments, should be processed first.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/hidp/core.c

index 08bfbb0f09265d5fe9a5475f5b766bc66d7ab2a2..2694a0a6186daec737d9345128a22ff9ac881659 100644 (file)
@@ -714,18 +714,18 @@ static int hidp_session(void *arg)
                                intr_sk->sk_state != BT_CONNECTED)
                        break;
 
-               while ((skb = skb_dequeue(&ctrl_sk->sk_receive_queue))) {
+               while ((skb = skb_dequeue(&intr_sk->sk_receive_queue))) {
                        skb_orphan(skb);
                        if (!skb_linearize(skb))
-                               hidp_recv_ctrl_frame(session, skb);
+                               hidp_recv_intr_frame(session, skb);
                        else
                                kfree_skb(skb);
                }
 
-               while ((skb = skb_dequeue(&intr_sk->sk_receive_queue))) {
+               while ((skb = skb_dequeue(&ctrl_sk->sk_receive_queue))) {
                        skb_orphan(skb);
                        if (!skb_linearize(skb))
-                               hidp_recv_intr_frame(session, skb);
+                               hidp_recv_ctrl_frame(session, skb);
                        else
                                kfree_skb(skb);
                }