FreeBSD/sys/dev/cxgb/cxgb_main.c
/*
 * Programs the XGMAC based on the settings in the ifnet.  These settings
 * include MTU, MAC address, mcast addresses, etc.
 */
Programs the XGMAC based on the settings in the ifnet.  These settings
include MTU, MAC address, mcast addresses, etc.
Programs the XGMAC based on the settings in the ifnet . These settings include MTU MAC address mcast addresses etc .
static void
cxgb_update_mac_settings(struct port_info *p)
{
	struct ifnet *ifp = p->ifp;
	struct t3_rx_mode rm;
	struct cmac *mac = &p->mac;
	int mtu, hwtagging;
	PORT_LOCK_ASSERT_OWNED(p);
	bcopy(IF_LLADDR(ifp), p->hw_addr, ETHER_ADDR_LEN);
	mtu = ifp->if_mtu;
	if (ifp->if_capenable & IFCAP_VLAN_MTU)
		mtu += ETHER_VLAN_ENCAP_LEN;
	hwtagging = (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0;
	t3_mac_set_mtu(mac, mtu);
	t3_set_vlan_accel(p->adapter, 1 << p->tx_chan, hwtagging);
	t3_mac_set_address(mac, 0, p->hw_addr);
	t3_init_rx_mode(&rm, p);
	t3_mac_set_rx_mode(mac, &rm);
}
static void cxgb_update_mac_settings ( struct port_info * p ) { struct ifnet * ifp = p -> ifp ; struct t3_rx_mode rm ; struct cmac * mac = & p -> mac ; int mtu , hwtagging ; PORT_LOCK_ASSERT_OWNED ( p ) ; bcopy ( IF_LLADDR ( ifp ) , p -> hw_addr , ETHER_ADDR_LEN ) ; mtu = ifp -> if_mtu ; if ( ifp -> if_capenable & IFCAP_VLAN_MTU ) mtu += ETHER_VLAN_ENCAP_LEN ; hwtagging = ( ifp -> if_capenable & IFCAP_VLAN_HWTAGGING ) != 0 ; t3_mac_set_mtu ( mac , mtu ) ; t3_set_vlan_accel ( p -> adapter , 1 << p -> tx_chan , hwtagging ) ; t3_mac_set_address ( mac , 0 , p -> hw_addr ) ; t3_init_rx_mode ( & rm , p ) ; t3_mac_set_rx_mode ( mac , & rm ) ; }
Programs the XGMAC based on the settings in the ifnet.
Programs the XGMAC based on the settings in the ifnet .