Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266331
b: refs/heads/master
c: 8aab475
h: refs/heads/master
i:
  266329: 5a4c766
  266327: fc56d72
v: v3
  • Loading branch information
Vinicius Costa Gomes authored and Gustavo F. Padovan committed Sep 21, 2011
1 parent 1b84722 commit cf3ffab
Show file tree
Hide file tree
Showing 4 changed files with 186 additions and 104 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1c1def09c446aae441410b70e6439ffe44dee866
refs/heads/master: 8aab47574a7f5b46a4cdbc6fd820ab34e6c5dbf9
9 changes: 8 additions & 1 deletion trunk/include/net/bluetooth/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,25 @@ struct smp_cmd_security_req {
#define SMP_MAX_ENC_KEY_SIZE 16

struct smp_chan {
struct l2cap_conn *conn;
u8 preq[7]; /* SMP Pairing Request */
u8 prsp[7]; /* SMP Pairing Response */
u8 prnd[16]; /* SMP Pairing Random */
u8 prnd[16]; /* SMP Pairing Random (local) */
u8 rrnd[16]; /* SMP Pairing Random (remote) */
u8 pcnf[16]; /* SMP Pairing Confirm */
u8 tk[16]; /* SMP Temporary Key */
u8 smp_key_size;
struct crypto_blkcipher *tfm;
struct work_struct confirm;
struct work_struct random;

};

/* SMP Commands */
int smp_conn_security(struct l2cap_conn *conn, __u8 sec_level);
int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb);
int smp_distribute_keys(struct l2cap_conn *conn, __u8 force);

void smp_chan_destroy(struct l2cap_conn *conn);

#endif /* __SMP_H */
2 changes: 1 addition & 1 deletion trunk/net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err)

if (test_and_clear_bit(HCI_CONN_LE_SMP_PEND, &hcon->pend)) {
del_timer(&conn->security_timer);
hci_conn_put(hcon);
smp_chan_destroy(conn);
}

hcon->l2cap_data = NULL;
Expand Down
Loading

0 comments on commit cf3ffab

Please sign in to comment.