aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2013-10-15 13:31:12 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2013-10-15 14:28:38 -0400
commitefdcf8e3d716730d2212dfd973571a0ed00c9b10 (patch)
tree17b3ba516a150a5b35580d1138c4612d0d6e60ff /net/bluetooth/hci_event.c
parent9493399108a186492bb828417a43ff37d9ae48fa (diff)
Bluetooth: Move eir_get_length() function into hci_event.c
The eir_get_length() function is only used from hci_event.c and so instead of having a public function move it to the location where it is used. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 071c0df118d5..7450626b7704 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2928,6 +2928,23 @@ unlock:
2928 hci_dev_unlock(hdev); 2928 hci_dev_unlock(hdev);
2929} 2929}
2930 2930
2931static inline size_t eir_get_length(u8 *eir, size_t eir_len)
2932{
2933 size_t parsed = 0;
2934
2935 while (parsed < eir_len) {
2936 u8 field_len = eir[0];
2937
2938 if (field_len == 0)
2939 return parsed;
2940
2941 parsed += field_len + 1;
2942 eir += field_len + 1;
2943 }
2944
2945 return eir_len;
2946}
2947
2931static void hci_extended_inquiry_result_evt(struct hci_dev *hdev, 2948static void hci_extended_inquiry_result_evt(struct hci_dev *hdev,
2932 struct sk_buff *skb) 2949 struct sk_buff *skb)
2933{ 2950{