Skip to content

Commit

Permalink
net: atlantic: fix missing | operator when assigning rec->llc
Browse files Browse the repository at this point in the history
rec->llc is currently being assigned twice, once with the lower 8 bits
from packed_record[8] and then re-assigned afterwards with data from
packed_record[9].  This looks like a type, I believe the second assignment
should be using the |= operator rather than a direct assignment.

Addresses-Coverity: ("Unused value")
Fixes: b8f8a0b ("net: atlantic: MACSec ingress offload HW bindings")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Igor Russkikh <irusskikh@marell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Colin Ian King authored and David S. Miller committed Apr 2, 2020
1 parent 2abb579 commit 8628754
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/aquantia/atlantic/macsec/macsec_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ get_ingress_preclass_record(struct aq_hw_s *hw,
rec->snap[1] = packed_record[8] & 0xFF;

rec->llc = (packed_record[8] >> 8) & 0xFF;
rec->llc = packed_record[9] << 8;
rec->llc |= packed_record[9] << 8;

rec->mac_sa[0] = packed_record[10];
rec->mac_sa[0] |= packed_record[11] << 16;
Expand Down

0 comments on commit 8628754

Please sign in to comment.