Lines Matching refs:atmvcc
63 struct atm_vcc *atmvcc; /* VCC descriptor */ member
80 static inline struct pppoatm_vcc *atmvcc_to_pvcc(const struct atm_vcc *atmvcc) in atmvcc_to_pvcc() argument
82 return (struct pppoatm_vcc *) (atmvcc->user_back); in atmvcc_to_pvcc()
105 static void pppoatm_pop(struct atm_vcc *atmvcc, struct sk_buff *skb) in pppoatm_pop() argument
107 struct pppoatm_vcc *pvcc = atmvcc_to_pvcc(atmvcc); in pppoatm_pop()
108 pvcc->old_pop(atmvcc, skb); in pppoatm_pop()
124 static void pppoatm_unassign_vcc(struct atm_vcc *atmvcc) in pppoatm_unassign_vcc() argument
127 pvcc = atmvcc_to_pvcc(atmvcc); in pppoatm_unassign_vcc()
128 atmvcc->push = pvcc->old_push; in pppoatm_unassign_vcc()
129 atmvcc->pop = pvcc->old_pop; in pppoatm_unassign_vcc()
132 atmvcc->user_back = NULL; in pppoatm_unassign_vcc()
139 static void pppoatm_push(struct atm_vcc *atmvcc, struct sk_buff *skb) in pppoatm_push() argument
141 struct pppoatm_vcc *pvcc = atmvcc_to_pvcc(atmvcc); in pppoatm_push()
145 pppoatm_unassign_vcc(atmvcc); in pppoatm_push()
146 atmvcc->push(atmvcc, NULL); /* Pass along bad news */ in pppoatm_push()
149 atm_return(atmvcc, skb->truesize); in pppoatm_push()
204 ATM_SKB(skb)->vcc = pvcc->atmvcc; in pppoatm_send()
206 pvcc->chan.unit, skb, pvcc->atmvcc); in pppoatm_send()
215 !atm_may_send(pvcc->atmvcc, n->truesize)) { in pppoatm_send()
222 } else if (!atm_may_send(pvcc->atmvcc, skb->truesize)) in pppoatm_send()
227 if (!atm_may_send(pvcc->atmvcc, skb->truesize)) in pppoatm_send()
274 static int pppoatm_assign_vcc(struct atm_vcc *atmvcc, unsigned long arg) in pppoatm_assign_vcc() argument
296 pvcc->atmvcc = atmvcc; in pppoatm_assign_vcc()
297 pvcc->old_push = atmvcc->push; in pppoatm_assign_vcc()
298 pvcc->old_pop = atmvcc->pop; in pppoatm_assign_vcc()
302 pvcc->chan.mtu = atmvcc->qos.txtp.max_sdu - PPP_HDRLEN - in pppoatm_assign_vcc()
310 atmvcc->user_back = pvcc; in pppoatm_assign_vcc()
311 atmvcc->push = pppoatm_push; in pppoatm_assign_vcc()
312 atmvcc->pop = pppoatm_pop; in pppoatm_assign_vcc()
320 static int pppoatm_ioctl(struct atm_vcc *atmvcc, unsigned int cmd, in pppoatm_ioctl() argument
323 if (cmd != ATM_SETBACKEND && atmvcc->push != pppoatm_push) in pppoatm_ioctl()
334 return pppoatm_assign_vcc(atmvcc, arg); in pppoatm_ioctl()
337 return put_user(ppp_channel_index(&atmvcc_to_pvcc(atmvcc)-> in pppoatm_ioctl()
340 return put_user(ppp_unit_number(&atmvcc_to_pvcc(atmvcc)-> in pppoatm_ioctl()