diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2009-02-06 23:21:31 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-07 02:43:14 -0800 |
commit | fa4dfae0ce703976578015902025137d5e268501 (patch) | |
tree | c2346894fce6278cd0e89f9ccfa51f9a3df8fb19 /drivers/net/igb/igb_main.c | |
parent | a8564f033efade1b6f027c4bb807cdf8cf5c9570 (diff) | |
download | lwn-fa4dfae0ce703976578015902025137d5e268501.tar.gz lwn-fa4dfae0ce703976578015902025137d5e268501.zip |
igb: change pba size determination from if to switch statement
As additional hardware is added to the igb driver it is easier to support
the expansion via switch statements instead of using nested ifs. For
this reason I am changing this to a switch statement.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb/igb_main.c')
-rw-r--r-- | drivers/net/igb/igb_main.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index accab3f7357e..d27e502097eb 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c @@ -888,11 +888,14 @@ void igb_reset(struct igb_adapter *adapter) /* Repartition Pba for greater than 9k mtu * To take effect CTRL.RST is required. */ - if (mac->type != e1000_82576) { - pba = E1000_PBA_34K; - } - else { + switch (mac->type) { + case e1000_82576: pba = E1000_PBA_64K; + break; + case e1000_82575: + default: + pba = E1000_PBA_34K; + break; } if ((adapter->max_frame_size > ETH_FRAME_LEN + ETH_FCS_LEN) && |