aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/net/natsemi.c
diff options
context:
space:
mode:
authorUdayan Kumar <udayan.kumar@gmail.com>2007-07-08 15:12:38 -0400
committerUdayan Kumar <udayan.kumar@gmail.com>2007-07-14 21:08:06 -0400
commitbfa322bb1986b7a1dd4f5e50dc99cc459f3a925f (patch)
tree114e48654b90405c6e504c8236f0727cb118952a /src/drivers/net/natsemi.c
parentf213f6a1a370b76a4f0c6ab397fea89b08f4f1cf (diff)
downloadipxe-bfa322bb1986b7a1dd4f5e50dc99cc459f3a925f.tar.gz
:x
Diffstat (limited to 'src/drivers/net/natsemi.c')
-rw-r--r--src/drivers/net/natsemi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/drivers/net/natsemi.c b/src/drivers/net/natsemi.c
index e07fd49b1..8e4bb2793 100644
--- a/src/drivers/net/natsemi.c
+++ b/src/drivers/net/natsemi.c
@@ -495,7 +495,7 @@ static int nat_transmit ( struct net_device *netdev, struct io_buffer *iobuf ) {
* @v netdev Network device
* @v rx_quota Maximum number of packets to receive
*/
-static void nat_poll ( struct net_device *netdev, unsigned int rx_quota ) {
+static void nat_poll ( struct net_device *netdev) {
struct natsemi_nic *nat = netdev->priv;
unsigned int status;
unsigned int rx_status;
@@ -544,7 +544,7 @@ static void nat_poll ( struct net_device *netdev, unsigned int rx_quota ) {
/* Handle received packets
*/
rx_status=(unsigned int)nat->rx[nat->rx_cur].cmdsts;
- while (rx_quota && (rx_status & OWN)) {
+ while ((rx_status & OWN)) {
rx_len= (rx_status & DSIZE) - CRC_SIZE;
/*check for the corrupt packet
*/
@@ -565,7 +565,6 @@ static void nat_poll ( struct net_device *netdev, unsigned int rx_quota ) {
/* add to the receive queue.
*/
netdev_rx(netdev,rx_iob);
- rx_quota--;
}
nat->rx[nat->rx_cur].cmdsts = RX_BUF_SIZE;
nat->rx_cur=(nat->rx_cur+1) % NUM_RX_DESC;
@@ -620,6 +619,7 @@ static int nat_probe ( struct pci_device *pci,
uint8_t ll_addr_encoded[MAX_LL_ADDR_LEN];
uint8_t last=0;
uint8_t last1=0;
+ uint8_t prev_bytes[2];
/* Allocate net device
*/
@@ -641,10 +641,12 @@ static int nat_probe ( struct pci_device *pci,
*/
nat_reset ( nat );
nat_init_eeprom ( nat );
+ nvs_read ( &nat->eeprom.nvs, EE_MAC-1, prev_bytes, 1);
nvs_read ( &nat->eeprom.nvs, EE_MAC, ll_addr_encoded, ETH_ALEN );
/* decoding the MAC address read from NVS
* and save it in netdev->ll_addr
*/
+ last=prev_bytes[1]>>7;
for ( i = 0 ; i < ETH_ALEN ; i++) {
last1=ll_addr_encoded[i]>>7;
netdev->ll_addr[i]=ll_addr_encoded[i]<<1|last;