Skip to contentSkip to conversation

Bluetooth: Use HCI_EV_HARDWARE_ERROR define for event payload

PATCH Applied Marcel Holtmann 2 participants 2 messages Nov 2, 2014 Bluetooth drivers

lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: Use HCI_EV_HARDWARE_ERROR define for event payload

When constructing the event payload for the HCI_Hardware_Error event message, use the HCI_EV_HARDWARE_ERROR define.

In addition rename the variables from hard_err to hw_err to clearly indicate that this is about the hardware error and not a hard error.

---
 drivers/bluetooth/hci_h5.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/bluetooth/hci_h5.c +2 -2
index 20bdd71559b1..bd1fe37a7993 100644
@@ -172,7 +172,7 @@ static void h5_peer_reset(struct hci_uart *hu)
 {
 	struct h5 *h5 = hu->priv;
 	struct sk_buff *skb;
-	const unsigned char hard_err[] = { 0x10, 0x01, 0x00 };
+	const u8 hw_err[] = { HCI_EV_HARDWARE_ERROR, 0x01, 0x00 };
 
 	BT_ERR("Peer device has reset");
 
@@ -192,7 +192,7 @@ static void h5_peer_reset(struct hci_uart *hu)
 		return;
 
 	bt_cb(skb)->pkt_type = HCI_EVENT_PKT;
-	memcpy(skb_put(skb, 3), hard_err, 3);
+	memcpy(skb_put(skb, 3), hw_err, 3);
 
 	/* Send Hardware Error to upper stack */
 	hci_recv_frame(hu->hdev, skb);
Signature · 1 line
1.9.3
#1 lore raw

Hi Marcel,

Quoted 10 lines · Marcel Holtmann

When constructing the event payload for the HCI_Hardware_Error event message, use the HCI_EV_HARDWARE_ERROR define.

In addition rename the variables from hard_err to hw_err to clearly indicate that this is about the hardware error and not a hard error.

---
 drivers/bluetooth/hci_h5.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied to bluetooth-next. Thanks.

Johan