forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
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