Skip to content

Commit

Permalink
ixgb: remove hardcoded number
Browse files Browse the repository at this point in the history
This adds a define for an awkward and uncommented value.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
  • Loading branch information
Auke Kok authored and Auke Kok committed May 23, 2006
1 parent 940829e commit c85fd6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ixgb/ixgb_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ extern void ixgb_free_rx_resources(struct ixgb_adapter *adapter);
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;
Expand Down Expand Up @@ -300,7 +302,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 */
}
Expand Down

0 comments on commit c85fd6f

Please sign in to comment.