/Linux-v4.19/net/caif/ |
D | cfserl.c | 16 #define container_obj(layr) ((struct cfserl *) layr) argument 29 static int cfserl_receive(struct cflayer *layr, struct cfpkt *pkt); 30 static int cfserl_transmit(struct cflayer *layr, struct cfpkt *pkt); 31 static void cfserl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl, 51 struct cfserl *layr = container_obj(l); in cfserl_receive() local 62 spin_lock(&layr->sync); in cfserl_receive() 64 if (layr->incomplete_frm != NULL) { in cfserl_receive() 65 layr->incomplete_frm = in cfserl_receive() 66 cfpkt_append(layr->incomplete_frm, newpkt, expectlen); in cfserl_receive() 67 pkt = layr->incomplete_frm; in cfserl_receive() [all …]
|
D | cfutill.c | 17 #define container_obj(layr) ((struct cfsrvl *) layr) argument 24 static int cfutill_receive(struct cflayer *layr, struct cfpkt *pkt); 25 static int cfutill_transmit(struct cflayer *layr, struct cfpkt *pkt); 40 static int cfutill_receive(struct cflayer *layr, struct cfpkt *pkt) in cfutill_receive() argument 43 struct cfsrvl *service = container_obj(layr); in cfutill_receive() 44 caif_assert(layr != NULL); in cfutill_receive() 45 caif_assert(layr->up != NULL); in cfutill_receive() 46 caif_assert(layr->up->receive != NULL); in cfutill_receive() 47 caif_assert(layr->up->ctrlcmd != NULL); in cfutill_receive() 56 return layr->up->receive(layr->up, pkt); in cfutill_receive() [all …]
|
D | cfsrvl.c | 26 #define container_obj(layr) container_of(layr, struct cfsrvl, layer) argument 28 static void cfservl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl, in cfservl_ctrlcmd() argument 31 struct cfsrvl *service = container_obj(layr); in cfservl_ctrlcmd() 33 if (layr->up == NULL || layr->up->ctrlcmd == NULL) in cfservl_ctrlcmd() 39 layr->up->ctrlcmd(layr->up, ctrl, phyid); in cfservl_ctrlcmd() 44 layr->up->ctrlcmd(layr->up, ctrl, phyid); in cfservl_ctrlcmd() 50 layr->up->ctrlcmd(layr->up, in cfservl_ctrlcmd() 58 layr->up->ctrlcmd(layr->up, in cfservl_ctrlcmd() 66 layr->up->ctrlcmd(layr->up, in cfservl_ctrlcmd() 73 layr->up->ctrlcmd(layr->up, in cfservl_ctrlcmd() [all …]
|
D | cffrml.c | 20 #define container_obj(layr) container_of(layr, struct cffrml, layer) argument 28 static int cffrml_receive(struct cflayer *layr, struct cfpkt *pkt); 29 static int cffrml_transmit(struct cflayer *layr, struct cfpkt *pkt); 30 static void cffrml_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl, 82 static int cffrml_receive(struct cflayer *layr, struct cfpkt *pkt) in cffrml_receive() argument 89 this = container_obj(layr); in cffrml_receive() 128 if (layr->up == NULL) { in cffrml_receive() 134 return layr->up->receive(layr->up, pkt); in cffrml_receive() 137 static int cffrml_transmit(struct cflayer *layr, struct cfpkt *pkt) in cffrml_transmit() argument 143 struct cffrml *this = container_obj(layr); in cffrml_transmit() [all …]
|
D | cfveil.c | 21 #define container_obj(layr) container_of(layr, struct cfsrvl, layer) argument 23 static int cfvei_receive(struct cflayer *layr, struct cfpkt *pkt); 24 static int cfvei_transmit(struct cflayer *layr, struct cfpkt *pkt); 39 static int cfvei_receive(struct cflayer *layr, struct cfpkt *pkt) in cfvei_receive() argument 43 caif_assert(layr->up != NULL); in cfvei_receive() 44 caif_assert(layr->receive != NULL); in cfvei_receive() 45 caif_assert(layr->ctrlcmd != NULL); in cfvei_receive() 55 ret = layr->up->receive(layr->up, pkt); in cfvei_receive() 58 layr->ctrlcmd(layr, CAIF_CTRLCMD_FLOW_OFF_IND, 0); in cfvei_receive() 62 layr->ctrlcmd(layr, CAIF_CTRLCMD_FLOW_ON_IND, 0); in cfvei_receive() [all …]
|
D | cfdgml.c | 17 #define container_obj(layr) ((struct cfsrvl *) layr) argument 24 static int cfdgml_receive(struct cflayer *layr, struct cfpkt *pkt); 25 static int cfdgml_transmit(struct cflayer *layr, struct cfpkt *pkt); 41 static int cfdgml_receive(struct cflayer *layr, struct cfpkt *pkt) in cfdgml_receive() argument 46 caif_assert(layr->up != NULL); in cfdgml_receive() 47 caif_assert(layr->receive != NULL); in cfdgml_receive() 48 caif_assert(layr->ctrlcmd != NULL); in cfdgml_receive() 62 ret = layr->up->receive(layr->up, pkt); in cfdgml_receive() 68 layr->ctrlcmd(layr, CAIF_CTRLCMD_FLOW_OFF_IND, 0); in cfdgml_receive() 72 layr->ctrlcmd(layr, CAIF_CTRLCMD_FLOW_ON_IND, 0); in cfdgml_receive() [all …]
|
D | cfdbgl.c | 15 #define container_obj(layr) ((struct cfsrvl *) layr) argument 17 static int cfdbgl_receive(struct cflayer *layr, struct cfpkt *pkt); 18 static int cfdbgl_transmit(struct cflayer *layr, struct cfpkt *pkt); 33 static int cfdbgl_receive(struct cflayer *layr, struct cfpkt *pkt) in cfdbgl_receive() argument 35 return layr->up->receive(layr->up, pkt); in cfdbgl_receive() 38 static int cfdbgl_transmit(struct cflayer *layr, struct cfpkt *pkt) in cfdbgl_transmit() argument 40 struct cfsrvl *service = container_obj(layr); in cfdbgl_transmit() 54 return layr->dn->transmit(layr->dn, pkt); in cfdbgl_transmit()
|
D | cfvidl.c | 17 #define container_obj(layr) ((struct cfsrvl *) layr) argument 19 static int cfvidl_receive(struct cflayer *layr, struct cfpkt *pkt); 20 static int cfvidl_transmit(struct cflayer *layr, struct cfpkt *pkt); 36 static int cfvidl_receive(struct cflayer *layr, struct cfpkt *pkt) in cfvidl_receive() argument 44 return layr->up->receive(layr->up, pkt); in cfvidl_receive() 47 static int cfvidl_transmit(struct cflayer *layr, struct cfpkt *pkt) in cfvidl_transmit() argument 49 struct cfsrvl *service = container_obj(layr); in cfvidl_transmit() 64 return layr->dn->transmit(layr->dn, pkt); in cfvidl_transmit()
|
D | cfmuxl.c | 18 #define container_obj(layr) container_of(layr, struct cfmuxl, layer) argument 42 static int cfmuxl_receive(struct cflayer *layr, struct cfpkt *pkt); 43 static int cfmuxl_transmit(struct cflayer *layr, struct cfpkt *pkt); 44 static void cfmuxl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl, 65 int cfmuxl_set_dnlayer(struct cflayer *layr, struct cflayer *dn, u8 phyid) in cfmuxl_set_dnlayer() argument 67 struct cfmuxl *muxl = (struct cfmuxl *) layr; in cfmuxl_set_dnlayer() 86 int cfmuxl_set_uplayer(struct cflayer *layr, struct cflayer *up, u8 linkid) in cfmuxl_set_uplayer() argument 88 struct cfmuxl *muxl = container_obj(layr); in cfmuxl_set_uplayer() 104 struct cflayer *cfmuxl_remove_dnlayer(struct cflayer *layr, u8 phyid) in cfmuxl_remove_dnlayer() argument 106 struct cfmuxl *muxl = container_obj(layr); in cfmuxl_remove_dnlayer() [all …]
|
D | caif_usb.c | 39 static int cfusbl_receive(struct cflayer *layr, struct cfpkt *pkt) in cfusbl_receive() argument 46 return layr->up->receive(layr->up, pkt); in cfusbl_receive() 49 static int cfusbl_transmit(struct cflayer *layr, struct cfpkt *pkt) in cfusbl_transmit() argument 55 struct cfusbl *usbl = container_of(layr, struct cfusbl, layer); in cfusbl_transmit() 75 return layr->dn->transmit(layr->dn, pkt); in cfusbl_transmit() 78 static void cfusbl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl, in cfusbl_ctrlcmd() argument 81 if (layr->up && layr->up->ctrlcmd) in cfusbl_ctrlcmd() 82 layr->up->ctrlcmd(layr->up, ctrl, layr->id); in cfusbl_ctrlcmd()
|
D | cfrfml.c | 17 #define container_obj(layr) container_of(layr, struct cfrfml, serv.layer) argument 21 static int cfrfml_receive(struct cflayer *layr, struct cfpkt *pkt); 22 static int cfrfml_transmit(struct cflayer *layr, struct cfpkt *pkt); 97 static int cfrfml_receive(struct cflayer *layr, struct cfpkt *pkt) in cfrfml_receive() argument 106 caif_assert(layr->up != NULL); in cfrfml_receive() 107 caif_assert(layr->receive != NULL); in cfrfml_receive() 108 rfml = container_obj(layr); in cfrfml_receive() 183 layr->up->ctrlcmd(layr->up, CAIF_CTRLCMD_REMOTE_SHUTDOWN_IND, in cfrfml_receive() 213 static int cfrfml_transmit(struct cflayer *layr, struct cfpkt *pkt) in cfrfml_transmit() argument 220 struct cfrfml *rfml = container_obj(layr); in cfrfml_transmit() [all …]
|
D | cfctrl.c | 17 #define container_obj(layr) container_of(layr, struct cfctrl, serv.layer) argument 30 static int cfctrl_recv(struct cflayer *layr, struct cfpkt *pkt); 31 static void cfctrl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl, 331 int cfctrl_cancel_req(struct cflayer *layr, struct cflayer *adap_layer) in cfctrl_cancel_req() argument 334 struct cfctrl *ctrl = container_obj(layr); in cfctrl_cancel_req() 551 static void cfctrl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl, in cfctrl_ctrlcmd() argument 554 struct cfctrl *this = container_obj(layr); in cfctrl_ctrlcmd()
|
D | caif_socket.c | 165 static int caif_sktrecv_cb(struct cflayer *layr, struct cfpkt *pkt) in caif_sktrecv_cb() argument 170 cf_sk = container_of(layr, struct caifsock, layer); in caif_sktrecv_cb() 181 static void cfsk_hold(struct cflayer *layr) in cfsk_hold() argument 183 struct caifsock *cf_sk = container_of(layr, struct caifsock, layer); in cfsk_hold() 187 static void cfsk_put(struct cflayer *layr) in cfsk_put() argument 189 struct caifsock *cf_sk = container_of(layr, struct caifsock, layer); in cfsk_put() 194 static void caif_ctrl_cb(struct cflayer *layr, in caif_ctrl_cb() argument 198 struct caifsock *cf_sk = container_of(layr, struct caifsock, layer); in caif_ctrl_cb()
|
D | chnl_net.c | 70 static int chnl_recv_cb(struct cflayer *layr, struct cfpkt *pkt) in chnl_recv_cb() argument 78 priv = container_of(layr, struct chnl_net, chnl); in chnl_recv_cb() 166 static void chnl_flowctrl_cb(struct cflayer *layr, enum caif_ctrlcmd flow, in chnl_flowctrl_cb() argument 169 struct chnl_net *priv = container_of(layr, struct chnl_net, chnl); in chnl_flowctrl_cb()
|
D | cfcnfg.c | 24 #define container_obj(layr) container_of(layr, struct cfcnfg, layer) argument
|
/Linux-v4.19/include/net/caif/ |
D | cfsrvl.h | 36 void cfsrvl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl, 48 static inline void cfsrvl_get(struct cflayer *layr) in cfsrvl_get() argument 50 struct cfsrvl *s = container_of(layr, struct cfsrvl, layer); in cfsrvl_get() 51 if (layr == NULL || layr->up == NULL || s->hold == NULL) in cfsrvl_get() 54 s->hold(layr->up); in cfsrvl_get() 57 static inline void cfsrvl_put(struct cflayer *layr) in cfsrvl_put() argument 59 struct cfsrvl *s = container_of(layr, struct cfsrvl, layer); in cfsrvl_put() 60 if (layr == NULL || layr->up == NULL || s->hold == NULL) in cfsrvl_put() 63 s->put(layr->up); in cfsrvl_put()
|
D | caif_layer.h | 179 int (*receive)(struct cflayer *layr, struct cfpkt *cfpkt); 206 int (*transmit) (struct cflayer *layr, struct cfpkt *cfpkt); 217 void (*ctrlcmd) (struct cflayer *layr, enum caif_ctrlcmd ctrl, 229 int (*modemcmd) (struct cflayer *layr, enum caif_modemcmd ctrl); 240 #define layer_set_up(layr, above) ((layr)->up = (struct cflayer *)(above)) argument 247 #define layer_set_dn(layr, below) ((layr)->dn = (struct cflayer *)(below)) argument
|
D | cffrml.h | 14 void cffrml_free(struct cflayer *layr); 17 void cffrml_put(struct cflayer *layr); 18 void cffrml_hold(struct cflayer *layr); 19 int cffrml_refcnt_read(struct cflayer *layr);
|
D | cfmuxl.h | 15 int cfmuxl_set_uplayer(struct cflayer *layr, struct cflayer *up, u8 linkid); 16 struct cflayer *cfmuxl_remove_dnlayer(struct cflayer *layr, u8 phyid); 17 int cfmuxl_set_dnlayer(struct cflayer *layr, struct cflayer *up, u8 phyid); 18 struct cflayer *cfmuxl_remove_uplayer(struct cflayer *layr, u8 linkid);
|
D | cfctrl.h | 127 int cfctrl_cancel_req(struct cflayer *layr, struct cflayer *adap_layer); 128 void cfctrl_remove(struct cflayer *layr);
|