Bluetooth: RFCOMM: Fix some remaining white-space issues
Change-Id: I56f3ffc9dc9dd18ff204224d1a3166f9dbdc4c3f Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
dde0737f1a
commit
9adfb4af17
2 changed files with 21 additions and 17 deletions
|
@ -91,24 +91,28 @@ struct bt_rfcomm_dlc_ops {
|
|||
/** @brief RFCOMM DLC structure. */
|
||||
struct bt_rfcomm_dlc {
|
||||
/* Queue for outgoing data */
|
||||
struct nano_fifo tx_queue;
|
||||
struct nano_fifo tx_queue;
|
||||
|
||||
/** TX credits */
|
||||
struct nano_sem tx_credits;
|
||||
struct bt_rfcomm_session *session;
|
||||
struct bt_rfcomm_dlc_ops *ops;
|
||||
struct bt_rfcomm_dlc *_next;
|
||||
uint16_t mtu;
|
||||
uint8_t dlci;
|
||||
uint8_t state;
|
||||
uint8_t rx_credit;
|
||||
bool initiator;
|
||||
struct nano_sem tx_credits;
|
||||
|
||||
struct bt_rfcomm_session *session;
|
||||
struct bt_rfcomm_dlc_ops *ops;
|
||||
struct bt_rfcomm_dlc *_next;
|
||||
|
||||
uint16_t mtu;
|
||||
uint8_t dlci;
|
||||
uint8_t state;
|
||||
uint8_t rx_credit;
|
||||
bool initiator;
|
||||
|
||||
/* Stack for TX fiber */
|
||||
BT_STACK(stack, 128);
|
||||
};
|
||||
|
||||
struct bt_rfcomm_server {
|
||||
/** Server Channel */
|
||||
uint8_t channel;
|
||||
uint8_t channel;
|
||||
|
||||
/** Server accept callback
|
||||
*
|
||||
|
|
|
@ -80,23 +80,23 @@ struct bt_rfcomm_msc {
|
|||
#define BT_RFCOMM_SIG_MAX_MTU 32767
|
||||
|
||||
#define BT_RFCOMM_CHECK_MTU(mtu) (!!((mtu) >= BT_RFCOMM_SIG_MIN_MTU && \
|
||||
(mtu) <= BT_RFCOMM_SIG_MAX_MTU))
|
||||
(mtu) <= BT_RFCOMM_SIG_MAX_MTU))
|
||||
|
||||
/* Helper to calculate needed outgoing buffer size.
|
||||
* Length in rfcomm header can be two bytes depending on user data length.
|
||||
* One byte in the tail should be reserved for FCS.
|
||||
*/
|
||||
#define BT_RFCOMM_BUF_SIZE(mtu) (CONFIG_BLUETOOTH_HCI_SEND_RESERVE + \
|
||||
sizeof(struct bt_hci_acl_hdr) + \
|
||||
sizeof(struct bt_l2cap_hdr) + \
|
||||
sizeof(struct bt_rfcomm_hdr) + 1 + (mtu) + \
|
||||
BT_RFCOMM_FCS_SIZE)
|
||||
sizeof(struct bt_hci_acl_hdr) + \
|
||||
sizeof(struct bt_l2cap_hdr) + \
|
||||
sizeof(struct bt_rfcomm_hdr) + 1 + (mtu) + \
|
||||
BT_RFCOMM_FCS_SIZE)
|
||||
|
||||
#define BT_RFCOMM_GET_DLCI(addr) (((addr) & 0xfc) >> 2)
|
||||
#define BT_RFCOMM_GET_FRAME_TYPE(ctrl) ((ctrl) & 0xef)
|
||||
#define BT_RFCOMM_GET_MSG_TYPE(type) (((type) & 0xfc) >> 2)
|
||||
#define BT_RFCOMM_GET_MSG_CR(type) (((type) & 0x02) >> 1)
|
||||
#define BT_RFCOMM_GET_LEN(len) (((len) & 0xfe) >> 1)
|
||||
#define BT_RFCOMM_GET_LEN(len) (((len) & 0xfe) >> 1)
|
||||
#define BT_RFCOMM_GET_CHANNEL(dlci) ((dlci) >> 1)
|
||||
#define BT_RFCOMM_GET_PF(ctrl) (((ctrl) & 0x10) >> 4)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue