Commit 04124681 authored by Gustavo F. Padovan's avatar Gustavo F. Padovan

Bluetooth: fix conding style issues all over the tree

Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
parent f64b993f
...@@ -415,7 +415,8 @@ void btmrvl_debugfs_init(struct hci_dev *hdev) ...@@ -415,7 +415,8 @@ void btmrvl_debugfs_init(struct hci_dev *hdev)
dbg->status_dir = debugfs_create_dir("status", hdev->debugfs); dbg->status_dir = debugfs_create_dir("status", hdev->debugfs);
dbg->curpsmode = debugfs_create_file("curpsmode", 0444, dbg->curpsmode = debugfs_create_file("curpsmode", 0444,
dbg->status_dir, priv, &btmrvl_curpsmode_fops); dbg->status_dir, priv,
&btmrvl_curpsmode_fops);
dbg->psstate = debugfs_create_file("psstate", 0444, dbg->status_dir, dbg->psstate = debugfs_create_file("psstate", 0444, dbg->status_dir,
priv, &btmrvl_psstate_fops); priv, &btmrvl_psstate_fops);
dbg->hsstate = debugfs_create_file("hsstate", 0444, dbg->status_dir, dbg->hsstate = debugfs_create_file("hsstate", 0444, dbg->status_dir,
......
...@@ -672,8 +672,8 @@ int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key, ...@@ -672,8 +672,8 @@ int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key,
bdaddr_t *bdaddr, u8 *val, u8 type, u8 pin_len); bdaddr_t *bdaddr, u8 *val, u8 type, u8 pin_len);
struct smp_ltk *hci_find_ltk(struct hci_dev *hdev, __le16 ediv, u8 rand[8]); struct smp_ltk *hci_find_ltk(struct hci_dev *hdev, __le16 ediv, u8 rand[8]);
int hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 addr_type, u8 type, int hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 addr_type, u8 type,
int new_key, u8 authenticated, u8 tk[16], int new_key, u8 authenticated, u8 tk[16], u8 enc_size, u16 ediv,
u8 enc_size, u16 ediv, u8 rand[8]); u8 rand[8]);
struct smp_ltk *hci_find_ltk_by_addr(struct hci_dev *hdev, bdaddr_t *bdaddr, struct smp_ltk *hci_find_ltk_by_addr(struct hci_dev *hdev, bdaddr_t *bdaddr,
u8 addr_type); u8 addr_type);
int hci_remove_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr); int hci_remove_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr);
...@@ -980,8 +980,8 @@ int mgmt_write_scan_failed(struct hci_dev *hdev, u8 scan, u8 status); ...@@ -980,8 +980,8 @@ int mgmt_write_scan_failed(struct hci_dev *hdev, u8 scan, u8 status);
int mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key, int mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key,
u8 persistent); u8 persistent);
int mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, int mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
u8 addr_type, u32 flags, u8 *name, u8 addr_type, u32 flags, u8 *name, u8 name_len,
u8 name_len, u8 *dev_class); u8 *dev_class);
int mgmt_device_disconnected(struct hci_dev *hdev, bdaddr_t *bdaddr, int mgmt_device_disconnected(struct hci_dev *hdev, bdaddr_t *bdaddr,
u8 link_type, u8 addr_type); u8 link_type, u8 addr_type);
int mgmt_disconnect_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, int mgmt_disconnect_failed(struct hci_dev *hdev, bdaddr_t *bdaddr,
...@@ -1017,9 +1017,8 @@ int mgmt_read_local_oob_data_reply_complete(struct hci_dev *hdev, u8 *hash, ...@@ -1017,9 +1017,8 @@ int mgmt_read_local_oob_data_reply_complete(struct hci_dev *hdev, u8 *hash,
u8 *randomizer, u8 status); u8 *randomizer, u8 status);
int mgmt_le_enable_complete(struct hci_dev *hdev, u8 enable, u8 status); int mgmt_le_enable_complete(struct hci_dev *hdev, u8 enable, u8 status);
int mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, int mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
u8 addr_type, u8 *dev_class, s8 rssi, u8 addr_type, u8 *dev_class, s8 rssi, u8 cfm_name,
u8 cfm_name, u8 ssp, u8 *eir, u8 ssp, u8 *eir, u16 eir_len);
u16 eir_len);
int mgmt_remote_name(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, int mgmt_remote_name(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
u8 addr_type, s8 rssi, u8 *name, u8 name_len); u8 addr_type, s8 rssi, u8 *name, u8 name_len);
int mgmt_start_discovery_failed(struct hci_dev *hdev, u8 status); int mgmt_start_discovery_failed(struct hci_dev *hdev, u8 status);
......
...@@ -1333,8 +1333,8 @@ int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key, ...@@ -1333,8 +1333,8 @@ int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key,
} }
int hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 addr_type, u8 type, int hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 addr_type, u8 type,
int new_key, u8 authenticated, u8 tk[16], int new_key, u8 authenticated, u8 tk[16], u8 enc_size, u16
u8 enc_size, u16 ediv, u8 rand[8]) ediv, u8 rand[8])
{ {
struct smp_ltk *key, *old_key; struct smp_ltk *key, *old_key;
...@@ -1476,8 +1476,7 @@ int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 *hash, ...@@ -1476,8 +1476,7 @@ int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 *hash,
return 0; return 0;
} }
struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev, struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr)
bdaddr_t *bdaddr)
{ {
struct bdaddr_list *b; struct bdaddr_list *b;
...@@ -1588,11 +1587,7 @@ static inline int is_connectable_adv(u8 evt_type) ...@@ -1588,11 +1587,7 @@ static inline int is_connectable_adv(u8 evt_type)
} }
int hci_add_adv_entry(struct hci_dev *hdev, int hci_add_adv_entry(struct hci_dev *hdev,
struct hci_ev_le_advertising_info *ev) struct hci_ev_le_advertising_info *ev) { struct adv_entry *entry; if (!is_connectable_adv(ev->evt_type))
{
struct adv_entry *entry;
if (!is_connectable_adv(ev->evt_type))
return -EINVAL; return -EINVAL;
/* Only new entries should be added to adv_entries. So, if /* Only new entries should be added to adv_entries. So, if
...@@ -1692,8 +1687,8 @@ static void le_scan_work(struct work_struct *work) ...@@ -1692,8 +1687,8 @@ static void le_scan_work(struct work_struct *work)
BT_DBG("%s", hdev->name); BT_DBG("%s", hdev->name);
hci_do_le_scan(hdev, param->type, param->interval, hci_do_le_scan(hdev, param->type, param->interval, param->window,
param->window, param->timeout); param->timeout);
} }
int hci_le_scan(struct hci_dev *hdev, u8 type, u16 interval, u16 window, int hci_le_scan(struct hci_dev *hdev, u8 type, u16 interval, u16 window,
......
...@@ -577,14 +577,14 @@ static void hci_setup(struct hci_dev *hdev) ...@@ -577,14 +577,14 @@ static void hci_setup(struct hci_dev *hdev)
struct hci_cp_read_local_ext_features cp; struct hci_cp_read_local_ext_features cp;
cp.page = 0x01; cp.page = 0x01;
hci_send_cmd(hdev, HCI_OP_READ_LOCAL_EXT_FEATURES, hci_send_cmd(hdev, HCI_OP_READ_LOCAL_EXT_FEATURES, sizeof(cp),
sizeof(cp), &cp); &cp);
} }
if (test_bit(HCI_LINK_SECURITY, &hdev->dev_flags)) { if (test_bit(HCI_LINK_SECURITY, &hdev->dev_flags)) {
u8 enable = 1; u8 enable = 1;
hci_send_cmd(hdev, HCI_OP_WRITE_AUTH_ENABLE, hci_send_cmd(hdev, HCI_OP_WRITE_AUTH_ENABLE, sizeof(enable),
sizeof(enable), &enable); &enable);
} }
} }
...@@ -628,8 +628,8 @@ static void hci_setup_link_policy(struct hci_dev *hdev) ...@@ -628,8 +628,8 @@ static void hci_setup_link_policy(struct hci_dev *hdev)
link_policy |= HCI_LP_PARK; link_policy |= HCI_LP_PARK;
link_policy = cpu_to_le16(link_policy); link_policy = cpu_to_le16(link_policy);
hci_send_cmd(hdev, HCI_OP_WRITE_DEF_LINK_POLICY, hci_send_cmd(hdev, HCI_OP_WRITE_DEF_LINK_POLICY, sizeof(link_policy),
sizeof(link_policy), &link_policy); &link_policy);
} }
static void hci_cc_read_local_commands(struct hci_dev *hdev, struct sk_buff *skb) static void hci_cc_read_local_commands(struct hci_dev *hdev, struct sk_buff *skb)
...@@ -717,8 +717,8 @@ static void hci_set_le_support(struct hci_dev *hdev) ...@@ -717,8 +717,8 @@ static void hci_set_le_support(struct hci_dev *hdev)
} }
if (cp.le != !!(hdev->host_features[0] & LMP_HOST_LE)) if (cp.le != !!(hdev->host_features[0] & LMP_HOST_LE))
hci_send_cmd(hdev, HCI_OP_WRITE_LE_HOST_SUPPORTED, hci_send_cmd(hdev, HCI_OP_WRITE_LE_HOST_SUPPORTED, sizeof(cp),
sizeof(cp), &cp); &cp);
} }
static void hci_cc_read_local_ext_features(struct hci_dev *hdev, static void hci_cc_read_local_ext_features(struct hci_dev *hdev,
...@@ -976,8 +976,8 @@ static void hci_cc_user_confirm_reply(struct hci_dev *hdev, struct sk_buff *skb) ...@@ -976,8 +976,8 @@ static void hci_cc_user_confirm_reply(struct hci_dev *hdev, struct sk_buff *skb)
hci_dev_lock(hdev); hci_dev_lock(hdev);
if (test_bit(HCI_MGMT, &hdev->dev_flags)) if (test_bit(HCI_MGMT, &hdev->dev_flags))
mgmt_user_confirm_reply_complete(hdev, &rp->bdaddr, ACL_LINK, mgmt_user_confirm_reply_complete(hdev, &rp->bdaddr, ACL_LINK, 0,
0, rp->status); rp->status);
hci_dev_unlock(hdev); hci_dev_unlock(hdev);
} }
...@@ -993,8 +993,7 @@ static void hci_cc_user_confirm_neg_reply(struct hci_dev *hdev, ...@@ -993,8 +993,7 @@ static void hci_cc_user_confirm_neg_reply(struct hci_dev *hdev,
if (test_bit(HCI_MGMT, &hdev->dev_flags)) if (test_bit(HCI_MGMT, &hdev->dev_flags))
mgmt_user_confirm_neg_reply_complete(hdev, &rp->bdaddr, mgmt_user_confirm_neg_reply_complete(hdev, &rp->bdaddr,
ACL_LINK, 0, ACL_LINK, 0, rp->status);
rp->status);
hci_dev_unlock(hdev); hci_dev_unlock(hdev);
} }
...@@ -1025,8 +1024,7 @@ static void hci_cc_user_passkey_neg_reply(struct hci_dev *hdev, ...@@ -1025,8 +1024,7 @@ static void hci_cc_user_passkey_neg_reply(struct hci_dev *hdev,
if (test_bit(HCI_MGMT, &hdev->dev_flags)) if (test_bit(HCI_MGMT, &hdev->dev_flags))
mgmt_user_passkey_neg_reply_complete(hdev, &rp->bdaddr, mgmt_user_passkey_neg_reply_complete(hdev, &rp->bdaddr,
ACL_LINK, 0, ACL_LINK, 0, rp->status);
rp->status);
hci_dev_unlock(hdev); hci_dev_unlock(hdev);
} }
...@@ -1375,8 +1373,8 @@ static void hci_check_pending_name(struct hci_dev *hdev, struct hci_conn *conn, ...@@ -1375,8 +1373,8 @@ static void hci_check_pending_name(struct hci_dev *hdev, struct hci_conn *conn,
struct inquiry_entry *e; struct inquiry_entry *e;
if (conn && !test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) if (conn && !test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags))
mgmt_device_connected(hdev, bdaddr, ACL_LINK, 0x00, 0, mgmt_device_connected(hdev, bdaddr, ACL_LINK, 0x00, 0, name,
name, name_len, conn->dev_class); name_len, conn->dev_class);
if (discov->state == DISCOVERY_STOPPED) if (discov->state == DISCOVERY_STOPPED)
return; return;
...@@ -1718,8 +1716,8 @@ static inline void hci_inquiry_result_evt(struct hci_dev *hdev, struct sk_buff * ...@@ -1718,8 +1716,8 @@ static inline void hci_inquiry_result_evt(struct hci_dev *hdev, struct sk_buff *
name_known = hci_inquiry_cache_update(hdev, &data, false, &ssp); name_known = hci_inquiry_cache_update(hdev, &data, false, &ssp);
mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00, mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00,
info->dev_class, 0, !name_known, ssp, info->dev_class, 0, !name_known, ssp, NULL,
NULL, 0); 0);
} }
hci_dev_unlock(hdev); hci_dev_unlock(hdev);
...@@ -1778,8 +1776,8 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s ...@@ -1778,8 +1776,8 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s
struct hci_cp_change_conn_ptype cp; struct hci_cp_change_conn_ptype cp;
cp.handle = ev->handle; cp.handle = ev->handle;
cp.pkt_type = cpu_to_le16(conn->pkt_type); cp.pkt_type = cpu_to_le16(conn->pkt_type);
hci_send_cmd(hdev, HCI_OP_CHANGE_CONN_PTYPE, hci_send_cmd(hdev, HCI_OP_CHANGE_CONN_PTYPE, sizeof(cp),
sizeof(cp), &cp); &cp);
} }
} else { } else {
conn->state = BT_CLOSED; conn->state = BT_CLOSED;
...@@ -1850,8 +1848,8 @@ static inline void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *sk ...@@ -1850,8 +1848,8 @@ static inline void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *sk
else else
cp.role = 0x01; /* Remain slave */ cp.role = 0x01; /* Remain slave */
hci_send_cmd(hdev, HCI_OP_ACCEPT_CONN_REQ, hci_send_cmd(hdev, HCI_OP_ACCEPT_CONN_REQ, sizeof(cp),
sizeof(cp), &cp); &cp);
} else { } else {
struct hci_cp_accept_sync_conn_req cp; struct hci_cp_accept_sync_conn_req cp;
...@@ -2994,9 +2992,8 @@ static inline void hci_extended_inquiry_result_evt(struct hci_dev *hdev, struct ...@@ -2994,9 +2992,8 @@ static inline void hci_extended_inquiry_result_evt(struct hci_dev *hdev, struct
name_known = hci_inquiry_cache_update(hdev, &data, name_known, name_known = hci_inquiry_cache_update(hdev, &data, name_known,
&ssp); &ssp);
mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00, mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00,
info->dev_class, info->rssi, info->dev_class, info->rssi, !name_known,
!name_known, ssp, info->data, ssp, info->data, sizeof(info->data));
sizeof(info->data));
} }
hci_dev_unlock(hdev); hci_dev_unlock(hdev);
...@@ -3320,8 +3317,7 @@ static inline void hci_le_adv_report_evt(struct hci_dev *hdev, ...@@ -3320,8 +3317,7 @@ static inline void hci_le_adv_report_evt(struct hci_dev *hdev,
rssi = ev->data[ev->length]; rssi = ev->data[ev->length];
mgmt_device_found(hdev, &ev->bdaddr, LE_LINK, ev->bdaddr_type, mgmt_device_found(hdev, &ev->bdaddr, LE_LINK, ev->bdaddr_type,
NULL, rssi, 0, 1, ev->data, NULL, rssi, 0, 1, ev->data, ev->length);
ev->length);
ptr += sizeof(*ev) + ev->length + 1; ptr += sizeof(*ev) + ev->length + 1;
} }
......
...@@ -1546,7 +1546,9 @@ static void l2cap_send_srejtail(struct l2cap_chan *chan) ...@@ -1546,7 +1546,9 @@ static void l2cap_send_srejtail(struct l2cap_chan *chan)
l2cap_send_sframe(chan, control); l2cap_send_sframe(chan, control);
} }
static inline int l2cap_skbuff_fromiovec(struct l2cap_chan *chan, struct msghdr *msg, int len, int count, struct sk_buff *skb) static inline int l2cap_skbuff_fromiovec(struct l2cap_chan *chan,
struct msghdr *msg, int len,
int count, struct sk_buff *skb)
{ {
struct l2cap_conn *conn = chan->conn; struct l2cap_conn *conn = chan->conn;
struct sk_buff **frag; struct sk_buff **frag;
...@@ -1564,7 +1566,8 @@ static inline int l2cap_skbuff_fromiovec(struct l2cap_chan *chan, struct msghdr ...@@ -1564,7 +1566,8 @@ static inline int l2cap_skbuff_fromiovec(struct l2cap_chan *chan, struct msghdr
count = min_t(unsigned int, conn->mtu, len); count = min_t(unsigned int, conn->mtu, len);
*frag = chan->ops->alloc_skb(chan, count, *frag = chan->ops->alloc_skb(chan, count,
msg->msg_flags & MSG_DONTWAIT, &err); msg->msg_flags & MSG_DONTWAIT,
&err);
if (!*frag) if (!*frag)
return err; return err;
......
...@@ -926,7 +926,8 @@ static void l2cap_sock_state_change_cb(void *data, int state) ...@@ -926,7 +926,8 @@ static void l2cap_sock_state_change_cb(void *data, int state)
} }
static struct sk_buff *l2cap_sock_alloc_skb_cb(struct l2cap_chan *chan, static struct sk_buff *l2cap_sock_alloc_skb_cb(struct l2cap_chan *chan,
unsigned long len, int nb, int *err) unsigned long len, int nb,
int *err)
{ {
struct sock *sk = chan->sk; struct sock *sk = chan->sk;
......
...@@ -267,8 +267,8 @@ static int cmd_complete(struct sock *sk, u16 index, u16 cmd, u8 status, ...@@ -267,8 +267,8 @@ static int cmd_complete(struct sock *sk, u16 index, u16 cmd, u8 status,
return err; return err;
} }
static int read_version(struct sock *sk, struct hci_dev *hdev, static int read_version(struct sock *sk, struct hci_dev *hdev, void *data,
void *data, u16 data_len) u16 data_len)
{ {
struct mgmt_rp_read_version rp; struct mgmt_rp_read_version rp;
...@@ -281,8 +281,8 @@ static int read_version(struct sock *sk, struct hci_dev *hdev, ...@@ -281,8 +281,8 @@ static int read_version(struct sock *sk, struct hci_dev *hdev,
sizeof(rp)); sizeof(rp));
} }
static int read_commands(struct sock *sk, struct hci_dev *hdev, static int read_commands(struct sock *sk, struct hci_dev *hdev, void *data,
void *data, u16 data_len) u16 data_len)
{ {
struct mgmt_rp_read_commands *rp; struct mgmt_rp_read_commands *rp;
u16 num_commands = ARRAY_SIZE(mgmt_commands); u16 num_commands = ARRAY_SIZE(mgmt_commands);
...@@ -315,8 +315,8 @@ static int read_commands(struct sock *sk, struct hci_dev *hdev, ...@@ -315,8 +315,8 @@ static int read_commands(struct sock *sk, struct hci_dev *hdev,
return err; return err;
} }
static int read_index_list(struct sock *sk, struct hci_dev *hdev, static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data,
void *data, u16 data_len) u16 data_len)
{ {
struct mgmt_rp_read_index_list *rp; struct mgmt_rp_read_index_list *rp;
struct list_head *p; struct list_head *p;
...@@ -667,8 +667,8 @@ static void mgmt_pending_free(struct pending_cmd *cmd) ...@@ -667,8 +667,8 @@ static void mgmt_pending_free(struct pending_cmd *cmd)
} }
static struct pending_cmd *mgmt_pending_add(struct sock *sk, u16 opcode, static struct pending_cmd *mgmt_pending_add(struct sock *sk, u16 opcode,
struct hci_dev *hdev, struct hci_dev *hdev, void *data,
void *data, u16 len) u16 len)
{ {
struct pending_cmd *cmd; struct pending_cmd *cmd;
...@@ -790,8 +790,8 @@ static int set_powered(struct sock *sk, struct hci_dev *hdev, void *data, ...@@ -790,8 +790,8 @@ static int set_powered(struct sock *sk, struct hci_dev *hdev, void *data,
return err; return err;
} }
static int mgmt_event(u16 event, struct hci_dev *hdev, void *data, static int mgmt_event(u16 event, struct hci_dev *hdev, void *data, u16 data_len,
u16 data_len, struct sock *skip_sk) struct sock *skip_sk)
{ {
struct sk_buff *skb; struct sk_buff *skb;
struct mgmt_hdr *hdr; struct mgmt_hdr *hdr;
...@@ -1023,8 +1023,8 @@ static int set_pairable(struct sock *sk, struct hci_dev *hdev, void *data, ...@@ -1023,8 +1023,8 @@ static int set_pairable(struct sock *sk, struct hci_dev *hdev, void *data,
return err; return err;
} }
static int set_link_security(struct sock *sk, struct hci_dev *hdev, static int set_link_security(struct sock *sk, struct hci_dev *hdev, void *data,
void *data, u16 len) u16 len)
{ {
struct mgmt_mode *cp = data; struct mgmt_mode *cp = data;
struct pending_cmd *cmd; struct pending_cmd *cmd;
...@@ -1225,8 +1225,8 @@ static int set_le(struct sock *sk, struct hci_dev *hdev, void *data, u16 len) ...@@ -1225,8 +1225,8 @@ static int set_le(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
hci_cp.simul = !!(hdev->features[6] & LMP_SIMUL_LE_BR); hci_cp.simul = !!(hdev->features[6] & LMP_SIMUL_LE_BR);
} }
err = hci_send_cmd(hdev, HCI_OP_WRITE_LE_HOST_SUPPORTED, err = hci_send_cmd(hdev, HCI_OP_WRITE_LE_HOST_SUPPORTED, sizeof(hci_cp),
sizeof(hci_cp), &hci_cp); &hci_cp);
if (err < 0) { if (err < 0) {
mgmt_pending_remove(cmd); mgmt_pending_remove(cmd);
goto unlock; goto unlock;
...@@ -1508,8 +1508,7 @@ static int unpair_device(struct sock *sk, struct hci_dev *hdev, void *data, ...@@ -1508,8 +1508,7 @@ static int unpair_device(struct sock *sk, struct hci_dev *hdev, void *data,
if (!hdev_is_powered(hdev)) { if (!hdev_is_powered(hdev)) {
err = cmd_complete(sk, hdev->id, MGMT_OP_UNPAIR_DEVICE, err = cmd_complete(sk, hdev->id, MGMT_OP_UNPAIR_DEVICE,
MGMT_STATUS_NOT_POWERED, MGMT_STATUS_NOT_POWERED, &rp, sizeof(rp));
&rp, sizeof(rp));
goto unlock; goto unlock;
} }
...@@ -1520,8 +1519,7 @@ static int unpair_device(struct sock *sk, struct hci_dev *hdev, void *data, ...@@ -1520,8 +1519,7 @@ static int unpair_device(struct sock *sk, struct hci_dev *hdev, void *data,
if (err < 0) { if (err < 0) {
err = cmd_complete(sk, hdev->id, MGMT_OP_UNPAIR_DEVICE, err = cmd_complete(sk, hdev->id, MGMT_OP_UNPAIR_DEVICE,
MGMT_STATUS_NOT_PAIRED, MGMT_STATUS_NOT_PAIRED, &rp, sizeof(rp));
&rp, sizeof(rp));
goto unlock; goto unlock;
} }
...@@ -1634,8 +1632,8 @@ static u8 link_to_mgmt(u8 link_type, u8 addr_type) ...@@ -1634,8 +1632,8 @@ static u8 link_to_mgmt(u8 link_type, u8 addr_type)
} }
} }
static int get_connections(struct sock *sk, struct hci_dev *hdev, static int get_connections(struct sock *sk, struct hci_dev *hdev, void *data,
void *data, u16 data_len) u16 data_len)
{ {
struct mgmt_rp_get_connections *rp; struct mgmt_rp_get_connections *rp;
struct hci_conn *c; struct hci_conn *c;
...@@ -1794,8 +1792,8 @@ static int pin_code_neg_reply(struct sock *sk, struct hci_dev *hdev, ...@@ -1794,8 +1792,8 @@ static int pin_code_neg_reply(struct sock *sk, struct hci_dev *hdev,
return err; return err;
} }
static int set_io_capability(struct sock *sk, struct hci_dev *hdev, static int set_io_capability(struct sock *sk, struct hci_dev *hdev, void *data,
void *data, u16 len) u16 len)
{ {
struct mgmt_cp_set_io_capability *cp = data; struct mgmt_cp_set_io_capability *cp = data;
...@@ -1810,8 +1808,8 @@ static int set_io_capability(struct sock *sk, struct hci_dev *hdev, ...@@ -1810,8 +1808,8 @@ static int set_io_capability(struct sock *sk, struct hci_dev *hdev,
hci_dev_unlock(hdev); hci_dev_unlock(hdev);
return cmd_complete(sk, hdev->id, MGMT_OP_SET_IO_CAPABILITY, 0, return cmd_complete(sk, hdev->id, MGMT_OP_SET_IO_CAPABILITY, 0, NULL,
NULL, 0); 0);
} }
static inline struct pending_cmd *find_pairing(struct hci_conn *conn) static inline struct pending_cmd *find_pairing(struct hci_conn *conn)
...@@ -1905,8 +1903,8 @@ static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data, ...@@ -1905,8 +1903,8 @@ static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data,
if (IS_ERR(conn)) { if (IS_ERR(conn)) {
err = cmd_complete(sk, hdev->id, MGMT_OP_PAIR_DEVICE, err = cmd_complete(sk, hdev->id, MGMT_OP_PAIR_DEVICE,
MGMT_STATUS_CONNECT_FAILED, MGMT_STATUS_CONNECT_FAILED, &rp,
&rp, sizeof(rp)); sizeof(rp));
goto unlock; goto unlock;
} }
...@@ -1944,8 +1942,8 @@ static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data, ...@@ -1944,8 +1942,8 @@ static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data,
return err; return err;
} }
static int cancel_pair_device(struct sock *sk, struct hci_dev *hdev, static int cancel_pair_device(struct sock *sk, struct hci_dev *hdev, void *data,
void *data, u16 len) u16 len)
{ {
struct mgmt_addr_info *addr = data; struct mgmt_addr_info *addr = data;
struct pending_cmd *cmd; struct pending_cmd *cmd;
...@@ -2051,8 +2049,8 @@ static int user_pairing_resp(struct sock *sk, struct hci_dev *hdev, ...@@ -2051,8 +2049,8 @@ static int user_pairing_resp(struct sock *sk, struct hci_dev *hdev,
return err; return err;
} }
static int user_confirm_reply(struct sock *sk, struct hci_dev *hdev, static int user_confirm_reply(struct sock *sk, struct hci_dev *hdev, void *data,
void *data, u16 len) u16 len)
{ {
struct mgmt_cp_user_confirm_reply *cp = data; struct mgmt_cp_user_confirm_reply *cp = data;
...@@ -2079,8 +2077,8 @@ static int user_confirm_neg_reply(struct sock *sk, struct hci_dev *hdev, ...@@ -2079,8 +2077,8 @@ static int user_confirm_neg_reply(struct sock *sk, struct hci_dev *hdev,
HCI_OP_USER_CONFIRM_NEG_REPLY, 0); HCI_OP_USER_CONFIRM_NEG_REPLY, 0);
} }
static int user_passkey_reply(struct sock *sk, struct hci_dev *hdev, static int user_passkey_reply(struct sock *sk, struct hci_dev *hdev, void *data,
void *data, u16 len) u16 len)
{ {
struct mgmt_cp_user_passkey_reply *cp = data; struct mgmt_cp_user_passkey_reply *cp = data;
...@@ -2088,8 +2086,7 @@ static int user_passkey_reply(struct sock *sk, struct hci_dev *hdev, ...@@ -2088,8 +2086,7 @@ static int user_passkey_reply(struct sock *sk, struct hci_dev *hdev,
return user_pairing_resp(sk, hdev, &cp->addr.bdaddr, cp->addr.type, return user_pairing_resp(sk, hdev, &cp->addr.bdaddr, cp->addr.type,
MGMT_OP_USER_PASSKEY_REPLY, MGMT_OP_USER_PASSKEY_REPLY,
HCI_OP_USER_PASSKEY_REPLY, HCI_OP_USER_PASSKEY_REPLY, cp->passkey);
cp->passkey);
} }
static int user_passkey_neg_reply(struct sock *sk, struct hci_dev *hdev, static int user_passkey_neg_reply(struct sock *sk, struct hci_dev *hdev,
...@@ -2211,8 +2208,8 @@ static int add_remote_oob_data(struct sock *sk, struct hci_dev *hdev, ...@@ -2211,8 +2208,8 @@ static int add_remote_oob_data(struct sock *sk, struct hci_dev *hdev,
if (!hdev_is_powered(hdev)) { if (!hdev_is_powered(hdev)) {
err = cmd_complete(sk, hdev->id, MGMT_OP_ADD_REMOTE_OOB_DATA, err = cmd_complete(sk, hdev->id, MGMT_OP_ADD_REMOTE_OOB_DATA,
MGMT_STATUS_NOT_POWERED, MGMT_STATUS_NOT_POWERED, &cp->addr,
&cp->addr, sizeof(cp->addr)); sizeof(cp->addr));
goto unlock; goto unlock;
} }
...@@ -2245,8 +2242,8 @@ static int remove_remote_oob_data(struct sock *sk, struct hci_dev *hdev, ...@@ -2245,8 +2242,8 @@ static int remove_remote_oob_data(struct sock *sk, struct hci_dev *hdev,
if (!hdev_is_powered(hdev)) { if (!hdev_is_powered(hdev)) {
err = cmd_complete(sk, hdev->id, err = cmd_complete(sk, hdev->id,
MGMT_OP_REMOVE_REMOTE_OOB_DATA, MGMT_OP_REMOVE_REMOTE_OOB_DATA,
MGMT_STATUS_NOT_POWERED, MGMT_STATUS_NOT_POWERED, &cp->addr,
&cp->addr, sizeof(cp->addr)); sizeof(cp->addr));
goto unlock; goto unlock;
} }
...@@ -2331,7 +2328,8 @@ static int start_discovery(struct sock *sk, struct hci_dev *hdev, ...@@ -2331,7 +2328,8 @@ static int start_discovery(struct sock *sk, struct hci_dev *hdev,
case DISCOV_TYPE_INTERLEAVED: case DISCOV_TYPE_INTERLEAVED:
if (lmp_host_le_capable(hdev) && lmp_bredr_capable(hdev)) if (lmp_host_le_capable(hdev) && lmp_bredr_capable(hdev))
err = hci_le_scan(hdev, LE_SCAN_TYPE, LE_SCAN_INT, err = hci_le_scan(hdev, LE_SCAN_TYPE, LE_SCAN_INT,
LE_SCAN_WIN, LE_SCAN_TIMEOUT_BREDR_LE); LE_SCAN_WIN,
LE_SCAN_TIMEOUT_BREDR_LE);
else else
err = -ENOTSUPP; err = -ENOTSUPP;
break; break;
...@@ -2365,15 +2363,15 @@ static int stop_discovery(struct sock *sk, struct hci_dev *hdev, void *data, ...@@ -2365,15 +2363,15 @@ static int stop_discovery(struct sock *sk, struct hci_dev *hdev, void *data,
if (!hci_discovery_active(hdev)) { if (!hci_discovery_active(hdev)) {
err = cmd_complete(sk, hdev->id, MGMT_OP_STOP_DISCOVERY, err = cmd_complete(sk, hdev->id, MGMT_OP_STOP_DISCOVERY,
MGMT_STATUS_REJECTED, MGMT_STATUS_REJECTED, &mgmt_cp->type,
&mgmt_cp->type, sizeof(mgmt_cp->type)); sizeof(mgmt_cp->type));
goto unlock; goto unlock;
} }
if (hdev->discovery.type != mgmt_cp->type) { if (hdev->discovery.type != mgmt_cp->type) {
err = cmd_complete(sk, hdev->id, MGMT_OP_STOP_DISCOVERY, err = cmd_complete(sk, hdev->id, MGMT_OP_STOP_DISCOVERY,
MGMT_STATUS_INVALID_PARAMS, MGMT_STATUS_INVALID_PARAMS, &mgmt_cp->type,
&mgmt_cp->type, sizeof(mgmt_cp->type)); sizeof(mgmt_cp->type));
goto unlock; goto unlock;
} }
...@@ -2402,8 +2400,8 @@ static int stop_discovery(struct sock *sk, struct hci_dev *hdev, void *data, ...@@ -2402,8 +2400,8 @@ static int stop_discovery(struct sock *sk, struct hci_dev *hdev, void *data,
} }
bacpy(&cp.bdaddr, &e->data.bdaddr); bacpy(&cp.bdaddr, &e->data.bdaddr);
err = hci_send_cmd(hdev, HCI_OP_REMOTE_NAME_REQ_CANCEL, err = hci_send_cmd(hdev, HCI_OP_REMOTE_NAME_REQ_CANCEL, sizeof(cp),
sizeof(cp), &cp); &cp);
if (err < 0) if (err < 0)
mgmt_pending_remove(cmd); mgmt_pending_remove(cmd);
else else
...@@ -2533,8 +2531,8 @@ static int set_fast_connectable(struct sock *sk, struct hci_dev *hdev, ...@@ -2533,8 +2531,8 @@ static int set_fast_connectable(struct sock *sk, struct hci_dev *hdev,
acp.window = 0x0012; /* default 11.25 msec page scan window */ acp.window = 0x0012; /* default 11.25 msec page scan window */
err = hci_send_cmd(hdev, HCI_OP_WRITE_PAGE_SCAN_ACTIVITY, err = hci_send_cmd(hdev, HCI_OP_WRITE_PAGE_SCAN_ACTIVITY, sizeof(acp),
sizeof(acp), &acp); &acp);
if (err < 0) { if (err < 0) {
err = cmd_status(sk, hdev->id, MGMT_OP_SET_FAST_CONNECTABLE, err = cmd_status(sk, hdev->id, MGMT_OP_SET_FAST_CONNECTABLE,
MGMT_STATUS_FAILED); MGMT_STATUS_FAILED);
...@@ -2599,8 +2597,8 @@ static int load_long_term_keys(struct sock *sk, struct hci_dev *hdev, ...@@ -2599,8 +2597,8 @@ static int load_long_term_keys(struct sock *sk, struct hci_dev *hdev,
} }
struct mgmt_handler { struct mgmt_handler {
int (*func) (struct sock *sk, struct hci_dev *hdev, int (*func) (struct sock *sk, struct hci_dev *hdev, void *data,
void *data, u16 data_len); u16 data_len);
bool var_len; bool var_len;
size_t data_len; size_t data_len;
} mgmt_handlers[] = { } mgmt_handlers[] = {
...@@ -2881,8 +2879,7 @@ int mgmt_write_scan_failed(struct hci_dev *hdev, u8 scan, u8 status) ...@@ -2881,8 +2879,7 @@ int mgmt_write_scan_failed(struct hci_dev *hdev, u8 scan, u8 status)
return 0; return 0;
} }
int mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key, int mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key, u8 persistent)
u8 persistent)
{ {
struct mgmt_ev_new_link_key ev; struct mgmt_ev_new_link_key ev;
...@@ -2917,13 +2914,13 @@ int mgmt_new_ltk(struct hci_dev *hdev, struct smp_ltk *key, u8 persistent) ...@@ -2917,13 +2914,13 @@ int mgmt_new_ltk(struct hci_dev *hdev, struct smp_ltk *key, u8 persistent)
memcpy(ev.key.rand, key->rand, sizeof(key->rand)); memcpy(ev.key.rand, key->rand, sizeof(key->rand));
memcpy(ev.key.val, key->val, sizeof(key->val)); memcpy(ev.key.val, key->val, sizeof(key->val));
return mgmt_event(MGMT_EV_NEW_LONG_TERM_KEY, hdev, return mgmt_event(MGMT_EV_NEW_LONG_TERM_KEY, hdev, &ev, sizeof(ev),
&ev, sizeof(ev), NULL); NULL);
} }
int mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, int mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
u8 addr_type, u32 flags, u8 *name, u8 addr_type, u32 flags, u8 *name, u8 name_len,
u8 name_len, u8 *dev_class) u8 *dev_class)
{ {
char buf[512]; char buf[512];
struct mgmt_ev_device_connected *ev = (void *) buf; struct mgmt_ev_device_connected *ev = (void *) buf;
...@@ -3252,8 +3249,8 @@ int mgmt_ssp_enable_complete(struct hci_dev *hdev, u8 enable, u8 status) ...@@ -3252,8 +3249,8 @@ int mgmt_ssp_enable_complete(struct hci_dev *hdev, u8 enable, u8 status)
&hdev->dev_flags)) &hdev->dev_flags))
err = new_settings(hdev, NULL); err = new_settings(hdev, NULL);
mgmt_pending_foreach(MGMT_OP_SET_SSP, hdev, mgmt_pending_foreach(MGMT_OP_SET_SSP, hdev, cmd_status_rsp,
cmd_status_rsp, &mgmt_err); &mgmt_err);
return err; return err;
} }
...@@ -3312,8 +3309,8 @@ int mgmt_set_class_of_dev_complete(struct hci_dev *hdev, u8 *dev_class, ...@@ -3312,8 +3309,8 @@ int mgmt_set_class_of_dev_complete(struct hci_dev *hdev, u8 *dev_class,
mgmt_pending_foreach(MGMT_OP_REMOVE_UUID, hdev, class_rsp, &match); mgmt_pending_foreach(MGMT_OP_REMOVE_UUID, hdev, class_rsp, &match);
if (!status) if (!status)
err = mgmt_event(MGMT_EV_CLASS_OF_DEV_CHANGED, hdev, err = mgmt_event(MGMT_EV_CLASS_OF_DEV_CHANGED, hdev, dev_class,
dev_class, 3, NULL); 3, NULL);
if (match.sk) if (match.sk)
sock_put(match.sk); sock_put(match.sk);
...@@ -3382,8 +3379,7 @@ int mgmt_read_local_oob_data_reply_complete(struct hci_dev *hdev, u8 *hash, ...@@ -3382,8 +3379,7 @@ int mgmt_read_local_oob_data_reply_complete(struct hci_dev *hdev, u8 *hash,
return -ENOENT; return -ENOENT;
if (status) { if (status) {
err = cmd_status(cmd->sk, hdev->id, err = cmd_status(cmd->sk, hdev->id, MGMT_OP_READ_LOCAL_OOB_DATA,
MGMT_OP_READ_LOCAL_OOB_DATA,
mgmt_status(status)); mgmt_status(status));
} else { } else {
struct mgmt_rp_read_local_oob_data rp; struct mgmt_rp_read_local_oob_data rp;
...@@ -3392,8 +3388,8 @@ int mgmt_read_local_oob_data_reply_complete(struct hci_dev *hdev, u8 *hash, ...@@ -3392,8 +3388,8 @@ int mgmt_read_local_oob_data_reply_complete(struct hci_dev *hdev, u8 *hash,
memcpy(rp.randomizer, randomizer, sizeof(rp.randomizer)); memcpy(rp.randomizer, randomizer, sizeof(rp.randomizer));
err = cmd_complete(cmd->sk, hdev->id, err = cmd_complete(cmd->sk, hdev->id,
MGMT_OP_READ_LOCAL_OOB_DATA, MGMT_OP_READ_LOCAL_OOB_DATA, 0, &rp,
0, &rp, sizeof(rp)); sizeof(rp));
} }
mgmt_pending_remove(cmd); mgmt_pending_remove(cmd);
...@@ -3440,8 +3436,8 @@ int mgmt_le_enable_complete(struct hci_dev *hdev, u8 enable, u8 status) ...@@ -3440,8 +3436,8 @@ int mgmt_le_enable_complete(struct hci_dev *hdev, u8 enable, u8 status)
} }
int mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, int mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
u8 addr_type, u8 *dev_class, s8 rssi, u8 addr_type, u8 *dev_class, s8 rssi, u8 cfm_name, u8
u8 cfm_name, u8 ssp, u8 *eir, u16 eir_len) ssp, u8 *eir, u16 eir_len)
{ {
char buf[512]; char buf[512];
struct mgmt_ev_device_found *ev = (void *) buf; struct mgmt_ev_device_found *ev = (void *) buf;
...@@ -3530,8 +3526,7 @@ int mgmt_stop_discovery_failed(struct hci_dev *hdev, u8 status) ...@@ -3530,8 +3526,7 @@ int mgmt_stop_discovery_failed(struct hci_dev *hdev, u8 status)
return -ENOENT; return -ENOENT;
err = cmd_complete(cmd->sk, hdev->id, cmd->opcode, mgmt_status(status), err = cmd_complete(cmd->sk, hdev->id, cmd->opcode, mgmt_status(status),
&hdev->discovery.type, &hdev->discovery.type, sizeof(hdev->discovery.type));
sizeof(hdev->discovery.type));
mgmt_pending_remove(cmd); mgmt_pending_remove(cmd);
return err; return err;
...@@ -3552,8 +3547,8 @@ int mgmt_discovering(struct hci_dev *hdev, u8 discovering) ...@@ -3552,8 +3547,8 @@ int mgmt_discovering(struct hci_dev *hdev, u8 discovering)
if (cmd != NULL) { if (cmd != NULL) {
u8 type = hdev->discovery.type; u8 type = hdev->discovery.type;
cmd_complete(cmd->sk, hdev->id, cmd->opcode, 0, cmd_complete(cmd->sk, hdev->id, cmd->opcode, 0, &type,
&type, sizeof(type)); sizeof(type));
mgmt_pending_remove(cmd); mgmt_pending_remove(cmd);
} }
......
...@@ -384,8 +384,7 @@ static void confirm_work(struct work_struct *work) ...@@ -384,8 +384,7 @@ static void confirm_work(struct work_struct *work)
if (conn->hcon->out) if (conn->hcon->out)
ret = smp_c1(tfm, smp->tk, smp->prnd, smp->preq, smp->prsp, 0, ret = smp_c1(tfm, smp->tk, smp->prnd, smp->preq, smp->prsp, 0,
conn->src, conn->hcon->dst_type, conn->dst, conn->src, conn->hcon->dst_type, conn->dst, res);
res);
else else
ret = smp_c1(tfm, smp->tk, smp->prnd, smp->preq, smp->prsp, ret = smp_c1(tfm, smp->tk, smp->prnd, smp->preq, smp->prsp,
conn->hcon->dst_type, conn->dst, 0, conn->src, conn->hcon->dst_type, conn->dst, 0, conn->src,
...@@ -424,12 +423,10 @@ static void random_work(struct work_struct *work) ...@@ -424,12 +423,10 @@ static void random_work(struct work_struct *work)
if (hcon->out) if (hcon->out)
ret = smp_c1(tfm, smp->tk, smp->rrnd, smp->preq, smp->prsp, 0, ret = smp_c1(tfm, smp->tk, smp->rrnd, smp->preq, smp->prsp, 0,
conn->src, hcon->dst_type, conn->dst, conn->src, hcon->dst_type, conn->dst, res);
res);
else else
ret = smp_c1(tfm, smp->tk, smp->rrnd, smp->preq, smp->prsp, ret = smp_c1(tfm, smp->tk, smp->rrnd, smp->preq, smp->prsp,
hcon->dst_type, conn->dst, 0, conn->src, hcon->dst_type, conn->dst, 0, conn->src, res);
res);
if (ret) { if (ret) {
reason = SMP_UNSPECIFIED; reason = SMP_UNSPECIFIED;
goto error; goto error;
...@@ -480,8 +477,8 @@ static void random_work(struct work_struct *work) ...@@ -480,8 +477,8 @@ static void random_work(struct work_struct *work)
SMP_MAX_ENC_KEY_SIZE - smp->enc_key_size); SMP_MAX_ENC_KEY_SIZE - smp->enc_key_size);
hci_add_ltk(hcon->hdev, conn->dst, hcon->dst_type, hci_add_ltk(hcon->hdev, conn->dst, hcon->dst_type,
HCI_SMP_STK_SLAVE, 0, 0, stk, HCI_SMP_STK_SLAVE, 0, 0, stk, smp->enc_key_size,
smp->enc_key_size, ediv, rand); ediv, rand);
} }
return; return;
...@@ -829,8 +826,8 @@ static int smp_cmd_master_ident(struct l2cap_conn *conn, struct sk_buff *skb) ...@@ -829,8 +826,8 @@ static int smp_cmd_master_ident(struct l2cap_conn *conn, struct sk_buff *skb)
hci_dev_lock(hdev); hci_dev_lock(hdev);
authenticated = (conn->hcon->sec_level == BT_SECURITY_HIGH); authenticated = (conn->hcon->sec_level == BT_SECURITY_HIGH);
hci_add_ltk(conn->hcon->hdev, conn->dst, hcon->dst_type, hci_add_ltk(conn->hcon->hdev, conn->dst, hcon->dst_type,
HCI_SMP_LTK, 1, authenticated, smp->tk, HCI_SMP_LTK, 1, authenticated, smp->tk, smp->enc_key_size,
smp->enc_key_size, rp->ediv, rp->rand); rp->ediv, rp->rand);
smp_distribute_keys(conn, 1); smp_distribute_keys(conn, 1);
hci_dev_unlock(hdev); hci_dev_unlock(hdev);
...@@ -955,8 +952,7 @@ int smp_distribute_keys(struct l2cap_conn *conn, __u8 force) ...@@ -955,8 +952,7 @@ int smp_distribute_keys(struct l2cap_conn *conn, __u8 force)
authenticated = hcon->sec_level == BT_SECURITY_HIGH; authenticated = hcon->sec_level == BT_SECURITY_HIGH;
hci_add_ltk(conn->hcon->hdev, conn->dst, hcon->dst_type, hci_add_ltk(conn->hcon->hdev, conn->dst, hcon->dst_type,
HCI_SMP_LTK_SLAVE, 1, authenticated, HCI_SMP_LTK_SLAVE, 1, authenticated,
enc.ltk, smp->enc_key_size, enc.ltk, smp->enc_key_size, ediv, ident.rand);
ediv, ident.rand);
ident.ediv = cpu_to_le16(ediv); ident.ediv = cpu_to_le16(ediv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment