diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2009-06-02 07:28:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-03 05:46:33 -0400 |
commit | 2adc55c959940fc680074392eddbd5585a76f3d9 (patch) | |
tree | bf5050070f1f0ef3dd6d1f951d0a50c7ac8aa161 /drivers/net/e1000e/ich8lan.c | |
parent | 3ec2a2b80f3eb53851fe4cef9e65b5d33376ef89 (diff) |
e1000e: specify max supported frame size in adapter struct
By putting the maximum frame size supported by the hardware into the
adapter structure, the change_mtu entry point function can be cleaned
up of checks for all the different max frame sizes supported by
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000e/ich8lan.c')
-rw-r--r-- | drivers/net/e1000e/ich8lan.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index 6d1aab6316ba..b63d9878b0ac 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c | |||
@@ -382,6 +382,11 @@ static s32 e1000_get_variants_ich8lan(struct e1000_adapter *adapter) | |||
382 | if (rc) | 382 | if (rc) |
383 | return rc; | 383 | return rc; |
384 | 384 | ||
385 | if (adapter->hw.phy.type == e1000_phy_ife) { | ||
386 | adapter->flags &= ~FLAG_HAS_JUMBO_FRAMES; | ||
387 | adapter->max_hw_frame_size = ETH_FRAME_LEN + ETH_FCS_LEN; | ||
388 | } | ||
389 | |||
385 | if ((adapter->hw.mac.type == e1000_ich8lan) && | 390 | if ((adapter->hw.mac.type == e1000_ich8lan) && |
386 | (adapter->hw.phy.type == e1000_phy_igp_3)) | 391 | (adapter->hw.phy.type == e1000_phy_igp_3)) |
387 | adapter->flags |= FLAG_LSC_GIG_SPEED_DROP; | 392 | adapter->flags |= FLAG_LSC_GIG_SPEED_DROP; |
@@ -2595,6 +2600,7 @@ struct e1000_info e1000_ich8_info = { | |||
2595 | | FLAG_HAS_FLASH | 2600 | | FLAG_HAS_FLASH |
2596 | | FLAG_APME_IN_WUC, | 2601 | | FLAG_APME_IN_WUC, |
2597 | .pba = 8, | 2602 | .pba = 8, |
2603 | .max_hw_frame_size = ETH_FRAME_LEN + ETH_FCS_LEN, | ||
2598 | .get_variants = e1000_get_variants_ich8lan, | 2604 | .get_variants = e1000_get_variants_ich8lan, |
2599 | .mac_ops = &ich8_mac_ops, | 2605 | .mac_ops = &ich8_mac_ops, |
2600 | .phy_ops = &ich8_phy_ops, | 2606 | .phy_ops = &ich8_phy_ops, |
@@ -2613,6 +2619,7 @@ struct e1000_info e1000_ich9_info = { | |||
2613 | | FLAG_HAS_FLASH | 2619 | | FLAG_HAS_FLASH |
2614 | | FLAG_APME_IN_WUC, | 2620 | | FLAG_APME_IN_WUC, |
2615 | .pba = 10, | 2621 | .pba = 10, |
2622 | .max_hw_frame_size = DEFAULT_JUMBO, | ||
2616 | .get_variants = e1000_get_variants_ich8lan, | 2623 | .get_variants = e1000_get_variants_ich8lan, |
2617 | .mac_ops = &ich8_mac_ops, | 2624 | .mac_ops = &ich8_mac_ops, |
2618 | .phy_ops = &ich8_phy_ops, | 2625 | .phy_ops = &ich8_phy_ops, |
@@ -2631,6 +2638,7 @@ struct e1000_info e1000_ich10_info = { | |||
2631 | | FLAG_HAS_FLASH | 2638 | | FLAG_HAS_FLASH |
2632 | | FLAG_APME_IN_WUC, | 2639 | | FLAG_APME_IN_WUC, |
2633 | .pba = 10, | 2640 | .pba = 10, |
2641 | .max_hw_frame_size = DEFAULT_JUMBO, | ||
2634 | .get_variants = e1000_get_variants_ich8lan, | 2642 | .get_variants = e1000_get_variants_ich8lan, |
2635 | .mac_ops = &ich8_mac_ops, | 2643 | .mac_ops = &ich8_mac_ops, |
2636 | .phy_ops = &ich8_phy_ops, | 2644 | .phy_ops = &ich8_phy_ops, |