Lines Matching refs:ecm_opts
683 struct f_ecm_opts *ecm_opts; in ecm_bind() local
690 ecm_opts = container_of(f->fi, struct f_ecm_opts, func_inst); in ecm_bind()
692 scoped_guard(mutex, &ecm_opts->lock) in ecm_bind()
693 if (ecm_opts->bind_count == 0 && !ecm_opts->bound) { in ecm_bind()
694 if (!device_is_registered(&ecm_opts->net->dev)) { in ecm_bind()
695 gether_set_gadget(ecm_opts->net, cdev->gadget); in ecm_bind()
696 status = gether_register_netdev(ecm_opts->net); in ecm_bind()
698 status = gether_attach_gadget(ecm_opts->net, cdev->gadget); in ecm_bind()
702 net = ecm_opts->net; in ecm_bind()
794 ecm_opts->bind_count++; in ecm_bind()
913 struct f_ecm_opts *ecm_opts; in ecm_unbind() local
917 ecm_opts = container_of(f->fi, struct f_ecm_opts, func_inst); in ecm_unbind()
929 ecm_opts->bind_count--; in ecm_unbind()
930 if (ecm_opts->bind_count == 0 && !ecm_opts->bound) in ecm_unbind()
931 gether_detach_gadget(ecm_opts->net); in ecm_unbind()