Re: [PATCH] Bluetooth: Fix mgmt response status when removing adapter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Johan,

> When an adapter is removed (hci_unregister_dev) any pending mgmt
> commands for that adapter should get the appropriate INVALID_INDEX
> response. Since hci_unregister_dev() calls hci_dev_do_close() first
> that'd so far have caused "not powered" responses to be sent.
> 
> Skipping the HCI_UNREGISTER case in mgmt_powered() is also not a
> solution since before reaching the mgmt_index_removed() stage any
> hci_conn callbacks (e.g. used by pairing) will get called, thereby
> causing "disconnected" status responses to be sent.
> 
> The fix that covers all scenarios is to handle both INVALID_INDEX and
> NOT_POWERED responses through the mgmt_powered() function. The
> INVALID_INDEX response sending from mgmt_index_removed() is left
> untouched since there are a couple of places not related to powering off
> or removing an adapter that call it (e.g. configuring a new bdaddr).
> 
> Signed-off-by: Johan Hedberg <johan.hedberg@xxxxxxxxx>
> ---
> net/bluetooth/mgmt.c | 18 +++++++++++++++---
> 1 file changed, 15 insertions(+), 3 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux