Skip to contentSkip to conversation

b44: fix IFF_ALLMULTI handling of CAM slots

PATCH Applied Bill Helfinstine 3 participants 3 messages Apr 1, 2007 – Apr 4, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 b44: fix IFF_ALLMULTI handling of CAM slots

If you set the IFF_ALLMULTI flag on a b44 device, or if you join more than B44_MCAST_TABLE_SIZE multicast groups, the device will stop receiving unicast messages. This is because the __b44_set_mac_addr call sets the zeroth CAM entry to the MAC address of the device, and then the loop at line 1722 proceeds to overwrite it unless the value of i is set by the __b44_load_mcast call. However, when IFF_ALLMULTI is set, that call is bypassed, leaving i set to zero.

Fixed by starting the loop at 1 to make it skip the CAM entry for the MAC address.

---

drivers/net/b44.c +1 -1
index aaada57..d742bfe 100644
@@ -1709,7 +1709,7 @@ static void __b44_set_rx_mode(struct net_device *dev)
 		bw32(bp, B44_RXCONFIG, val);
 	} else {
 		unsigned char zero[6] = {0, 0, 0, 0, 0, 0};
-		int i = 0;
+		int i = 1;
 
 		__b44_set_mac_addr(bp);
 
Acked-by on v1 1/1
#1 lore raw
Quoted 14 lines · Bill Helfinstine

If you set the IFF_ALLMULTI flag on a b44 device, or if you join more than
B44_MCAST_TABLE_SIZE multicast groups, the device will stop receiving unicast
messages. This is because the __b44_set_mac_addr call sets the zeroth CAM
entry to the MAC address of the device, and then the loop at line 1722 proceeds to overwrite it unless the value of i is set by the __b44_load_mcast
call. However, when IFF_ALLMULTI is set, that call is bypassed, leaving i set
to zero.

Quoted 5 lines

Fixed by starting the loop at 1 to make it skip the CAM entry for the MAC
address.

Thanks.

Applied
#2 lore raw
In reply to Bill Helfinstine
Quoted 8 lines · Bill Helfinstine

If you set the IFF_ALLMULTI flag on a b44 device, or if you join more than B44_MCAST_TABLE_SIZE multicast groups, the device will stop receiving unicast messages. This is because the __b44_set_mac_addr call sets the zeroth CAM entry to the MAC address of the device, and then the loop at line 1722 proceeds to overwrite it unless the value of i is set by the __b44_load_mcast call. However, when IFF_ALLMULTI is set, that call is bypassed, leaving i set to zero.

Quoted 4 lines

Fixed by starting the loop at 1 to make it skip the CAM entry for the MAC address.

applied