Thread (2 messages) flat view 2 messages, 2 authors, 2014-02-25

Re: [PATCH v3] Bluetooth: Fix advertising address type when toggling connectable

From: Marcel Holtmann <marcel@holtmann.org>
Date: 2014-02-25 18:04:37

Hi Johan,
When the connectable setting is toggled using mgmt_set_connectable the
HCI_CONNECTABLE flag will only be set once the related HCI commands
succeed. When determining what kind of advertising to do we need to
therefore also check whether there is a pending Set Connectable command
in addition to the current flag value.

The enable_advertising function was already taking care of this for the
advertising type with the help of the get_adv_type function, but was
failing to do the same for the address type selection. This patch
converts the get_adv_type function to be more generic in that it returns
the expected connectable state and updates the enable_advertising
function to use the return value both for the advertising type as well
as the advertising address type.

Signed-off-by: Johan Hedberg <redacted>
---
net/bluetooth/mgmt.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
patch has been applied to bluetooth-next tree.

Regards

Marcel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help