/linux/net/caif/ |
H A 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, 56 struct cfserl *layr = container_obj(l); in cfserl_receive() local 67 spin_lock(&layr->sync); in cfserl_receive() 69 if (layr->incomplete_frm != NULL) { in cfserl_receive() 70 layr->incomplete_frm = in cfserl_receive() 71 cfpkt_append(layr->incomplete_frm, newpkt, expectlen); in cfserl_receive() 72 pkt = layr->incomplete_frm; in cfserl_receive() [all …]
|
H A 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 …]
|
H A D | cfsrvl.c | 25 #define container_obj(layr) container_of(layr, struct cfsrvl, layer) argument 27 static void cfservl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl, in cfservl_ctrlcmd() argument 30 struct cfsrvl *service = container_obj(layr); in cfservl_ctrlcmd() 32 if (layr->up == NULL || layr->up->ctrlcmd == NULL) in cfservl_ctrlcmd() 38 layr->up->ctrlcmd(layr->up, ctrl, phyid); in cfservl_ctrlcmd() 43 layr->up->ctrlcmd(layr->up, ctrl, phyid); in cfservl_ctrlcmd() 49 layr->up->ctrlcmd(layr->up, in cfservl_ctrlcmd() 57 layr->up->ctrlcmd(layr->up, in cfservl_ctrlcmd() 65 layr->up->ctrlcmd(layr->up, in cfservl_ctrlcmd() 72 layr->up->ctrlcmd(layr->up, in cfservl_ctrlcmd() [all …]
|
H A 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 …]
|
H A 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 …]
|
H A 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); 40 static int cfdgml_receive(struct cflayer *layr, struct cfpkt *pkt) in cfdgml_receive() argument 45 caif_assert(layr->up != NULL); in cfdgml_receive() 46 caif_assert(layr->receive != NULL); in cfdgml_receive() 47 caif_assert(layr->ctrlcmd != NULL); in cfdgml_receive() 61 ret = layr->up->receive(layr->up, pkt); in cfdgml_receive() 67 layr->ctrlcmd(layr, CAIF_CTRLCMD_FLOW_OFF_IND, 0); in cfdgml_receive() 71 layr->ctrlcmd(layr, CAIF_CTRLCMD_FLOW_ON_IND, 0); in cfdgml_receive() [all …]
|
H A 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()
|
H A 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()
|
H A 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 …]
|
H A 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 …]
|
H A 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()
|
H A 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, 335 int cfctrl_cancel_req(struct cflayer *layr, struct cflayer *adap_layer) in cfctrl_cancel_req() argument 338 struct cfctrl *ctrl = container_obj(layr); in cfctrl_cancel_req() 555 static void cfctrl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl, in cfctrl_ctrlcmd() argument 558 struct cfctrl *this = container_obj(layr); in cfctrl_ctrlcmd()
|
H A D | caif_socket.c | 161 static int caif_sktrecv_cb(struct cflayer *layr, struct cfpkt *pkt) in caif_sktrecv_cb() argument 166 cf_sk = container_of(layr, struct caifsock, layer); in caif_sktrecv_cb() 177 static void cfsk_hold(struct cflayer *layr) in cfsk_hold() argument 179 struct caifsock *cf_sk = container_of(layr, struct caifsock, layer); in cfsk_hold() 183 static void cfsk_put(struct cflayer *layr) in cfsk_put() argument 185 struct caifsock *cf_sk = container_of(layr, struct caifsock, layer); in cfsk_put() 190 static void caif_ctrl_cb(struct cflayer *layr, in caif_ctrl_cb() argument 194 struct caifsock *cf_sk = container_of(layr, struct caifsock, layer); in caif_ctrl_cb()
|
H A D | chnl_net.c | 56 static int chnl_recv_cb(struct cflayer *layr, struct cfpkt *pkt) in chnl_recv_cb() argument 64 priv = container_of(layr, struct chnl_net, chnl); in chnl_recv_cb() 147 static void chnl_flowctrl_cb(struct cflayer *layr, enum caif_ctrlcmd flow, in chnl_flowctrl_cb() argument 150 struct chnl_net *priv = container_of(layr, struct chnl_net, chnl); in chnl_flowctrl_cb()
|
H A D | cfcnfg.c | 24 #define container_obj(layr) container_of(layr, struct cfcnfg, layer) argument
|
/linux/include/net/caif/ |
H A D | cfsrvl.h | 45 static inline void cfsrvl_get(struct cflayer *layr) in cfsrvl_get() argument 47 struct cfsrvl *s = container_of(layr, struct cfsrvl, layer); in cfsrvl_get() 48 if (layr == NULL || layr->up == NULL || s->hold == NULL) in cfsrvl_get() 51 s->hold(layr->up); in cfsrvl_get() 54 static inline void cfsrvl_put(struct cflayer *layr) in cfsrvl_put() argument 56 struct cfsrvl *s = container_of(layr, struct cfsrvl, layer); in cfsrvl_put() 57 if (layr == NULL || layr->up == NULL || s->hold == NULL) in cfsrvl_put() 60 s->put(layr->up); in cfsrvl_put()
|
H A D | caif_layer.h | 177 int (*receive)(struct cflayer *layr, struct cfpkt *cfpkt); 204 int (*transmit) (struct cflayer *layr, struct cfpkt *cfpkt); 215 void (*ctrlcmd) (struct cflayer *layr, enum caif_ctrlcmd ctrl, 227 int (*modemcmd) (struct cflayer *layr, enum caif_modemcmd ctrl); 238 #define layer_set_up(layr, above) ((layr)->up = (struct cflayer *)(above)) argument 245 #define layer_set_dn(layr, below) ((layr)->dn = (struct cflayer *)(below)) argument
|
H A 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);
|
H A 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);
|
H A D | cfctrl.h | 127 int cfctrl_cancel_req(struct cflayer *layr, struct cflayer *adap_layer); 128 void cfctrl_remove(struct cflayer *layr);
|