Lines Matching defs:protocol
3 * (used by different CAN protocol modules)
96 static const struct can_proto *can_get_proto(int protocol)
101 cp = rcu_dereference(proto_tab[protocol]);
114 static int can_create(struct net *net, struct socket *sock, int protocol,
123 if (protocol < 0 || protocol >= CAN_NPROTO)
126 cp = can_get_proto(protocol);
130 /* try to load protocol module if kernel is modular */
132 err = request_module("can-proto-%d", protocol);
140 protocol);
142 cp = can_get_proto(protocol);
146 /* check for available protocol and correct usage */
209 skb->protocol = htons(ETH_P_CANXL);
211 skb->protocol = htons(ETH_P_CAN);
215 skb->protocol = htons(ETH_P_CANFD);
543 /* Check for bugs in CAN protocol implementations using af_can.c:
724 /* af_can protocol functions */
727 * can_proto_register - register CAN transport protocol
728 * @cp: pointer to CAN protocol structure
732 * -EINVAL invalid (out of range) protocol number
733 * -EBUSY protocol already in use
738 int proto = cp->protocol;
742 pr_err("can: protocol number %d out of range\n", proto);
753 pr_err("can: protocol %d already registered\n", proto);
769 * can_proto_unregister - unregister CAN transport protocol
770 * @cp: pointer to CAN protocol structure
774 int proto = cp->protocol;
887 /* protocol register */
908 /* protocol unregister */