aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/axgbe/xgbe-dev.c
diff options
context:
space:
mode:
authorDoug Moore <dougm@FreeBSD.org>2024-08-12 21:04:32 +0000
committerDoug Moore <dougm@FreeBSD.org>2024-08-12 21:04:32 +0000
commitb70247df0ba43a97fb4b06bbc85163a3ecaf08a5 (patch)
tree7c2576ada963ba5b21d6450ead44d33bda7efc09 /sys/dev/axgbe/xgbe-dev.c
parentccb0365643dc5e8d37ada3789bbe370b81ba5b3c (diff)
Diffstat (limited to 'sys/dev/axgbe/xgbe-dev.c')
-rw-r--r--sys/dev/axgbe/xgbe-dev.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/axgbe/xgbe-dev.c b/sys/dev/axgbe/xgbe-dev.c
index 39d0dab144a2..3a7d683ea5a9 100644
--- a/sys/dev/axgbe/xgbe-dev.c
+++ b/sys/dev/axgbe/xgbe-dev.c
@@ -826,7 +826,7 @@ static int
xgbe_update_vlan_hash_table(struct xgbe_prv_data *pdata)
{
uint32_t crc;
- uint16_t vid;
+ size_t vid;
uint16_t vlan_hash_table = 0;
__le16 vid_le = 0;
@@ -834,14 +834,13 @@ xgbe_update_vlan_hash_table(struct xgbe_prv_data *pdata)
XGMAC_IOREAD(pdata, MAC_VLANHTR));
/* Generate the VLAN Hash Table value */
- for_each_set_bit(vid, pdata->active_vlans, VLAN_NVID) {
-
+ bit_foreach(pdata->active_vlans, VLAN_NVID, vid) {
/* Get the CRC32 value of the VLAN ID */
vid_le = cpu_to_le16(vid);
crc = bitrev32(~xgbe_vid_crc32_le(vid_le)) >> 28;
vlan_hash_table |= (1 << crc);
- axgbe_printf(1, "%s: vid 0x%x vid_le 0x%x crc 0x%x "
+ axgbe_printf(1, "%s: vid 0x%lx vid_le 0x%x crc 0x%x "
"vlan_hash_table 0x%x\n", __func__, vid, vid_le, crc,
vlan_hash_table);
}