aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorHannes Frederic Sowa <hannes@stressinduktion.org>2013-04-02 10:36:46 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-05 00:46:13 -0400
commit31d1670e73f4911fe401273a8f576edc9c2b5fea (patch)
treec486c48066545f816af98306660cb439428405b6 /drivers/net/ethernet
parent4543fbefe6e06a9e40d9f2b28d688393a299f079 (diff)
atl1e: limit gso segment size to prevent generation of wrong ip length fields
The limit of 0x3c00 is taken from the windows driver. Suggested-by: Huang, Xiong <xiong@qca.qualcomm.com> Cc: Huang, Xiong <xiong@qca.qualcomm.com> Cc: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/atheros/atl1e/atl1e.h2
-rw-r--r--drivers/net/ethernet/atheros/atl1e/atl1e_main.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e.h b/drivers/net/ethernet/atheros/atl1e/atl1e.h
index edfdf6b950e7..b5fd934585e9 100644
--- a/drivers/net/ethernet/atheros/atl1e/atl1e.h
+++ b/drivers/net/ethernet/atheros/atl1e/atl1e.h
@@ -186,7 +186,7 @@ struct atl1e_tpd_desc {
186/* how about 0x2000 */ 186/* how about 0x2000 */
187#define MAX_TX_BUF_LEN 0x2000 187#define MAX_TX_BUF_LEN 0x2000
188#define MAX_TX_BUF_SHIFT 13 188#define MAX_TX_BUF_SHIFT 13
189/*#define MAX_TX_BUF_LEN 0x3000 */ 189#define MAX_TSO_SEG_SIZE 0x3c00
190 190
191/* rrs word 1 bit 0:31 */ 191/* rrs word 1 bit 0:31 */
192#define RRS_RX_CSUM_MASK 0xFFFF 192#define RRS_RX_CSUM_MASK 0xFFFF
diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
index f73d5609439a..ac25f05ff68f 100644
--- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
+++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
@@ -2329,6 +2329,7 @@ static int atl1e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2329 2329
2330 INIT_WORK(&adapter->reset_task, atl1e_reset_task); 2330 INIT_WORK(&adapter->reset_task, atl1e_reset_task);
2331 INIT_WORK(&adapter->link_chg_task, atl1e_link_chg_task); 2331 INIT_WORK(&adapter->link_chg_task, atl1e_link_chg_task);
2332 netif_set_gso_max_size(netdev, MAX_TSO_SEG_SIZE);
2332 err = register_netdev(netdev); 2333 err = register_netdev(netdev);
2333 if (err) { 2334 if (err) {
2334 netdev_err(netdev, "register netdevice failed\n"); 2335 netdev_err(netdev, "register netdevice failed\n");