Lines Matching full:vcc
82 struct atm_vcc *vcc, struct sk_buff *skb);
94 static int lec_mcast_make(struct lec_priv *priv, struct atm_vcc *vcc);
100 struct atm_vcc *vcc,
101 void (*old_push)(struct atm_vcc *vcc,
103 static void lec_vcc_close(struct lec_priv *priv, struct atm_vcc *vcc);
181 lec_send(struct atm_vcc *vcc, struct sk_buff *skb) in lec_send() argument
185 ATM_SKB(skb)->vcc = vcc; in lec_send()
186 atm_account_tx(vcc, skb); in lec_send()
188 if (vcc->send(vcc, skb) < 0) { in lec_send()
210 struct atm_vcc *vcc; in lec_start_xmit() local
279 /* Send to right vcc */ in lec_start_xmit()
283 vcc = lec_arp_resolve(priv, dst, is_rdesc, &entry); in lec_start_xmit()
284 pr_debug("%s:vcc:%p vcc_flags:%lx, entry:%p\n", in lec_start_xmit()
285 dev->name, vcc, vcc ? vcc->flags : 0, entry); in lec_start_xmit()
286 if (!vcc || !test_bit(ATM_VF_READY, &vcc->flags)) { in lec_start_xmit()
301 dev->name, vcc->vpi, vcc->vci); in lec_start_xmit()
306 lec_send(vcc, skb2); in lec_start_xmit()
309 lec_send(vcc, skb); in lec_start_xmit()
311 if (!atm_may_send(vcc, 0)) { in lec_start_xmit()
312 struct lec_vcc_priv *vpriv = LEC_VCC_PRIV(vcc); in lec_start_xmit()
318 * vcc->pop() might have occurred in between, making in lec_start_xmit()
319 * the vcc usuable again. Since xmit is serialized, in lec_start_xmit()
323 if (atm_may_send(vcc, 0)) in lec_start_xmit()
341 static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb) in lec_atm_send() argument
344 struct net_device *dev = (struct net_device *)vcc->proto_data; in lec_atm_send()
351 WARN_ON(refcount_sub_and_test(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc)); in lec_atm_send()
469 static void lec_atm_close(struct atm_vcc *vcc) in lec_atm_close() argument
472 struct net_device *dev = (struct net_device *)vcc->proto_data; in lec_atm_close()
481 if (skb_peek(&sk_atm(vcc)->sk_receive_queue)) in lec_atm_close()
483 while ((skb = skb_dequeue(&sk_atm(vcc)->sk_receive_queue))) { in lec_atm_close()
484 atm_return(vcc, skb->truesize); in lec_atm_close()
576 static int lec_is_data_direct(struct atm_vcc *vcc) in lec_is_data_direct() argument
578 return ((vcc->sap.blli[0].l3.tr9577.snap[4] == LEC_DATA_DIRECT_8023) || in lec_is_data_direct()
579 (vcc->sap.blli[0].l3.tr9577.snap[4] == LEC_DATA_DIRECT_8025)); in lec_is_data_direct()
582 static void lec_push(struct atm_vcc *vcc, struct sk_buff *skb) in lec_push() argument
585 struct net_device *dev = (struct net_device *)vcc->proto_data; in lec_push()
589 printk(KERN_DEBUG "%s: vcc vpi:%d vci:%d\n", in lec_push()
590 dev->name, vcc->vpi, vcc->vci); in lec_push()
594 lec_vcc_close(priv, vcc); in lec_push()
610 struct sock *sk = sk_atm(vcc); in lec_push()
619 atm_return(vcc, skb->truesize); in lec_push()
633 * If this is a Data Direct VCC, and the VCC does not match in lec_push()
637 if (lec_is_data_direct(vcc)) { in lec_push()
640 if (entry && entry->vcc != vcc) { in lec_push()
654 lec_arp_check_empties(priv, vcc, skb); in lec_push()
664 static void lec_pop(struct atm_vcc *vcc, struct sk_buff *skb) in lec_pop() argument
666 struct lec_vcc_priv *vpriv = LEC_VCC_PRIV(vcc); in lec_pop()
674 vpriv->old_pop(vcc, skb); in lec_pop()
676 if (vpriv->xoff && atm_may_send(vcc, 0)) { in lec_pop()
683 static int lec_vcc_attach(struct atm_vcc *vcc, void __user *arg) in lec_vcc_attach() argument
702 vpriv->old_pop = vcc->pop; in lec_vcc_attach()
703 vcc->user_back = vpriv; in lec_vcc_attach()
704 vcc->pop = lec_pop; in lec_vcc_attach()
706 &ioc_data, vcc, vcc->push); in lec_vcc_attach()
707 vcc->proto_data = dev_lec[ioc_data.dev_num]; in lec_vcc_attach()
708 vcc->push = lec_push; in lec_vcc_attach()
712 static int lec_mcast_attach(struct atm_vcc *vcc, int arg) in lec_mcast_attach() argument
719 vcc->proto_data = dev_lec[arg]; in lec_mcast_attach()
720 return lec_mcast_make(netdev_priv(dev_lec[arg]), vcc); in lec_mcast_attach()
724 static int lecd_attach(struct atm_vcc *vcc, int arg) in lecd_attach() argument
757 priv->lecd = vcc; in lecd_attach()
758 vcc->dev = &lecatm_dev; in lecd_attach()
759 vcc_insert_socket(sk_atm(vcc)); in lecd_attach()
761 vcc->proto_data = dev_lec[i]; in lecd_attach()
762 set_bit(ATM_VF_META, &vcc->flags); in lecd_attach()
763 set_bit(ATM_VF_READY, &vcc->flags); in lecd_attach()
806 if (entry->vcc) in lec_info()
807 seq_printf(seq, "%3d %3d ", entry->vcc->vpi, entry->vcc->vci); in lec_info()
993 struct atm_vcc *vcc = ATM_SD(sock); in lane_ioctl() local
1009 err = lecd_attach(vcc, (int)arg); in lane_ioctl()
1014 err = lec_mcast_attach(vcc, (int)arg); in lane_ioctl()
1017 err = lec_vcc_attach(vcc, (void __user *)arg); in lane_ioctl()
1251 if (entry->vcc) { in lec_arp_clear_vccs()
1252 struct atm_vcc *vcc = entry->vcc; in lec_arp_clear_vccs() local
1253 struct lec_vcc_priv *vpriv = LEC_VCC_PRIV(vcc); in lec_arp_clear_vccs()
1254 struct net_device *dev = (struct net_device *)vcc->proto_data; in lec_arp_clear_vccs()
1256 vcc->pop = vpriv->old_pop; in lec_arp_clear_vccs()
1260 vcc->user_back = NULL; in lec_arp_clear_vccs()
1261 vcc->push = entry->old_push; in lec_arp_clear_vccs()
1262 vcc_release_async(vcc, -EPIPE); in lec_arp_clear_vccs()
1263 entry->vcc = NULL; in lec_arp_clear_vccs()
1266 struct atm_vcc *vcc = entry->recv_vcc; in lec_arp_clear_vccs() local
1267 struct lec_vcc_priv *vpriv = LEC_VCC_PRIV(vcc); in lec_arp_clear_vccs()
1270 vcc->user_back = NULL; in lec_arp_clear_vccs()
1309 * If this is the only MAC connected to this VCC, in lec_arp_remove()
1310 * also tear down the VCC in lec_arp_remove()
1370 "Vcc vpi:%d vci:%d, Recv_vcc vpi:%d vci:%d Last_used:%lx, Timestamp:%lx, No_tries:%d ", in dump_arp_table()
1371 rulla->vcc ? rulla->vcc->vpi : 0, in dump_arp_table()
1372 rulla->vcc ? rulla->vcc->vci : 0, in dump_arp_table()
1395 "Vcc vpi:%d vci:%d, Recv_vcc vpi:%d vci:%d Last_used:%lx, Timestamp:%lx, No_tries:%d ", in dump_arp_table()
1396 rulla->vcc ? rulla->vcc->vpi : 0, in dump_arp_table()
1397 rulla->vcc ? rulla->vcc->vci : 0, in dump_arp_table()
1417 "Vcc vpi:%d vci:%d, Recv_vcc vpi:%d vci:%d Last_used:%lx, Timestamp:%lx, No_tries:%d ", in dump_arp_table()
1418 rulla->vcc ? rulla->vcc->vpi : 0, in dump_arp_table()
1419 rulla->vcc ? rulla->vcc->vci : 0, in dump_arp_table()
1439 "Vcc vpi:%d vci:%d, Recv_vcc vpi:%d vci:%d Last_used:%lx, Timestamp:%lx, No_tries:%d ", in dump_arp_table()
1440 rulla->vcc ? rulla->vcc->vpi : 0, in dump_arp_table()
1441 rulla->vcc ? rulla->vcc->vci : 0, in dump_arp_table()
1572 /* Unknown/unused vcc expire, remove associated entry */
1583 to_remove->vcc ? to_remove->recv_vcc->vpi : 0, in lec_arp_expire_vcc()
1584 to_remove->vcc ? to_remove->recv_vcc->vci : 0); in lec_arp_expire_vcc()
1673 struct atm_vcc *vcc = entry->vcc; in lec_arp_check_expire() local
1678 lec_send(vcc, skb); in lec_arp_check_expire()
1693 * Try to find vcc where mac_address is attached.
1727 found = entry->vcc; in lec_arp_resolve()
1757 pr_debug("entry->status %d entry->vcc %p\n", entry->status, in lec_arp_resolve()
1758 entry->vcc); in lec_arp_resolve()
1853 tmp->vcc = entry->vcc; in lec_arp_update()
1893 /* Vcc to this host exists */ in lec_arp_update()
1899 entry->vcc = tmp->vcc; in lec_arp_update()
1922 * Notifies: Vcc setup ready
1926 struct atm_vcc *vcc, in lec_vcc_added() argument
1927 void (*old_push) (struct atm_vcc *vcc, struct sk_buff *skb)) in lec_vcc_added()
1934 /* Vcc for Multicast Forward. No timer, LANEv2 7.1.20 and 2.3.5.3 */ in lec_vcc_added()
1944 entry->recv_vcc = vcc; in lec_vcc_added()
1952 entry->recv_vcc = vcc; in lec_vcc_added()
1958 * Vcc which we don't want to make default vcc, in lec_vcc_added()
1968 entry->recv_vcc = vcc; in lec_vcc_added()
1987 pr_debug("Currently -> Vcc: %d, Rvcc:%d\n", in lec_vcc_added()
1988 entry->vcc ? entry->vcc->vci : 0, in lec_vcc_added()
1993 entry->vcc = vcc; in lec_vcc_added()
2017 * we formed into default VCC (8.1.11). in lec_vcc_added()
2029 pr_debug("After vcc was added\n"); in lec_vcc_added()
2035 * from this vcc in lec_vcc_added()
2040 entry->vcc = vcc; in lec_vcc_added()
2049 pr_debug("After vcc was added\n"); in lec_vcc_added()
2070 struct atm_vcc *vcc = entry->vcc; in lec_flush_complete() local
2076 lec_send(vcc, skb); in lec_flush_complete()
2110 static int lec_mcast_make(struct lec_priv *priv, struct atm_vcc *vcc) in lec_mcast_make() argument
2124 vpriv->old_pop = vcc->pop; in lec_mcast_make()
2125 vcc->user_back = vpriv; in lec_mcast_make()
2126 vcc->pop = lec_pop; in lec_mcast_make()
2130 vcc->pop = vpriv->old_pop; in lec_mcast_make()
2135 memcpy(to_add->atm_addr, vcc->remote.sas_addr.prv, ATM_ESA_LEN); in lec_mcast_make()
2138 to_add->vcc = vcc; in lec_mcast_make()
2139 to_add->old_push = vcc->push; in lec_mcast_make()
2140 vcc->push = lec_push; in lec_mcast_make()
2141 priv->mcast_vcc = vcc; in lec_mcast_make()
2148 static void lec_vcc_close(struct lec_priv *priv, struct atm_vcc *vcc) in lec_vcc_close() argument
2155 pr_debug("LEC_ARP: lec_vcc_close vpi:%d vci:%d\n", vcc->vpi, vcc->vci); in lec_vcc_close()
2163 if (vcc == entry->vcc) { in lec_vcc_close()
2166 if (priv->mcast_vcc == vcc) in lec_vcc_close()
2174 if (entry->vcc == vcc) { in lec_vcc_close()
2184 if (entry->recv_vcc == vcc) { in lec_vcc_close()
2193 if (entry->recv_vcc == vcc) { in lec_vcc_close()
2207 struct atm_vcc *vcc, struct sk_buff *skb) in lec_arp_check_empties() argument
2218 if (vcc == entry->vcc) { in lec_arp_check_empties()