Browse Source

added netdev_tx_complete to natsemi.c

tags/v0.9.3
Udayan Kumar 17 years ago
parent
commit
6d4dafdc6e
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      src/drivers/net/natsemi.c

+ 6
- 0
src/drivers/net/natsemi.c View File

45
 	 * alternatively substracting sizeof(head) and sizeof(list_head) can also 
45
 	 * alternatively substracting sizeof(head) and sizeof(list_head) can also 
46
 	 * give the same.*/
46
 	 * give the same.*/
47
 	struct io_buffer *iobuf[NUM_RX_DESC];
47
 	struct io_buffer *iobuf[NUM_RX_DESC];
48
+	/*netdev_tx_complete needs pointer to the iobuf of the data so as to free 
49
+	  it form the memory.*/
50
+	struct io_buffer *tx_iobuf[TX_RING_SIZE];
48
 	struct spi_bit_basher spibit;
51
 	struct spi_bit_basher spibit;
49
 	struct spi_device eeprom;
52
 	struct spi_device eeprom;
50
 	struct nvo_block nvo;
53
 	struct nvo_block nvo;
415
 	}
418
 	}
416
 
419
 
417
 	//DBG_HD(iobuf->data,iob_len(iobuf));
420
 	//DBG_HD(iobuf->data,iob_len(iobuf));
421
+	/* to be used in netdev_tx_complete*/
422
+	nat->tx_iobuf[nat->tx_cur]=iobuf;
418
 
423
 
419
 	/* Pad and align packet */
424
 	/* Pad and align packet */
420
 	iob_pad ( iobuf, ETH_ZLEN );
425
 	iob_pad ( iobuf, ETH_ZLEN );
473
 			DBG("Success in transmitting Packet with data\n");
478
 			DBG("Success in transmitting Packet with data\n");
474
 		//	DBG_HD(&nat->tx[nat->tx_dirty].bufptr,130);
479
 		//	DBG_HD(&nat->tx[nat->tx_dirty].bufptr,130);
475
 		}
480
 		}
481
+		netdev_tx_complete(netdev,nat->tx_iobuf[nat->tx_dirty]);
476
 		/* setting cmdsts zero, indicating that it can be reused */
482
 		/* setting cmdsts zero, indicating that it can be reused */
477
 		nat->tx[nat->tx_dirty].cmdsts=0;
483
 		nat->tx[nat->tx_dirty].cmdsts=0;
478
 		nat->tx_dirty=(nat->tx_dirty +1) % TX_RING_SIZE;
484
 		nat->tx_dirty=(nat->tx_dirty +1) % TX_RING_SIZE;

Loading…
Cancel
Save