Skip to contentSkip to conversation

audio: Fix AVDTP General Reject message

PATCH In review Mike Brudevold 2 participants 3 messages Apr 27, 2012 – Apr 28, 2012 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 audio: Fix AVDTP General Reject message

From: Michael Brudevold <[email protected]>

As per spec, bits other than Transaction Label and Packet Type are RFA. This fixes the RFA bits which were previously set to the invalid signal_id.

Test case TP/SIG/SMG/BI-28-C.

---
 audio/avdtp.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
audio/avdtp.c +5 -6
index 34d49d2..6dd19ba 100644
@@ -1348,11 +1348,10 @@ static GSList *caps_to_list(uint8_t *data, int size,
 	return caps;
 }
 
-static gboolean avdtp_unknown_cmd(struct avdtp *session, uint8_t transaction,
-							uint8_t signal_id)
+static gboolean avdtp_unknown_cmd(struct avdtp *session, uint8_t transaction)
 {
 	return avdtp_send(session, transaction, AVDTP_MSG_TYPE_GEN_REJECT,
-							signal_id, NULL, 0);
+							0, NULL, 0);
 }
 
 static gboolean avdtp_discover_cmd(struct avdtp *session, uint8_t transaction,
@@ -1412,7 +1411,7 @@ static gboolean avdtp_getcap_cmd(struct avdtp *session, uint8_t transaction,
 	}
 
 	if (get_all && session->server->version < 0x0103)
-		return avdtp_unknown_cmd(session, transaction, cmd);
+		return avdtp_unknown_cmd(session, transaction);
 
 	if (!sep->ind->get_capability(session, sep, get_all, &caps,
 							&err, sep->user_data))
@@ -1894,7 +1893,7 @@ failed:
 static gboolean avdtp_secctl_cmd(struct avdtp *session, uint8_t transaction,
 					struct seid_req *req, int size)
 {
-	return avdtp_unknown_cmd(session, transaction, AVDTP_SECURITY_CONTROL);
+	return avdtp_unknown_cmd(session, transaction);
 }
 
 static gboolean avdtp_delayreport_cmd(struct avdtp *session,
@@ -1988,7 +1987,7 @@ static gboolean avdtp_parse_cmd(struct avdtp *session, uint8_t transaction,
 		return avdtp_delayreport_cmd(session, transaction, buf, size);
 	default:
 		DBG("Received unknown request id %u", signal_id);
-		return avdtp_unknown_cmd(session, transaction, signal_id);
+		return avdtp_unknown_cmd(session, transaction);
 	}
 }
 
Signature · 1 line
1.7.5.4
#1 lore raw

Hi Michael,

Quoted 9 lines · Mike Brudevold

From: Michael Brudevold <[email protected]>

As per spec, bits other than Transaction Label and Packet Type are RFA. This fixes the RFA bits which were previously set to the invalid signal_id.

Test case TP/SIG/SMG/BI-28-C.

---
 audio/avdtp.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

See commit 998b0976e28cd33cbfd2f71b6f27a162da6fe668

This is how BlueZ used to behave until ESR04 was released (still available on bluetooth.org adopted specs page) which clarified the AVDTP 1.0 specification (both profile and test spec) to define general reject as containing the signal id. For whatever reason it seems like the content of ESR04 never made it the the 1.2 spec version. I'd like to get some clarity on this, i.e. was the errata dropped on purpose or by mistake.

Johan

author
#2 lore raw

Hi Johan,

Quoted 10 lines
Quoted 7 lines

As per spec, bits other than Transaction Label and Packet Type are RFA. This fixes the RFA bits which were previously set to the invalid signal_id.

Test case TP/SIG/SMG/BI-28-C.
---
 audio/avdtp.c |   11 +++++------

 1 files changed, 5 insertions(+), 6 deletions(-)

See commit 998b0976e28cd33cbfd2f71b6f27a162da6fe668

Quoted 7 lines

This is how BlueZ used to behave until ESR04 was released (still available on bluetooth.org adopted specs page) which clarified the AVDTP 1.0 specification (both profile and test spec) to define general reject as containing the signal id. For whatever reason it seems like the content of ESR04 never made it the the 1.2 spec version. I'd like to get some clarity on this, i.e. was the errata dropped on purpose or by mistake.

I think this [1] covers it. It looks like they are in the process of adding a new PICS option that declares support for ESR04, but it's not quite there yet which is why my test plan had TP/SIG/SMG/BI-28-C. The ESR04 test case (TP/SIG/SMG/ESR04/BI-28-C) is already in the test spec. You can drop this patch.

Thanks!
Mike

[1] https://www.bluetooth.org/tse/errata_view.cfm?errata_id=2834