Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth: Classic: Move classic functions from conn.c to conn_br.c #87474

Merged

Conversation

lylezhu2012
Copy link
Collaborator

Move functions bt_sco_cleanup(), bt_conn_create_br(), bt_hci_connect_br_cancel(), and bt_conn_get_dst_br() from conn.c to conn_br.c.

Change the function bt_hci_connect_br_cancel() to internal public function.

Add a header file conn_br_internal.h. And declare the function bt_hci_connect_br_cancel() in the header file.

Move functions `bt_sco_cleanup()`, `bt_conn_create_br()`,
`bt_hci_connect_br_cancel()`, and `bt_conn_get_dst_br()` from `conn.c`
to `conn_br.c`.

Change the function `bt_hci_connect_br_cancel()` to internal public
function.

Add a header file `conn_br_internal.h`. And declare the function
`bt_hci_connect_br_cancel()` in the header file.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
@jhedberg
Copy link
Member

@lylezhu2012 why are you still leaving some BR/EDR functions in conn.c? Why not move everything?

@lylezhu2012
Copy link
Collaborator Author

@lylezhu2012 why are you still leaving some BR/EDR functions in conn.c? Why not move everything?

Too many functions use sco_conns, and they are not unique to classic. And also acl_conns are shared by LE and classic. For now, I think it is hard to move all code blocks of classic to conn_br.c.

@jhedberg
Copy link
Member

Too many functions use sco_conns, and they are not unique to classic. And also acl_conns are shared by LE and classic. For now, I think it is hard to move all code blocks of classic to conn_br.c.

Ok, makes sense. Thanks for the clarification.

@kartben kartben merged commit 22ea55c into zephyrproject-rtos:main Mar 25, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Classic Bluetooth Classic (BR/EDR) area: Bluetooth Host Bluetooth Host (excluding BR/EDR) area: Bluetooth
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants