From: Stephen Hemminger Date: Tue, 4 May 2010 16:58:54 +0000 (-0700) Subject: Staging: hv: use existing Ethernet header size X-Git-Tag: MMI-PSA29.97-13-9~23841^2^2~205 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9f8bd8bacf90c78e331ad63c38b0ea167e2ce639;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Staging: hv: use existing Ethernet header size Use ETH_ALEN to indicate that MAC address is Ethernet. Also use Linux printk format for mac addresses. Signed-off-by: Stephen Hemminger Acked-by: Hank Janssen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/hv/NetVscApi.h b/drivers/staging/hv/NetVscApi.h index c372c98785d5..91a4cd9965d8 100644 --- a/drivers/staging/hv/NetVscApi.h +++ b/drivers/staging/hv/NetVscApi.h @@ -27,9 +27,6 @@ #include "VmbusApi.h" -/* Defines */ -#define HW_MACADDR_LEN 6 - /* Fwd declaration */ struct hv_netvsc_packet; @@ -92,9 +89,6 @@ struct netvsc_driver { u32 RingBufferSize; u32 RequestExtSize; - /* Additional num of page buffers to allocate */ - u32 AdditionalRequestPageBufferCount; - /* * This is set by the caller to allow us to callback when we * receive a packet from the "wire" diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c index cd2930de2176..861139677e33 100644 --- a/drivers/staging/hv/RndisFilter.c +++ b/drivers/staging/hv/RndisFilter.c @@ -22,6 +22,8 @@ #include #include #include +#include + #include "osd.h" #include "logging.h" #include "NetVscApi.h" @@ -50,7 +52,7 @@ struct rndis_device { spinlock_t request_lock; struct list_head RequestList; - unsigned char HwMacAddr[HW_MACADDR_LEN]; + unsigned char HwMacAddr[ETH_ALEN]; }; struct rndis_request { @@ -538,7 +540,7 @@ Cleanup: static int RndisFilterQueryDeviceMac(struct rndis_device *Device) { - u32 size = HW_MACADDR_LEN; + u32 size = ETH_ALEN; return RndisFilterQueryDevice(Device, RNDIS_OID_802_3_PERMANENT_ADDRESS, @@ -833,16 +835,10 @@ static int RndisFilterOnDeviceAdd(struct hv_device *Device, */ } - DPRINT_INFO(NETVSC, "Device 0x%p mac addr %02x%02x%02x%02x%02x%02x", - rndisDevice, - rndisDevice->HwMacAddr[0], - rndisDevice->HwMacAddr[1], - rndisDevice->HwMacAddr[2], - rndisDevice->HwMacAddr[3], - rndisDevice->HwMacAddr[4], - rndisDevice->HwMacAddr[5]); + DPRINT_INFO(NETVSC, "Device 0x%p mac addr %pM", + rndisDevice, rndisDevice->HwMacAddr); - memcpy(deviceInfo->MacAddr, rndisDevice->HwMacAddr, HW_MACADDR_LEN); + memcpy(deviceInfo->MacAddr, rndisDevice->HwMacAddr, ETH_ALEN); RndisFilterQueryDeviceLinkStatus(rndisDevice);