Skip to content

Commit e8c00f5

Browse files
opsiffVudentz
authored andcommitted
Bluetooth: HCI: Add definition of hci_rp_remote_name_req_cancel
Return Parameters is not only status, also bdaddr: BLUETOOTH CORE SPECIFICATION Version 5.4 | Vol 4, Part E page 1870: BLUETOOTH CORE SPECIFICATION Version 5.0 | Vol 2, Part E page 802: Return parameters: Status: Size: 1 octet BD_ADDR: Size: 6 octets Note that it also fixes the warning: "Bluetooth: hci0: unexpected cc 0x041a length: 7 > 1" Fixes: c8992cf ("Bluetooth: hci_event: Use of a function table to handle Command Complete") Signed-off-by: Wentao Guan <guanwentao@uniontech.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
1 parent 5b86e2a commit e8c00f5

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

include/net/bluetooth/hci.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,11 @@ struct hci_cp_remote_name_req_cancel {
879879
bdaddr_t bdaddr;
880880
} __packed;
881881

882+
struct hci_rp_remote_name_req_cancel {
883+
__u8 status;
884+
bdaddr_t bdaddr;
885+
} __packed;
886+
882887
#define HCI_OP_READ_REMOTE_FEATURES 0x041b
883888
struct hci_cp_read_remote_features {
884889
__le16 handle;

net/bluetooth/hci_event.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ static u8 hci_cc_exit_periodic_inq(struct hci_dev *hdev, void *data,
151151
static u8 hci_cc_remote_name_req_cancel(struct hci_dev *hdev, void *data,
152152
struct sk_buff *skb)
153153
{
154-
struct hci_ev_status *rp = data;
154+
struct hci_rp_remote_name_req_cancel *rp = data;
155155

156156
bt_dev_dbg(hdev, "status 0x%2.2x", rp->status);
157157

@@ -4015,8 +4015,8 @@ static const struct hci_cc {
40154015
HCI_CC_STATUS(HCI_OP_INQUIRY_CANCEL, hci_cc_inquiry_cancel),
40164016
HCI_CC_STATUS(HCI_OP_PERIODIC_INQ, hci_cc_periodic_inq),
40174017
HCI_CC_STATUS(HCI_OP_EXIT_PERIODIC_INQ, hci_cc_exit_periodic_inq),
4018-
HCI_CC_STATUS(HCI_OP_REMOTE_NAME_REQ_CANCEL,
4019-
hci_cc_remote_name_req_cancel),
4018+
HCI_CC(HCI_OP_REMOTE_NAME_REQ_CANCEL, hci_cc_remote_name_req_cancel,
4019+
sizeof(struct hci_rp_remote_name_req_cancel)),
40204020
HCI_CC(HCI_OP_ROLE_DISCOVERY, hci_cc_role_discovery,
40214021
sizeof(struct hci_rp_role_discovery)),
40224022
HCI_CC(HCI_OP_READ_LINK_POLICY, hci_cc_read_link_policy,

0 commit comments

Comments
 (0)