Skip to contentSkip to conversation

AVCTP: Fix sending wrong response format

PATCH Applied Luiz Augusto von Dentz 2 participants 2 messages Mar 4, 2014 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 AVCTP: Fix sending wrong response format

From: Luiz Augusto von Dentz <[email protected]>

Reject and Not Implemented responses of PASS THROUGH commands shall contain the data of the previous frame accourding to AVC Panel Subunit specification page 87.

---
 android/avctp.c        | 4 ++--
 profiles/audio/avctp.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
android/avctp.c +2 -2
index abf9449..9232cfa 100644
@@ -322,7 +322,7 @@ static ssize_t handle_panel_passthrough(struct avctp *session,
 
 	if (*code != AVC_CTYPE_CONTROL || *subunit != AVC_SUBUNIT_PANEL) {
 		*code = AVC_CTYPE_REJECTED;
-		return 0;
+		return operand_count;
 	}
 
 	if (operand_count == 0)
@@ -394,7 +394,7 @@ static ssize_t handle_panel_passthrough(struct avctp *session,
 		DBG("AV/C: unknown button 0x%02X %s",
 						operands[0] & 0x7F, status);
 		*code = AVC_CTYPE_NOT_IMPLEMENTED;
-		return 0;
+		return operand_count;
 	}
 
 done:
profiles/audio/avctp.c +2 -2
index 28c7685..f88e634 100644
@@ -342,7 +342,7 @@ static size_t handle_panel_passthrough(struct avctp *session,
 
 	if (*code != AVC_CTYPE_CONTROL || *subunit != AVC_SUBUNIT_PANEL) {
 		*code = AVC_CTYPE_REJECTED;
-		return 0;
+		return operand_count;
 	}
 
 	if (operand_count == 0)
@@ -408,7 +408,7 @@ static size_t handle_panel_passthrough(struct avctp *session,
 		DBG("AV/C: unknown button 0x%02X %s",
 						operands[0] & 0x7F, status);
 		*code = AVC_CTYPE_NOT_IMPLEMENTED;
-		return 0;
+		return operand_count;
 	}
 
 done:
Signature · 1 line
1.8.5.3
#1 lore raw

Hi Luiz,

Quoted 7 lines · Luiz Augusto von Dentz

Reject and Not Implemented responses of PASS THROUGH commands shall contain the data of the previous frame accourding to AVC Panel Subunit specification page 87.

---
 android/avctp.c        | 4 ++--
 profiles/audio/avctp.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

Applied. Thanks.

Johan