Lines Matching refs:brvcc
153 struct br2684_vcc *brvcc; in atm_dev_event() local
163 list_for_each_entry(brvcc, &BRPRIV(net_dev)->brvccs, brvccs) { in atm_dev_event()
164 atm_vcc = brvcc->atmvcc; in atm_dev_event()
165 if (atm_vcc && brvcc->atmvcc->dev == atm_dev) { in atm_dev_event()
187 struct br2684_vcc *brvcc = BR2684_VCC(vcc); in br2684_pop() local
189 pr_debug("(vcc %p ; net_dev %p )\n", vcc, brvcc->device); in br2684_pop()
190 brvcc->old_pop(vcc, skb); in br2684_pop()
193 if (atomic_inc_return(&brvcc->qspace) == 1) in br2684_pop()
194 netif_wake_queue(brvcc->device); in br2684_pop()
203 struct br2684_vcc *brvcc) in br2684_xmit_vcc() argument
207 int minheadroom = (brvcc->encaps == e_llc) ? in br2684_xmit_vcc()
214 brvcc->copies_needed++; in br2684_xmit_vcc()
217 brvcc->copies_failed++; in br2684_xmit_vcc()
223 if (brvcc->encaps == e_llc) { in br2684_xmit_vcc()
254 ATM_SKB(skb)->vcc = atmvcc = brvcc->atmvcc; in br2684_xmit_vcc()
260 if (atomic_dec_return(&brvcc->qspace) < 1) { in br2684_xmit_vcc()
262 netif_stop_queue(brvcc->device); in br2684_xmit_vcc()
264 if (unlikely(atomic_read(&brvcc->qspace) > 0)) in br2684_xmit_vcc()
265 netif_wake_queue(brvcc->device); in br2684_xmit_vcc()
276 struct br2684_vcc *brvcc = BR2684_VCC(atmvcc); in br2684_release_cb() local
278 if (atomic_read(&brvcc->qspace) > 0) in br2684_release_cb()
279 netif_wake_queue(brvcc->device); in br2684_release_cb()
281 if (brvcc->old_release_cb) in br2684_release_cb()
282 brvcc->old_release_cb(atmvcc); in br2684_release_cb()
295 struct br2684_vcc *brvcc; in br2684_start_xmit() local
301 brvcc = pick_outgoing_vcc(skb, brdev); in br2684_start_xmit()
302 if (brvcc == NULL) { in br2684_start_xmit()
310 atmvcc = brvcc->atmvcc; in br2684_start_xmit()
323 netif_stop_queue(brvcc->device); in br2684_start_xmit()
328 if (!br2684_xmit_vcc(skb, dev, brvcc)) { in br2684_start_xmit()
362 struct br2684_vcc *brvcc; in br2684_setfilt() local
377 brvcc = NULL; in br2684_setfilt()
379 brvcc = list_entry_brvcc(brdev->brvccs.next); in br2684_setfilt()
381 if (brvcc == NULL) in br2684_setfilt()
384 brvcc = BR2684_VCC(atmvcc); in br2684_setfilt()
385 memcpy(&brvcc->filter, &fs.filter, sizeof(brvcc->filter)); in br2684_setfilt()
391 packet_fails_filter(__be16 type, struct br2684_vcc *brvcc, struct sk_buff *skb) in packet_fails_filter() argument
393 if (brvcc->filter.netmask == 0) in packet_fails_filter()
396 (((struct iphdr *)(skb->data))->daddr & brvcc->filter. in packet_fails_filter()
397 netmask) == brvcc->filter.prefix) in packet_fails_filter()
409 static void br2684_close_vcc(struct br2684_vcc *brvcc) in br2684_close_vcc() argument
411 pr_debug("removing VCC %p from dev %p\n", brvcc, brvcc->device); in br2684_close_vcc()
413 list_del(&brvcc->brvccs); in br2684_close_vcc()
415 brvcc->atmvcc->user_back = NULL; /* what about vcc->recvq ??? */ in br2684_close_vcc()
416 brvcc->atmvcc->release_cb = brvcc->old_release_cb; in br2684_close_vcc()
417 brvcc->old_push(brvcc->atmvcc, NULL); /* pass on the bad news */ in br2684_close_vcc()
418 module_put(brvcc->old_owner); in br2684_close_vcc()
419 kfree(brvcc); in br2684_close_vcc()
425 struct br2684_vcc *brvcc = BR2684_VCC(atmvcc); in br2684_push() local
426 struct net_device *net_dev = brvcc->device; in br2684_push()
433 br2684_close_vcc(brvcc); in br2684_push()
447 if (brvcc->encaps == e_llc) { in br2684_push()
502 if (unlikely(packet_fails_filter(skb->protocol, brvcc, skb))) in br2684_push()
533 struct br2684_vcc *brvcc; in br2684_regvcc() local
541 brvcc = kzalloc(sizeof(struct br2684_vcc), GFP_KERNEL); in br2684_regvcc()
542 if (!brvcc) in br2684_regvcc()
550 atomic_set(&brvcc->qspace, 2); in br2684_regvcc()
577 pr_debug("vcc=%p, encaps=%d, brvcc=%p\n", atmvcc, be.encaps, brvcc); in br2684_regvcc()
587 list_add(&brvcc->brvccs, &brdev->brvccs); in br2684_regvcc()
589 brvcc->device = net_dev; in br2684_regvcc()
590 brvcc->atmvcc = atmvcc; in br2684_regvcc()
591 atmvcc->user_back = brvcc; in br2684_regvcc()
592 brvcc->encaps = (enum br2684_encaps)be.encaps; in br2684_regvcc()
593 brvcc->old_push = atmvcc->push; in br2684_regvcc()
594 brvcc->old_pop = atmvcc->pop; in br2684_regvcc()
595 brvcc->old_release_cb = atmvcc->release_cb; in br2684_regvcc()
596 brvcc->old_owner = atmvcc->owner; in br2684_regvcc()
618 kfree(brvcc); in br2684_regvcc()
790 const struct br2684_vcc *brvcc; in br2684_seq_show() local
798 list_for_each_entry(brvcc, &brdev->brvccs, brvccs) { in br2684_seq_show()
801 "\n", brvcc->atmvcc->dev->number, in br2684_seq_show()
802 brvcc->atmvcc->vpi, brvcc->atmvcc->vci, in br2684_seq_show()
803 (brvcc->encaps == e_llc) ? "LLC" : "VC", in br2684_seq_show()
805 brvcc->copies_failed, brvcc->copies_needed); in br2684_seq_show()
807 if (brvcc->filter.netmask != 0) in br2684_seq_show()
809 &brvcc->filter.prefix, in br2684_seq_show()
810 &brvcc->filter.netmask); in br2684_seq_show()
843 struct br2684_vcc *brvcc; in br2684_exit() local
857 brvcc = list_entry_brvcc(brdev->brvccs.next); in br2684_exit()
858 br2684_close_vcc(brvcc); in br2684_exit()