@@ -1591,21 +1591,20 @@ static u8 irdma_iw_get_vlan_prio(u32 *loc_addr, u8 prio, bool ipv4)
1591
1591
}
1592
1592
1593
1593
/**
1594
- * irdma_netdev_vlan_ipv6 - Gets the netdev and mac
1594
+ * irdma_get_vlan_mac_ipv6 - Gets the vlan and mac
1595
1595
* @addr: local IPv6 address
1596
1596
* @vlan_id: vlan id for the given IPv6 address
1597
1597
* @mac: mac address for the given IPv6 address
1598
1598
*
1599
- * Returns the net_device of the IPv6 address and also sets the
1600
- * vlan id and mac for that address.
1599
+ * Returns the vlan id and mac for an IPv6 address.
1601
1600
*/
1602
- struct net_device * irdma_netdev_vlan_ipv6 (u32 * addr , u16 * vlan_id , u8 * mac )
1601
+ void irdma_get_vlan_mac_ipv6 (u32 * addr , u16 * vlan_id , u8 * mac )
1603
1602
{
1604
1603
struct net_device * ip_dev = NULL ;
1605
1604
struct in6_addr laddr6 ;
1606
1605
1607
1606
if (!IS_ENABLED (CONFIG_IPV6 ))
1608
- return NULL ;
1607
+ return ;
1609
1608
1610
1609
irdma_copy_ip_htonl (laddr6 .in6_u .u6_addr32 , addr );
1611
1610
if (vlan_id )
@@ -1624,8 +1623,6 @@ struct net_device *irdma_netdev_vlan_ipv6(u32 *addr, u16 *vlan_id, u8 *mac)
1624
1623
}
1625
1624
}
1626
1625
rcu_read_unlock ();
1627
-
1628
- return ip_dev ;
1629
1626
}
1630
1627
1631
1628
/**
@@ -3666,8 +3663,8 @@ int irdma_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
3666
3663
cm_node -> vlan_id = irdma_get_vlan_ipv4 (cm_node -> loc_addr );
3667
3664
} else {
3668
3665
cm_node -> ipv4 = false;
3669
- irdma_netdev_vlan_ipv6 (cm_node -> loc_addr , & cm_node -> vlan_id ,
3670
- NULL );
3666
+ irdma_get_vlan_mac_ipv6 (cm_node -> loc_addr , & cm_node -> vlan_id ,
3667
+ NULL );
3671
3668
}
3672
3669
ibdev_dbg (& iwdev -> ibdev , "CM: Accept vlan_id=%d\n" ,
3673
3670
cm_node -> vlan_id );
@@ -3875,8 +3872,8 @@ int irdma_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
3875
3872
raddr6 -> sin6_addr .in6_u .u6_addr32 );
3876
3873
cm_info .loc_port = ntohs (laddr6 -> sin6_port );
3877
3874
cm_info .rem_port = ntohs (raddr6 -> sin6_port );
3878
- irdma_netdev_vlan_ipv6 (cm_info .loc_addr , & cm_info .vlan_id ,
3879
- NULL );
3875
+ irdma_get_vlan_mac_ipv6 (cm_info .loc_addr , & cm_info .vlan_id ,
3876
+ NULL );
3880
3877
}
3881
3878
cm_info .cm_id = cm_id ;
3882
3879
cm_info .qh_qpid = iwdev -> vsi .ilq -> qp_id ;
@@ -4005,8 +4002,8 @@ int irdma_create_listen(struct iw_cm_id *cm_id, int backlog)
4005
4002
laddr6 -> sin6_addr .in6_u .u6_addr32 );
4006
4003
cm_info .loc_port = ntohs (laddr6 -> sin6_port );
4007
4004
if (ipv6_addr_type (& laddr6 -> sin6_addr ) != IPV6_ADDR_ANY ) {
4008
- irdma_netdev_vlan_ipv6 (cm_info .loc_addr ,
4009
- & cm_info .vlan_id , NULL );
4005
+ irdma_get_vlan_mac_ipv6 (cm_info .loc_addr ,
4006
+ & cm_info .vlan_id , NULL );
4010
4007
} else {
4011
4008
cm_info .vlan_id = 0xFFFF ;
4012
4009
wildcard = true;
0 commit comments