bluetooth: fix net lock imbalance in drop casse

Signed-off-by: larry <larry@transtekcorp.com>
This commit is contained in:
larry 2022-08-04 19:57:43 +08:00 committed by Xiang Xiao
parent fa9d352566
commit ab33519b1b
1 changed files with 2 additions and 2 deletions

View File

@ -511,6 +511,8 @@ static void btnet_hci_received(FAR struct bt_buf_s *buf, FAR void *context)
frame = buf->frame;
buf->frame = NULL;
net_lock();
/* Ignore the frame if the network is not up */
priv = (FAR struct btnet_driver_s *)context;
@ -556,8 +558,6 @@ static void btnet_hci_received(FAR struct bt_buf_s *buf, FAR void *context)
/* Transfer the frame to the network logic */
net_lock();
#ifdef CONFIG_NET_BLUETOOTH
/* Invoke the PF_BLUETOOTH tap first. If the frame matches
* with a connected PF_BLUETOOTH socket, it will take the