Lines Matching refs:geth
259 struct f_gether *geth = func_to_geth(f); in geth_set_alt() local
265 if (geth->port.in_ep->driver_data) { in geth_set_alt()
267 gether_disconnect(&geth->port); in geth_set_alt()
271 if (config_ep_by_speed(cdev->gadget, f, geth->port.in_ep) || in geth_set_alt()
272 config_ep_by_speed(cdev->gadget, f, geth->port.out_ep)) { in geth_set_alt()
273 geth->port.in_ep->desc = NULL; in geth_set_alt()
274 geth->port.out_ep->desc = NULL; in geth_set_alt()
278 net = gether_connect(&geth->port); in geth_set_alt()
284 struct f_gether *geth = func_to_geth(f); in geth_disable() local
288 gether_disconnect(&geth->port); in geth_disable()
299 struct f_gether *geth = func_to_geth(f); in geth_bind() local
345 geth->port.in_ep = ep; in geth_bind()
351 geth->port.out_ep = ep; in geth_bind()
379 geth->port.in_ep->name, geth->port.out_ep->name); in geth_bind()
384 if (geth->port.out_ep) in geth_bind()
385 geth->port.out_ep->driver_data = NULL; in geth_bind()
386 if (geth->port.in_ep) in geth_bind()
387 geth->port.in_ep->driver_data = NULL; in geth_bind()
479 struct f_gether *geth; in geth_alloc() local
484 geth = kzalloc(sizeof(*geth), GFP_KERNEL); in geth_alloc()
485 if (!geth) in geth_alloc()
493 status = gether_get_host_addr_cdc(opts->net, geth->ethaddr, in geth_alloc()
494 sizeof(geth->ethaddr)); in geth_alloc()
496 kfree(geth); in geth_alloc()
500 geth_string_defs[1].s = geth->ethaddr; in geth_alloc()
502 geth->port.ioport = netdev_priv(opts->net); in geth_alloc()
504 geth->port.cdc_filter = DEFAULT_FILTER; in geth_alloc()
506 geth->port.func.name = "cdc_subset"; in geth_alloc()
507 geth->port.func.bind = geth_bind; in geth_alloc()
508 geth->port.func.unbind = geth_unbind; in geth_alloc()
509 geth->port.func.set_alt = geth_set_alt; in geth_alloc()
510 geth->port.func.disable = geth_disable; in geth_alloc()
511 geth->port.func.free_func = geth_free; in geth_alloc()
513 return &geth->port.func; in geth_alloc()
516 DECLARE_USB_FUNCTION_INIT(geth, geth_alloc_inst, geth_alloc);