• Home
  • Raw
  • Download

Lines Matching refs:pkt

23 		       int cmd, struct cfpkt *pkt){  in handle_loop()  argument
28 int cmd, struct cfpkt *pkt);
30 static int cfctrl_recv(struct cflayer *layr, struct cfpkt *pkt);
178 struct cfpkt *pkt; in cfctrl_enum_req() local
186 pkt = cfpkt_create(CFPKT_CTRL_PKT_LEN); in cfctrl_enum_req()
187 if (!pkt) in cfctrl_enum_req()
190 init_info(cfpkt_info(pkt), cfctrl); in cfctrl_enum_req()
191 cfpkt_info(pkt)->dev_info->id = physlinkid; in cfctrl_enum_req()
193 cfpkt_addbdy(pkt, CFCTRL_CMD_ENUM); in cfctrl_enum_req()
194 cfpkt_addbdy(pkt, physlinkid); in cfctrl_enum_req()
195 cfpkt_set_prio(pkt, TC_PRIO_CONTROL); in cfctrl_enum_req()
196 dn->transmit(dn, pkt); in cfctrl_enum_req()
210 struct cfpkt *pkt; in cfctrl_linkup_request() local
225 pkt = cfpkt_create(CFPKT_CTRL_PKT_LEN); in cfctrl_linkup_request()
226 if (!pkt) in cfctrl_linkup_request()
228 cfpkt_addbdy(pkt, CFCTRL_CMD_LINK_SETUP); in cfctrl_linkup_request()
229 cfpkt_addbdy(pkt, (param->chtype << 4) | param->linktype); in cfctrl_linkup_request()
230 cfpkt_addbdy(pkt, (param->priority << 3) | param->phyid); in cfctrl_linkup_request()
231 cfpkt_addbdy(pkt, param->endpoint & 0x03); in cfctrl_linkup_request()
237 cfpkt_addbdy(pkt, (u8) param->u.video.connid); in cfctrl_linkup_request()
243 cfpkt_add_body(pkt, &tmp32, 4); in cfctrl_linkup_request()
250 cfpkt_add_body(pkt, &tmp32, 4); in cfctrl_linkup_request()
252 cfpkt_add_body(pkt, param->u.rfm.volume, in cfctrl_linkup_request()
257 cfpkt_add_body(pkt, &tmp16, 2); in cfctrl_linkup_request()
259 cfpkt_add_body(pkt, &tmp16, 2); in cfctrl_linkup_request()
263 cfpkt_add_body(pkt, utility_name, UTILITY_NAME_LENGTH); in cfctrl_linkup_request()
265 cfpkt_add_body(pkt, &tmp8, 1); in cfctrl_linkup_request()
266 cfpkt_add_body(pkt, param->u.utility.params, in cfctrl_linkup_request()
281 init_info(cfpkt_info(pkt), cfctrl); in cfctrl_linkup_request()
287 cfpkt_info(pkt)->dev_info->id = param->phyid; in cfctrl_linkup_request()
288 cfpkt_set_prio(pkt, TC_PRIO_CONTROL); in cfctrl_linkup_request()
290 dn->transmit(dn, pkt); in cfctrl_linkup_request()
308 struct cfpkt *pkt; in cfctrl_linkdown_req() local
316 pkt = cfpkt_create(CFPKT_CTRL_PKT_LEN); in cfctrl_linkdown_req()
317 if (!pkt) in cfctrl_linkdown_req()
319 cfpkt_addbdy(pkt, CFCTRL_CMD_LINK_DESTROY); in cfctrl_linkdown_req()
320 cfpkt_addbdy(pkt, channelid); in cfctrl_linkdown_req()
321 init_info(cfpkt_info(pkt), cfctrl); in cfctrl_linkdown_req()
322 cfpkt_set_prio(pkt, TC_PRIO_CONTROL); in cfctrl_linkdown_req()
324 dn->transmit(dn, pkt); in cfctrl_linkdown_req()
350 static int cfctrl_recv(struct cflayer *layer, struct cfpkt *pkt) in cfctrl_recv() argument
363 cfpkt_extr_head(pkt, &cmdrsp, 1); in cfctrl_recv()
368 if (handle_loop(cfctrl, cmd, pkt) != 0) in cfctrl_recv()
387 cfpkt_extr_head(pkt, &tmp, 1); in cfctrl_recv()
395 cfpkt_extr_head(pkt, &tmp, 1); in cfctrl_recv()
401 cfpkt_extr_head(pkt, &endpoint, 1); in cfctrl_recv()
410 cfpkt_extr_head(pkt, &linkid, 1); in cfctrl_recv()
413 cfpkt_extr_head(pkt, &tmp, 1); in cfctrl_recv()
418 cfpkt_extr_head(pkt, &linkid, 1); in cfctrl_recv()
422 cfpkt_extr_head(pkt, &tmp32, 4); in cfctrl_recv()
428 cfpkt_extr_head(pkt, &linkid, 1); in cfctrl_recv()
435 cfpkt_extr_head(pkt, &tmp32, 4); in cfctrl_recv()
439 for (cfpkt_extr_head(pkt, &tmp, 1); in cfctrl_recv()
440 cfpkt_more(pkt) && tmp != '\0'; in cfctrl_recv()
441 cfpkt_extr_head(pkt, &tmp, 1)) in cfctrl_recv()
448 cfpkt_extr_head(pkt, &linkid, 1); in cfctrl_recv()
457 cfpkt_extr_head(pkt, &tmp16, 2); in cfctrl_recv()
461 cfpkt_extr_head(pkt, &tmp16, 2); in cfctrl_recv()
470 && cfpkt_more(pkt); i++) { in cfctrl_recv()
471 cfpkt_extr_head(pkt, &tmp, 1); in cfctrl_recv()
475 cfpkt_extr_head(pkt, &len, 1); in cfctrl_recv()
479 while (cfpkt_more(pkt) && len--) { in cfctrl_recv()
480 cfpkt_extr_head(pkt, &tmp, 1); in cfctrl_recv()
486 cfpkt_extr_head(pkt, &linkid, 1); in cfctrl_recv()
488 cfpkt_extr_head(pkt, &len, 1); in cfctrl_recv()
490 cfpkt_extr_head(pkt, &param, len); in cfctrl_recv()
504 cfpkt_erroneous(pkt)) { in cfctrl_recv()
525 cfpkt_extr_head(pkt, &linkid, 1); in cfctrl_recv()
553 cfpkt_destroy(pkt); in cfctrl_recv()
592 static int handle_loop(struct cfctrl *ctrl, int cmd, struct cfpkt *pkt) in handle_loop() argument
620 cfpkt_add_trail(pkt, &linkid, 1); in handle_loop()
622 cfpkt_peek_head(pkt, &linktype, 1); in handle_loop()
625 cfpkt_add_trail(pkt, &tmp, 1); in handle_loop()
626 cfpkt_add_trail(pkt, &tmp, 1); in handle_loop()
632 cfpkt_peek_head(pkt, &linkid, 1); in handle_loop()