sfc: Refactor EF10 stat mask code to allow for more conditional stats
authorEdward Cree <ecree@solarflare.com>
Fri, 27 Sep 2013 17:52:49 +0000 (18:52 +0100)
committerBen Hutchings <bhutchings@solarflare.com>
Fri, 4 Oct 2013 22:31:51 +0000 (23:31 +0100)
commit4bae913bd372aab90fdbd91e7e5fb841a2a0dc15
tree182cf2705eb6349cb1fea0cc69dd2cd446b0be64
parent87648cc925222f16c3bd119af8ae8e8fb2f3fe1d
sfc: Refactor EF10 stat mask code to allow for more conditional stats

Previously, efx_ef10_stat_mask returned a static const unsigned long[], which
meant that each possible mask had to be declared statically with
STAT_MASK_BITMAP.  Since adding a condition would double the size of the
decision tree, we now create the bitmask dynamically.

To do this, we have two functions efx_ef10_raw_stat_mask, which returns a u64,
and efx_ef10_get_stat_mask, which fills in an unsigned long * argument.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/ethernet/sfc/ef10.c