Lines Matching defs:opts
861 struct f_ecm_opts *opts;
863 opts = container_of(f, struct f_ecm_opts, func_inst);
864 if (opts->bound)
865 gether_cleanup(netdev_priv(opts->net));
867 free_netdev(opts->net);
868 kfree(opts);
873 struct f_ecm_opts *opts;
875 opts = kzalloc(sizeof(*opts), GFP_KERNEL);
876 if (!opts)
878 mutex_init(&opts->lock);
879 opts->func_inst.free_func_inst = ecm_free_inst;
880 opts->net = gether_setup_default();
881 if (IS_ERR(opts->net)) {
882 struct net_device *net = opts->net;
883 kfree(opts);
887 config_group_init_type_name(&opts->func_inst.group, "", &ecm_func_type);
889 return &opts->func_inst;
895 struct f_ecm_opts *opts;
898 opts = container_of(f->fi, struct f_ecm_opts, func_inst);
900 mutex_lock(&opts->lock);
901 opts->refcnt--;
902 mutex_unlock(&opts->lock);
925 struct f_ecm_opts *opts;
933 opts = container_of(fi, struct f_ecm_opts, func_inst);
934 mutex_lock(&opts->lock);
935 opts->refcnt++;
938 status = gether_get_host_addr_cdc(opts->net, ecm->ethaddr,
942 mutex_unlock(&opts->lock);
946 ecm->port.ioport = netdev_priv(opts->net);
947 mutex_unlock(&opts->lock);