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 */
207 skb->protocol = htons(ETH_P_CAN);
211 skb->protocol = htons(ETH_P_CANFD);
542 /* Check for bugs in CAN protocol implementations using af_can.c:
730 /* af_can protocol functions */
733 * can_proto_register - register CAN transport protocol
734 * @cp: pointer to CAN protocol structure
738 * -EINVAL invalid (out of range) protocol number
739 * -EBUSY protocol already in use
744 int proto = cp->protocol;
748 pr_err("can: protocol number %d out of range\n", proto);
759 pr_err("can: protocol %d already registered\n", proto);
775 * can_proto_unregister - unregister CAN transport protocol
776 * @cp: pointer to CAN protocol structure
780 int proto = cp->protocol;
886 /* protocol register */
906 /* protocol unregister */