diff options
author | araujo <araujo@FreeBSD.org> | 2015-03-09 10:29:15 +0000 |
---|---|---|
committer | araujo <araujo@FreeBSD.org> | 2015-03-09 10:29:15 +0000 |
commit | 9ae74daa194ec4ee26207f3bc373eae41a8e39dd (patch) | |
tree | d6c2c18ee711b92f0035273e19f54ab7f4e90939 /sys/dev/ixgbe | |
parent | 005b6181806cea0fedbd9d5a070a6aa7ed21c13d (diff) | |
download | FreeBSD-src-9ae74daa194ec4ee26207f3bc373eae41a8e39dd.zip FreeBSD-src-9ae74daa194ec4ee26207f3bc373eae41a8e39dd.tar.gz |
Fix style(9) from my previous commit r279803.
Spotted by: kevlo
Diffstat (limited to 'sys/dev/ixgbe')
-rw-r--r-- | sys/dev/ixgbe/ixgbe.c | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/sys/dev/ixgbe/ixgbe.c b/sys/dev/ixgbe/ixgbe.c index 0d5021c..db202fd 100644 --- a/sys/dev/ixgbe/ixgbe.c +++ b/sys/dev/ixgbe/ixgbe.c @@ -1699,7 +1699,7 @@ static void ixgbe_media_status(struct ifnet * ifp, struct ifmediareq * ifmr) { struct adapter *adapter = ifp->if_softc; - struct ixgbe_hw *hw = &adapter->hw; + struct ixgbe_hw *hw = &adapter->hw; INIT_DEBUGOUT("ixgbe_media_status: begin"); IXGBE_CORE_LOCK(adapter); @@ -1715,29 +1715,28 @@ ixgbe_media_status(struct ifnet * ifp, struct ifmediareq * ifmr) ifmr->ifm_status |= IFM_ACTIVE; - /* - * Not all NIC are 1000baseSX as an example X540T. - * We must set properly the media based on NIC model. - */ - switch (hw->device_id) { - case IXGBE_DEV_ID_X540T: - if (adapter->link_speed == IXGBE_LINK_SPEED_100_FULL) - ifmr->ifm_active |= IFM_100_TX | IFM_FDX; - else if (adapter->link_speed == IXGBE_LINK_SPEED_1GB_FULL) - ifmr->ifm_active |= IFM_1000_T | IFM_FDX; - else if (adapter->link_speed == IXGBE_LINK_SPEED_10GB_FULL) - ifmr->ifm_active |= adapter->optics | IFM_FDX; - break; - default: - if (adapter->link_speed == IXGBE_LINK_SPEED_100_FULL) - ifmr->ifm_active |= IFM_100_TX | IFM_FDX; - else if (adapter->link_speed == IXGBE_LINK_SPEED_1GB_FULL) - ifmr->ifm_active |= IFM_1000_SX | IFM_FDX; - else if (adapter->link_speed == IXGBE_LINK_SPEED_10GB_FULL) - ifmr->ifm_active |= adapter->optics | IFM_FDX; - break; - } - + /* + * Not all NIC are 1000baseSX as an example X540T. + * We must set properly the media based on NIC model. + */ + switch (hw->device_id) { + case IXGBE_DEV_ID_X540T: + if (adapter->link_speed == IXGBE_LINK_SPEED_100_FULL) + ifmr->ifm_active |= IFM_100_TX | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_1GB_FULL) + ifmr->ifm_active |= IFM_1000_T | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_10GB_FULL) + ifmr->ifm_active |= adapter->optics | IFM_FDX; + break; + default: + if (adapter->link_speed == IXGBE_LINK_SPEED_100_FULL) + ifmr->ifm_active |= IFM_100_TX | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_1GB_FULL) + ifmr->ifm_active |= IFM_1000_SX | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_10GB_FULL) + ifmr->ifm_active |= adapter->optics | IFM_FDX; + break; + } IXGBE_CORE_UNLOCK(adapter); |