From fd6effcaf8a894c0a0f602b943dbc54a170d4418 Mon Sep 17 00:00:00 2001 From: Bob Copeland Date: Thu, 18 Dec 2008 23:23:05 -0500 Subject: ath5k: correct packet length in tx descriptors Packet length calculation (which includes frame check sequence) should take into account whether we add a pad field or not. Extract the calculation into a helper and use it in both places. Changes to desc.c Changes-licensed-under: ISC Changes to ath5k.h, base.c Changes-licensed-under: 3-Clause-BSD Signed-off-by: Bob Copeland Signed-off-by: John W. Linville --- drivers/net/wireless/ath5k/ath5k.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/net/wireless/ath5k/ath5k.h') diff --git a/drivers/net/wireless/ath5k/ath5k.h b/drivers/net/wireless/ath5k/ath5k.h index 13df1191b07..183ffc8e62c 100644 --- a/drivers/net/wireless/ath5k/ath5k.h +++ b/drivers/net/wireless/ath5k/ath5k.h @@ -1350,4 +1350,9 @@ static inline u32 ath5k_hw_bitswap(u32 val, unsigned int bits) return retval; } +static inline int ath5k_pad_size(int hdrlen) +{ + return (hdrlen < 24) ? 0 : hdrlen & 3; +} + #endif -- cgit v1.2.3