summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJaganath Kanakkassery <jaganathx.kanakkassery@intel.com>2017-01-17 22:16:19 +0530
committerJohan Hedberg <johan.hedberg@intel.com>2017-01-28 08:43:41 +0200
commit91f9c9cf1cfd98daee949553bc423eab4f52c5d3 (patch)
treefd2269d114d135c8d151bd0dbb6e14de18135e0b /include
parent17ea79e733a5b84527b4331903adec97ecf49d1d (diff)
Bluetooth: RFCOMM: Implement MSC Flow Control
This is mainly for backward compatibility with 1.0b devices and for spec compliance. CFC is mandatory post 1.0b spec where in MSC FC shall not be used. FC bit in MSC is used to manage the flow control. If FC is 1 then the device is unable to accept frames. Implementation is done by reusing "tx_credit" as a binary semaphore wherein it will be blocked if MSC is recieved with FC bit 1 and unblocked if FC bit is 0. Once tx thread is scheduled then semaphore should be always available until all the buf in queue is sent. Change-Id: I91181668ec0f46ff0b02905dd97e4503fc1fa7a7 Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/bluetooth/rfcomm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/bluetooth/rfcomm.h b/include/bluetooth/rfcomm.h
index d54f57434..3da79574a 100644
--- a/include/bluetooth/rfcomm.h
+++ b/include/bluetooth/rfcomm.h
@@ -80,7 +80,7 @@ struct bt_rfcomm_dlc {
/* Queue for outgoing data */
struct k_fifo tx_queue;
- /** TX credits */
+ /* TX credits, Reuse as a binary sem for MSC FC if CFC is not enabled */
struct k_sem tx_credits;
struct bt_rfcomm_session *session;