summaryrefslogtreecommitdiffstats
path: root/sys/netgraph
diff options
context:
space:
mode:
authoremax <emax@FreeBSD.org>2005-01-11 01:39:53 +0000
committeremax <emax@FreeBSD.org>2005-01-11 01:39:53 +0000
commit580248c6b5cd3aadd2c92bf157c02d6ed1f9871a (patch)
tree837fc090ba11403957baae574ccd6a561c169ddb /sys/netgraph
parent3fba2d8bb33bb85c7359fa9087c8cae7ae40ce99 (diff)
downloadFreeBSD-src-580248c6b5cd3aadd2c92bf157c02d6ed1f9871a.zip
FreeBSD-src-580248c6b5cd3aadd2c92bf157c02d6ed1f9871a.tar.gz
Make default RFCOMM session MTU match default L2CAP MTU.
This is just a workaround for a know problem with Motorola E1000 phone. Something is wrong with the configuration of L2CAP/RFCOMM channel. Even though we set L2CAP MTU to 132 bytes (default RFCOMM MTU 127 + 5 bytes RFCOMM frame header) and the phone accepts it, the phone still sends oversized L2CAP packets. It appears that the phone wants to use bigger (667 bytes) RFCOMM frames, but it does not segment them according to the configured L2CAP MTU. The 667 bytes RFCOMM frame size corresponds to the default L2CAP MTU of 672 bytes (667 + 5 bytes RFCOMM frame header). This problem only appears if connection was initiated from the phone. I'm not sure who is at fault here, so for now just put workaround in place. Quick look at the spec did not reveal any anwser. Tested by: Jes < jjess at freebsd dot polarhome dot com > MFC after: 3 days
Diffstat (limited to 'sys/netgraph')
-rw-r--r--sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h b/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h
index cfc8873..4dd1b82 100644
--- a/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h
+++ b/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h
@@ -42,7 +42,7 @@
/* XXX FIXME this does not belong here */
-#define RFCOMM_DEFAULT_MTU 127
+#define RFCOMM_DEFAULT_MTU 667
#define RFCOMM_MAX_MTU 1024
#define RFCOMM_DEFAULT_CREDITS 7
@@ -218,9 +218,9 @@ struct rfcomm_mcc_pn
*****************************************************************************/
#define NG_BTSOCKET_RFCOMM_SENDSPACE \
- (RFCOMM_MAX_CREDITS * RFCOMM_DEFAULT_MTU * 10)
+ (RFCOMM_MAX_CREDITS * RFCOMM_DEFAULT_MTU * 2)
#define NG_BTSOCKET_RFCOMM_RECVSPACE \
- (RFCOMM_MAX_CREDITS * RFCOMM_DEFAULT_MTU * 10)
+ (RFCOMM_MAX_CREDITS * RFCOMM_DEFAULT_MTU * 2)
/*
* Bluetooth RFCOMM session. One L2CAP connection == one RFCOMM session
OpenPOWER on IntegriCloud