kernels/linux-2.4.0/drivers/net/tokenring/tms380tr.c
/*
 * Initializes the open parameter block.
 */
Initializes the open parameter block.
Initializes the open parameter block .
static void tms380tr_init_opb(struct net_device *dev)
{
	struct net_local *tp;
	unsigned long Addr;
	unsigned short RplSize    = RPL_SIZE;
	unsigned short TplSize    = TPL_SIZE;
	unsigned short BufferSize = BUFFER_SIZE;
	int i;
	tp = (struct net_local *)dev->priv;
	tp->ocpl.OPENOptions 	 = 0;
	tp->ocpl.OPENOptions 	|= ENABLE_FULL_DUPLEX_SELECTION;
	tp->ocpl.FullDuplex 	 = 0;
	tp->ocpl.FullDuplex 	|= OPEN_FULL_DUPLEX_OFF;
        for (i=0;i<6;i++)
                tp->ocpl.NodeAddr[i] = ((unsigned char *)dev->dev_addr)[i];
	tp->ocpl.GroupAddr	 = 0;
	tp->ocpl.FunctAddr	 = 0;
	tp->ocpl.RxListSize	 = cpu_to_be16((unsigned short)RplSize);
	tp->ocpl.TxListSize	 = cpu_to_be16((unsigned short)TplSize);
	tp->ocpl.BufSize	 = cpu_to_be16((unsigned short)BufferSize);
	tp->ocpl.Reserved	 = 0;
	tp->ocpl.TXBufMin	 = TX_BUF_MIN;
	tp->ocpl.TXBufMax	 = TX_BUF_MAX;
	Addr = htonl(virt_to_bus(tp->ProductID));
	tp->ocpl.ProdIDAddr[0]	 = LOWORD(Addr);
	tp->ocpl.ProdIDAddr[1]	 = HIWORD(Addr);
	return;
}
static void tms380tr_init_opb ( struct net_device * dev ) { struct net_local * tp ; unsigned long Addr ; unsigned short RplSize = RPL_SIZE ; unsigned short TplSize = TPL_SIZE ; unsigned short BufferSize = BUFFER_SIZE ; int i ; tp = ( struct net_local * ) dev -> priv ; tp -> ocpl . OPENOptions = 0 ; tp -> ocpl . OPENOptions |= ENABLE_FULL_DUPLEX_SELECTION ; tp -> ocpl . FullDuplex = 0 ; tp -> ocpl . FullDuplex |= OPEN_FULL_DUPLEX_OFF ; for ( i = 0 ; i < 6 ; i ++ ) tp -> ocpl . NodeAddr [ i ] = ( ( unsigned char * ) dev -> dev_addr ) [ i ] ; tp -> ocpl . GroupAddr = 0 ; tp -> ocpl . FunctAddr = 0 ; tp -> ocpl . RxListSize = cpu_to_be16 ( ( unsigned short ) RplSize ) ; tp -> ocpl . TxListSize = cpu_to_be16 ( ( unsigned short ) TplSize ) ; tp -> ocpl . BufSize = cpu_to_be16 ( ( unsigned short ) BufferSize ) ; tp -> ocpl . Reserved = 0 ; tp -> ocpl . TXBufMin = TX_BUF_MIN ; tp -> ocpl . TXBufMax = TX_BUF_MAX ; Addr = htonl ( virt_to_bus ( tp -> ProductID ) ) ; tp -> ocpl . ProdIDAddr [ 0 ] = LOWORD ( Addr ) ; tp -> ocpl . ProdIDAddr [ 1 ] = HIWORD ( Addr ) ; return ; }
Initializes the open parameter block.
Initializes the open parameter block .
/* 
	 * Set node address 
	 *
	 * We go ahead and put it in the OPB even though on
	 * most of the generic adapters this isn't required.
	 * Its simpler this way.  -- ASF
	 */