bnxt_en: fix firmware message length endianness
authorEdwin Peer <edwin.peer@broadcom.com>
Mon, 25 May 2020 21:41:19 +0000 (17:41 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 May 2020 03:30:48 +0000 (20:30 -0700)
commit2a5a8800fa915bd9bc272c91ca64728e6aa84c0a
tree723aa1cfaae8ffcfeda918baaeabe3377b332357
parent95ec1f470b976858264d7635a6ef76bc33c3875b
bnxt_en: fix firmware message length endianness

The explicit mask and shift is not the appropriate way to parse fields
out of a little endian struct. The length field is internally __le16
and the strategy employed only happens to work on little endian machines
because the offset used is actually incorrect (length is at offset 6).

Also remove the related and no longer used definitions from bnxt.h.

Fixes: 845adfe40c2a ("bnxt_en: Improve valid bit checking in firmware response message.")
Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h