Lines Matching defs:cfctrl

15 #include <net/caif/cfctrl.h>
17 #define container_obj(layr) container_of(layr, struct cfctrl, serv.layer)
22 static int handle_loop(struct cfctrl *ctrl,
27 static int handle_loop(struct cfctrl *ctrl,
38 struct cfctrl *this =
39 kzalloc(sizeof(struct cfctrl), GFP_ATOMIC);
42 caif_assert(offsetof(struct cfctrl, serv.layer) == 0);
63 struct cfctrl *ctrl = container_obj(layer);
129 static void cfctrl_insert_req(struct cfctrl *ctrl,
140 static struct cfctrl_request_info *cfctrl_remove_req(struct cfctrl *ctrl,
165 struct cfctrl *this = container_obj(layer);
169 static void init_info(struct caif_payload_info *info, struct cfctrl *cfctrl)
172 info->channel_id = cfctrl->serv.layer.id;
173 info->dev_info = &cfctrl->serv.dev_info;
179 struct cfctrl *cfctrl = container_obj(layer);
180 struct cflayer *dn = cfctrl->serv.layer.dn;
189 caif_assert(offsetof(struct cfctrl, serv.layer) == 0);
190 init_info(cfpkt_info(pkt), cfctrl);
192 cfctrl->serv.dev_info.id = physlinkid;
203 struct cfctrl *cfctrl = container_obj(layer);
204 struct cflayer *dn = cfctrl->serv.layer.dn;
282 cfctrl_insert_req(cfctrl, req);
283 init_info(cfpkt_info(pkt), cfctrl);
296 count = cfctrl_cancel_req(&cfctrl->serv.layer,
311 struct cfctrl *cfctrl = container_obj(layer);
312 struct cflayer *dn = cfctrl->serv.layer.dn;
323 init_info(cfpkt_info(pkt), cfctrl);
328 cfctrl->loop_linkused[channelid] = 0;
336 struct cfctrl *ctrl = container_obj(layr);
352 static int cfctrl_link_setup(struct cfctrl *cfctrl, struct cfpkt *pkt, u8 cmdrsp)
471 spin_lock_bh(&cfctrl->info_list_lock);
472 req = cfctrl_remove_req(cfctrl, &rsp);
478 cfctrl->res.reject_rsp(cfctrl->serv.layer.up, 0,
481 cfctrl->res.linksetup_rsp(cfctrl->serv.layer.up, linkid,
488 spin_unlock_bh(&cfctrl->info_list_lock);
499 struct cfctrl *cfctrl = container_obj(layer);
506 if (handle_loop(cfctrl, cmd, pkt) != 0)
512 ret = cfctrl_link_setup(cfctrl, pkt, cmdrsp);
516 cfctrl->res.linkdestroy_rsp(cfctrl->serv.layer.up, linkid);
520 cfctrl->res.linkerror_ind();
523 cfctrl->res.enum_rsp();
526 cfctrl->res.sleep_rsp();
529 cfctrl->res.wake_rsp();
532 cfctrl->res.restart_rsp();
535 cfctrl->res.radioset_rsp();
550 struct cfctrl *this = container_obj(layr);
582 static int handle_loop(struct cfctrl *ctrl, int cmd, struct cfpkt *pkt)