Commit e77f43d
committed
Bluetooth: hci_core: Fix not handling hdev->le_num_of_adv_sets=1
If hdev->le_num_of_adv_sets is set to 1 it means that only handle 0x00
can be used, but since the MGMT interface instances start from 1
(instance 0 means all instances in case of MGMT_OP_REMOVE_ADVERTISING)
the code needs to map the instance to handle otherwise users will not be
able to advertise as instance 1 would attempt to use handle 0x01.
Fixes: 1d0fac2 ("Bluetooth: Use controller sets when available")
Signed-off-by: Luiz Augusto von Dentz <[email protected]>1 parent 36b1c9c commit e77f43d
File tree
3 files changed
+18
-9
lines changed- include/net/bluetooth
- net/bluetooth
3 files changed
+18
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1765 | 1765 | | |
1766 | 1766 | | |
1767 | 1767 | | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
1768 | 1777 | | |
1769 | 1778 | | |
1770 | 1779 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1043 | 1043 | | |
1044 | 1044 | | |
1045 | 1045 | | |
| 1046 | + | |
1046 | 1047 | | |
1047 | 1048 | | |
1048 | 1049 | | |
1049 | | - | |
1050 | | - | |
1051 | 1050 | | |
1052 | 1051 | | |
1053 | 1052 | | |
| |||
1066 | 1065 | | |
1067 | 1066 | | |
1068 | 1067 | | |
1069 | | - | |
| 1068 | + | |
1070 | 1069 | | |
1071 | 1070 | | |
1072 | 1071 | | |
| |||
1249 | 1248 | | |
1250 | 1249 | | |
1251 | 1250 | | |
1252 | | - | |
| 1251 | + | |
1253 | 1252 | | |
1254 | 1253 | | |
1255 | 1254 | | |
| |||
1331 | 1330 | | |
1332 | 1331 | | |
1333 | 1332 | | |
1334 | | - | |
| 1333 | + | |
1335 | 1334 | | |
1336 | 1335 | | |
1337 | 1336 | | |
| |||
1410 | 1409 | | |
1411 | 1410 | | |
1412 | 1411 | | |
| 1412 | + | |
1413 | 1413 | | |
1414 | 1414 | | |
1415 | | - | |
1416 | | - | |
| 1415 | + | |
1417 | 1416 | | |
1418 | 1417 | | |
1419 | 1418 | | |
1420 | 1419 | | |
1421 | 1420 | | |
1422 | 1421 | | |
1423 | 1422 | | |
1424 | | - | |
| 1423 | + | |
1425 | 1424 | | |
1426 | 1425 | | |
1427 | 1426 | | |
| |||
1734 | 1733 | | |
1735 | 1734 | | |
1736 | 1735 | | |
1737 | | - | |
| 1736 | + | |
1738 | 1737 | | |
1739 | 1738 | | |
1740 | 1739 | | |
| |||
0 commit comments