#include <linux/module.h>
#include <linux/debugfs.h>
#include <linux/kthread.h>
#include <asm/unaligned.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/l2cap.h>
#include <net/bluetooth/rfcomm.h>
Go to the source code of this file.
|
struct rfcomm_dlc * | rfcomm_dlc_alloc (gfp_t prio) |
|
void | rfcomm_dlc_free (struct rfcomm_dlc *d) |
|
int | rfcomm_dlc_open (struct rfcomm_dlc *d, bdaddr_t *src, bdaddr_t *dst, u8 channel) |
|
int | rfcomm_dlc_close (struct rfcomm_dlc *d, int err) |
|
int | rfcomm_dlc_send (struct rfcomm_dlc *d, struct sk_buff *skb) |
|
void | __rfcomm_dlc_throttle (struct rfcomm_dlc *d) |
|
void | __rfcomm_dlc_unthrottle (struct rfcomm_dlc *d) |
|
int | rfcomm_dlc_set_modem_status (struct rfcomm_dlc *d, u8 v24_sig) |
|
int | rfcomm_dlc_get_modem_status (struct rfcomm_dlc *d, u8 *v24_sig) |
|
void | rfcomm_session_getaddr (struct rfcomm_session *s, bdaddr_t *src, bdaddr_t *dst) |
|
int | rfcomm_send_rpn (struct rfcomm_session *s, int cr, u8 dlci, u8 bit_rate, u8 data_bits, u8 stop_bits, u8 parity, u8 flow_ctrl_settings, u8 xon_char, u8 xoff_char, u16 param_mask) |
|
void | rfcomm_dlc_accept (struct rfcomm_dlc *d) |
|
| module_init (rfcomm_init) |
|
| module_exit (rfcomm_exit) |
|
| module_param (disable_cfc, bool, 0644) |
|
| MODULE_PARM_DESC (disable_cfc,"Disable credit based flow control") |
|
| module_param (channel_mtu, int, 0644) |
|
| MODULE_PARM_DESC (channel_mtu,"Default MTU for the RFCOMM channel") |
|
| module_param (l2cap_mtu, uint, 0644) |
|
| MODULE_PARM_DESC (l2cap_mtu,"Default MTU for the L2CAP connection") |
|
| module_param (l2cap_ertm, bool, 0644) |
|
| MODULE_PARM_DESC (l2cap_ertm,"Use L2CAP ERTM mode for connection") |
|
| MODULE_AUTHOR ("Marcel Holtmann <[email protected]>") |
|
| MODULE_DESCRIPTION ("Bluetooth RFCOMM ver "VERSION) |
|
| MODULE_VERSION (VERSION) |
|
| MODULE_LICENSE ("GPL") |
|
| MODULE_ALIAS ("bt-proto-3") |
|
#define __addr |
( |
|
cr, |
|
|
|
dlci |
|
) |
| (((dlci & 0x3f) << 2) | (cr << 1) | 0x01) |
#define __crc |
( |
|
data | ) |
(rfcomm_crc_table[rfcomm_crc_table[0xff ^ data[0]] ^ data[1]]) |
#define __dlci |
( |
|
dir, |
|
|
|
chn |
|
) |
| (((chn & 0x1f) << 1) | dir) |
#define __get_channel |
( |
|
b | ) |
((b & 0xf8) >> 3) |
#define __get_dir |
( |
|
b | ) |
((b & 0x04) >> 2) |
#define __get_dlci |
( |
|
b | ) |
((b & 0xfc) >> 2) |
#define __get_mcc_len |
( |
|
b | ) |
((b & 0xfe) >> 1) |
#define __get_mcc_type |
( |
|
b | ) |
((b & 0xfc) >> 2) |
#define __get_rpn_data_bits |
( |
|
line | ) |
((line) & 0x3) |
#define __get_rpn_parity |
( |
|
line | ) |
(((line) >> 3) & 0x7) |
#define __get_rpn_stop_bits |
( |
|
line | ) |
(((line) >> 2) & 0x1) |
#define __get_type |
( |
|
b | ) |
((b & 0xef)) |
#define __len16 |
( |
|
len | ) |
((len) << 1) |
#define __len8 |
( |
|
len | ) |
(((len) << 1) | 1) |
#define __mcc_type |
( |
|
cr, |
|
|
|
type |
|
) |
| (((type << 2) | (cr << 1) | 0x01)) |
#define __rpn_line_settings |
( |
|
data, |
|
|
|
stop, |
|
|
|
parity |
|
) |
| ((data & 0x3) | ((stop & 0x1) << 2) | ((parity & 0x7) << 3)) |
#define __srv_channel |
( |
|
dlci | ) |
(dlci >> 1) |
#define __test_cr |
( |
|
b | ) |
((b & 0x02)) |
#define __test_ea |
( |
|
b | ) |
((b & 0x01)) |
#define __test_pf |
( |
|
b | ) |
((b & 0x10)) |
MODULE_ALIAS |
( |
"bt-proto-3" |
| ) |
|
MODULE_DESCRIPTION |
( |
"Bluetooth RFCOMM ver " |
VERSION | ) |
|
module_exit |
( |
rfcomm_exit |
| ) |
|
module_init |
( |
rfcomm_init |
| ) |
|
module_param |
( |
disable_cfc |
, |
|
|
bool |
, |
|
|
0644 |
|
|
) |
| |
module_param |
( |
channel_mtu |
, |
|
|
int |
, |
|
|
0644 |
|
|
) |
| |
module_param |
( |
l2cap_mtu |
, |
|
|
uint |
, |
|
|
0644 |
|
|
) |
| |
module_param |
( |
l2cap_ertm |
, |
|
|
bool |
, |
|
|
0644 |
|
|
) |
| |
MODULE_PARM_DESC |
( |
disable_cfc |
, |
|
|
"Disable credit based flow control" |
|
|
) |
| |
MODULE_PARM_DESC |
( |
channel_mtu |
, |
|
|
"Default MTU for the RFCOMM channel" |
|
|
) |
| |
int rfcomm_send_rpn |
( |
struct rfcomm_session * |
s, |
|
|
int |
cr, |
|
|
u8 |
dlci, |
|
|
u8 |
bit_rate, |
|
|
u8 |
data_bits, |
|
|
u8 |
stop_bits, |
|
|
u8 |
parity, |
|
|
u8 |
flow_ctrl_settings, |
|
|
u8 |
xon_char, |
|
|
u8 |
xoff_char, |
|
|
u16 |
param_mask |
|
) |
| |