@@ -2938,12 +2938,14 @@ int hci_recv_frame(struct hci_dev *hdev, struct sk_buff *skb)
29382938 case HCI_ACLDATA_PKT :
29392939 /* Detect if ISO packet has been sent as ACL */
29402940 if (hci_conn_num (hdev , CIS_LINK ) ||
2941- hci_conn_num (hdev , BIS_LINK )) {
2941+ hci_conn_num (hdev , BIS_LINK ) ||
2942+ hci_conn_num (hdev , PA_LINK )) {
29422943 __u16 handle = __le16_to_cpu (hci_acl_hdr (skb )-> handle );
29432944 __u8 type ;
29442945
29452946 type = hci_conn_lookup_type (hdev , hci_handle (handle ));
2946- if (type == CIS_LINK || type == BIS_LINK )
2947+ if (type == CIS_LINK || type == BIS_LINK ||
2948+ type == PA_LINK )
29472949 hci_skb_pkt_type (skb ) = HCI_ISODATA_PKT ;
29482950 }
29492951 break ;
@@ -3398,6 +3400,7 @@ static inline void hci_quote_sent(struct hci_conn *conn, int num, int *quote)
33983400 break ;
33993401 case CIS_LINK :
34003402 case BIS_LINK :
3403+ case PA_LINK :
34013404 cnt = hdev -> iso_mtu ? hdev -> iso_cnt :
34023405 hdev -> le_mtu ? hdev -> le_cnt : hdev -> acl_cnt ;
34033406 break ;
@@ -3411,7 +3414,7 @@ static inline void hci_quote_sent(struct hci_conn *conn, int num, int *quote)
34113414}
34123415
34133416static struct hci_conn * hci_low_sent (struct hci_dev * hdev , __u8 type ,
3414- __u8 type2 , int * quote )
3417+ int * quote )
34153418{
34163419 struct hci_conn_hash * h = & hdev -> conn_hash ;
34173420 struct hci_conn * conn = NULL , * c ;
@@ -3423,7 +3426,7 @@ static struct hci_conn *hci_low_sent(struct hci_dev *hdev, __u8 type,
34233426 rcu_read_lock ();
34243427
34253428 list_for_each_entry_rcu (c , & h -> list , list ) {
3426- if (( c -> type != type && c -> type != type2 ) ||
3429+ if (c -> type != type ||
34273430 skb_queue_empty (& c -> data_q ))
34283431 continue ;
34293432
@@ -3627,7 +3630,7 @@ static void hci_sched_sco(struct hci_dev *hdev, __u8 type)
36273630 else
36283631 cnt = & hdev -> sco_cnt ;
36293632
3630- while (* cnt && (conn = hci_low_sent (hdev , type , type , & quote ))) {
3633+ while (* cnt && (conn = hci_low_sent (hdev , type , & quote ))) {
36313634 while (quote -- && (skb = skb_dequeue (& conn -> data_q ))) {
36323635 BT_DBG ("skb %p len %d" , skb , skb -> len );
36333636 hci_send_conn_frame (hdev , conn , skb );
@@ -3746,23 +3749,21 @@ static void hci_sched_le(struct hci_dev *hdev)
37463749 hci_prio_recalculate (hdev , LE_LINK );
37473750}
37483751
3749- /* Schedule CIS */
3750- static void hci_sched_iso (struct hci_dev * hdev )
3752+ /* Schedule iso */
3753+ static void hci_sched_iso (struct hci_dev * hdev , __u8 type )
37513754{
37523755 struct hci_conn * conn ;
37533756 struct sk_buff * skb ;
37543757 int quote , * cnt ;
37553758
37563759 BT_DBG ("%s" , hdev -> name );
37573760
3758- if (!hci_conn_num (hdev , CIS_LINK ) &&
3759- !hci_conn_num (hdev , BIS_LINK ))
3761+ if (!hci_conn_num (hdev , type ))
37603762 return ;
37613763
37623764 cnt = hdev -> iso_pkts ? & hdev -> iso_cnt :
37633765 hdev -> le_pkts ? & hdev -> le_cnt : & hdev -> acl_cnt ;
3764- while (* cnt && (conn = hci_low_sent (hdev , CIS_LINK , BIS_LINK ,
3765- & quote ))) {
3766+ while (* cnt && (conn = hci_low_sent (hdev , type , & quote ))) {
37663767 while (quote -- && (skb = skb_dequeue (& conn -> data_q ))) {
37673768 BT_DBG ("skb %p len %d" , skb , skb -> len );
37683769 hci_send_conn_frame (hdev , conn , skb );
@@ -3787,7 +3788,9 @@ static void hci_tx_work(struct work_struct *work)
37873788 /* Schedule queues and send stuff to HCI driver */
37883789 hci_sched_sco (hdev , SCO_LINK );
37893790 hci_sched_sco (hdev , ESCO_LINK );
3790- hci_sched_iso (hdev );
3791+ hci_sched_iso (hdev , CIS_LINK );
3792+ hci_sched_iso (hdev , BIS_LINK );
3793+ hci_sched_iso (hdev , PA_LINK );
37913794 hci_sched_acl (hdev );
37923795 hci_sched_le (hdev );
37933796 }
0 commit comments