Skip to content

Commit 33f2404

Browse files
Frédéric DalleauGustavo Padovan
Frédéric Dalleau
authored and
Gustavo Padovan
committed
Bluetooth: Remove unused mask parameter in sco_conn_defer_accept
From Bluetooth Core v4.0 specification, 7.1.8 Accept Connection Request Command "When accepting synchronous connection request, the Role parameter is not used and will be ignored by the BR/EDR Controller." Signed-off-by: Frédéric Dalleau <[email protected]> Acked-by: Marcel Holtmann <[email protected]> Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo Padovan <[email protected]>
1 parent e660ed6 commit 33f2404

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

net/bluetooth/sco.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ static int sco_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
651651
return err;
652652
}
653653

654-
static void sco_conn_defer_accept(struct hci_conn *conn, int mask)
654+
static void sco_conn_defer_accept(struct hci_conn *conn)
655655
{
656656
struct hci_dev *hdev = conn->hdev;
657657

@@ -663,11 +663,7 @@ static void sco_conn_defer_accept(struct hci_conn *conn, int mask)
663663
struct hci_cp_accept_conn_req cp;
664664

665665
bacpy(&cp.bdaddr, &conn->dst);
666-
667-
if (lmp_rswitch_capable(hdev) && (mask & HCI_LM_MASTER))
668-
cp.role = 0x00; /* Become master */
669-
else
670-
cp.role = 0x01; /* Remain slave */
666+
cp.role = 0x00; /* Ignored */
671667

672668
hci_send_cmd(hdev, HCI_OP_ACCEPT_CONN_REQ, sizeof(cp), &cp);
673669
} else {
@@ -697,7 +693,7 @@ static int sco_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
697693

698694
if (sk->sk_state == BT_CONNECT2 &&
699695
test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags)) {
700-
sco_conn_defer_accept(pi->conn->hcon, 0);
696+
sco_conn_defer_accept(pi->conn->hcon);
701697
sk->sk_state = BT_CONFIG;
702698
msg->msg_namelen = 0;
703699

0 commit comments

Comments
 (0)