* [PATCH 0/1] Bluetooth: RPN negotiation fix
@ 2010-07-23 9:57 Yuri Kululin
2010-07-23 9:57 ` [PATCH 1/1] " Yuri Kululin
0 siblings, 1 reply; 3+ messages in thread
From: Yuri Kululin @ 2010-07-23 9:57 UTC (permalink / raw)
To: linux-bluetooth; +Cc: ext-yuri.kululin
RFCOMM port settings can be changed by using RPN command.
If the bit rate 115200 bit/s (which is not default according to
the ETSI 3GPP TS 07.10) is not supported by sender of RPN command
sender and receiver will never find an agreement. Currently RFCOMM accepts
115200 bit/s only.
This patch fixes this issue.
Please review.
Best regards,
Yuri Kululin
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] Bluetooth: RPN negotiation fix
2010-07-23 9:57 [PATCH 0/1] Bluetooth: RPN negotiation fix Yuri Kululin
@ 2010-07-23 9:57 ` Yuri Kululin
2010-08-11 17:31 ` Marcel Holtmann
0 siblings, 1 reply; 3+ messages in thread
From: Yuri Kululin @ 2010-07-23 9:57 UTC (permalink / raw)
To: linux-bluetooth; +Cc: ext-yuri.kululin
According to the ETSI 3GPP TS 07.10 the default bit rate value for RFCOMM
is 9600 bit/s. Return this bit rate in case of RPN request and accept other
sane bit rates proposed by the sender in RPM command.
Signed-off-by: Yuri Kululin <ext-yuri.kululin@nokia.com>
---
net/bluetooth/rfcomm/core.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index 7dca91b..16b79f3 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -1415,8 +1415,8 @@ static int rfcomm_recv_rpn(struct rfcomm_session *s, int cr, int len, struct sk_
return 0;
if (len == 1) {
- /* This is a request, return default settings */
- bit_rate = RFCOMM_RPN_BR_115200;
+ /* This is a request, return default (according to ETSI TS 07.10) settings */
+ bit_rate = RFCOMM_RPN_BR_9600;
data_bits = RFCOMM_RPN_DATA_8;
stop_bits = RFCOMM_RPN_STOP_1;
parity = RFCOMM_RPN_PARITY_NONE;
@@ -1431,9 +1431,9 @@ static int rfcomm_recv_rpn(struct rfcomm_session *s, int cr, int len, struct sk_
if (rpn->param_mask & cpu_to_le16(RFCOMM_RPN_PM_BITRATE)) {
bit_rate = rpn->bit_rate;
- if (bit_rate != RFCOMM_RPN_BR_115200) {
+ if (bit_rate > RFCOMM_RPN_BR_230400) {
BT_DBG("RPN bit rate mismatch 0x%x", bit_rate);
- bit_rate = RFCOMM_RPN_BR_115200;
+ bit_rate = RFCOMM_RPN_BR_9600;
rpn_mask ^= RFCOMM_RPN_PM_BITRATE;
}
}
--
1.7.1.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] Bluetooth: RPN negotiation fix
2010-07-23 9:57 ` [PATCH 1/1] " Yuri Kululin
@ 2010-08-11 17:31 ` Marcel Holtmann
0 siblings, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2010-08-11 17:31 UTC (permalink / raw)
To: Yuri Kululin; +Cc: linux-bluetooth
Hi Yuri,
> According to the ETSI 3GPP TS 07.10 the default bit rate value for RFCOMM
> is 9600 bit/s. Return this bit rate in case of RPN request and accept other
> sane bit rates proposed by the sender in RPM command.
>
> Signed-off-by: Yuri Kululin <ext-yuri.kululin@nokia.com>
> ---
> net/bluetooth/rfcomm/core.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
patch has been applied. Thanks.
Regards
Marcel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-11 17:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-23 9:57 [PATCH 0/1] Bluetooth: RPN negotiation fix Yuri Kululin
2010-07-23 9:57 ` [PATCH 1/1] " Yuri Kululin
2010-08-11 17:31 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox