diff options
author | Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> | 2014-12-23 10:47:11 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-01-15 15:31:25 +0300 |
commit | c44690a157719437d09c83eec393211e7fd65076 (patch) | |
tree | 70798217368751e4638f6250b0262f7675fb7a20 /drivers/net/wireless/ath/wil6210/wil6210.h | |
parent | 26a359d914e977aeab582c868236b450762973f7 (diff) | |
download | linux-c44690a157719437d09c83eec393211e7fd65076.tar.xz |
wil6210: fix max. MPDU size
When configuring Tx/Rx VRING's, driver need to specify max. MPDU size
It should take into account all overhead introduced by 802.3->208.11
transformation.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/wil6210.h')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wil6210.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h index 1b4efd2ea09f..bedb9ed372f4 100644 --- a/drivers/net/wireless/ath/wil6210/wil6210.h +++ b/drivers/net/wireless/ath/wil6210/wil6210.h @@ -62,11 +62,21 @@ static inline u32 WIL_GET_BITS(u32 x, int b0, int b1) #define WIL_MAX_AGG_WSIZE (32) /* FW/HW limit */ /* Hardware offload block adds the following: * 26 bytes - 3-address QoS data header + * 8 bytes - IV + EIV (for GCMP) * 8 bytes - SNAP + * 16 bytes - MIC (for GCMP) * 4 bytes - CRC - * 24 bytes - security related (if connection is secure) */ #define WIL_MAX_MPDU_OVERHEAD (62) + +/* Calculate MAC buffer size for the firmware. It includes all overhead, + * as it will go over the air, and need to be 8 byte aligned + */ +static inline u32 wil_mtu2macbuf(u32 mtu) +{ + return ALIGN(mtu + WIL_MAX_MPDU_OVERHEAD, 8); +} + /* Max supported by wil6210 value for interrupt threshold is 5sec. */ #define WIL6210_ITR_TRSH_MAX (5000000) #define WIL6210_ITR_TRSH_DEFAULT (300) /* usec */ |