Lines Matching refs:proto

63 	BUG_ON(!hdlc->proto->netif_rx);  in hdlc_rcv()
64 return hdlc->proto->netif_rx(skb); in hdlc_rcv()
71 if (hdlc->proto->xmit) in hdlc_start_xmit()
72 return hdlc->proto->xmit(skb, dev); in hdlc_start_xmit()
82 if (hdlc->proto->start) in hdlc_proto_start()
83 hdlc->proto->start(dev); in hdlc_proto_start()
90 if (hdlc->proto->stop) in hdlc_proto_stop()
91 hdlc->proto->stop(dev); in hdlc_proto_stop()
151 if (!hdlc->proto) in hdlc_open()
154 if (hdlc->proto->open) { in hdlc_open()
155 int result = hdlc->proto->open(dev); in hdlc_open()
194 if (hdlc->proto->close) in hdlc_close()
195 hdlc->proto->close(dev); in hdlc_close()
201 struct hdlc_proto *proto = first_proto; in hdlc_ioctl() local
204 if (dev_to_hdlc(dev)->proto) { in hdlc_ioctl()
205 result = dev_to_hdlc(dev)->proto->ioctl(dev, ifs); in hdlc_ioctl()
212 while (proto) { in hdlc_ioctl()
213 result = proto->ioctl(dev, ifs); in hdlc_ioctl()
216 proto = proto->next; in hdlc_ioctl()
272 int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto, in attach_hdlc_protocol() argument
281 if (!try_module_get(proto->module)) in attach_hdlc_protocol()
287 module_put(proto->module); in attach_hdlc_protocol()
291 dev_to_hdlc(dev)->proto = proto; in attach_hdlc_protocol()
302 if (hdlc->proto) { in detach_hdlc_protocol()
310 if (hdlc->proto->detach) in detach_hdlc_protocol()
311 hdlc->proto->detach(dev); in detach_hdlc_protocol()
312 module_put(hdlc->proto->module); in detach_hdlc_protocol()
313 hdlc->proto = NULL; in detach_hdlc_protocol()
323 void register_hdlc_protocol(struct hdlc_proto *proto) in register_hdlc_protocol() argument
326 proto->next = first_proto; in register_hdlc_protocol()
327 first_proto = proto; in register_hdlc_protocol()
332 void unregister_hdlc_protocol(struct hdlc_proto *proto) in unregister_hdlc_protocol() argument
338 while (*p != proto) { in unregister_hdlc_protocol()
342 *p = proto->next; in unregister_hdlc_protocol()