diff options
-rw-r--r-- | include/net/bluetooth/hci_core.h | 10 | ||||
-rw-r--r-- | net/bluetooth/hci_core.c | 26 | ||||
-rw-r--r-- | net/bluetooth/mgmt.c | 2 |
3 files changed, 15 insertions, 23 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index ab94abdeb3c1..964a7888ad0c 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -768,7 +768,7 @@ int hci_inquiry(void __user *arg); | |||
768 | 768 | ||
769 | struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev, | 769 | struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev, |
770 | bdaddr_t *bdaddr, u8 type); | 770 | bdaddr_t *bdaddr, u8 type); |
771 | int hci_blacklist_clear(struct hci_dev *hdev); | 771 | void hci_blacklist_clear(struct hci_dev *hdev); |
772 | int hci_blacklist_add(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); | 772 | int hci_blacklist_add(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); |
773 | int hci_blacklist_del(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); | 773 | int hci_blacklist_del(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); |
774 | 774 | ||
@@ -779,9 +779,9 @@ void hci_conn_params_add(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type, | |||
779 | void hci_conn_params_del(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type); | 779 | void hci_conn_params_del(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type); |
780 | void hci_conn_params_clear(struct hci_dev *hdev); | 780 | void hci_conn_params_clear(struct hci_dev *hdev); |
781 | 781 | ||
782 | int hci_uuids_clear(struct hci_dev *hdev); | 782 | void hci_uuids_clear(struct hci_dev *hdev); |
783 | 783 | ||
784 | int hci_link_keys_clear(struct hci_dev *hdev); | 784 | void hci_link_keys_clear(struct hci_dev *hdev); |
785 | struct link_key *hci_find_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr); | 785 | struct link_key *hci_find_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr); |
786 | int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key, | 786 | int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key, |
787 | bdaddr_t *bdaddr, u8 *val, u8 type, u8 pin_len); | 787 | bdaddr_t *bdaddr, u8 *val, u8 type, u8 pin_len); |
@@ -793,7 +793,7 @@ int hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 addr_type, u8 type, | |||
793 | struct smp_ltk *hci_find_ltk_by_addr(struct hci_dev *hdev, bdaddr_t *bdaddr, | 793 | struct smp_ltk *hci_find_ltk_by_addr(struct hci_dev *hdev, bdaddr_t *bdaddr, |
794 | u8 addr_type, bool master); | 794 | u8 addr_type, bool master); |
795 | int hci_remove_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 bdaddr_type); | 795 | int hci_remove_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 bdaddr_type); |
796 | int hci_smp_ltks_clear(struct hci_dev *hdev); | 796 | void hci_smp_ltks_clear(struct hci_dev *hdev); |
797 | int hci_remove_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr); | 797 | int hci_remove_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr); |
798 | 798 | ||
799 | struct smp_irk *hci_find_irk_by_rpa(struct hci_dev *hdev, bdaddr_t *rpa); | 799 | struct smp_irk *hci_find_irk_by_rpa(struct hci_dev *hdev, bdaddr_t *rpa); |
@@ -803,7 +803,7 @@ int hci_add_irk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 addr_type, | |||
803 | u8 val[16], bdaddr_t *rpa); | 803 | u8 val[16], bdaddr_t *rpa); |
804 | void hci_smp_irks_clear(struct hci_dev *hdev); | 804 | void hci_smp_irks_clear(struct hci_dev *hdev); |
805 | 805 | ||
806 | int hci_remote_oob_data_clear(struct hci_dev *hdev); | 806 | void hci_remote_oob_data_clear(struct hci_dev *hdev); |
807 | struct oob_data *hci_find_remote_oob_data(struct hci_dev *hdev, | 807 | struct oob_data *hci_find_remote_oob_data(struct hci_dev *hdev, |
808 | bdaddr_t *bdaddr); | 808 | bdaddr_t *bdaddr); |
809 | int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr, | 809 | int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr, |
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 957c8f4cc4c7..fd5bb4086613 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -2506,7 +2506,7 @@ static void hci_discov_off(struct work_struct *work) | |||
2506 | mgmt_discoverable_timeout(hdev); | 2506 | mgmt_discoverable_timeout(hdev); |
2507 | } | 2507 | } |
2508 | 2508 | ||
2509 | int hci_uuids_clear(struct hci_dev *hdev) | 2509 | void hci_uuids_clear(struct hci_dev *hdev) |
2510 | { | 2510 | { |
2511 | struct bt_uuid *uuid, *tmp; | 2511 | struct bt_uuid *uuid, *tmp; |
2512 | 2512 | ||
@@ -2514,11 +2514,9 @@ int hci_uuids_clear(struct hci_dev *hdev) | |||
2514 | list_del(&uuid->list); | 2514 | list_del(&uuid->list); |
2515 | kfree(uuid); | 2515 | kfree(uuid); |
2516 | } | 2516 | } |
2517 | |||
2518 | return 0; | ||
2519 | } | 2517 | } |
2520 | 2518 | ||
2521 | int hci_link_keys_clear(struct hci_dev *hdev) | 2519 | void hci_link_keys_clear(struct hci_dev *hdev) |
2522 | { | 2520 | { |
2523 | struct list_head *p, *n; | 2521 | struct list_head *p, *n; |
2524 | 2522 | ||
@@ -2530,11 +2528,9 @@ int hci_link_keys_clear(struct hci_dev *hdev) | |||
2530 | list_del(p); | 2528 | list_del(p); |
2531 | kfree(key); | 2529 | kfree(key); |
2532 | } | 2530 | } |
2533 | |||
2534 | return 0; | ||
2535 | } | 2531 | } |
2536 | 2532 | ||
2537 | int hci_smp_ltks_clear(struct hci_dev *hdev) | 2533 | void hci_smp_ltks_clear(struct hci_dev *hdev) |
2538 | { | 2534 | { |
2539 | struct smp_ltk *k, *tmp; | 2535 | struct smp_ltk *k, *tmp; |
2540 | 2536 | ||
@@ -2542,8 +2538,6 @@ int hci_smp_ltks_clear(struct hci_dev *hdev) | |||
2542 | list_del(&k->list); | 2538 | list_del(&k->list); |
2543 | kfree(k); | 2539 | kfree(k); |
2544 | } | 2540 | } |
2545 | |||
2546 | return 0; | ||
2547 | } | 2541 | } |
2548 | 2542 | ||
2549 | void hci_smp_irks_clear(struct hci_dev *hdev) | 2543 | void hci_smp_irks_clear(struct hci_dev *hdev) |
@@ -2873,7 +2867,7 @@ int hci_remove_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr) | |||
2873 | return 0; | 2867 | return 0; |
2874 | } | 2868 | } |
2875 | 2869 | ||
2876 | int hci_remote_oob_data_clear(struct hci_dev *hdev) | 2870 | void hci_remote_oob_data_clear(struct hci_dev *hdev) |
2877 | { | 2871 | { |
2878 | struct oob_data *data, *n; | 2872 | struct oob_data *data, *n; |
2879 | 2873 | ||
@@ -2881,8 +2875,6 @@ int hci_remote_oob_data_clear(struct hci_dev *hdev) | |||
2881 | list_del(&data->list); | 2875 | list_del(&data->list); |
2882 | kfree(data); | 2876 | kfree(data); |
2883 | } | 2877 | } |
2884 | |||
2885 | return 0; | ||
2886 | } | 2878 | } |
2887 | 2879 | ||
2888 | int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr, | 2880 | int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr, |
@@ -2951,7 +2943,7 @@ struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev, | |||
2951 | return NULL; | 2943 | return NULL; |
2952 | } | 2944 | } |
2953 | 2945 | ||
2954 | int hci_blacklist_clear(struct hci_dev *hdev) | 2946 | void hci_blacklist_clear(struct hci_dev *hdev) |
2955 | { | 2947 | { |
2956 | struct list_head *p, *n; | 2948 | struct list_head *p, *n; |
2957 | 2949 | ||
@@ -2961,8 +2953,6 @@ int hci_blacklist_clear(struct hci_dev *hdev) | |||
2961 | list_del(p); | 2953 | list_del(p); |
2962 | kfree(b); | 2954 | kfree(b); |
2963 | } | 2955 | } |
2964 | |||
2965 | return 0; | ||
2966 | } | 2956 | } |
2967 | 2957 | ||
2968 | int hci_blacklist_add(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type) | 2958 | int hci_blacklist_add(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type) |
@@ -2991,8 +2981,10 @@ int hci_blacklist_del(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type) | |||
2991 | { | 2981 | { |
2992 | struct bdaddr_list *entry; | 2982 | struct bdaddr_list *entry; |
2993 | 2983 | ||
2994 | if (!bacmp(bdaddr, BDADDR_ANY)) | 2984 | if (!bacmp(bdaddr, BDADDR_ANY)) { |
2995 | return hci_blacklist_clear(hdev); | 2985 | hci_blacklist_clear(hdev); |
2986 | return 0; | ||
2987 | } | ||
2996 | 2988 | ||
2997 | entry = hci_blacklist_lookup(hdev, bdaddr, type); | 2989 | entry = hci_blacklist_lookup(hdev, bdaddr, type); |
2998 | if (!entry) | 2990 | if (!entry) |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 473f8687b28b..fbb76a0de580 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -2073,7 +2073,7 @@ static int remove_uuid(struct sock *sk, struct hci_dev *hdev, void *data, | |||
2073 | } | 2073 | } |
2074 | 2074 | ||
2075 | if (memcmp(cp->uuid, bt_uuid_any, 16) == 0) { | 2075 | if (memcmp(cp->uuid, bt_uuid_any, 16) == 0) { |
2076 | err = hci_uuids_clear(hdev); | 2076 | hci_uuids_clear(hdev); |
2077 | 2077 | ||
2078 | if (enable_service_cache(hdev)) { | 2078 | if (enable_service_cache(hdev)) { |
2079 | err = cmd_complete(sk, hdev->id, MGMT_OP_REMOVE_UUID, | 2079 | err = cmd_complete(sk, hdev->id, MGMT_OP_REMOVE_UUID, |