]> asedeno.scripts.mit.edu Git - linux.git/commit
hv_netvsc: optimize initialization of RNDIS header
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 1 Dec 2017 19:01:48 +0000 (11:01 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 3 Dec 2017 15:10:02 +0000 (10:10 -0500)
commitf5a2255010b0bde6df5a9060dbc826ad14ad4c44
treea68310aeb34336e68086d3857348cc6d2eece058
parenta7f99d0f2bbfe3b42ce398cdd37a97762e72cb56
hv_netvsc: optimize initialization of RNDIS header

The memset of the whole maximum possible RNDIS header is unnecessary.
For the main part of the header use a structure assignment.

No need to memset the whole per packet info. Instead rely on caller to
set what it wants. Also get rid of cast to void and signed/unsigned
conversion. Now return pointer to per packet data (rather than the
header) which simplifies use by code setting up the packet data.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc_drv.c