e1000: Mask registers when writing
commita9484b8a417246b5ebb1d3b8c41b58a7e0862a72
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Thu, 23 Feb 2023 10:19:49 +0000 (23 19:19 +0900)
committerJason Wang <jasowang@redhat.com>
Fri, 10 Mar 2023 07:35:38 +0000 (10 15:35 +0800)
tree1820dbac49a92ab16fa5b4fecc4493a985327b30
parentb7728c9f62d8ee5c4772a08ebe2f21bd789c73f7
e1000: Mask registers when writing

When a register has effective bits fewer than their width, the old code
inconsistently masked when writing or reading. Make the code consistent
by always masking when writing, and remove some code duplication.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/e1000.c