Merge tag 'for-net-next-2021-12-29' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Luiz Augusto von Dentz says: ==================== bluetooth-next pull request for net-next: - Add support for Foxconn MT7922A - Add support for Realtek RTL8852AE - Rework HCI event handling to use skb_pull_data * tag 'for-net-next-2021-12-29' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next: (62 commits) Bluetooth: MGMT: Fix spelling mistake "simultanous" -> "simultaneous" Bluetooth: vhci: Set HCI_QUIRK_VALID_LE_STATES Bluetooth: MGMT: Fix LE simultaneous roles UUID if not supported Bluetooth: hci_sync: Add check simultaneous roles support Bluetooth: hci_sync: Wait for proper events when connecting LE Bluetooth: hci_sync: Add support for waiting specific LE subevents Bluetooth: hci_sync: Add hci_le_create_conn_sync Bluetooth: hci_event: Use skb_pull_data when processing inquiry results Bluetooth: hci_sync: Push sync command cancellation to workqueue Bluetooth: hci_qca: Stop IBS timer during BT OFF Bluetooth: btusb: Add support for Foxconn MT7922A Bluetooth: btintel: Add missing quirks and msft ext for legacy bootloader Bluetooth: btusb: Add two more Bluetooth parts for WCN6855 Bluetooth: L2CAP: Fix using wrong mode Bluetooth: hci_sync: Fix not always pausing advertising when necessary Bluetooth: mgmt: Make use of mgmt_send_event_skb in MGMT_EV_DEVICE_CONNECTED Bluetooth: mgmt: Make use of mgmt_send_event_skb in MGMT_EV_DEVICE_FOUND Bluetooth: mgmt: Introduce mgmt_alloc_skb and mgmt_send_event_skb Bluetooth: btusb: Return error code when getting patch status failed Bluetooth: btusb: Handle download_firmware failure cases ... ==================== Link: https://lore.kernel.org/r/20211229211258.2290966-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -2023,6 +2023,30 @@ void *skb_pull(struct sk_buff *skb, unsigned int len)
|
||||
}
|
||||
EXPORT_SYMBOL(skb_pull);
|
||||
|
||||
/**
|
||||
* skb_pull_data - remove data from the start of a buffer returning its
|
||||
* original position.
|
||||
* @skb: buffer to use
|
||||
* @len: amount of data to remove
|
||||
*
|
||||
* This function removes data from the start of a buffer, returning
|
||||
* the memory to the headroom. A pointer to the original data in the buffer
|
||||
* is returned after checking if there is enough data to pull. Once the
|
||||
* data has been pulled future pushes will overwrite the old data.
|
||||
*/
|
||||
void *skb_pull_data(struct sk_buff *skb, size_t len)
|
||||
{
|
||||
void *data = skb->data;
|
||||
|
||||
if (skb->len < len)
|
||||
return NULL;
|
||||
|
||||
skb_pull(skb, len);
|
||||
|
||||
return data;
|
||||
}
|
||||
EXPORT_SYMBOL(skb_pull_data);
|
||||
|
||||
/**
|
||||
* skb_trim - remove end from a buffer
|
||||
* @skb: buffer to alter
|
||||
|
||||
Reference in New Issue
Block a user