Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] audio: Fix AVDTP General Reject message
@ 2012-04-27 17:22 Mike Brudevold
  2012-04-28  9:43 ` Johan Hedberg
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Brudevold @ 2012-04-27 17:22 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Michael Brudevold

From: Michael Brudevold <michael.brudevold@logicpd.com>

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(-)

diff --git a/audio/avdtp.c b/audio/avdtp.c
index 34d49d2..6dd19ba 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -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);
 	}
 }
 
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] audio: Fix AVDTP General Reject message
  2012-04-27 17:22 [PATCH] audio: Fix AVDTP General Reject message Mike Brudevold
@ 2012-04-28  9:43 ` Johan Hedberg
  2012-04-28 15:58   ` Mike
  0 siblings, 1 reply; 3+ messages in thread
From: Johan Hedberg @ 2012-04-28  9:43 UTC (permalink / raw)
  To: Mike Brudevold; +Cc: linux-bluetooth, Michael Brudevold

Hi Michael,

On Fri, Apr 27, 2012, Mike Brudevold wrote:
> From: Michael Brudevold <michael.brudevold@logicpd.com>
> 
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] audio: Fix AVDTP General Reject message
  2012-04-28  9:43 ` Johan Hedberg
@ 2012-04-28 15:58   ` Mike
  0 siblings, 0 replies; 3+ messages in thread
From: Mike @ 2012-04-28 15:58 UTC (permalink / raw)
  To: linux-bluetooth

Hi Johan,

>> 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.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-28 15:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-27 17:22 [PATCH] audio: Fix AVDTP General Reject message Mike Brudevold
2012-04-28  9:43 ` Johan Hedberg
2012-04-28 15:58   ` Mike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox