- removed hard coded numbers and used constants instead Signed-off-by: Jeff Kirsher <[EMAIL PROTECTED]> Signed-off-by: Jesse Brandeburg <[EMAIL PROTECTED]> Signed-off-by: John Ronciak <[EMAIL PROTECTED]> ---
drivers/net/ixgb/ixgb_ethtool.c | 4 +++- drivers/net/ixgb/ixgb_main.c | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c index 9201b56..00a6f2b 100644 --- a/drivers/net/ixgb/ixgb_ethtool.c +++ b/drivers/net/ixgb/ixgb_ethtool.c @@ -44,6 +44,8 @@ extern void ixgb_free_rx_resources(struc extern void ixgb_free_tx_resources(struct ixgb_adapter *adapter); extern void ixgb_update_stats(struct ixgb_adapter *adapter); +#define IXGB_ALL_RAR_ENTRIES 16 + struct ixgb_stats { char stat_string[ETH_GSTRING_LEN]; int sizeof_stat; @@ -316,7 +318,7 @@ ixgb_get_regs(struct net_device *netdev, *reg++ = IXGB_READ_REG(hw, RXCSUM); /* 20 */ /* there are 16 RAR entries in hardware, we only use 3 */ - for(i = 0; i < 16; i++) { + for(i = 0; i < IXGB_ALL_RAR_ENTRIES; i++) { *reg++ = IXGB_READ_REG_ARRAY(hw, RAL, (i << 1)); /*21,...,51 */ *reg++ = IXGB_READ_REG_ARRAY(hw, RAH, (i << 1)); /*22,...,52 */ } diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index 916ac40..974d996 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c @@ -1225,11 +1225,11 @@ ixgb_tso(struct ixgb_adapter *adapter, s if(++i == adapter->tx_ring.count) i = 0; adapter->tx_ring.next_to_use = i; - return 1; + return TRUE; } #endif - return 0; + return FALSE; } static inline boolean_t @@ -1411,7 +1411,7 @@ ixgb_xmit_frame(struct sk_buff *skb, str if(unlikely(IXGB_DESC_UNUSED(&adapter->tx_ring) < DESC_NEEDED)) { netif_stop_queue(netdev); spin_unlock_irqrestore(&adapter->tx_lock, flags); - return 1; + return NETDEV_TX_BUSY; } spin_unlock_irqrestore(&adapter->tx_lock, flags); @@ -1438,7 +1438,7 @@ ixgb_xmit_frame(struct sk_buff *skb, str netdev->trans_start = jiffies; - return 0; + return NETDEV_TX_OK; } /** - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html