diff options
author | Akihiko Odaki <akihiko.odaki@daynix.com> | 2023-02-23 19:19:45 +0900 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2023-03-10 15:35:38 +0800 |
commit | 0eadd56bf53ab196a16d492d7dd31c62e1c24c32 (patch) | |
tree | dd9555e2462d6e7945e5d9168c0ba9884746fe7c /hw/net/e1000.c | |
parent | ee59483267de29056b5b2ee2421ef3844e5c9932 (diff) |
e1000e: Fix the code style
igb implementation first starts off by copying e1000e code. Correct the
code style before that.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net/e1000.c')
-rw-r--r-- | hw/net/e1000.c | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/hw/net/e1000.c b/hw/net/e1000.c index 7efb8a4c52..8ee30aa37c 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -808,10 +808,11 @@ receive_filter(E1000State *s, const uint8_t *buf, int size) if (e1000x_is_vlan_packet(buf, le16_to_cpu(s->mac_reg[VET])) && e1000x_vlan_rx_filter_enabled(s->mac_reg)) { uint16_t vid = lduw_be_p(buf + 14); - uint32_t vfta = ldl_le_p((uint32_t*)(s->mac_reg + VFTA) + + uint32_t vfta = ldl_le_p((uint32_t *)(s->mac_reg + VFTA) + ((vid >> 5) & 0x7f)); - if ((vfta & (1 << (vid & 0x1f))) == 0) + if ((vfta & (1 << (vid & 0x1f))) == 0) { return 0; + } } if (!isbcast && !ismcast && (rctl & E1000_RCTL_UPE)) { /* promiscuous ucast */ @@ -1220,16 +1221,16 @@ static const readops macreg_readops[] = { [TDFPC] = mac_low13_read, [AIT] = mac_low16_read, - [CRCERRS ... MPC] = &mac_readreg, - [IP6AT ... IP6AT+3] = &mac_readreg, [IP4AT ... IP4AT+6] = &mac_readreg, - [FFLT ... FFLT+6] = &mac_low11_read, - [RA ... RA+31] = &mac_readreg, - [WUPM ... WUPM+31] = &mac_readreg, - [MTA ... MTA+127] = &mac_readreg, - [VFTA ... VFTA+127] = &mac_readreg, - [FFMT ... FFMT+254] = &mac_low4_read, - [FFVT ... FFVT+254] = &mac_readreg, - [PBM ... PBM+16383] = &mac_readreg, + [CRCERRS ... MPC] = &mac_readreg, + [IP6AT ... IP6AT + 3] = &mac_readreg, [IP4AT ... IP4AT + 6] = &mac_readreg, + [FFLT ... FFLT + 6] = &mac_low11_read, + [RA ... RA + 31] = &mac_readreg, + [WUPM ... WUPM + 31] = &mac_readreg, + [MTA ... MTA + 127] = &mac_readreg, + [VFTA ... VFTA + 127] = &mac_readreg, + [FFMT ... FFMT + 254] = &mac_low4_read, + [FFVT ... FFVT + 254] = &mac_readreg, + [PBM ... PBM + 16383] = &mac_readreg, }; enum { NREADOPS = ARRAY_SIZE(macreg_readops) }; @@ -1252,14 +1253,14 @@ static const writeops macreg_writeops[] = { [RDTR] = set_16bit, [RADV] = set_16bit, [TADV] = set_16bit, [ITR] = set_16bit, - [IP6AT ... IP6AT+3] = &mac_writereg, [IP4AT ... IP4AT+6] = &mac_writereg, - [FFLT ... FFLT+6] = &mac_writereg, - [RA ... RA+31] = &mac_writereg, - [WUPM ... WUPM+31] = &mac_writereg, - [MTA ... MTA+127] = &mac_writereg, - [VFTA ... VFTA+127] = &mac_writereg, - [FFMT ... FFMT+254] = &mac_writereg, [FFVT ... FFVT+254] = &mac_writereg, - [PBM ... PBM+16383] = &mac_writereg, + [IP6AT ... IP6AT + 3] = &mac_writereg, [IP4AT ... IP4AT + 6] = &mac_writereg, + [FFLT ... FFLT + 6] = &mac_writereg, + [RA ... RA + 31] = &mac_writereg, + [WUPM ... WUPM + 31] = &mac_writereg, + [MTA ... MTA + 127] = &mac_writereg, + [VFTA ... VFTA + 127] = &mac_writereg, + [FFMT ... FFMT + 254] = &mac_writereg, [FFVT ... FFVT + 254] = &mac_writereg, + [PBM ... PBM + 16383] = &mac_writereg, }; enum { NWRITEOPS = ARRAY_SIZE(macreg_writeops) }; |