FreeBSD/sys/dev/qlxgb/qla_hw.c
/*
 * Name: qla_config_mac_addr
 * Function: binds a MAC address to the context/interface.
 *	Can be unicast, multicast or broadcast.
 */
qla_config_mac_addr
Function: binds a MAC address to the context/interface.
Can be unicast, multicast or broadcast.
qla_config_mac_addr Function : binds a MAC address to the context / interface . Can be unicast multicast or broadcast .
static int
qla_config_mac_addr(qla_host_t *ha, uint8_t *mac_addr, uint16_t cntxt_id,
	uint32_t add_multi)
{
	qla_fw_cds_config_mac_addr_t mac_config;
	int ret;
	bzero(&mac_config, sizeof(qla_fw_cds_config_mac_addr_t));
	mac_config.hdr.cmd = Q8_FWCD_CNTRL_REQ;
	mac_config.hdr.opcode = Q8_FWCD_OPCODE_CONFIG_MAC_ADDR;
	mac_config.hdr.cntxt_id = cntxt_id;
	if (add_multi)
		mac_config.cmd = Q8_FWCD_ADD_MAC_ADDR;
	else
		mac_config.cmd = Q8_FWCD_DEL_MAC_ADDR;
	bcopy(mac_addr, mac_config.mac_addr,6); 
	ret = qla_fw_cmd(ha, &mac_config, sizeof(qla_fw_cds_config_mac_addr_t));
	return ret;
}
static int qla_config_mac_addr ( qla_host_t * ha , uint8_t * mac_addr , uint16_t cntxt_id , uint32_t add_multi ) { qla_fw_cds_config_mac_addr_t mac_config ; int ret ; bzero ( & mac_config , sizeof ( qla_fw_cds_config_mac_addr_t ) ) ; mac_config . hdr . cmd = Q8_FWCD_CNTRL_REQ ; mac_config . hdr . opcode = Q8_FWCD_OPCODE_CONFIG_MAC_ADDR ; mac_config . hdr . cntxt_id = cntxt_id ; if ( add_multi ) mac_config . cmd = Q8_FWCD_ADD_MAC_ADDR ; else mac_config . cmd = Q8_FWCD_DEL_MAC_ADDR ; bcopy ( mac_addr , mac_config . mac_addr , 6 ) ; ret = qla_fw_cmd ( ha , & mac_config , sizeof ( qla_fw_cds_config_mac_addr_t ) ) ; return ret ; }
Name: qla_config_mac_addr
 Function: binds a MAC address to the context/interface.
Name : qla_config_mac_addr Function : binds a MAC address to the context / interface .
//	device_printf(ha->pci_dev, //		"%s: mac_addr %02x:%02x:%02x:%02x:%02x:%02x\n", __func__, //		mac_addr[0], mac_addr[1], mac_addr[2], //		mac_addr[3], mac_addr[4], mac_addr[5]);