Loading drivers/bluetooth/ath3k.c +2 −0 Original line number Original line Diff line number Diff line Loading @@ -87,6 +87,7 @@ static const struct usb_device_id ath3k_table[] = { { USB_DEVICE(0x04CA, 0x3007) }, { USB_DEVICE(0x04CA, 0x3007) }, { USB_DEVICE(0x04CA, 0x3008) }, { USB_DEVICE(0x04CA, 0x3008) }, { USB_DEVICE(0x04CA, 0x300b) }, { USB_DEVICE(0x04CA, 0x300b) }, { USB_DEVICE(0x04CA, 0x3010) }, { USB_DEVICE(0x0930, 0x0219) }, { USB_DEVICE(0x0930, 0x0219) }, { USB_DEVICE(0x0930, 0x0220) }, { USB_DEVICE(0x0930, 0x0220) }, { USB_DEVICE(0x0930, 0x0227) }, { USB_DEVICE(0x0930, 0x0227) }, Loading Loading @@ -140,6 +141,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = { { USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3010), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0220), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0220), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0227), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0227), .driver_info = BTUSB_ATH3012 }, Loading drivers/bluetooth/btusb.c +1 −0 Original line number Original line Diff line number Diff line Loading @@ -167,6 +167,7 @@ static const struct usb_device_id blacklist_table[] = { { USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3010), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0220), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0220), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0227), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0227), .driver_info = BTUSB_ATH3012 }, Loading net/bluetooth/hci_conn.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -661,7 +661,7 @@ static void hci_req_add_le_create_conn(struct hci_request *req, memset(&cp, 0, sizeof(cp)); memset(&cp, 0, sizeof(cp)); /* Update random address, but set require_privacy to false so /* Update random address, but set require_privacy to false so * that we never connect with an unresolvable address. * that we never connect with an non-resolvable address. */ */ if (hci_update_random_address(req, false, &own_addr_type)) if (hci_update_random_address(req, false, &own_addr_type)) return; return; Loading net/bluetooth/hci_core.c +36 −24 Original line number Original line Diff line number Diff line Loading @@ -1373,8 +1373,6 @@ static void hci_init1_req(struct hci_request *req, unsigned long opt) static void bredr_setup(struct hci_request *req) static void bredr_setup(struct hci_request *req) { { struct hci_dev *hdev = req->hdev; __le16 param; __le16 param; __u8 flt_type; __u8 flt_type; Loading Loading @@ -1403,14 +1401,6 @@ static void bredr_setup(struct hci_request *req) /* Connection accept timeout ~20 secs */ /* Connection accept timeout ~20 secs */ param = cpu_to_le16(0x7d00); param = cpu_to_le16(0x7d00); hci_req_add(req, HCI_OP_WRITE_CA_TIMEOUT, 2, ¶m); hci_req_add(req, HCI_OP_WRITE_CA_TIMEOUT, 2, ¶m); /* AVM Berlin (31), aka "BlueFRITZ!", reports version 1.2, * but it does not support page scan related HCI commands. */ if (hdev->manufacturer != 31 && hdev->hci_ver > BLUETOOTH_VER_1_1) { hci_req_add(req, HCI_OP_READ_PAGE_SCAN_ACTIVITY, 0, NULL); hci_req_add(req, HCI_OP_READ_PAGE_SCAN_TYPE, 0, NULL); } } } static void le_setup(struct hci_request *req) static void le_setup(struct hci_request *req) Loading Loading @@ -1718,6 +1708,16 @@ static void hci_init3_req(struct hci_request *req, unsigned long opt) if (hdev->commands[5] & 0x10) if (hdev->commands[5] & 0x10) hci_setup_link_policy(req); hci_setup_link_policy(req); if (hdev->commands[8] & 0x01) hci_req_add(req, HCI_OP_READ_PAGE_SCAN_ACTIVITY, 0, NULL); /* Some older Broadcom based Bluetooth 1.2 controllers do not * support the Read Page Scan Type command. Check support for * this command in the bit mask of supported commands. */ if (hdev->commands[13] & 0x01) hci_req_add(req, HCI_OP_READ_PAGE_SCAN_TYPE, 0, NULL); if (lmp_le_capable(hdev)) { if (lmp_le_capable(hdev)) { u8 events[8]; u8 events[8]; Loading Loading @@ -2634,6 +2634,12 @@ static int hci_dev_do_close(struct hci_dev *hdev) drain_workqueue(hdev->workqueue); drain_workqueue(hdev->workqueue); hci_dev_lock(hdev); hci_dev_lock(hdev); if (!test_and_clear_bit(HCI_AUTO_OFF, &hdev->dev_flags)) { if (hdev->dev_type == HCI_BREDR) mgmt_powered(hdev, 0); } hci_inquiry_cache_flush(hdev); hci_inquiry_cache_flush(hdev); hci_pend_le_actions_clear(hdev); hci_pend_le_actions_clear(hdev); hci_conn_hash_flush(hdev); hci_conn_hash_flush(hdev); Loading Loading @@ -2681,14 +2687,6 @@ static int hci_dev_do_close(struct hci_dev *hdev) hdev->flags &= BIT(HCI_RAW); hdev->flags &= BIT(HCI_RAW); hdev->dev_flags &= ~HCI_PERSISTENT_MASK; hdev->dev_flags &= ~HCI_PERSISTENT_MASK; if (!test_and_clear_bit(HCI_AUTO_OFF, &hdev->dev_flags)) { if (hdev->dev_type == HCI_BREDR) { hci_dev_lock(hdev); mgmt_powered(hdev, 0); hci_dev_unlock(hdev); } } /* Controller radio is available but is currently powered down */ /* Controller radio is available but is currently powered down */ hdev->amp_status = AMP_STATUS_POWERED_DOWN; hdev->amp_status = AMP_STATUS_POWERED_DOWN; Loading Loading @@ -3083,7 +3081,9 @@ static void hci_power_on(struct work_struct *work) err = hci_dev_do_open(hdev); err = hci_dev_do_open(hdev); if (err < 0) { if (err < 0) { hci_dev_lock(hdev); mgmt_set_powered_failed(hdev, err); mgmt_set_powered_failed(hdev, err); hci_dev_unlock(hdev); return; return; } } Loading Loading @@ -3959,17 +3959,29 @@ int hci_update_random_address(struct hci_request *req, bool require_privacy, } } /* In case of required privacy without resolvable private address, /* In case of required privacy without resolvable private address, * use an unresolvable private address. This is useful for active * use an non-resolvable private address. This is useful for active * scanning and non-connectable advertising. * scanning and non-connectable advertising. */ */ if (require_privacy) { if (require_privacy) { bdaddr_t urpa; bdaddr_t nrpa; while (true) { /* The non-resolvable private address is generated * from random six bytes with the two most significant * bits cleared. */ get_random_bytes(&nrpa, 6); nrpa.b[5] &= 0x3f; get_random_bytes(&urpa, 6); /* The non-resolvable private address shall not be urpa.b[5] &= 0x3f; /* Clear two most significant bits */ * equal to the public address. */ if (bacmp(&hdev->bdaddr, &nrpa)) break; } *own_addr_type = ADDR_LE_DEV_RANDOM; *own_addr_type = ADDR_LE_DEV_RANDOM; set_random_addr(req, &urpa); set_random_addr(req, &nrpa); return 0; return 0; } } Loading Loading @@ -5625,7 +5637,7 @@ void hci_req_add_le_passive_scan(struct hci_request *req) u8 filter_policy; u8 filter_policy; /* Set require_privacy to false since no SCAN_REQ are send /* Set require_privacy to false since no SCAN_REQ are send * during passive scanning. Not using an unresolvable address * during passive scanning. Not using an non-resolvable address * here is important so that peer devices using direct * here is important so that peer devices using direct * advertising with our address will be correctly reported * advertising with our address will be correctly reported * by the controller. * by the controller. Loading net/bluetooth/hci_event.c +20 −0 Original line number Original line Diff line number Diff line Loading @@ -257,6 +257,8 @@ static void hci_cc_write_auth_enable(struct hci_dev *hdev, struct sk_buff *skb) if (!sent) if (!sent) return; return; hci_dev_lock(hdev); if (!status) { if (!status) { __u8 param = *((__u8 *) sent); __u8 param = *((__u8 *) sent); Loading @@ -268,6 +270,8 @@ static void hci_cc_write_auth_enable(struct hci_dev *hdev, struct sk_buff *skb) if (test_bit(HCI_MGMT, &hdev->dev_flags)) if (test_bit(HCI_MGMT, &hdev->dev_flags)) mgmt_auth_enable_complete(hdev, status); mgmt_auth_enable_complete(hdev, status); hci_dev_unlock(hdev); } } static void hci_cc_write_encrypt_mode(struct hci_dev *hdev, struct sk_buff *skb) static void hci_cc_write_encrypt_mode(struct hci_dev *hdev, struct sk_buff *skb) Loading Loading @@ -443,6 +447,8 @@ static void hci_cc_write_ssp_mode(struct hci_dev *hdev, struct sk_buff *skb) if (!sent) if (!sent) return; return; hci_dev_lock(hdev); if (!status) { if (!status) { if (sent->mode) if (sent->mode) hdev->features[1][0] |= LMP_HOST_SSP; hdev->features[1][0] |= LMP_HOST_SSP; Loading @@ -458,6 +464,8 @@ static void hci_cc_write_ssp_mode(struct hci_dev *hdev, struct sk_buff *skb) else else clear_bit(HCI_SSP_ENABLED, &hdev->dev_flags); clear_bit(HCI_SSP_ENABLED, &hdev->dev_flags); } } hci_dev_unlock(hdev); } } static void hci_cc_write_sc_support(struct hci_dev *hdev, struct sk_buff *skb) static void hci_cc_write_sc_support(struct hci_dev *hdev, struct sk_buff *skb) Loading @@ -471,6 +479,8 @@ static void hci_cc_write_sc_support(struct hci_dev *hdev, struct sk_buff *skb) if (!sent) if (!sent) return; return; hci_dev_lock(hdev); if (!status) { if (!status) { if (sent->support) if (sent->support) hdev->features[1][0] |= LMP_HOST_SC; hdev->features[1][0] |= LMP_HOST_SC; Loading @@ -486,6 +496,8 @@ static void hci_cc_write_sc_support(struct hci_dev *hdev, struct sk_buff *skb) else else clear_bit(HCI_SC_ENABLED, &hdev->dev_flags); clear_bit(HCI_SC_ENABLED, &hdev->dev_flags); } } hci_dev_unlock(hdev); } } static void hci_cc_read_local_version(struct hci_dev *hdev, struct sk_buff *skb) static void hci_cc_read_local_version(struct hci_dev *hdev, struct sk_buff *skb) Loading Loading @@ -1135,6 +1147,8 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev, if (!cp) if (!cp) return; return; hci_dev_lock(hdev); switch (cp->enable) { switch (cp->enable) { case LE_SCAN_ENABLE: case LE_SCAN_ENABLE: set_bit(HCI_LE_SCAN, &hdev->dev_flags); set_bit(HCI_LE_SCAN, &hdev->dev_flags); Loading Loading @@ -1184,6 +1198,8 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev, BT_ERR("Used reserved LE_Scan_Enable param %d", cp->enable); BT_ERR("Used reserved LE_Scan_Enable param %d", cp->enable); break; break; } } hci_dev_unlock(hdev); } } static void hci_cc_le_read_white_list_size(struct hci_dev *hdev, static void hci_cc_le_read_white_list_size(struct hci_dev *hdev, Loading Loading @@ -1278,6 +1294,8 @@ static void hci_cc_write_le_host_supported(struct hci_dev *hdev, if (!sent) if (!sent) return; return; hci_dev_lock(hdev); if (sent->le) { if (sent->le) { hdev->features[1][0] |= LMP_HOST_LE; hdev->features[1][0] |= LMP_HOST_LE; set_bit(HCI_LE_ENABLED, &hdev->dev_flags); set_bit(HCI_LE_ENABLED, &hdev->dev_flags); Loading @@ -1291,6 +1309,8 @@ static void hci_cc_write_le_host_supported(struct hci_dev *hdev, hdev->features[1][0] |= LMP_HOST_LE_BREDR; hdev->features[1][0] |= LMP_HOST_LE_BREDR; else else hdev->features[1][0] &= ~LMP_HOST_LE_BREDR; hdev->features[1][0] &= ~LMP_HOST_LE_BREDR; hci_dev_unlock(hdev); } } static void hci_cc_set_adv_param(struct hci_dev *hdev, struct sk_buff *skb) static void hci_cc_set_adv_param(struct hci_dev *hdev, struct sk_buff *skb) Loading Loading
drivers/bluetooth/ath3k.c +2 −0 Original line number Original line Diff line number Diff line Loading @@ -87,6 +87,7 @@ static const struct usb_device_id ath3k_table[] = { { USB_DEVICE(0x04CA, 0x3007) }, { USB_DEVICE(0x04CA, 0x3007) }, { USB_DEVICE(0x04CA, 0x3008) }, { USB_DEVICE(0x04CA, 0x3008) }, { USB_DEVICE(0x04CA, 0x300b) }, { USB_DEVICE(0x04CA, 0x300b) }, { USB_DEVICE(0x04CA, 0x3010) }, { USB_DEVICE(0x0930, 0x0219) }, { USB_DEVICE(0x0930, 0x0219) }, { USB_DEVICE(0x0930, 0x0220) }, { USB_DEVICE(0x0930, 0x0220) }, { USB_DEVICE(0x0930, 0x0227) }, { USB_DEVICE(0x0930, 0x0227) }, Loading Loading @@ -140,6 +141,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = { { USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3010), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0220), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0220), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0227), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0227), .driver_info = BTUSB_ATH3012 }, Loading
drivers/bluetooth/btusb.c +1 −0 Original line number Original line Diff line number Diff line Loading @@ -167,6 +167,7 @@ static const struct usb_device_id blacklist_table[] = { { USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3010), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0220), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0220), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0227), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0227), .driver_info = BTUSB_ATH3012 }, Loading
net/bluetooth/hci_conn.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -661,7 +661,7 @@ static void hci_req_add_le_create_conn(struct hci_request *req, memset(&cp, 0, sizeof(cp)); memset(&cp, 0, sizeof(cp)); /* Update random address, but set require_privacy to false so /* Update random address, but set require_privacy to false so * that we never connect with an unresolvable address. * that we never connect with an non-resolvable address. */ */ if (hci_update_random_address(req, false, &own_addr_type)) if (hci_update_random_address(req, false, &own_addr_type)) return; return; Loading
net/bluetooth/hci_core.c +36 −24 Original line number Original line Diff line number Diff line Loading @@ -1373,8 +1373,6 @@ static void hci_init1_req(struct hci_request *req, unsigned long opt) static void bredr_setup(struct hci_request *req) static void bredr_setup(struct hci_request *req) { { struct hci_dev *hdev = req->hdev; __le16 param; __le16 param; __u8 flt_type; __u8 flt_type; Loading Loading @@ -1403,14 +1401,6 @@ static void bredr_setup(struct hci_request *req) /* Connection accept timeout ~20 secs */ /* Connection accept timeout ~20 secs */ param = cpu_to_le16(0x7d00); param = cpu_to_le16(0x7d00); hci_req_add(req, HCI_OP_WRITE_CA_TIMEOUT, 2, ¶m); hci_req_add(req, HCI_OP_WRITE_CA_TIMEOUT, 2, ¶m); /* AVM Berlin (31), aka "BlueFRITZ!", reports version 1.2, * but it does not support page scan related HCI commands. */ if (hdev->manufacturer != 31 && hdev->hci_ver > BLUETOOTH_VER_1_1) { hci_req_add(req, HCI_OP_READ_PAGE_SCAN_ACTIVITY, 0, NULL); hci_req_add(req, HCI_OP_READ_PAGE_SCAN_TYPE, 0, NULL); } } } static void le_setup(struct hci_request *req) static void le_setup(struct hci_request *req) Loading Loading @@ -1718,6 +1708,16 @@ static void hci_init3_req(struct hci_request *req, unsigned long opt) if (hdev->commands[5] & 0x10) if (hdev->commands[5] & 0x10) hci_setup_link_policy(req); hci_setup_link_policy(req); if (hdev->commands[8] & 0x01) hci_req_add(req, HCI_OP_READ_PAGE_SCAN_ACTIVITY, 0, NULL); /* Some older Broadcom based Bluetooth 1.2 controllers do not * support the Read Page Scan Type command. Check support for * this command in the bit mask of supported commands. */ if (hdev->commands[13] & 0x01) hci_req_add(req, HCI_OP_READ_PAGE_SCAN_TYPE, 0, NULL); if (lmp_le_capable(hdev)) { if (lmp_le_capable(hdev)) { u8 events[8]; u8 events[8]; Loading Loading @@ -2634,6 +2634,12 @@ static int hci_dev_do_close(struct hci_dev *hdev) drain_workqueue(hdev->workqueue); drain_workqueue(hdev->workqueue); hci_dev_lock(hdev); hci_dev_lock(hdev); if (!test_and_clear_bit(HCI_AUTO_OFF, &hdev->dev_flags)) { if (hdev->dev_type == HCI_BREDR) mgmt_powered(hdev, 0); } hci_inquiry_cache_flush(hdev); hci_inquiry_cache_flush(hdev); hci_pend_le_actions_clear(hdev); hci_pend_le_actions_clear(hdev); hci_conn_hash_flush(hdev); hci_conn_hash_flush(hdev); Loading Loading @@ -2681,14 +2687,6 @@ static int hci_dev_do_close(struct hci_dev *hdev) hdev->flags &= BIT(HCI_RAW); hdev->flags &= BIT(HCI_RAW); hdev->dev_flags &= ~HCI_PERSISTENT_MASK; hdev->dev_flags &= ~HCI_PERSISTENT_MASK; if (!test_and_clear_bit(HCI_AUTO_OFF, &hdev->dev_flags)) { if (hdev->dev_type == HCI_BREDR) { hci_dev_lock(hdev); mgmt_powered(hdev, 0); hci_dev_unlock(hdev); } } /* Controller radio is available but is currently powered down */ /* Controller radio is available but is currently powered down */ hdev->amp_status = AMP_STATUS_POWERED_DOWN; hdev->amp_status = AMP_STATUS_POWERED_DOWN; Loading Loading @@ -3083,7 +3081,9 @@ static void hci_power_on(struct work_struct *work) err = hci_dev_do_open(hdev); err = hci_dev_do_open(hdev); if (err < 0) { if (err < 0) { hci_dev_lock(hdev); mgmt_set_powered_failed(hdev, err); mgmt_set_powered_failed(hdev, err); hci_dev_unlock(hdev); return; return; } } Loading Loading @@ -3959,17 +3959,29 @@ int hci_update_random_address(struct hci_request *req, bool require_privacy, } } /* In case of required privacy without resolvable private address, /* In case of required privacy without resolvable private address, * use an unresolvable private address. This is useful for active * use an non-resolvable private address. This is useful for active * scanning and non-connectable advertising. * scanning and non-connectable advertising. */ */ if (require_privacy) { if (require_privacy) { bdaddr_t urpa; bdaddr_t nrpa; while (true) { /* The non-resolvable private address is generated * from random six bytes with the two most significant * bits cleared. */ get_random_bytes(&nrpa, 6); nrpa.b[5] &= 0x3f; get_random_bytes(&urpa, 6); /* The non-resolvable private address shall not be urpa.b[5] &= 0x3f; /* Clear two most significant bits */ * equal to the public address. */ if (bacmp(&hdev->bdaddr, &nrpa)) break; } *own_addr_type = ADDR_LE_DEV_RANDOM; *own_addr_type = ADDR_LE_DEV_RANDOM; set_random_addr(req, &urpa); set_random_addr(req, &nrpa); return 0; return 0; } } Loading Loading @@ -5625,7 +5637,7 @@ void hci_req_add_le_passive_scan(struct hci_request *req) u8 filter_policy; u8 filter_policy; /* Set require_privacy to false since no SCAN_REQ are send /* Set require_privacy to false since no SCAN_REQ are send * during passive scanning. Not using an unresolvable address * during passive scanning. Not using an non-resolvable address * here is important so that peer devices using direct * here is important so that peer devices using direct * advertising with our address will be correctly reported * advertising with our address will be correctly reported * by the controller. * by the controller. Loading
net/bluetooth/hci_event.c +20 −0 Original line number Original line Diff line number Diff line Loading @@ -257,6 +257,8 @@ static void hci_cc_write_auth_enable(struct hci_dev *hdev, struct sk_buff *skb) if (!sent) if (!sent) return; return; hci_dev_lock(hdev); if (!status) { if (!status) { __u8 param = *((__u8 *) sent); __u8 param = *((__u8 *) sent); Loading @@ -268,6 +270,8 @@ static void hci_cc_write_auth_enable(struct hci_dev *hdev, struct sk_buff *skb) if (test_bit(HCI_MGMT, &hdev->dev_flags)) if (test_bit(HCI_MGMT, &hdev->dev_flags)) mgmt_auth_enable_complete(hdev, status); mgmt_auth_enable_complete(hdev, status); hci_dev_unlock(hdev); } } static void hci_cc_write_encrypt_mode(struct hci_dev *hdev, struct sk_buff *skb) static void hci_cc_write_encrypt_mode(struct hci_dev *hdev, struct sk_buff *skb) Loading Loading @@ -443,6 +447,8 @@ static void hci_cc_write_ssp_mode(struct hci_dev *hdev, struct sk_buff *skb) if (!sent) if (!sent) return; return; hci_dev_lock(hdev); if (!status) { if (!status) { if (sent->mode) if (sent->mode) hdev->features[1][0] |= LMP_HOST_SSP; hdev->features[1][0] |= LMP_HOST_SSP; Loading @@ -458,6 +464,8 @@ static void hci_cc_write_ssp_mode(struct hci_dev *hdev, struct sk_buff *skb) else else clear_bit(HCI_SSP_ENABLED, &hdev->dev_flags); clear_bit(HCI_SSP_ENABLED, &hdev->dev_flags); } } hci_dev_unlock(hdev); } } static void hci_cc_write_sc_support(struct hci_dev *hdev, struct sk_buff *skb) static void hci_cc_write_sc_support(struct hci_dev *hdev, struct sk_buff *skb) Loading @@ -471,6 +479,8 @@ static void hci_cc_write_sc_support(struct hci_dev *hdev, struct sk_buff *skb) if (!sent) if (!sent) return; return; hci_dev_lock(hdev); if (!status) { if (!status) { if (sent->support) if (sent->support) hdev->features[1][0] |= LMP_HOST_SC; hdev->features[1][0] |= LMP_HOST_SC; Loading @@ -486,6 +496,8 @@ static void hci_cc_write_sc_support(struct hci_dev *hdev, struct sk_buff *skb) else else clear_bit(HCI_SC_ENABLED, &hdev->dev_flags); clear_bit(HCI_SC_ENABLED, &hdev->dev_flags); } } hci_dev_unlock(hdev); } } static void hci_cc_read_local_version(struct hci_dev *hdev, struct sk_buff *skb) static void hci_cc_read_local_version(struct hci_dev *hdev, struct sk_buff *skb) Loading Loading @@ -1135,6 +1147,8 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev, if (!cp) if (!cp) return; return; hci_dev_lock(hdev); switch (cp->enable) { switch (cp->enable) { case LE_SCAN_ENABLE: case LE_SCAN_ENABLE: set_bit(HCI_LE_SCAN, &hdev->dev_flags); set_bit(HCI_LE_SCAN, &hdev->dev_flags); Loading Loading @@ -1184,6 +1198,8 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev, BT_ERR("Used reserved LE_Scan_Enable param %d", cp->enable); BT_ERR("Used reserved LE_Scan_Enable param %d", cp->enable); break; break; } } hci_dev_unlock(hdev); } } static void hci_cc_le_read_white_list_size(struct hci_dev *hdev, static void hci_cc_le_read_white_list_size(struct hci_dev *hdev, Loading Loading @@ -1278,6 +1294,8 @@ static void hci_cc_write_le_host_supported(struct hci_dev *hdev, if (!sent) if (!sent) return; return; hci_dev_lock(hdev); if (sent->le) { if (sent->le) { hdev->features[1][0] |= LMP_HOST_LE; hdev->features[1][0] |= LMP_HOST_LE; set_bit(HCI_LE_ENABLED, &hdev->dev_flags); set_bit(HCI_LE_ENABLED, &hdev->dev_flags); Loading @@ -1291,6 +1309,8 @@ static void hci_cc_write_le_host_supported(struct hci_dev *hdev, hdev->features[1][0] |= LMP_HOST_LE_BREDR; hdev->features[1][0] |= LMP_HOST_LE_BREDR; else else hdev->features[1][0] &= ~LMP_HOST_LE_BREDR; hdev->features[1][0] &= ~LMP_HOST_LE_BREDR; hci_dev_unlock(hdev); } } static void hci_cc_set_adv_param(struct hci_dev *hdev, struct sk_buff *skb) static void hci_cc_set_adv_param(struct hci_dev *hdev, struct sk_buff *skb) Loading