driver/net/benet: fix be_cmd_multicast_set() memcpy bug
Subsystems (2)
PATCH 1/1 driver/net/benet: fix be_cmd_multicast_set() memcpy bug
Hi,
Regarding benet be_cmd_multicast_set() function, now using netdev_for_each_mc_addr() helper for mac address copy, but when copying to req->mac[] did not increase of the index.
Cc Sathya Perla <[email protected]>
Cc Subbu Seetharaman <[email protected]>
Cc Sarveshwar Bandi <[email protected]>
Cc Ajit Khaparde <[email protected]>
Signed-off-by Joe Jin <[email protected]>
--- be_cmds.c | 2 +-
drivers/net/benet/be_cmds.c +1 -1
@@ -1235,7 +1235,7 @@ int be_cmd_multicast_set(struct be_adapter *adapter, u32 if_id, i =0 ;netdev_for_each_mc_addr (ha, netdev) -memcpy (req->mac[i].byte, ha->addr,ETH_ALEN ); +memcpy (req->mac[i++].byte, ha->addr,ETH_ALEN ); }else { req->promiscuous =1 ; }
Signature · 4 lines
Oracle <http://www.oracle.com> Joe Jin | Team Leader, Software Development | +8610.8278.6295 ORACLE | Linux and Virtualization Incubator Building 2-A ZPark | Beijing China, 100094
From: Joe Jin <[email protected]>
Date: Mon, 6 Dec 2010 21:00:59 +0800
Quoted 11 lines
Hi,
Regarding benet
be_cmd_multicast_set()function, now usingnetdev_for_each_mc_addr()helper for mac address copy, but when copying to req->mac[] did not increase of the index.Cc Sathya Perla <[email protected]>Cc Subbu Seetharaman <[email protected]>Cc Sarveshwar Bandi <[email protected]>Cc Ajit Khaparde <[email protected]>Signed-off-by Joe Jin <[email protected]>
Applied, thank you.