hn_rndis.c (324465) | hn_rndis.c (324466) |
---|---|
1/*- 2 * Copyright (c) 2009-2012,2016-2017 Microsoft Corp. 3 * Copyright (c) 2010-2012 Citrix Inc. 4 * Copyright (c) 2012 NetApp Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2009-2012,2016-2017 Microsoft Corp. 3 * Copyright (c) 2010-2012 Citrix Inc. 4 * Copyright (c) 2012 NetApp Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: stable/10/sys/dev/hyperv/netvsc/hn_rndis.c 324465 2017-10-10 03:21:17Z sephe $"); | 30__FBSDID("$FreeBSD: stable/10/sys/dev/hyperv/netvsc/hn_rndis.c 324466 2017-10-10 03:29:36Z sephe $"); |
31 32#include "opt_inet6.h" 33#include "opt_inet.h" 34 35#include <sys/param.h> 36#include <sys/socket.h> 37#include <sys/systm.h> 38#include <sys/taskqueue.h> --- 145 unchanged lines hidden (view full) --- 184 return (error); 185 if (size != sizeof(uint32_t)) { 186 if_printf(sc->hn_ifp, "invalid link status len %zu\n", size); 187 return (EINVAL); 188 } 189 return (0); 190} 191 | 31 32#include "opt_inet6.h" 33#include "opt_inet.h" 34 35#include <sys/param.h> 36#include <sys/socket.h> 37#include <sys/systm.h> 38#include <sys/taskqueue.h> --- 145 unchanged lines hidden (view full) --- 184 return (error); 185 if (size != sizeof(uint32_t)) { 186 if_printf(sc->hn_ifp, "invalid link status len %zu\n", size); 187 return (EINVAL); 188 } 189 return (0); 190} 191 |
192int 193hn_rndis_get_mtu(struct hn_softc *sc, uint32_t *mtu) 194{ 195 size_t size; 196 int error; 197 198 size = sizeof(*mtu); 199 error = hn_rndis_query(sc, OID_GEN_MAXIMUM_FRAME_SIZE, NULL, 0, 200 mtu, &size); 201 if (error) 202 return (error); 203 if (size != sizeof(uint32_t)) { 204 if_printf(sc->hn_ifp, "invalid mtu len %zu\n", size); 205 return (EINVAL); 206 } 207 return (0); 208} 209 |
|
192static const void * 193hn_rndis_xact_exec1(struct hn_softc *sc, struct vmbus_xact *xact, size_t reqlen, 194 struct hn_nvs_sendctx *sndc, size_t *comp_len) 195{ 196 struct vmbus_gpa gpa[HN_XACT_REQ_PGCNT]; 197 int gpa_cnt, error; 198 bus_addr_t paddr; 199 --- 813 unchanged lines hidden --- | 210static const void * 211hn_rndis_xact_exec1(struct hn_softc *sc, struct vmbus_xact *xact, size_t reqlen, 212 struct hn_nvs_sendctx *sndc, size_t *comp_len) 213{ 214 struct vmbus_gpa gpa[HN_XACT_REQ_PGCNT]; 215 int gpa_cnt, error; 216 bus_addr_t paddr; 217 --- 813 unchanged lines hidden --- |