Lines Matching refs:lp
122 struct net_local *lp = (struct net_local *) dev; in net_send_packet() local
124 spin_lock_irq(&lp->lock); in net_send_packet()
126 lp->skbs[lp->in_idx++] = skb; /* add to buffer list */ in net_send_packet()
127 if (lp->in_idx >= MAX_SKB_BUFFERS) in net_send_packet()
128 lp->in_idx = 0; /* wrap around */ in net_send_packet()
129 lp->sk_count++; /* adjust counter */ in net_send_packet()
136 if (lp->sk_count >= MAX_SKB_BUFFERS) in net_send_packet()
143 spin_unlock_irq(&lp->lock); in net_send_packet()
145 if (lp->sk_count <= 3) { in net_send_packet()
160 struct net_local *lp = card->netif; in hysdn_tx_netack() local
162 if (!lp) in hysdn_tx_netack()
166 if (!lp->sk_count) in hysdn_tx_netack()
169 lp->dev->stats.tx_packets++; in hysdn_tx_netack()
170 lp->dev->stats.tx_bytes += lp->skbs[lp->out_idx]->len; in hysdn_tx_netack()
172 dev_kfree_skb(lp->skbs[lp->out_idx++]); /* free skb */ in hysdn_tx_netack()
173 if (lp->out_idx >= MAX_SKB_BUFFERS) in hysdn_tx_netack()
174 lp->out_idx = 0; /* wrap around */ in hysdn_tx_netack()
176 if (lp->sk_count-- == MAX_SKB_BUFFERS) /* dec usage count */ in hysdn_tx_netack()
177 netif_start_queue((struct net_device *) lp); in hysdn_tx_netack()
186 struct net_local *lp = card->netif; in hysdn_rx_netpkt() local
190 if (!lp) in hysdn_rx_netpkt()
193 dev = lp->dev; in hysdn_rx_netpkt()
220 struct net_local *lp = card->netif; in hysdn_tx_netget() local
222 if (!lp) in hysdn_tx_netget()
225 if (!lp->sk_count) in hysdn_tx_netget()
228 return (lp->skbs[lp->out_idx]); /* next packet to send */ in hysdn_tx_netget()
251 struct net_local *lp; in hysdn_net_create() local
265 lp = netdev_priv(dev); in hysdn_net_create()
266 lp->dev = dev; in hysdn_net_create()