* [PATCH] Bluetooth: Fix advertising parameter update when toggling connectable
@ 2014-07-10 7:51 johan.hedberg
2014-07-10 8:04 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: johan.hedberg @ 2014-07-10 7:51 UTC (permalink / raw)
To: linux-bluetooth
From: Johan Hedberg <johan.hedberg@intel.com>
When we change the connectable state and have advertising enabled we
should update the advertising parameters no matter what. The code was
incorrectly only updating them if advertising was not already active.
This patch fixes the issue.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
---
net/bluetooth/mgmt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index b49e6e711166..233e6c128727 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1897,8 +1897,8 @@ static int set_connectable(struct sock *sk, struct hci_dev *hdev, void *data,
if (cp->val || test_bit(HCI_FAST_CONNECTABLE, &hdev->dev_flags))
write_fast_connectable(&req, false);
- if (test_bit(HCI_ADVERTISING, &hdev->dev_flags) &&
- !test_bit(HCI_LE_ADV, &hdev->dev_flags))
+ /* Update the advertising parameters if necessary */
+ if (test_bit(HCI_ADVERTISING, &hdev->dev_flags))
enable_advertising(&req);
err = hci_req_run(&req, set_connectable_complete);
--
1.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Bluetooth: Fix advertising parameter update when toggling connectable
2014-07-10 7:51 [PATCH] Bluetooth: Fix advertising parameter update when toggling connectable johan.hedberg
@ 2014-07-10 8:04 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2014-07-10 8:04 UTC (permalink / raw)
To: Johan Hedberg; +Cc: linux-bluetooth
Hi Johan,
> When we change the connectable state and have advertising enabled we
> should update the advertising parameters no matter what. The code was
> incorrectly only updating them if advertising was not already active.
> This patch fixes the issue.
>
> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
> ---
> net/bluetooth/mgmt.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-10 8:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-10 7:51 [PATCH] Bluetooth: Fix advertising parameter update when toggling connectable johan.hedberg
2014-07-10 8:04 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox