Bluetooth: Add clarifying comment when setting local OOB flag
[deliverable/linux.git] / net / bluetooth / smp.c
index 82824213d0fbcebd0117ea2a340827c5086ba509..1bd281060de25578b4e7db9b7db6af9cc3715606 100644 (file)
@@ -1735,6 +1735,10 @@ static u8 smp_cmd_pairing_req(struct l2cap_conn *conn, struct sk_buff *skb)
        memcpy(&smp->preq[1], req, sizeof(*req));
        skb_pull(skb, sizeof(*req));
 
+       /* If the remote side's OOB flag is set it means it has
+        * successfully received our local OOB data - therefore set the
+        * flag to indicate that local OOB is in use.
+        */
        if (req->oob_flag == SMP_OOB_PRESENT)
                set_bit(SMP_FLAG_LOCAL_OOB, &smp->flags);
 
@@ -1902,6 +1906,10 @@ static u8 smp_cmd_pairing_rsp(struct l2cap_conn *conn, struct sk_buff *skb)
        if (hci_dev_test_flag(hdev, HCI_SC_ONLY) && !(auth & SMP_AUTH_SC))
                return SMP_AUTH_REQUIREMENTS;
 
+       /* If the remote side's OOB flag is set it means it has
+        * successfully received our local OOB data - therefore set the
+        * flag to indicate that local OOB is in use.
+        */
        if (rsp->oob_flag == SMP_OOB_PRESENT)
                set_bit(SMP_FLAG_LOCAL_OOB, &smp->flags);
 
This page took 0.03224 seconds and 5 git commands to generate.