Bluetooth: Improve skb handling in mgmt_device_connected()
authorRadoslaw Biernacki <rad@semihalf.com>
Tue, 1 Feb 2022 20:10:33 +0000 (20:10 +0000)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 2 Feb 2022 01:36:09 +0000 (17:36 -0800)
commit5dee595b19df80bda081d6cd27043a876bf25aee
treef972297b3fc2f0ab1e160e523afc856788909654
parent241026130c6cb6001e8f2bacf578ccfec6a56478
Bluetooth: Improve skb handling in mgmt_device_connected()

This patch introduce eir_skb_put_data() that can be used to simplify
operations on eir in goal of eliminating the necessity of intermediary
buffers.
eir_skb_put_data() is in pair to what eir_append_data() does with help of
eir_len, but without awkwardness when passing return value to skb_put() (as
it returns updated offset not size).

Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/eir.h
net/bluetooth/mgmt.c