Bluetooth: L2CAP: Introduce internal BR/EDR connection L2CAP notifier API
Adds dedicated function informing L2CAP layer about established BR/EDR connection. Existing 'bt_l2cap_connected()' connection notifier is refactored to use new API 'bt_l2cap_br_connected()' which is implemented in l2cap_br.c file. Currently the new handler is just stub since proper internals of BR/EDR L2CAP signal channel management are not yet implemented in l2cap_br.c file. Change-Id: Idef9be63338c6bb4b3315ec0452d84f2431fbaa2 Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This commit is contained in:
parent
bc1423f441
commit
51044bf5f8
3 changed files with 12 additions and 3 deletions
|
@ -204,14 +204,15 @@ void bt_l2cap_connected(struct bt_conn *conn)
|
|||
struct bt_l2cap_fixed_chan *fchan;
|
||||
struct bt_l2cap_chan *chan;
|
||||
|
||||
fchan = le_channels;
|
||||
|
||||
#if defined(CONFIG_BLUETOOTH_BREDR)
|
||||
if (conn->type == BT_CONN_TYPE_BR) {
|
||||
fchan = br_channels;
|
||||
bt_l2cap_br_connected(conn);
|
||||
return;
|
||||
}
|
||||
#endif /* CONFIG_BLUETOOTH_BREDR */
|
||||
|
||||
fchan = le_channels;
|
||||
|
||||
for (; fchan; fchan = fchan->_next) {
|
||||
if (fchan->accept(conn, &chan) < 0) {
|
||||
continue;
|
||||
|
|
|
@ -53,6 +53,11 @@ static NET_BUF_POOL(br_sig_pool, CONFIG_BLUETOOTH_MAX_CONN,
|
|||
BT_L2CAP_BUF_SIZE(L2CAP_BR_MIN_MTU), &br_sig, NULL,
|
||||
BT_BUF_USER_DATA_MIN);
|
||||
|
||||
void bt_l2cap_br_connected(struct bt_conn *conn)
|
||||
{
|
||||
BT_WARN("Not yet implemented");
|
||||
}
|
||||
|
||||
static struct bt_l2cap_server *l2cap_br_server_lookup_psm(uint16_t psm)
|
||||
{
|
||||
struct bt_l2cap_server *server;
|
||||
|
|
|
@ -174,4 +174,7 @@ void bt_l2cap_br_fixed_chan_register(struct bt_l2cap_fixed_chan *chan);
|
|||
|
||||
/* Initialize BR/EDR L2CAP signal layer */
|
||||
void bt_l2cap_br_init(void);
|
||||
|
||||
/* Notify BR/EDR L2CAP channels about established new ACL connection */
|
||||
void bt_l2cap_br_connected(struct bt_conn *conn);
|
||||
#endif /* CONFIG_BLUETOOTH_BREDR */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue