aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2025-11-13 14:15:38 +0000
committerEd Maste <emaste@FreeBSD.org>2025-11-30 15:56:13 +0000
commit8666fda1afb03b3a88e57a20d76da8e7910b6407 (patch)
tree5b33ee5b9c8f8ad12822cc0587582a075b6d2bc1
parent0156be41a1eb8e0408819466b912181aa7966df9 (diff)
aq(4): Fix VLAN tag test
Previously emitted a compiler warning "warning: bitwise comparison always evaluates to false." Looking at the OpenBSD driver (which is based on this code) it looks like the VLAN flag should be set if either of these bits is. In the OpenBSD driver these are AQ_RXDESC_TYPE_VLAN and AQ_RXDESC_TYPE_VLAN2 rather than a magic number 0x60. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53836
-rw-r--r--sys/dev/aq/aq_ring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/aq/aq_ring.c b/sys/dev/aq/aq_ring.c
index e20527b8c7c2..ca0391a6d61b 100644
--- a/sys/dev/aq/aq_ring.c
+++ b/sys/dev/aq/aq_ring.c
@@ -361,7 +361,7 @@ static int aq_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri)
ri->iri_frags[i].irf_idx = cidx;
ri->iri_frags[i].irf_len = len;
- if ((rx_desc->wb.pkt_type & 0x60) == 1) {
+ if ((rx_desc->wb.pkt_type & 0x60) != 0) {
ri->iri_flags |= M_VLANTAG;
ri->iri_vtag = le32toh(rx_desc->wb.vlan);
}