aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDmitry Kravkov <dmitry@broadcom.com>2010-07-27 08:32:19 -0400
committerDavid S. Miller <davem@davemloft.net>2010-07-27 23:35:40 -0400
commit5d7cd49622af9396643f8d2c5ed17039d89fef14 (patch)
treebfc2a67d1445474e5b57c6a14702fe593b589641 /drivers/net
parent5d1e859c5b600c491336f023a2f2105c24597226 (diff)
bnx2x: store module parameters in driver main structure
Store module parameters during initialization of main driver structure. This will allow access to the parameters from different files. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bnx2x/bnx2x.h2
-rw-r--r--drivers/net/bnx2x/bnx2x_main.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
index 3b51c5f0b0a3..237609f84855 100644
--- a/drivers/net/bnx2x/bnx2x.h
+++ b/drivers/net/bnx2x/bnx2x.h
@@ -1006,6 +1006,8 @@ struct bnx2x {
1006 1006
1007 int multi_mode; 1007 int multi_mode;
1008 int num_queues; 1008 int num_queues;
1009 int disable_tpa;
1010 int int_mode;
1009 1011
1010 u32 rx_mode; 1012 u32 rx_mode;
1011#define BNX2X_RX_MODE_NONE 0 1013#define BNX2X_RX_MODE_NONE 0
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index 51b788339c90..1e0ac8bb246f 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -7878,7 +7878,7 @@ static int bnx2x_set_num_queues(struct bnx2x *bp)
7878{ 7878{
7879 int rc = 0; 7879 int rc = 0;
7880 7880
7881 switch (int_mode) { 7881 switch (bp->int_mode) {
7882 case INT_MODE_INTx: 7882 case INT_MODE_INTx:
7883 case INT_MODE_MSI: 7883 case INT_MODE_MSI:
7884 bp->num_queues = 1; 7884 bp->num_queues = 1;
@@ -9951,7 +9951,7 @@ static int __devinit bnx2x_init_bp(struct bnx2x *bp)
9951 multi_mode = ETH_RSS_MODE_DISABLED; 9951 multi_mode = ETH_RSS_MODE_DISABLED;
9952 } 9952 }
9953 bp->multi_mode = multi_mode; 9953 bp->multi_mode = multi_mode;
9954 9954 bp->int_mode = int_mode;
9955 9955
9956 bp->dev->features |= NETIF_F_GRO; 9956 bp->dev->features |= NETIF_F_GRO;
9957 9957
@@ -9963,6 +9963,7 @@ static int __devinit bnx2x_init_bp(struct bnx2x *bp)
9963 bp->flags |= TPA_ENABLE_FLAG; 9963 bp->flags |= TPA_ENABLE_FLAG;
9964 bp->dev->features |= NETIF_F_LRO; 9964 bp->dev->features |= NETIF_F_LRO;
9965 } 9965 }
9966 bp->disable_tpa = disable_tpa;
9966 9967
9967 if (CHIP_IS_E1(bp)) 9968 if (CHIP_IS_E1(bp))
9968 bp->dropless_fc = 0; 9969 bp->dropless_fc = 0;
@@ -11006,7 +11007,7 @@ static int bnx2x_set_flags(struct net_device *dev, u32 data)
11006 11007
11007 /* TPA requires Rx CSUM offloading */ 11008 /* TPA requires Rx CSUM offloading */
11008 if ((data & ETH_FLAG_LRO) && bp->rx_csum) { 11009 if ((data & ETH_FLAG_LRO) && bp->rx_csum) {
11009 if (!disable_tpa) { 11010 if (!bp->disable_tpa) {
11010 if (!(dev->features & NETIF_F_LRO)) { 11011 if (!(dev->features & NETIF_F_LRO)) {
11011 dev->features |= NETIF_F_LRO; 11012 dev->features |= NETIF_F_LRO;
11012 bp->flags |= TPA_ENABLE_FLAG; 11013 bp->flags |= TPA_ENABLE_FLAG;