diff options
Diffstat (limited to 'include/net/caif/cfsrvl.h')
-rw-r--r-- | include/net/caif/cfsrvl.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/include/net/caif/cfsrvl.h b/include/net/caif/cfsrvl.h index 2dc9eb193ecf..b1fa87ee0992 100644 --- a/include/net/caif/cfsrvl.h +++ b/include/net/caif/cfsrvl.h | |||
@@ -16,6 +16,8 @@ struct cfsrvl { | |||
16 | bool open; | 16 | bool open; |
17 | bool phy_flow_on; | 17 | bool phy_flow_on; |
18 | bool modem_flow_on; | 18 | bool modem_flow_on; |
19 | bool supports_flowctrl; | ||
20 | void (*release)(struct kref *); | ||
19 | struct dev_info dev_info; | 21 | struct dev_info dev_info; |
20 | struct kref ref; | 22 | struct kref ref; |
21 | }; | 23 | }; |
@@ -25,13 +27,15 @@ struct cflayer *cfvei_create(u8 linkid, struct dev_info *dev_info); | |||
25 | struct cflayer *cfdgml_create(u8 linkid, struct dev_info *dev_info); | 27 | struct cflayer *cfdgml_create(u8 linkid, struct dev_info *dev_info); |
26 | struct cflayer *cfutill_create(u8 linkid, struct dev_info *dev_info); | 28 | struct cflayer *cfutill_create(u8 linkid, struct dev_info *dev_info); |
27 | struct cflayer *cfvidl_create(u8 linkid, struct dev_info *dev_info); | 29 | struct cflayer *cfvidl_create(u8 linkid, struct dev_info *dev_info); |
28 | struct cflayer *cfrfml_create(u8 linkid, struct dev_info *dev_info); | 30 | struct cflayer *cfrfml_create(u8 linkid, struct dev_info *dev_info, |
31 | int mtu_size); | ||
29 | struct cflayer *cfdbgl_create(u8 linkid, struct dev_info *dev_info); | 32 | struct cflayer *cfdbgl_create(u8 linkid, struct dev_info *dev_info); |
30 | bool cfsrvl_phyid_match(struct cflayer *layer, int phyid); | 33 | bool cfsrvl_phyid_match(struct cflayer *layer, int phyid); |
31 | void cfservl_destroy(struct cflayer *layer); | 34 | void cfservl_destroy(struct cflayer *layer); |
32 | void cfsrvl_init(struct cfsrvl *service, | 35 | void cfsrvl_init(struct cfsrvl *service, |
33 | u8 channel_id, | 36 | u8 channel_id, |
34 | struct dev_info *dev_info); | 37 | struct dev_info *dev_info, |
38 | bool supports_flowctrl); | ||
35 | bool cfsrvl_ready(struct cfsrvl *service, int *err); | 39 | bool cfsrvl_ready(struct cfsrvl *service, int *err); |
36 | u8 cfsrvl_getphyid(struct cflayer *layer); | 40 | u8 cfsrvl_getphyid(struct cflayer *layer); |
37 | 41 | ||
@@ -50,7 +54,10 @@ static inline void cfsrvl_put(struct cflayer *layr) | |||
50 | if (layr == NULL) | 54 | if (layr == NULL) |
51 | return; | 55 | return; |
52 | s = container_of(layr, struct cfsrvl, layer); | 56 | s = container_of(layr, struct cfsrvl, layer); |
53 | kref_put(&s->ref, cfsrvl_release); | 57 | |
58 | WARN_ON(!s->release); | ||
59 | if (s->release) | ||
60 | kref_put(&s->ref, s->release); | ||
54 | } | 61 | } |
55 | 62 | ||
56 | #endif /* CFSRVL_H_ */ | 63 | #endif /* CFSRVL_H_ */ |