[PATCH 03/10] add flow control escape characters for tx
From: Mark P . Mendelsohn
Date: Thu Aug 11 2011 - 14:12:03 EST
---
drivers/bluetooth/hci_h5.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
index a2a97cc..0168269 100644
--- a/drivers/bluetooth/hci_h5.c
+++ b/drivers/bluetooth/hci_h5.c
@@ -139,6 +139,8 @@ static void h5_slip_one_byte(struct sk_buff *skb, u8 c)
{
const char esc_c0[2] = { 0xdb, 0xdc };
const char esc_db[2] = { 0xdb, 0xdd };
+ const char esc_oneone[2] = { 0xdb, 0xde };
+ const char esc_onethree[2] = { 0xdb, 0xdf };
switch (c) {
case 0xc0:
@@ -147,6 +149,12 @@ static void h5_slip_one_byte(struct sk_buff *skb, u8 c)
case 0xdb:
memcpy(skb_put(skb, 2), &esc_db, 2);
break;
+ case 0x11:
+ memcpy(skb_put(skb, 2), &esc_oneone, 2);
+ break;
+ case 0x13:
+ memcpy(skb_put(skb, 2), &esc_onethree, 2);
+ break;
default:
memcpy(skb_put(skb, 1), &c, 1);
}
--
1.7.1