diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-06-11 04:13:10 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-06-11 23:10:31 -0400 |
commit | 11778716ededa873f24eebaae011e52f3d27dfca (patch) | |
tree | cb4d9a7f5065b74ee9275da7f20222737e964e9b /net/bluetooth/hci_core.c | |
parent | f0e0951007b051046587e73ffc9716caa024d537 (diff) |
Bluetooth: Fix not setting HCI_RESET flag for AMP
Move reset function to common initialization section fixing
not setting HCI_RESET flag for amp_init.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r-- | net/bluetooth/hci_core.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index f7a35cc400cf..a2bdf936ed46 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -188,12 +188,6 @@ static void bredr_init(struct hci_dev *hdev) | |||
188 | 188 | ||
189 | /* Mandatory initialization */ | 189 | /* Mandatory initialization */ |
190 | 190 | ||
191 | /* Reset */ | ||
192 | if (!test_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks)) { | ||
193 | set_bit(HCI_RESET, &hdev->flags); | ||
194 | hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL); | ||
195 | } | ||
196 | |||
197 | /* Read Local Supported Features */ | 191 | /* Read Local Supported Features */ |
198 | hci_send_cmd(hdev, HCI_OP_READ_LOCAL_FEATURES, 0, NULL); | 192 | hci_send_cmd(hdev, HCI_OP_READ_LOCAL_FEATURES, 0, NULL); |
199 | 193 | ||
@@ -234,9 +228,6 @@ static void amp_init(struct hci_dev *hdev) | |||
234 | { | 228 | { |
235 | hdev->flow_ctl_mode = HCI_FLOW_CTL_MODE_BLOCK_BASED; | 229 | hdev->flow_ctl_mode = HCI_FLOW_CTL_MODE_BLOCK_BASED; |
236 | 230 | ||
237 | /* Reset */ | ||
238 | hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL); | ||
239 | |||
240 | /* Read Local Version */ | 231 | /* Read Local Version */ |
241 | hci_send_cmd(hdev, HCI_OP_READ_LOCAL_VERSION, 0, NULL); | 232 | hci_send_cmd(hdev, HCI_OP_READ_LOCAL_VERSION, 0, NULL); |
242 | 233 | ||
@@ -262,6 +253,10 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt) | |||
262 | } | 253 | } |
263 | skb_queue_purge(&hdev->driver_init); | 254 | skb_queue_purge(&hdev->driver_init); |
264 | 255 | ||
256 | /* Reset */ | ||
257 | if (!test_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks)) | ||
258 | hci_reset_req(hdev, 0); | ||
259 | |||
265 | switch (hdev->dev_type) { | 260 | switch (hdev->dev_type) { |
266 | case HCI_BREDR: | 261 | case HCI_BREDR: |
267 | bredr_init(hdev); | 262 | bredr_init(hdev); |