wireless/bluetooth: Support removable bluetooth modules.

This bluetooth stack remains in an inconsistent state when
the bluetooth HCI module is removed. This change adds a
bt_netdev_unregister function that can be used to clean up
after a module is removed. Some global variables are also
set to their default values.
This commit is contained in:
Lwazi Dube
2023-05-03 13:05:45 -04:00
committed by Xiang Xiao
parent af559a8311
commit 16fc1b47b9
9 changed files with 238 additions and 7 deletions
@@ -119,4 +119,21 @@ struct bt_driver_s
int bt_netdev_register(FAR struct bt_driver_s *btdev);
/****************************************************************************
* Name: bt_netdev_unregister
*
* Description:
* Unregister a network driver registered by bt_netdev_register.
*
* Input Parameters:
* btdev - An instance of the low-level driver interface structure.
*
* Returned Value:
* Zero (OK) is returned on success. Otherwise a negated errno value is
* returned to indicate the nature of the failure.
*
****************************************************************************/
int bt_netdev_unregister(FAR struct bt_driver_s *btdev);
#endif /* __INCLUDE_NUTTX_WIRELESS_BLUETOOTH_BT_DRIVER_H */