diff options
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r-- | net/bluetooth/hci_conn.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 3db432473ad5..8a4678a2c982 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c | |||
@@ -337,7 +337,7 @@ static void hci_conn_enter_sniff_mode(struct hci_conn *conn) | |||
337 | hci_send_cmd(hdev, HCI_OP_SNIFF_SUBRATE, sizeof(cp), &cp); | 337 | hci_send_cmd(hdev, HCI_OP_SNIFF_SUBRATE, sizeof(cp), &cp); |
338 | } | 338 | } |
339 | 339 | ||
340 | if (!test_and_set_bit(HCI_CONN_MODE_CHANGE_PEND, &conn->pend)) { | 340 | if (!test_and_set_bit(HCI_CONN_MODE_CHANGE_PEND, &conn->flags)) { |
341 | struct hci_cp_sniff_mode cp; | 341 | struct hci_cp_sniff_mode cp; |
342 | cp.handle = cpu_to_le16(conn->handle); | 342 | cp.handle = cpu_to_le16(conn->handle); |
343 | cp.max_interval = cpu_to_le16(hdev->sniff_max_interval); | 343 | cp.max_interval = cpu_to_le16(hdev->sniff_max_interval); |
@@ -589,9 +589,9 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8 | |||
589 | acl->power_save = 1; | 589 | acl->power_save = 1; |
590 | hci_conn_enter_active_mode(acl, BT_POWER_FORCE_ACTIVE_ON); | 590 | hci_conn_enter_active_mode(acl, BT_POWER_FORCE_ACTIVE_ON); |
591 | 591 | ||
592 | if (test_bit(HCI_CONN_MODE_CHANGE_PEND, &acl->pend)) { | 592 | if (test_bit(HCI_CONN_MODE_CHANGE_PEND, &acl->flags)) { |
593 | /* defer SCO setup until mode change completed */ | 593 | /* defer SCO setup until mode change completed */ |
594 | set_bit(HCI_CONN_SCO_SETUP_PEND, &acl->pend); | 594 | set_bit(HCI_CONN_SCO_SETUP_PEND, &acl->flags); |
595 | return sco; | 595 | return sco; |
596 | } | 596 | } |
597 | 597 | ||
@@ -633,13 +633,13 @@ static int hci_conn_auth(struct hci_conn *conn, __u8 sec_level, __u8 auth_type) | |||
633 | 633 | ||
634 | conn->auth_type = auth_type; | 634 | conn->auth_type = auth_type; |
635 | 635 | ||
636 | if (!test_and_set_bit(HCI_CONN_AUTH_PEND, &conn->pend)) { | 636 | if (!test_and_set_bit(HCI_CONN_AUTH_PEND, &conn->flags)) { |
637 | struct hci_cp_auth_requested cp; | 637 | struct hci_cp_auth_requested cp; |
638 | cp.handle = cpu_to_le16(conn->handle); | 638 | cp.handle = cpu_to_le16(conn->handle); |
639 | hci_send_cmd(conn->hdev, HCI_OP_AUTH_REQUESTED, | 639 | hci_send_cmd(conn->hdev, HCI_OP_AUTH_REQUESTED, |
640 | sizeof(cp), &cp); | 640 | sizeof(cp), &cp); |
641 | if (conn->key_type != 0xff) | 641 | if (conn->key_type != 0xff) |
642 | set_bit(HCI_CONN_REAUTH_PEND, &conn->pend); | 642 | set_bit(HCI_CONN_REAUTH_PEND, &conn->flags); |
643 | } | 643 | } |
644 | 644 | ||
645 | return 0; | 645 | return 0; |
@@ -650,7 +650,7 @@ static void hci_conn_encrypt(struct hci_conn *conn) | |||
650 | { | 650 | { |
651 | BT_DBG("conn %p", conn); | 651 | BT_DBG("conn %p", conn); |
652 | 652 | ||
653 | if (!test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &conn->pend)) { | 653 | if (!test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags)) { |
654 | struct hci_cp_set_conn_encrypt cp; | 654 | struct hci_cp_set_conn_encrypt cp; |
655 | cp.handle = cpu_to_le16(conn->handle); | 655 | cp.handle = cpu_to_le16(conn->handle); |
656 | cp.encrypt = 0x01; | 656 | cp.encrypt = 0x01; |
@@ -700,7 +700,7 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type) | |||
700 | goto encrypt; | 700 | goto encrypt; |
701 | 701 | ||
702 | auth: | 702 | auth: |
703 | if (test_bit(HCI_CONN_ENCRYPT_PEND, &conn->pend)) | 703 | if (test_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags)) |
704 | return 0; | 704 | return 0; |
705 | 705 | ||
706 | if (!hci_conn_auth(conn, sec_level, auth_type)) | 706 | if (!hci_conn_auth(conn, sec_level, auth_type)) |
@@ -735,7 +735,7 @@ int hci_conn_change_link_key(struct hci_conn *conn) | |||
735 | { | 735 | { |
736 | BT_DBG("conn %p", conn); | 736 | BT_DBG("conn %p", conn); |
737 | 737 | ||
738 | if (!test_and_set_bit(HCI_CONN_AUTH_PEND, &conn->pend)) { | 738 | if (!test_and_set_bit(HCI_CONN_AUTH_PEND, &conn->flags)) { |
739 | struct hci_cp_change_conn_link_key cp; | 739 | struct hci_cp_change_conn_link_key cp; |
740 | cp.handle = cpu_to_le16(conn->handle); | 740 | cp.handle = cpu_to_le16(conn->handle); |
741 | hci_send_cmd(conn->hdev, HCI_OP_CHANGE_CONN_LINK_KEY, | 741 | hci_send_cmd(conn->hdev, HCI_OP_CHANGE_CONN_LINK_KEY, |
@@ -754,7 +754,7 @@ int hci_conn_switch_role(struct hci_conn *conn, __u8 role) | |||
754 | if (!role && conn->link_mode & HCI_LM_MASTER) | 754 | if (!role && conn->link_mode & HCI_LM_MASTER) |
755 | return 1; | 755 | return 1; |
756 | 756 | ||
757 | if (!test_and_set_bit(HCI_CONN_RSWITCH_PEND, &conn->pend)) { | 757 | if (!test_and_set_bit(HCI_CONN_RSWITCH_PEND, &conn->flags)) { |
758 | struct hci_cp_switch_role cp; | 758 | struct hci_cp_switch_role cp; |
759 | bacpy(&cp.bdaddr, &conn->dst); | 759 | bacpy(&cp.bdaddr, &conn->dst); |
760 | cp.role = role; | 760 | cp.role = role; |
@@ -781,7 +781,7 @@ void hci_conn_enter_active_mode(struct hci_conn *conn, __u8 force_active) | |||
781 | if (!conn->power_save && !force_active) | 781 | if (!conn->power_save && !force_active) |
782 | goto timer; | 782 | goto timer; |
783 | 783 | ||
784 | if (!test_and_set_bit(HCI_CONN_MODE_CHANGE_PEND, &conn->pend)) { | 784 | if (!test_and_set_bit(HCI_CONN_MODE_CHANGE_PEND, &conn->flags)) { |
785 | struct hci_cp_exit_sniff_mode cp; | 785 | struct hci_cp_exit_sniff_mode cp; |
786 | cp.handle = cpu_to_le16(conn->handle); | 786 | cp.handle = cpu_to_le16(conn->handle); |
787 | hci_send_cmd(hdev, HCI_OP_EXIT_SNIFF_MODE, sizeof(cp), &cp); | 787 | hci_send_cmd(hdev, HCI_OP_EXIT_SNIFF_MODE, sizeof(cp), &cp); |