diff mbox

[for-4.13] brcmfmac: fix regression in brcmf_sdio_txpkt_hdalign()

Message ID 1499851968-18768-1-git-send-email-arend.vanspriel@broadcom.com (mailing list archive)
State Accepted
Commit 0a16628212b8b0daac643b6a0f1caa4e9482afc8
Delegated to: Kalle Valo
Headers show

Commit Message

Arend van Spriel July 12, 2017, 9:32 a.m. UTC
Recent change in brcmf_sdio_txpkt_hdalign() changed the
behavior and now always returns 0. This resulted in a
regression which basically renders the device useless.

Fixes: 270a6c1f65fe ("brcmfmac: rework headroom check in .start_xmit()")
Reported-by: S. Gilles <sgilles@math.umd.edu>
Tested-by: S. Gilles <sgilles@math.umd.edu>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Bob Copeland July 12, 2017, 2:29 p.m. UTC | #1
On Wed, Jul 12, 2017 at 10:32:48AM +0100, Arend van Spriel wrote:
> Recent change in brcmf_sdio_txpkt_hdalign() changed the
> behavior and now always returns 0. This resulted in a
> regression which basically renders the device useless.

Should this go via netdev as well, or just wait for Kalle (returning
on Sunday)?
Arend van Spriel July 12, 2017, 2:57 p.m. UTC | #2
On 12-07-17 16:29, Bob Copeland wrote:
> On Wed, Jul 12, 2017 at 10:32:48AM +0100, Arend van Spriel wrote:
>> Recent change in brcmf_sdio_txpkt_hdalign() changed the
>> behavior and now always returns 0. This resulted in a
>> regression which basically renders the device useless.
> 
> Should this go via netdev as well, or just wait for Kalle (returning
> on Sunday)?

Hi Bob,

This regression got introduced recently so the issue will pop-up in
v4.13-rc1 hence I figured we can wait for Kalle with this one.

Regards,
Arend
Kalle Valo July 21, 2017, 7:41 a.m. UTC | #3
Arend Van Spriel <arend.vanspriel@broadcom.com> wrote:

> Recent change in brcmf_sdio_txpkt_hdalign() changed the
> behavior and now always returns 0. This resulted in a
> regression which basically renders the device useless.
> 
> Fixes: 270a6c1f65fe ("brcmfmac: rework headroom check in .start_xmit()")
> Reported-by: S. Gilles <sgilles@math.umd.edu>
> Tested-by: S. Gilles <sgilles@math.umd.edu>
> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>

Patch applied to wireless-drivers.git, thanks.

0a16628212b8 brcmfmac: fix regression in brcmf_sdio_txpkt_hdalign()
diff mbox

Patch

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index fbcbb43..c3ecec6 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -2053,12 +2053,13 @@  static int brcmf_sdio_txpkt_hdalign(struct brcmf_sdio *bus, struct sk_buff *pkt)
 				atomic_inc(&stats->pktcow_failed);
 				return -ENOMEM;
 			}
+			head_pad = 0;
 		}
 		skb_push(pkt, head_pad);
 		dat_buf = (u8 *)(pkt->data);
 	}
 	memset(dat_buf, 0, head_pad + bus->tx_hdrlen);
-	return 0;
+	return head_pad;
 }
 
 /**