Skip to content

Commit 46c0d94

Browse files
ceggers-arriVudentz
authored andcommitted
Bluetooth: hci_sync: revert some mesh modifications
This reverts minor parts of the changes made in commit b338d91 ("Bluetooth: Implement support for Mesh"). It looks like these changes were only made for development purposes but shouldn't have been part of the commit. Fixes: b338d91 ("Bluetooth: Implement support for Mesh") Cc: [email protected] Signed-off-by: Christian Eggers <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 1f029b4 commit 46c0d94

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

net/bluetooth/hci_sync.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1970,13 +1970,10 @@ static int hci_clear_adv_sets_sync(struct hci_dev *hdev, struct sock *sk)
19701970
static int hci_clear_adv_sync(struct hci_dev *hdev, struct sock *sk, bool force)
19711971
{
19721972
struct adv_info *adv, *n;
1973-
int err = 0;
19741973

19751974
if (ext_adv_capable(hdev))
19761975
/* Remove all existing sets */
1977-
err = hci_clear_adv_sets_sync(hdev, sk);
1978-
if (ext_adv_capable(hdev))
1979-
return err;
1976+
return hci_clear_adv_sets_sync(hdev, sk);
19801977

19811978
/* This is safe as long as there is no command send while the lock is
19821979
* held.
@@ -2004,13 +2001,11 @@ static int hci_clear_adv_sync(struct hci_dev *hdev, struct sock *sk, bool force)
20042001
static int hci_remove_adv_sync(struct hci_dev *hdev, u8 instance,
20052002
struct sock *sk)
20062003
{
2007-
int err = 0;
2004+
int err;
20082005

20092006
/* If we use extended advertising, instance has to be removed first. */
20102007
if (ext_adv_capable(hdev))
2011-
err = hci_remove_ext_adv_instance_sync(hdev, instance, sk);
2012-
if (ext_adv_capable(hdev))
2013-
return err;
2008+
return hci_remove_ext_adv_instance_sync(hdev, instance, sk);
20142009

20152010
/* This is safe as long as there is no command send while the lock is
20162011
* held.
@@ -2109,16 +2104,13 @@ int hci_read_tx_power_sync(struct hci_dev *hdev, __le16 handle, u8 type)
21092104
int hci_disable_advertising_sync(struct hci_dev *hdev)
21102105
{
21112106
u8 enable = 0x00;
2112-
int err = 0;
21132107

21142108
/* If controller is not advertising we are done. */
21152109
if (!hci_dev_test_flag(hdev, HCI_LE_ADV))
21162110
return 0;
21172111

21182112
if (ext_adv_capable(hdev))
2119-
err = hci_disable_ext_adv_instance_sync(hdev, 0x00);
2120-
if (ext_adv_capable(hdev))
2121-
return err;
2113+
return hci_disable_ext_adv_instance_sync(hdev, 0x00);
21222114

21232115
return __hci_cmd_sync_status(hdev, HCI_OP_LE_SET_ADV_ENABLE,
21242116
sizeof(enable), &enable, HCI_CMD_TIMEOUT);

0 commit comments

Comments
 (0)