File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 92
92
HCI_SERVICE_CACHE ,
93
93
HCI_LINK_KEYS ,
94
94
HCI_DEBUG_KEYS ,
95
+ HCI_UNREGISTER ,
95
96
96
97
HCI_LE_SCAN ,
97
98
HCI_SSP_ENABLED ,
Original file line number Diff line number Diff line change @@ -666,6 +666,11 @@ int hci_dev_open(__u16 dev)
666
666
667
667
hci_req_lock (hdev );
668
668
669
+ if (test_bit (HCI_UNREGISTER , & hdev -> dev_flags )) {
670
+ ret = - ENODEV ;
671
+ goto done ;
672
+ }
673
+
669
674
if (hdev -> rfkill && rfkill_blocked (hdev -> rfkill )) {
670
675
ret = - ERFKILL ;
671
676
goto done ;
@@ -1850,6 +1855,8 @@ void hci_unregister_dev(struct hci_dev *hdev)
1850
1855
1851
1856
BT_DBG ("%p name %s bus %d" , hdev , hdev -> name , hdev -> bus );
1852
1857
1858
+ set_bit (HCI_UNREGISTER , & hdev -> dev_flags );
1859
+
1853
1860
write_lock (& hci_dev_list_lock );
1854
1861
list_del (& hdev -> list );
1855
1862
write_unlock (& hci_dev_list_lock );
You can’t perform that action at this time.
0 commit comments