Lines Matching refs:ncm_opts
1186 struct f_ncm_opts *ncm_opts; in ncm_unwrap_ntb() local
1188 ncm_opts = container_of(port->func.fi, struct f_ncm_opts, func_inst); in ncm_unwrap_ntb()
1189 frame_max = ncm_opts->max_segment_size; in ncm_unwrap_ntb()
1439 struct f_ncm_opts *ncm_opts; in ncm_bind() local
1448 ncm_opts = container_of(f->fi, struct f_ncm_opts, func_inst); in ncm_bind()
1456 scoped_guard(mutex, &ncm_opts->lock) in ncm_bind()
1457 if (ncm_opts->bind_count == 0) { in ncm_bind()
1458 if (!device_is_registered(&ncm_opts->net->dev)) { in ncm_bind()
1459 ncm_opts->net->mtu = (ncm_opts->max_segment_size - ETH_HLEN); in ncm_bind()
1460 gether_set_gadget(ncm_opts->net, cdev->gadget); in ncm_bind()
1461 status = gether_register_netdev(ncm_opts->net); in ncm_bind()
1463 status = gether_attach_gadget(ncm_opts->net, cdev->gadget); in ncm_bind()
1467 net = ncm_opts->net; in ncm_bind()
1502 ecm_desc.wMaxSegmentSize = cpu_to_le16(ncm_opts->max_segment_size); in ncm_bind()
1562 os_desc_table[0].os_desc = &ncm_opts->ncm_os_desc; in ncm_bind()
1569 ncm_opts->bind_count++; in ncm_bind()
1726 struct f_ncm_opts *ncm_opts; in ncm_unbind() local
1730 ncm_opts = container_of(f->fi, struct f_ncm_opts, func_inst); in ncm_unbind()
1748 ncm_opts->bind_count--; in ncm_unbind()
1749 if (ncm_opts->bind_count == 0) in ncm_unbind()
1750 gether_detach_gadget(ncm_opts->net); in ncm_unbind()