@@ -2938,12 +2938,14 @@ int hci_recv_frame(struct hci_dev *hdev, struct sk_buff *skb)
2938
2938
case HCI_ACLDATA_PKT :
2939
2939
/* Detect if ISO packet has been sent as ACL */
2940
2940
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 )) {
2942
2943
__u16 handle = __le16_to_cpu (hci_acl_hdr (skb )-> handle );
2943
2944
__u8 type ;
2944
2945
2945
2946
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 )
2947
2949
hci_skb_pkt_type (skb ) = HCI_ISODATA_PKT ;
2948
2950
}
2949
2951
break ;
@@ -3398,6 +3400,7 @@ static inline void hci_quote_sent(struct hci_conn *conn, int num, int *quote)
3398
3400
break ;
3399
3401
case CIS_LINK :
3400
3402
case BIS_LINK :
3403
+ case PA_LINK :
3401
3404
cnt = hdev -> iso_mtu ? hdev -> iso_cnt :
3402
3405
hdev -> le_mtu ? hdev -> le_cnt : hdev -> acl_cnt ;
3403
3406
break ;
@@ -3411,7 +3414,7 @@ static inline void hci_quote_sent(struct hci_conn *conn, int num, int *quote)
3411
3414
}
3412
3415
3413
3416
static struct hci_conn * hci_low_sent (struct hci_dev * hdev , __u8 type ,
3414
- __u8 type2 , int * quote )
3417
+ int * quote )
3415
3418
{
3416
3419
struct hci_conn_hash * h = & hdev -> conn_hash ;
3417
3420
struct hci_conn * conn = NULL , * c ;
@@ -3423,7 +3426,7 @@ static struct hci_conn *hci_low_sent(struct hci_dev *hdev, __u8 type,
3423
3426
rcu_read_lock ();
3424
3427
3425
3428
list_for_each_entry_rcu (c , & h -> list , list ) {
3426
- if (( c -> type != type && c -> type != type2 ) ||
3429
+ if (c -> type != type ||
3427
3430
skb_queue_empty (& c -> data_q ))
3428
3431
continue ;
3429
3432
@@ -3627,7 +3630,7 @@ static void hci_sched_sco(struct hci_dev *hdev, __u8 type)
3627
3630
else
3628
3631
cnt = & hdev -> sco_cnt ;
3629
3632
3630
- while (* cnt && (conn = hci_low_sent (hdev , type , type , & quote ))) {
3633
+ while (* cnt && (conn = hci_low_sent (hdev , type , & quote ))) {
3631
3634
while (quote -- && (skb = skb_dequeue (& conn -> data_q ))) {
3632
3635
BT_DBG ("skb %p len %d" , skb , skb -> len );
3633
3636
hci_send_conn_frame (hdev , conn , skb );
@@ -3746,23 +3749,21 @@ static void hci_sched_le(struct hci_dev *hdev)
3746
3749
hci_prio_recalculate (hdev , LE_LINK );
3747
3750
}
3748
3751
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 )
3751
3754
{
3752
3755
struct hci_conn * conn ;
3753
3756
struct sk_buff * skb ;
3754
3757
int quote , * cnt ;
3755
3758
3756
3759
BT_DBG ("%s" , hdev -> name );
3757
3760
3758
- if (!hci_conn_num (hdev , CIS_LINK ) &&
3759
- !hci_conn_num (hdev , BIS_LINK ))
3761
+ if (!hci_conn_num (hdev , type ))
3760
3762
return ;
3761
3763
3762
3764
cnt = hdev -> iso_pkts ? & hdev -> iso_cnt :
3763
3765
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 ))) {
3766
3767
while (quote -- && (skb = skb_dequeue (& conn -> data_q ))) {
3767
3768
BT_DBG ("skb %p len %d" , skb , skb -> len );
3768
3769
hci_send_conn_frame (hdev , conn , skb );
@@ -3787,7 +3788,9 @@ static void hci_tx_work(struct work_struct *work)
3787
3788
/* Schedule queues and send stuff to HCI driver */
3788
3789
hci_sched_sco (hdev , SCO_LINK );
3789
3790
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 );
3791
3794
hci_sched_acl (hdev );
3792
3795
hci_sched_le (hdev );
3793
3796
}
0 commit comments