aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x_main.c
diff options
context:
space:
mode:
authorVladislav Zolotarov <vladz@broadcom.com>2010-02-16 21:03:40 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-17 16:35:42 -0500
commitd43a7e67ae2f911765b3d5b6cbb85221a9ffd0a4 (patch)
treeb21a43a0bceccb2eca7bbe52c2e20cfa09198cbb /drivers/net/bnx2x_main.c
parentf1e1a199f3a68a32cf86095b3650d761ee8798b9 (diff)
bnx2x: Do not allow enabling LRO if disable_tpa=1
Bug fix: Do not allow enabling LRO if disable_tpa=1. Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x_main.c')
-rw-r--r--drivers/net/bnx2x_main.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 16685a153c10..ccdc3fe13414 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -9968,12 +9968,14 @@ static int bnx2x_set_flags(struct net_device *dev, u32 data)
9968 9968
9969 /* TPA requires Rx CSUM offloading */ 9969 /* TPA requires Rx CSUM offloading */
9970 if ((data & ETH_FLAG_LRO) && bp->rx_csum) { 9970 if ((data & ETH_FLAG_LRO) && bp->rx_csum) {
9971 if (!(dev->features & NETIF_F_LRO)) { 9971 if (!disable_tpa) {
9972 dev->features |= NETIF_F_LRO; 9972 if (!(dev->features & NETIF_F_LRO)) {
9973 bp->flags |= TPA_ENABLE_FLAG; 9973 dev->features |= NETIF_F_LRO;
9974 changed = 1; 9974 bp->flags |= TPA_ENABLE_FLAG;
9975 } 9975 changed = 1;
9976 9976 }
9977 } else
9978 rc = -EINVAL;
9977 } else if (dev->features & NETIF_F_LRO) { 9979 } else if (dev->features & NETIF_F_LRO) {
9978 dev->features &= ~NETIF_F_LRO; 9980 dev->features &= ~NETIF_F_LRO;
9979 bp->flags &= ~TPA_ENABLE_FLAG; 9981 bp->flags &= ~TPA_ENABLE_FLAG;