aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-19 19:13:58 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-22 18:45:51 -0500
commit0ddf477b8a9b02412a6cabd51c486998811c7dd1 (patch)
treedf82cf6637248439897153aca2f8fa6216003b61 /drivers/net/benet
parent3b9a7728d878a3e7adc79fb89c3bb9ebc23760d7 (diff)
net: convert multiple drivers to use netdev_for_each_mc_addr, part3
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet')
-rw-r--r--drivers/net/benet/be_cmds.c10
-rw-r--r--drivers/net/benet/be_cmds.h3
-rw-r--r--drivers/net/benet/be_main.c6
3 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index ee16b374e02c..c8a2bacb1d13 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -1134,8 +1134,7 @@ err:
1134 * (mc == NULL) => multicast promiscous 1134 * (mc == NULL) => multicast promiscous
1135 */ 1135 */
1136int be_cmd_multicast_set(struct be_adapter *adapter, u32 if_id, 1136int be_cmd_multicast_set(struct be_adapter *adapter, u32 if_id,
1137 struct dev_mc_list *mc_list, u32 mc_count, 1137 struct net_device *netdev, struct be_dma_mem *mem)
1138 struct be_dma_mem *mem)
1139{ 1138{
1140 struct be_mcc_wrb *wrb; 1139 struct be_mcc_wrb *wrb;
1141 struct be_cmd_req_mcast_mac_config *req = mem->va; 1140 struct be_cmd_req_mcast_mac_config *req = mem->va;
@@ -1162,13 +1161,14 @@ int be_cmd_multicast_set(struct be_adapter *adapter, u32 if_id,
1162 OPCODE_COMMON_NTWK_MULTICAST_SET, sizeof(*req)); 1161 OPCODE_COMMON_NTWK_MULTICAST_SET, sizeof(*req));
1163 1162
1164 req->interface_id = if_id; 1163 req->interface_id = if_id;
1165 if (mc_list) { 1164 if (netdev) {
1166 int i; 1165 int i;
1167 struct dev_mc_list *mc; 1166 struct dev_mc_list *mc;
1168 1167
1169 req->num_mac = cpu_to_le16(mc_count); 1168 req->num_mac = cpu_to_le16(netdev_mc_count(netdev));
1170 1169
1171 for (mc = mc_list, i = 0; mc; mc = mc->next, i++) 1170 i = 0;
1171 netdev_for_each_mc_addr(mc, netdev)
1172 memcpy(req->mac[i].byte, mc->dmi_addr, ETH_ALEN); 1172 memcpy(req->mac[i].byte, mc->dmi_addr, ETH_ALEN);
1173 } else { 1173 } else {
1174 req->promiscuous = 1; 1174 req->promiscuous = 1;
diff --git a/drivers/net/benet/be_cmds.h b/drivers/net/benet/be_cmds.h
index 3464924d6c28..728b0d736929 100644
--- a/drivers/net/benet/be_cmds.h
+++ b/drivers/net/benet/be_cmds.h
@@ -912,8 +912,7 @@ extern int be_cmd_vlan_config(struct be_adapter *adapter, u32 if_id,
912extern int be_cmd_promiscuous_config(struct be_adapter *adapter, 912extern int be_cmd_promiscuous_config(struct be_adapter *adapter,
913 u8 port_num, bool en); 913 u8 port_num, bool en);
914extern int be_cmd_multicast_set(struct be_adapter *adapter, u32 if_id, 914extern int be_cmd_multicast_set(struct be_adapter *adapter, u32 if_id,
915 struct dev_mc_list *mc_list, u32 mc_count, 915 struct net_device *netdev, struct be_dma_mem *mem);
916 struct be_dma_mem *mem);
917extern int be_cmd_set_flow_control(struct be_adapter *adapter, 916extern int be_cmd_set_flow_control(struct be_adapter *adapter,
918 u32 tx_fc, u32 rx_fc); 917 u32 tx_fc, u32 rx_fc);
919extern int be_cmd_get_flow_control(struct be_adapter *adapter, 918extern int be_cmd_get_flow_control(struct be_adapter *adapter,
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index de0830e14aa5..27ccdd80257b 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -577,13 +577,13 @@ static void be_set_multicast_list(struct net_device *netdev)
577 /* Enable multicast promisc if num configured exceeds what we support */ 577 /* Enable multicast promisc if num configured exceeds what we support */
578 if (netdev->flags & IFF_ALLMULTI || 578 if (netdev->flags & IFF_ALLMULTI ||
579 netdev_mc_count(netdev) > BE_MAX_MC) { 579 netdev_mc_count(netdev) > BE_MAX_MC) {
580 be_cmd_multicast_set(adapter, adapter->if_handle, NULL, 0, 580 be_cmd_multicast_set(adapter, adapter->if_handle, NULL,
581 &adapter->mc_cmd_mem); 581 &adapter->mc_cmd_mem);
582 goto done; 582 goto done;
583 } 583 }
584 584
585 be_cmd_multicast_set(adapter, adapter->if_handle, netdev->mc_list, 585 be_cmd_multicast_set(adapter, adapter->if_handle, netdev,
586 netdev_mc_count(netdev), &adapter->mc_cmd_mem); 586 &adapter->mc_cmd_mem);
587done: 587done:
588 return; 588 return;
589} 589}