aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2013-04-30 14:29:30 -0400
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2013-06-22 19:23:50 -0400
commit41dc2bd6d13bfccc34d05586be2eb65876a5990a (patch)
tree1d88bf7263f48063b803116805c057271a179848 /net
parentfef5234a791507a2fe1ccfc85f080523fe762320 (diff)
Bluetooth: Make mgmt_start_discovery_failed static
mgmt_start_discovery_failed is now only used in mgmt.c so we can make it a local function. This patch also moves the mgmt_start_ discovery_failed definition up in mgmt.c to avoid forward declaration. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/mgmt.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 434df715448e..a9bd271a736e 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2650,6 +2650,27 @@ int mgmt_interleaved_discovery(struct hci_dev *hdev)
2650 return err; 2650 return err;
2651} 2651}
2652 2652
2653static int mgmt_start_discovery_failed(struct hci_dev *hdev, u8 status)
2654{
2655 struct pending_cmd *cmd;
2656 u8 type;
2657 int err;
2658
2659 hci_discovery_set_state(hdev, DISCOVERY_STOPPED);
2660
2661 cmd = mgmt_pending_find(MGMT_OP_START_DISCOVERY, hdev);
2662 if (!cmd)
2663 return -ENOENT;
2664
2665 type = hdev->discovery.type;
2666
2667 err = cmd_complete(cmd->sk, hdev->id, cmd->opcode, mgmt_status(status),
2668 &type, sizeof(type));
2669 mgmt_pending_remove(cmd);
2670
2671 return err;
2672}
2673
2653static void start_discovery_complete(struct hci_dev *hdev, u8 status) 2674static void start_discovery_complete(struct hci_dev *hdev, u8 status)
2654{ 2675{
2655 BT_DBG("status %d", status); 2676 BT_DBG("status %d", status);
@@ -4190,27 +4211,6 @@ int mgmt_remote_name(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
4190 sizeof(*ev) + eir_len, NULL); 4211 sizeof(*ev) + eir_len, NULL);
4191} 4212}
4192 4213
4193int mgmt_start_discovery_failed(struct hci_dev *hdev, u8 status)
4194{
4195 struct pending_cmd *cmd;
4196 u8 type;
4197 int err;
4198
4199 hci_discovery_set_state(hdev, DISCOVERY_STOPPED);
4200
4201 cmd = mgmt_pending_find(MGMT_OP_START_DISCOVERY, hdev);
4202 if (!cmd)
4203 return -ENOENT;
4204
4205 type = hdev->discovery.type;
4206
4207 err = cmd_complete(cmd->sk, hdev->id, cmd->opcode, mgmt_status(status),
4208 &type, sizeof(type));
4209 mgmt_pending_remove(cmd);
4210
4211 return err;
4212}
4213
4214int mgmt_stop_discovery_failed(struct hci_dev *hdev, u8 status) 4214int mgmt_stop_discovery_failed(struct hci_dev *hdev, u8 status)
4215{ 4215{
4216 struct pending_cmd *cmd; 4216 struct pending_cmd *cmd;