Skip to contentSkip to conversation

monitor: Fix RFCOMM parity type mask

PATCH In review Andrei Emeltchenko 2 participants 2 messages Dec 5, 2014 1 message not in the archive Bluetooth drivers

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 000401d01078ea58bb0bf0a310samsung.com

#1 lore raw

PATCH v2 1/1 monitor: Fix RFCOMM parity type mask

From: Andrei Emeltchenko <[email protected]>

Fix RFCOMM RPN parity type bit according to Spec. GSM 07.10 version 6.3.0. (PT1 - PT2 indicates the parity type).
---
*v2: Fixed parity type bits

 monitor/rfcomm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
monitor/rfcomm.c +1 -1
index fe3afb7..4ba61c8 100644
@@ -67,7 +67,7 @@ static char *cr_str[] = {
 #define GET_RPN_DB(parity)	(parity & 0x03)
 #define GET_RPN_SB(parity)	((parity & 0x04) >> 2)
 #define GET_RPN_PARITY(parity)	((parity & 0x08) >> 3)
-#define GET_RPN_PTYPE(parity)	((parity & 0x03) >> 3)
+#define GET_RPN_PTYPE(parity)	((parity & 0x30) >> 4)
 #define GET_RPN_XIN(io)		(io & 0x01)
 #define GET_RPN_XOUT(io)	((io & 0x02) >> 1)
 #define GET_RPN_RTRI(io)	((io & 0x04) >> 2)
Signature · 1 line
1.9.1
#2 lore raw

Hi Andrei,

Quoted 24 lines · Andrei Emeltchenko

From: Andrei Emeltchenko <[email protected]>

Fix RFCOMM RPN parity type bit according to Spec. GSM 07.10 version 6.3.0. (PT1 - PT2 indicates the parity type).
---
*v2: Fixed parity type bits

 monitor/rfcomm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
monitor/rfcomm.c +1 -2
index fe3afb7..4ba61c8 100644
@@ -67,7 +67,7 @@ static char *cr_str[] = {
 #define GET_RPN_DB(parity)     (parity & 0x03)
 #define GET_RPN_SB(parity)     ((parity & 0x04) >> 2)
 #define GET_RPN_PARITY(parity) ((parity & 0x08) >> 3)
-#define GET_RPN_PTYPE(parity)  ((parity & 0x03) >> 3)
+#define GET_RPN_PTYPE(parity)  ((parity & 0x30) >> 4)
 #define GET_RPN_XIN(io)                (io & 0x01)
 #define GET_RPN_XOUT(io)       ((io & 0x02) >> 1)
 #define GET_RPN_RTRI(io)       ((io & 0x04) >> 2)
--
Quoted 1 line

1.9.1

Pushed, thanks.

Signature · 1 line
Luiz Augusto von Dentz