diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2012-01-15 20:04:43 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-13 17:01:27 +0200 |
commit | 4ddb1930f91b7395a760cd4a8cf1b2a87011571c (patch) | |
tree | 2cd6027778ab7e9c7d1ee9e3eefe595fad15e9fb /net/bluetooth/hci_event.c | |
parent | e319d2e74378660c5e09a1b8703663ba97f0f62a (diff) | |
download | lwn-4ddb1930f91b7395a760cd4a8cf1b2a87011571c.tar.gz lwn-4ddb1930f91b7395a760cd4a8cf1b2a87011571c.zip |
Bluetooth: Rename eir_has_complete_name to eir_has_data_type
This allows for other uses such as checking for an embedded class of
device value in order to decide whether to append the class or not.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index e13ce945afc4..d256042a83cf 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -2842,7 +2842,7 @@ static inline void hci_sniff_subrate_evt(struct hci_dev *hdev, struct sk_buff *s BT_DBG("%s status %d", hdev->name, ev->status); } -static inline bool eir_has_complete_name(u8 *data, size_t data_len) +static inline bool eir_has_data_type(u8 *data, size_t data_len, u8 type) { u8 field_len; size_t parsed; @@ -2858,7 +2858,7 @@ static inline bool eir_has_complete_name(u8 *data, size_t data_len) if (parsed > data_len) break; - if (data[1] == EIR_NAME_COMPLETE) + if (data[1] == type) return true; data += field_len + 1; @@ -2893,8 +2893,9 @@ static inline void hci_extended_inquiry_result_evt(struct hci_dev *hdev, struct data.ssp_mode = 0x01; if (test_bit(HCI_MGMT, &hdev->dev_flags)) - name_known = eir_has_complete_name(info->data, - sizeof(info->data)); + name_known = eir_has_data_type(info->data, + sizeof(info->data), + EIR_NAME_COMPLETE); else name_known = true; |