mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 01:49:36 +00:00
mwifiex: set needed_headroom, not hard_header_len
hard_header_len provides limitations for things like AF_PACKET, such that we don't allow transmitting packets smaller than this. needed_headroom provides a suggested minimum headroom for SKBs, so that we can trivally add our headers to the front. The latter is the correct field to use in this case, while the former mostly just prevents sending small AF_PACKET frames. In any case, mwifiex already does its own bounce buffering [1] if we don't have enough headroom, so hints (not hard limits) are all that are needed. This is the essentially the same bug (and fix) that brcmfmac had, fixed in commitcb39288fd6
("brcmfmac: use ndev->needed_headroom to reserve additional header space"). [1] mwifiex_hard_start_xmit(): if (skb_headroom(skb) < MWIFIEX_MIN_DATA_HEADER_LEN) { [...] /* Insufficient skb headroom - allocate a new skb */ Fixes:5e6e3a92b9
("wireless: mwifiex: initial commit for Marvell mwifiex driver") Signed-off-by: Brian Norris <briannorris@chromium.org> Acked-by: Ganapathi Bhat <ganapathi.gbhat@nxp.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
310443268b
commit
9454f7a895
1 changed files with 1 additions and 1 deletions
|
@ -3052,7 +3052,7 @@ struct wireless_dev *mwifiex_add_virtual_intf(struct wiphy *wiphy,
|
||||||
|
|
||||||
dev->flags |= IFF_BROADCAST | IFF_MULTICAST;
|
dev->flags |= IFF_BROADCAST | IFF_MULTICAST;
|
||||||
dev->watchdog_timeo = MWIFIEX_DEFAULT_WATCHDOG_TIMEOUT;
|
dev->watchdog_timeo = MWIFIEX_DEFAULT_WATCHDOG_TIMEOUT;
|
||||||
dev->hard_header_len += MWIFIEX_MIN_DATA_HEADER_LEN;
|
dev->needed_headroom = MWIFIEX_MIN_DATA_HEADER_LEN;
|
||||||
dev->ethtool_ops = &mwifiex_ethtool_ops;
|
dev->ethtool_ops = &mwifiex_ethtool_ops;
|
||||||
|
|
||||||
mdev_priv = netdev_priv(dev);
|
mdev_priv = netdev_priv(dev);
|
||||||
|
|
Loading…
Reference in a new issue