Lines Matching full:comp

112 	const struct rndis_comp_hdr *comp;  in hn_rndis_rx_ctrl()  local
123 if (dlen < sizeof(*comp)) { in hn_rndis_rx_ctrl()
127 comp = data; in hn_rndis_rx_ctrl()
129 KASSERT(comp->rm_rid > HN_RNDIS_RID_COMPAT_MAX, in hn_rndis_rx_ctrl()
130 ("invalid RNDIS rid 0x%08x\n", comp->rm_rid)); in hn_rndis_rx_ctrl()
131 vmbus_xact_ctx_wakeup(sc->hn_xact, comp, dlen); in hn_rndis_rx_ctrl()
258 const struct rndis_comp_hdr *comp; in hn_rndis_xact_execute() local
262 KASSERT(min_complen >= sizeof(*comp), in hn_rndis_xact_execute()
268 comp = hn_rndis_xact_exec1(sc, xact, reqlen, &hn_nvs_sendctx_none, in hn_rndis_xact_execute()
270 if (comp == NULL) in hn_rndis_xact_execute()
277 if (comp_len >= sizeof(*comp)) { in hn_rndis_xact_execute()
279 if_printf(sc->hn_ifp, "invalid RNDIS comp len %zu, " in hn_rndis_xact_execute()
280 "status 0x%08x\n", comp_len, comp->rm_status); in hn_rndis_xact_execute()
282 if_printf(sc->hn_ifp, "invalid RNDIS comp len %zu\n", in hn_rndis_xact_execute()
287 if (comp->rm_len < min_complen) { in hn_rndis_xact_execute()
288 if_printf(sc->hn_ifp, "invalid RNDIS comp msglen %u\n", in hn_rndis_xact_execute()
289 comp->rm_len); in hn_rndis_xact_execute()
292 if (comp->rm_type != comp_type) { in hn_rndis_xact_execute()
293 if_printf(sc->hn_ifp, "unexpected RNDIS comp 0x%08x, " in hn_rndis_xact_execute()
294 "expect 0x%08x\n", comp->rm_type, comp_type); in hn_rndis_xact_execute()
297 if (comp->rm_rid != rid) { in hn_rndis_xact_execute()
298 if_printf(sc->hn_ifp, "RNDIS comp rid mismatch %u, " in hn_rndis_xact_execute()
299 "expect %u\n", comp->rm_rid, rid); in hn_rndis_xact_execute()
304 return (comp); in hn_rndis_xact_execute()
321 const struct rndis_query_comp *comp; in hn_rndis_query2() local
357 comp_len = sizeof(*comp) + min_odlen; in hn_rndis_query2()
358 comp = hn_rndis_xact_execute(sc, xact, rid, reqlen, &comp_len, in hn_rndis_query2()
360 if (comp == NULL) { in hn_rndis_query2()
366 if (comp->rm_status != RNDIS_STATUS_SUCCESS) { in hn_rndis_query2()
368 "status 0x%08x\n", oid, comp->rm_status); in hn_rndis_query2()
372 if (comp->rm_infobuflen == 0 || comp->rm_infobufoffset == 0) { in hn_rndis_query2()
383 /* ofs is the offset from the beginning of comp. */ in hn_rndis_query2()
384 ofs = RNDIS_QUERY_COMP_INFOBUFOFFSET_ABS(comp->rm_infobufoffset); in hn_rndis_query2()
385 if (ofs < sizeof(*comp) || ofs + comp->rm_infobuflen > comp_len) { in hn_rndis_query2()
386 if_printf(sc->hn_ifp, "RNDIS query invalid comp ib off/len, " in hn_rndis_query2()
387 "%u/%u\n", comp->rm_infobufoffset, comp->rm_infobuflen); in hn_rndis_query2()
395 if (comp->rm_infobuflen < odlen) in hn_rndis_query2()
396 odlen = comp->rm_infobuflen; in hn_rndis_query2()
397 memcpy(odata, ((const uint8_t *)comp) + ofs, odlen); in hn_rndis_query2()
533 const struct rndis_set_comp *comp; in hn_rndis_set() local
558 comp_len = sizeof(*comp); in hn_rndis_set()
559 comp = hn_rndis_xact_execute(sc, xact, rid, reqlen, &comp_len, in hn_rndis_set()
561 if (comp == NULL) { in hn_rndis_set()
567 if (comp->rm_status != RNDIS_STATUS_SUCCESS) { in hn_rndis_set()
569 "status 0x%08x\n", oid, comp->rm_status); in hn_rndis_set()
851 const struct rndis_init_comp *comp; in hn_rndis_init() local
872 comp = hn_rndis_xact_execute(sc, xact, rid, sizeof(*req), &comp_len, in hn_rndis_init()
874 if (comp == NULL) { in hn_rndis_init()
880 if (comp->rm_status != RNDIS_STATUS_SUCCESS) { in hn_rndis_init()
882 comp->rm_status); in hn_rndis_init()
886 sc->hn_rndis_agg_size = comp->rm_pktmaxsz; in hn_rndis_init()
887 sc->hn_rndis_agg_pkts = comp->rm_pktmaxcnt; in hn_rndis_init()
888 sc->hn_rndis_agg_align = 1U << comp->rm_align; in hn_rndis_init()
905 comp->rm_ver_major, comp->rm_ver_minor, in hn_rndis_init()