kernels/linux-2.4.0/drivers/net/dmfe.c
/* Send a setup frame for DM9102/DM9102A
   This setup frame initilize DM910X addres filter mode
 */
Send a setup frame for DM9102/DM9102A
This setup frame initilize DM910X addres filter mode
Send a setup frame for DM9102 / DM9102A This setup frame initilize DM910X addres filter mode
static void send_filter_frame(struct net_device *dev, int mc_cnt)
{
	struct dmfe_board_info *db = dev->priv;
	struct dev_mc_list *mcptr;
	struct tx_desc *txptr;
	u16 *addrptr;
	u32 *suptr;
	int i;
	DMFE_DBUG(0, "send_filetr_frame()", 0);
	txptr = db->tx_insert_ptr;
	suptr = (u32 *) txptr->tx_buf_ptr;
	addrptr = (u16 *) dev->dev_addr;
	*suptr++ = addrptr[0];
	*suptr++ = addrptr[1];
	*suptr++ = addrptr[2];
	*suptr++ = 0xffff;
	*suptr++ = 0xffff;
	*suptr++ = 0xffff;
	for (mcptr = dev->mc_list, i = 0; i < mc_cnt; i++, mcptr = mcptr->next) {
		addrptr = (u16 *) mcptr->dmi_addr;
		*suptr++ = addrptr[0];
		*suptr++ = addrptr[1];
		*suptr++ = addrptr[2];
	}
	for (; i < 14; i++) {
		*suptr++ = 0xffff;
		*suptr++ = 0xffff;
		*suptr++ = 0xffff;
	}
	db->tx_insert_ptr = (struct tx_desc *) txptr->next_tx_desc;
	txptr->tdes1 = 0x890000c0;
	if (!db->tx_packet_cnt) {
		db->tx_packet_cnt++;
		txptr->tdes0 = 0x80000000;
		update_cr6(db->cr6_data | 0x2000, dev->base_addr);
		outl(0x1, dev->base_addr + DCR1);	
		update_cr6(db->cr6_data, dev->base_addr);
	} else {
		db->tx_queue_cnt++;
	}
}
static void send_filter_frame ( struct net_device * dev , int mc_cnt ) { struct dmfe_board_info * db = dev -> priv ; struct dev_mc_list * mcptr ; struct tx_desc * txptr ; u16 * addrptr ; u32 * suptr ; int i ; DMFE_DBUG ( 0 , " " , 0 ) ; txptr = db -> tx_insert_ptr ; suptr = ( u32 * ) txptr -> tx_buf_ptr ; addrptr = ( u16 * ) dev -> dev_addr ; * suptr ++ = addrptr [ 0 ] ; * suptr ++ = addrptr [ 1 ] ; * suptr ++ = addrptr [ 2 ] ; * suptr ++ = 0xffff ; * suptr ++ = 0xffff ; * suptr ++ = 0xffff ; for ( mcptr = dev -> mc_list , i = 0 ; i < mc_cnt ; i ++ , mcptr = mcptr -> next ) { addrptr = ( u16 * ) mcptr -> dmi_addr ; * suptr ++ = addrptr [ 0 ] ; * suptr ++ = addrptr [ 1 ] ; * suptr ++ = addrptr [ 2 ] ; } for ( ; i < 14 ; i ++ ) { * suptr ++ = 0xffff ; * suptr ++ = 0xffff ; * suptr ++ = 0xffff ; } db -> tx_insert_ptr = ( struct tx_desc * ) txptr -> next_tx_desc ; txptr -> tdes1 = 0x890000c0 ; if ( ! db -> tx_packet_cnt ) { db -> tx_packet_cnt ++ ; txptr -> tdes0 = 0x80000000 ; update_cr6 ( db -> cr6_data | 0x2000 , dev -> base_addr ) ; outl ( 0x1 , dev -> base_addr + DCR1 ) ; update_cr6 ( db -> cr6_data , dev -> base_addr ) ; } else { db -> tx_queue_cnt ++ ; } }
Send a setup frame for DM9102/DM9102A
This setup frame initilize DM910X addres filter mode
Send a setup frame for DM9102 / DM9102A This setup frame initilize DM910X addres filter mode
/* Node address */ /* broadcast address */ /* fit the multicast address */ /* prepare the setup frame */ /* Resource Check and Send the setup packet */ /* Resource Empty */ /* Issue Tx polling command */ /* Put into TX queue */