Lines Matching defs:opts
844 struct f_ecm_opts *opts;
846 opts = container_of(f, struct f_ecm_opts, func_inst);
847 if (opts->bound)
848 gether_cleanup(netdev_priv(opts->net));
850 free_netdev(opts->net);
851 kfree(opts);
856 struct f_ecm_opts *opts;
858 opts = kzalloc(sizeof(*opts), GFP_KERNEL);
859 if (!opts)
861 mutex_init(&opts->lock);
862 opts->func_inst.free_func_inst = ecm_free_inst;
863 opts->net = gether_setup_default();
864 if (IS_ERR(opts->net)) {
865 struct net_device *net = opts->net;
866 kfree(opts);
870 config_group_init_type_name(&opts->func_inst.group, "", &ecm_func_type);
872 return &opts->func_inst;
898 struct f_ecm_opts *opts;
901 opts = container_of(f->fi, struct f_ecm_opts, func_inst);
903 mutex_lock(&opts->lock);
904 opts->refcnt--;
905 mutex_unlock(&opts->lock);
928 struct f_ecm_opts *opts;
936 opts = container_of(fi, struct f_ecm_opts, func_inst);
937 mutex_lock(&opts->lock);
938 opts->refcnt++;
941 status = gether_get_host_addr_cdc(opts->net, ecm->ethaddr,
945 mutex_unlock(&opts->lock);
949 ecm->port.ioport = netdev_priv(opts->net);
950 mutex_unlock(&opts->lock);