提交 b24c6247 编写于 作者: H Hemant Gupta 提交者: Gustavo Padovan

Bluetooth: Fix clearing discovery type when stopping discovery

This patch prevents resetting of discovery type while stopping
discovery, since otherwise the wrong type might be send in case of
discovery failure. It also doesn't matter that we are "lazy" with
updating the type since it is anyway reset when starting discovery again
and it's not needed to know the current discovery state.
Signed-off-by: NHemant Gupta <hemant.gupta@stericsson.com>
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
上级 0ed09148
...@@ -385,7 +385,6 @@ void hci_discovery_set_state(struct hci_dev *hdev, int state) ...@@ -385,7 +385,6 @@ void hci_discovery_set_state(struct hci_dev *hdev, int state)
case DISCOVERY_STOPPED: case DISCOVERY_STOPPED:
if (hdev->discovery.state != DISCOVERY_STARTING) if (hdev->discovery.state != DISCOVERY_STARTING)
mgmt_discovering(hdev, 0); mgmt_discovering(hdev, 0);
hdev->discovery.type = 0;
break; break;
case DISCOVERY_STARTING: case DISCOVERY_STARTING:
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册