hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/net/ethernet/intel/igb/e1000_mac.c
....@@ -426,7 +426,7 @@
426426 static u32 igb_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr)
427427 {
428428 u32 hash_value, hash_mask;
429
- u8 bit_shift = 0;
429
+ u8 bit_shift = 1;
430430
431431 /* Register count multiplied by bits per register */
432432 hash_mask = (hw->mac.mta_reg_count * 32) - 1;
....@@ -434,7 +434,7 @@
434434 /* For a mc_filter_type of 0, bit_shift is the number of left-shifts
435435 * where 0xFF would still fall within the hash mask.
436436 */
437
- while (hash_mask >> bit_shift != 0xFF)
437
+ while (hash_mask >> bit_shift != 0xFF && bit_shift < 4)
438438 bit_shift++;
439439
440440 /* The portion of the address that is used for the hash table