diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2017-10-20 14:39:43 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-23 03:06:47 +0100 |
commit | 39cdd34989cf9fb62935041727bf885136f720a4 (patch) | |
tree | b51de3fa2ce9be8d2b66f8186301599e9a5034a5 /drivers/net/dsa/bcm_sf2_regs.h | |
parent | 33ad61d0f799656e8987e9c80e6e15151bb857f3 (diff) | |
download | linux-stable-39cdd34989cf9fb62935041727bf885136f720a4.tar.gz linux-stable-39cdd34989cf9fb62935041727bf885136f720a4.tar.bz2 linux-stable-39cdd34989cf9fb62935041727bf885136f720a4.zip |
net: dsa: bcm_sf2: Use existing shift/masks
Instead of open coding the shift for the IP protocol, IP fragment bit
etc. define and/or use existing constants to that end.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/bcm_sf2_regs.h')
-rw-r--r-- | drivers/net/dsa/bcm_sf2_regs.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/dsa/bcm_sf2_regs.h b/drivers/net/dsa/bcm_sf2_regs.h index d1596dfca323..61bc9729383f 100644 --- a/drivers/net/dsa/bcm_sf2_regs.h +++ b/drivers/net/dsa/bcm_sf2_regs.h @@ -302,9 +302,12 @@ enum bcm_sf2_reg_offs { /* UDF_DATA7 */ #define L3_FRAMING_SHIFT 24 #define L3_FRAMING_MASK (0x3 << L3_FRAMING_SHIFT) +#define IPTOS_SHIFT 16 +#define IPTOS_MASK 0xff #define IPPROTO_SHIFT 8 #define IPPROTO_MASK (0xff << IPPROTO_SHIFT) -#define IP_FRAG (1 << 7) +#define IP_FRAG_SHIFT 7 +#define IP_FRAG (1 << IP_FRAG_SHIFT) /* UDF_DATA0 */ #define SLICE_VALID 3 |