win-pvdrivers

changeset 767:3e2651f9c739

test fix for bad mac address detection
author James Harper <james.harper@bendigoit.com.au>
date Sun Jan 31 21:46:42 2010 +1100 (2010-01-31)
parents 6300617040e0
children ff2ac86471dc
files xennet/xennet.c
line diff
     1.1 --- a/xennet/xennet.c	Sun Jan 31 21:28:42 2010 +1100
     1.2 +++ b/xennet/xennet.c	Sun Jan 31 21:46:42 2010 +1100
     1.3 @@ -173,7 +173,7 @@ XenNet_ConnectBackend(struct xennet_info
     1.4            }
     1.5            s = e + 1;
     1.6          }
     1.7 -        if (!(xi->curr_mac_addr[0] & 0x02))
     1.8 +        if ((xi->curr_mac_addr[0] & 0x03) == 0x02)
     1.9          {
    1.10            /* only copy if curr_mac_addr is not a LUA */
    1.11            memcpy(xi->curr_mac_addr, xi->perm_mac_addr, ETH_ALEN);
    1.12 @@ -624,9 +624,9 @@ XenNet_Init(
    1.13    
    1.14  
    1.15    NdisReadNetworkAddress(&status, &network_address, &network_address_length, config_handle);
    1.16 -  if (!NT_SUCCESS(status) || network_address_length != ETH_ALEN || !(((PUCHAR)network_address)[0] & 0x02))
    1.17 +  if (!NT_SUCCESS(status) || network_address_length != ETH_ALEN || ((((PUCHAR)network_address)[0] & 0x03) != 0x02))
    1.18    {
    1.19 -    KdPrint(("Could not read NetworkAddress value (%08x)\n", status));
    1.20 +    KdPrint(("Could not read NetworkAddress value (%08x) or value is invalid\n", status));
    1.21      memset(xi->curr_mac_addr, 0, ETH_ALEN);
    1.22    }
    1.23    else