diff options
author | Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> | 2014-09-10 16:34:45 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-09-11 15:27:38 -0400 |
commit | e0106adade2dd16fb776f53f25ffe50da0793f3d (patch) | |
tree | 4918217c0a3cb8eea99627904d56048355b47fff /drivers/net/wireless/ath/wil6210/netdev.c | |
parent | 1bd922fce29168b8a7d5b53c7be89de87381896b (diff) | |
download | linux-e0106adade2dd16fb776f53f25ffe50da0793f3d.tar.gz linux-e0106adade2dd16fb776f53f25ffe50da0793f3d.tar.bz2 linux-e0106adade2dd16fb776f53f25ffe50da0793f3d.zip |
wil6210: enlarge TX/RX buffer length
HW supports upto 2304 packet size on the air.
HW is responsible for adding (Tx) or removing (Rx) the following headers:
802.11 hdr: 26B
SNAP: 8B
CRC: 4B
Security (optional): 24B
HW adds max 62B to the payload passed from driver. It means driver can use
max packet size of 2304-62 = 2242B
Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/netdev.c')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/netdev.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/wil6210/netdev.c b/drivers/net/wireless/ath/wil6210/netdev.c index a995d9d59cb5..1c0c77d9a14f 100644 --- a/drivers/net/wireless/ath/wil6210/netdev.c +++ b/drivers/net/wireless/ath/wil6210/netdev.c @@ -17,6 +17,7 @@ #include <linux/etherdevice.h> #include "wil6210.h" +#include "txrx.h" static int wil_open(struct net_device *ndev) { @@ -40,8 +41,10 @@ static int wil_change_mtu(struct net_device *ndev, int new_mtu) { struct wil6210_priv *wil = ndev_to_wil(ndev); - if (new_mtu < 68 || new_mtu > IEEE80211_MAX_DATA_LEN_DMG) + if (new_mtu < 68 || new_mtu > (TX_BUF_LEN - ETH_HLEN)) { + wil_err(wil, "invalid MTU %d\n", new_mtu); return -EINVAL; + } wil_dbg_misc(wil, "change MTU %d -> %d\n", ndev->mtu, new_mtu); ndev->mtu = new_mtu; |