diff options
author | Foster Snowhill <forst@pen.gy> | 2023-06-07 15:57:00 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-06-09 10:26:57 +0100 |
commit | 3e65efcca87a9bb5f3b864e0a43d167bc0a8688c (patch) | |
tree | 7bc5a7274a2010aa5647c14c455fdf17469c021c /drivers/net/usb | |
parent | 2203718c2f59ffdd6c78d54e5add594aebb4461e (diff) |
usbnet: ipheth: transmit URBs without trailing padding
The behaviour of the official iOS tethering driver on macOS is to not
transmit any trailing padding at the end of URBs. This is applicable
to both NCM and legacy modes, including older devices.
Adapt the driver to not include trailing padding in TX URBs, matching
the behaviour of the official macOS driver.
Signed-off-by: Foster Snowhill <forst@pen.gy>
Tested-by: Georgi Valkov <gvalkov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/ipheth.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c index 8875a3d0e6d9..dd809e247521 100644 --- a/drivers/net/usb/ipheth.c +++ b/drivers/net/usb/ipheth.c @@ -373,12 +373,10 @@ static netdev_tx_t ipheth_tx(struct sk_buff *skb, struct net_device *net) } memcpy(dev->tx_buf, skb->data, skb->len); - if (skb->len < IPHETH_BUF_SIZE) - memset(dev->tx_buf + skb->len, 0, IPHETH_BUF_SIZE - skb->len); usb_fill_bulk_urb(dev->tx_urb, udev, usb_sndbulkpipe(udev, dev->bulk_out), - dev->tx_buf, IPHETH_BUF_SIZE, + dev->tx_buf, skb->len, ipheth_sndbulk_callback, dev); dev->tx_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; |