Lines Matching refs:comp

115 	const struct rndis_comp_hdr *comp;
126 if (dlen < sizeof(*comp)) {
130 comp = data;
132 KASSERT(comp->rm_rid > HN_RNDIS_RID_COMPAT_MAX,
133 ("invalid RNDIS rid 0x%08x\n", comp->rm_rid));
134 vmbus_xact_ctx_wakeup(sc->hn_xact, comp, dlen);
261 const struct rndis_comp_hdr *comp;
265 KASSERT(min_complen >= sizeof(*comp),
271 comp = hn_rndis_xact_exec1(sc, xact, reqlen, &hn_nvs_sendctx_none,
273 if (comp == NULL)
280 if (comp_len >= sizeof(*comp)) {
282 if_printf(sc->hn_ifp, "invalid RNDIS comp len %zu, "
283 "status 0x%08x\n", comp_len, comp->rm_status);
285 if_printf(sc->hn_ifp, "invalid RNDIS comp len %zu\n",
290 if (comp->rm_len < min_complen) {
291 if_printf(sc->hn_ifp, "invalid RNDIS comp msglen %u\n",
292 comp->rm_len);
295 if (comp->rm_type != comp_type) {
296 if_printf(sc->hn_ifp, "unexpected RNDIS comp 0x%08x, "
297 "expect 0x%08x\n", comp->rm_type, comp_type);
300 if (comp->rm_rid != rid) {
301 if_printf(sc->hn_ifp, "RNDIS comp rid mismatch %u, "
302 "expect %u\n", comp->rm_rid, rid);
307 return (comp);
324 const struct rndis_query_comp *comp;
360 comp_len = sizeof(*comp) + min_odlen;
361 comp = hn_rndis_xact_execute(sc, xact, rid, reqlen, &comp_len,
363 if (comp == NULL) {
369 if (comp->rm_status != RNDIS_STATUS_SUCCESS) {
371 "status 0x%08x\n", oid, comp->rm_status);
375 if (comp->rm_infobuflen == 0 || comp->rm_infobufoffset == 0) {
386 /* ofs is the offset from the beginning of comp. */
387 ofs = RNDIS_QUERY_COMP_INFOBUFOFFSET_ABS(comp->rm_infobufoffset);
388 if (ofs < sizeof(*comp) || ofs + comp->rm_infobuflen > comp_len) {
389 if_printf(sc->hn_ifp, "RNDIS query invalid comp ib off/len, "
390 "%u/%u\n", comp->rm_infobufoffset, comp->rm_infobuflen);
398 if (comp->rm_infobuflen < odlen)
399 odlen = comp->rm_infobuflen;
400 memcpy(odata, ((const uint8_t *)comp) + ofs, odlen);
536 const struct rndis_set_comp *comp;
561 comp_len = sizeof(*comp);
562 comp = hn_rndis_xact_execute(sc, xact, rid, reqlen, &comp_len,
564 if (comp == NULL) {
570 if (comp->rm_status != RNDIS_STATUS_SUCCESS) {
572 "status 0x%08x\n", oid, comp->rm_status);
832 const struct rndis_init_comp *comp;
853 comp = hn_rndis_xact_execute(sc, xact, rid, sizeof(*req), &comp_len,
855 if (comp == NULL) {
861 if (comp->rm_status != RNDIS_STATUS_SUCCESS) {
863 comp->rm_status);
867 sc->hn_rndis_agg_size = comp->rm_pktmaxsz;
868 sc->hn_rndis_agg_pkts = comp->rm_pktmaxcnt;
869 sc->hn_rndis_agg_align = 1U << comp->rm_align;
886 comp->rm_ver_major, comp->rm_ver_minor,