enic: Update driver to use __dev_uc/mc_sync/unsync calls
This change updates the enic driver to make use of __dev_uc_sync and __dev_mc_sync calls. Previously the driver was doing its own list management by storing the mc_addr and uc_addr list in a 32 address array. With this change the sync data is stored in the netdev_addr_list structures and instead we just track how many addresses we have written to the device. When we encounter 32 we stop and print a message as occurred previously with the old approach. Other than the core change the only other bit needed was to propagate the constant attribute with the MAC address as there were several spots where is twas only passed as a u8 * instead of a const u8 *. This patch is meant to maintain the original functionality without the use of the mc_addr and uc_addr arrays. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Acked-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
670e5b8eaf
commit
f009618ac5
6 changed files with 73 additions and 118 deletions
|
@ -657,7 +657,7 @@ int vnic_dev_packet_filter(struct vnic_dev *vdev, int directed, int multicast,
|
|||
return err;
|
||||
}
|
||||
|
||||
int vnic_dev_add_addr(struct vnic_dev *vdev, u8 *addr)
|
||||
int vnic_dev_add_addr(struct vnic_dev *vdev, const u8 *addr)
|
||||
{
|
||||
u64 a0 = 0, a1 = 0;
|
||||
int wait = 1000;
|
||||
|
@ -674,7 +674,7 @@ int vnic_dev_add_addr(struct vnic_dev *vdev, u8 *addr)
|
|||
return err;
|
||||
}
|
||||
|
||||
int vnic_dev_del_addr(struct vnic_dev *vdev, u8 *addr)
|
||||
int vnic_dev_del_addr(struct vnic_dev *vdev, const u8 *addr)
|
||||
{
|
||||
u64 a0 = 0, a1 = 0;
|
||||
int wait = 1000;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue