Loading drivers/bluetooth/btmrvl_debugfs.c +12 −11 Original line number Original line Diff line number Diff line Loading @@ -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, Loading include/net/bluetooth/hci_core.h +33 −34 Original line number Original line Diff line number Diff line Loading @@ -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); Loading Loading @@ -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, Loading Loading @@ -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); Loading net/bluetooth/hci_core.c +22 −27 Original line number Original line Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; Loading Loading @@ -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 Loading Loading @@ -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, Loading net/bluetooth/hci_event.c +53 −57 Original line number Original line Diff line number Diff line Loading @@ -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); } } } } Loading Loading @@ -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) Loading Loading @@ -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, Loading Loading @@ -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); } } Loading @@ -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); } } Loading Loading @@ -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); } } Loading Loading @@ -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; Loading Loading @@ -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); Loading Loading @@ -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; Loading Loading @@ -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; Loading Loading @@ -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); Loading Loading @@ -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; } } Loading net/bluetooth/l2cap_core.c +7 −4 Original line number Original line Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading Loading
drivers/bluetooth/btmrvl_debugfs.c +12 −11 Original line number Original line Diff line number Diff line Loading @@ -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, Loading
include/net/bluetooth/hci_core.h +33 −34 Original line number Original line Diff line number Diff line Loading @@ -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); Loading Loading @@ -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, Loading Loading @@ -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); Loading
net/bluetooth/hci_core.c +22 −27 Original line number Original line Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; Loading Loading @@ -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 Loading Loading @@ -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, Loading
net/bluetooth/hci_event.c +53 −57 Original line number Original line Diff line number Diff line Loading @@ -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); } } } } Loading Loading @@ -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) Loading Loading @@ -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, Loading Loading @@ -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); } } Loading @@ -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); } } Loading Loading @@ -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); } } Loading Loading @@ -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; Loading Loading @@ -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); Loading Loading @@ -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; Loading Loading @@ -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; Loading Loading @@ -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); Loading Loading @@ -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; } } Loading
net/bluetooth/l2cap_core.c +7 −4 Original line number Original line Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading