Bluetooth: btqca: Introduce HCI_EV_VENDOR and use it
Using HCI_VENDOR_PKT for vendor specific events does work since it has also the value 0xff, but it is actually the packet type indicator constant and not the event constant. So introduce HCI_EV_VENDOR and use it. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
ad3e0b2f3c
commit
e4cc5a1873
|
@ -39,7 +39,7 @@ int qca_read_soc_version(struct hci_dev *hdev, u32 *soc_version)
|
||||||
|
|
||||||
cmd = EDL_PATCH_VER_REQ_CMD;
|
cmd = EDL_PATCH_VER_REQ_CMD;
|
||||||
skb = __hci_cmd_sync_ev(hdev, EDL_PATCH_CMD_OPCODE, EDL_PATCH_CMD_LEN,
|
skb = __hci_cmd_sync_ev(hdev, EDL_PATCH_CMD_OPCODE, EDL_PATCH_CMD_LEN,
|
||||||
&cmd, HCI_VENDOR_PKT, HCI_INIT_TIMEOUT);
|
&cmd, HCI_EV_VENDOR, HCI_INIT_TIMEOUT);
|
||||||
if (IS_ERR(skb)) {
|
if (IS_ERR(skb)) {
|
||||||
err = PTR_ERR(skb);
|
err = PTR_ERR(skb);
|
||||||
bt_dev_err(hdev, "Reading QCA version information failed (%d)",
|
bt_dev_err(hdev, "Reading QCA version information failed (%d)",
|
||||||
|
@ -229,7 +229,7 @@ static int qca_tlv_send_segment(struct hci_dev *hdev, int seg_size,
|
||||||
cmd);
|
cmd);
|
||||||
|
|
||||||
skb = __hci_cmd_sync_ev(hdev, EDL_PATCH_CMD_OPCODE, seg_size + 2, cmd,
|
skb = __hci_cmd_sync_ev(hdev, EDL_PATCH_CMD_OPCODE, seg_size + 2, cmd,
|
||||||
HCI_VENDOR_PKT, HCI_INIT_TIMEOUT);
|
HCI_EV_VENDOR, HCI_INIT_TIMEOUT);
|
||||||
if (IS_ERR(skb)) {
|
if (IS_ERR(skb)) {
|
||||||
err = PTR_ERR(skb);
|
err = PTR_ERR(skb);
|
||||||
bt_dev_err(hdev, "QCA Failed to send TLV segment (%d)", err);
|
bt_dev_err(hdev, "QCA Failed to send TLV segment (%d)", err);
|
||||||
|
@ -318,7 +318,7 @@ int qca_set_bdaddr_rome(struct hci_dev *hdev, const bdaddr_t *bdaddr)
|
||||||
cmd[2] = sizeof(bdaddr_t); /* size */
|
cmd[2] = sizeof(bdaddr_t); /* size */
|
||||||
memcpy(cmd + 3, bdaddr, sizeof(bdaddr_t));
|
memcpy(cmd + 3, bdaddr, sizeof(bdaddr_t));
|
||||||
skb = __hci_cmd_sync_ev(hdev, EDL_NVM_ACCESS_OPCODE, sizeof(cmd), cmd,
|
skb = __hci_cmd_sync_ev(hdev, EDL_NVM_ACCESS_OPCODE, sizeof(cmd), cmd,
|
||||||
HCI_VENDOR_PKT, HCI_INIT_TIMEOUT);
|
HCI_EV_VENDOR, HCI_INIT_TIMEOUT);
|
||||||
if (IS_ERR(skb)) {
|
if (IS_ERR(skb)) {
|
||||||
err = PTR_ERR(skb);
|
err = PTR_ERR(skb);
|
||||||
bt_dev_err(hdev, "QCA Change address command failed (%d)", err);
|
bt_dev_err(hdev, "QCA Change address command failed (%d)", err);
|
||||||
|
|
|
@ -2176,6 +2176,8 @@ struct hci_evt_le_ext_adv_set_term {
|
||||||
__u8 num_evts;
|
__u8 num_evts;
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
|
#define HCI_EV_VENDOR 0xff
|
||||||
|
|
||||||
/* Internal events generated by Bluetooth stack */
|
/* Internal events generated by Bluetooth stack */
|
||||||
#define HCI_EV_STACK_INTERNAL 0xfd
|
#define HCI_EV_STACK_INTERNAL 0xfd
|
||||||
struct hci_ev_stack_internal {
|
struct hci_ev_stack_internal {
|
||||||
|
|
Loading…
Reference in New Issue