{
struct sk_buff *newskb = NULL;
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
- struct can_pkg_stats *can_stats = dev_net(skb->dev)->can.pkg_stats;
+ struct can_pkg_stats *pkg_stats = dev_net(skb->dev)->can.pkg_stats;
int err = -EINVAL;
if (skb->len == CAN_MTU) {
netif_rx_ni(newskb);
/* update statistics */
- can_stats->tx_frames++;
- can_stats->tx_frames_delta++;
+ pkg_stats->tx_frames++;
+ pkg_stats->tx_frames_delta++;
return 0;
struct receiver *r;
struct hlist_head *rl;
struct can_dev_rcv_lists *d;
- struct can_rcv_lists_stats *can_pstats = net->can.rcv_lists_stats;
+ struct can_rcv_lists_stats *rcv_lists_stats = net->can.rcv_lists_stats;
int err = 0;
/* insert new receiver (dev,canid,mask) -> (func,data) */
hlist_add_head_rcu(&r->list, rl);
d->entries++;
- can_pstats->rcv_entries++;
- if (can_pstats->rcv_entries_max < can_pstats->rcv_entries)
- can_pstats->rcv_entries_max = can_pstats->rcv_entries;
+ rcv_lists_stats->rcv_entries++;
+ if (rcv_lists_stats->rcv_entries_max < rcv_lists_stats->rcv_entries)
+ rcv_lists_stats->rcv_entries_max = rcv_lists_stats->rcv_entries;
} else {
kmem_cache_free(rcv_cache, r);
err = -ENODEV;
{
struct receiver *r = NULL;
struct hlist_head *rl;
- struct can_rcv_lists_stats *can_pstats = net->can.rcv_lists_stats;
+ struct can_rcv_lists_stats *rcv_lists_stats = net->can.rcv_lists_stats;
struct can_dev_rcv_lists *d;
if (dev && dev->type != ARPHRD_CAN)
hlist_del_rcu(&r->list);
d->entries--;
- if (can_pstats->rcv_entries > 0)
- can_pstats->rcv_entries--;
+ if (rcv_lists_stats->rcv_entries > 0)
+ rcv_lists_stats->rcv_entries--;
/* remove device structure requested by NETDEV_UNREGISTER */
if (d->remove_on_zero_entries && !d->entries) {
{
struct can_dev_rcv_lists *d;
struct net *net = dev_net(dev);
- struct can_pkg_stats *can_stats = net->can.pkg_stats;
+ struct can_pkg_stats *pkg_stats = net->can.pkg_stats;
int matches;
/* update statistics */
- can_stats->rx_frames++;
- can_stats->rx_frames_delta++;
+ pkg_stats->rx_frames++;
+ pkg_stats->rx_frames_delta++;
/* create non-zero unique skb identifier together with *skb */
while (!(can_skb_prv(skb)->skbcnt))
consume_skb(skb);
if (matches > 0) {
- can_stats->matches++;
- can_stats->matches_delta++;
+ pkg_stats->matches++;
+ pkg_stats->matches_delta++;
}
}