]> git.baikalelectronics.ru Git - kernel.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)
commit8e4d3677210585ffc20094ef23d285e165cb4eb8
treea68310aeb34336e68086d3857348cc6d2eece058
parent184ac6e43a191fa7aec8967fb7804c1d68ef7f30
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