Searched refs:rndis (Results 1 - 19 of 19) sorted by relevance

/linux-4.1.27/drivers/usb/gadget/function/
H A Df_rndis.c29 #include "rndis.h"
386 struct f_rndis *rndis = _rndis; rndis_response_available() local
387 struct usb_request *req = rndis->notify_req; rndis_response_available()
388 struct usb_composite_dev *cdev = rndis->port.func.config->cdev; rndis_response_available()
392 if (atomic_inc_return(&rndis->notify_count) != 1) rndis_response_available()
403 status = usb_ep_queue(rndis->notify, req, GFP_ATOMIC); rndis_response_available()
405 atomic_dec(&rndis->notify_count); rndis_response_available()
412 struct f_rndis *rndis = req->context; rndis_response_complete() local
413 struct usb_composite_dev *cdev = rndis->port.func.config->cdev; rndis_response_complete()
424 atomic_set(&rndis->notify_count, 0); rndis_response_complete()
432 if (ep != rndis->notify) rndis_response_complete()
438 if (atomic_dec_and_test(&rndis->notify_count)) rndis_response_complete()
440 status = usb_ep_queue(rndis->notify, req, GFP_ATOMIC); rndis_response_complete()
442 atomic_dec(&rndis->notify_count); rndis_response_complete()
451 struct f_rndis *rndis = req->context; rndis_command_complete() local
456 status = rndis_msg_parser(rndis->config, (u8 *) req->buf); rndis_command_complete()
466 struct f_rndis *rndis = func_to_rndis(f); rndis_setup() local
484 if (w_value || w_index != rndis->ctrl_id) rndis_setup()
489 req->context = rndis; rndis_setup()
495 if (w_value || w_index != rndis->ctrl_id) rndis_setup()
502 buf = rndis_get_next_response(rndis->config, &n); rndis_setup()
506 req->context = rndis; rndis_setup()
507 rndis_free_response(rndis->config, buf); rndis_setup()
523 DBG(cdev, "rndis req%02x.%02x v%04x i%04x l%d\n", rndis_setup()
530 ERROR(cdev, "rndis response on err %d\n", value); rndis_setup()
540 struct f_rndis *rndis = func_to_rndis(f); rndis_set_alt() local
545 if (intf == rndis->ctrl_id) { rndis_set_alt()
546 if (rndis->notify->driver_data) { rndis_set_alt()
547 VDBG(cdev, "reset rndis control %d\n", intf); rndis_set_alt()
548 usb_ep_disable(rndis->notify); rndis_set_alt()
550 if (!rndis->notify->desc) { rndis_set_alt()
551 VDBG(cdev, "init rndis ctrl %d\n", intf); rndis_set_alt()
552 if (config_ep_by_speed(cdev->gadget, f, rndis->notify)) rndis_set_alt()
555 usb_ep_enable(rndis->notify); rndis_set_alt()
556 rndis->notify->driver_data = rndis; rndis_set_alt()
558 } else if (intf == rndis->data_id) { rndis_set_alt()
561 if (rndis->port.in_ep->driver_data) { rndis_set_alt()
562 DBG(cdev, "reset rndis\n"); rndis_set_alt()
563 gether_disconnect(&rndis->port); rndis_set_alt()
566 if (!rndis->port.in_ep->desc || !rndis->port.out_ep->desc) { rndis_set_alt()
567 DBG(cdev, "init rndis\n"); rndis_set_alt()
569 rndis->port.in_ep) || rndis_set_alt()
571 rndis->port.out_ep)) { rndis_set_alt()
572 rndis->port.in_ep->desc = NULL; rndis_set_alt()
573 rndis->port.out_ep->desc = NULL; rndis_set_alt()
579 rndis->port.is_zlp_ok = false; rndis_set_alt()
593 rndis->port.cdc_filter = 0; rndis_set_alt()
596 net = gether_connect(&rndis->port); rndis_set_alt()
600 rndis_set_param_dev(rndis->config, net, rndis_set_alt()
601 &rndis->port.cdc_filter); rndis_set_alt()
612 struct f_rndis *rndis = func_to_rndis(f); rndis_disable() local
615 if (!rndis->notify->driver_data) rndis_disable()
618 DBG(cdev, "rndis deactivated\n"); rndis_disable()
620 rndis_uninit(rndis->config); rndis_disable()
621 gether_disconnect(&rndis->port); rndis_disable()
623 usb_ep_disable(rndis->notify); rndis_disable()
624 rndis->notify->driver_data = NULL; rndis_disable()
638 struct f_rndis *rndis = func_to_rndis(&geth->func); rndis_open() local
643 rndis_set_param_medium(rndis->config, RNDIS_MEDIUM_802_3, rndis_open()
645 rndis_signal_connect(rndis->config); rndis_open()
650 struct f_rndis *rndis = func_to_rndis(&geth->func); rndis_close() local
654 rndis_set_param_medium(rndis->config, RNDIS_MEDIUM_802_3, 0); rndis_close()
655 rndis_signal_disconnect(rndis->config); rndis_close()
673 struct f_rndis *rndis = func_to_rndis(f); rndis_bind() local
723 rndis->ctrl_id = status; rndis_bind()
736 rndis->data_id = status; rndis_bind()
747 rndis->port.in_ep = ep; rndis_bind()
753 rndis->port.out_ep = ep; rndis_bind()
763 rndis->notify = ep; rndis_bind()
769 rndis->notify_req = usb_ep_alloc_request(ep, GFP_KERNEL); rndis_bind()
770 if (!rndis->notify_req) rndis_bind()
772 rndis->notify_req->buf = kmalloc(STATUS_BYTECOUNT, GFP_KERNEL); rndis_bind()
773 if (!rndis->notify_req->buf) rndis_bind()
775 rndis->notify_req->length = STATUS_BYTECOUNT; rndis_bind()
776 rndis->notify_req->context = rndis; rndis_bind()
777 rndis->notify_req->complete = rndis_response_complete; rndis_bind()
796 rndis->port.open = rndis_open; rndis_bind()
797 rndis->port.close = rndis_close; rndis_bind()
799 rndis_set_param_medium(rndis->config, RNDIS_MEDIUM_802_3, 0); rndis_bind()
800 rndis_set_host_mac(rndis->config, rndis->ethaddr); rndis_bind()
802 if (rndis->manufacturer && rndis->vendorID && rndis_bind()
803 rndis_set_param_vendor(rndis->config, rndis->vendorID, rndis_bind()
804 rndis->manufacturer)) { rndis_bind()
817 rndis->port.in_ep->name, rndis->port.out_ep->name, rndis_bind()
818 rndis->notify->name); rndis_bind()
827 if (rndis->notify_req) { rndis_bind()
828 kfree(rndis->notify_req->buf); rndis_bind()
829 usb_ep_free_request(rndis->notify, rndis->notify_req); rndis_bind()
833 if (rndis->notify) rndis_bind()
834 rndis->notify->driver_data = NULL; rndis_bind()
835 if (rndis->port.out_ep) rndis_bind()
836 rndis->port.out_ep->driver_data = NULL; rndis_bind()
837 if (rndis->port.in_ep) rndis_bind()
838 rndis->port.in_ep->driver_data = NULL; rndis_bind()
866 USB_ETHERNET_CONFIGFS_ITEM(rndis); variable
869 USB_ETHERNET_CONFIGFS_ITEM_ATTR_DEV_ADDR(rndis); variable
872 USB_ETHERNET_CONFIGFS_ITEM_ATTR_HOST_ADDR(rndis); variable
875 USB_ETHERNET_CONFIGFS_ITEM_ATTR_QMULT(rndis); variable
878 USB_ETHERNET_CONFIGFS_ITEM_ATTR_IFNAME(rndis); variable
932 names[0] = "rndis"; rndis_alloc_inst()
943 struct f_rndis *rndis; rndis_free() local
946 rndis = func_to_rndis(f); rndis_free()
947 rndis_deregister(rndis->config); rndis_free()
949 kfree(rndis); rndis_free()
957 struct f_rndis *rndis = func_to_rndis(f); rndis_unbind() local
963 kfree(rndis->notify_req->buf); rndis_unbind()
964 usb_ep_free_request(rndis->notify, rndis->notify_req); rndis_unbind()
969 struct f_rndis *rndis; rndis_alloc() local
974 rndis = kzalloc(sizeof(*rndis), GFP_KERNEL); rndis_alloc()
975 if (!rndis) rndis_alloc()
982 gether_get_host_addr_u8(opts->net, rndis->ethaddr); rndis_alloc()
983 rndis->vendorID = opts->vendor_id; rndis_alloc()
984 rndis->manufacturer = opts->manufacturer; rndis_alloc()
986 rndis->port.ioport = netdev_priv(opts->net); rndis_alloc()
989 rndis->port.cdc_filter = 0; rndis_alloc()
992 rndis->port.header_len = sizeof(struct rndis_packet_msg_type); rndis_alloc()
993 rndis->port.wrap = rndis_add_header; rndis_alloc()
994 rndis->port.unwrap = rndis_rm_hdr; rndis_alloc()
996 rndis->port.func.name = "rndis"; rndis_alloc()
998 rndis->port.func.bind = rndis_bind; rndis_alloc()
999 rndis->port.func.unbind = rndis_unbind; rndis_alloc()
1000 rndis->port.func.set_alt = rndis_set_alt; rndis_alloc()
1001 rndis->port.func.setup = rndis_setup; rndis_alloc()
1002 rndis->port.func.disable = rndis_disable; rndis_alloc()
1003 rndis->port.func.free_func = rndis_free; rndis_alloc()
1005 status = rndis_register(rndis_response_available, rndis); rndis_alloc()
1007 kfree(rndis); rndis_alloc()
1010 rndis->config = status; rndis_alloc()
1012 return &rndis->port.func; rndis_alloc()
1015 DECLARE_USB_FUNCTION(rndis, rndis_alloc_inst, rndis_alloc);
H A DMakefile29 usb_f_rndis-y := f_rndis.o rndis.o
H A Drndis.h18 #include <linux/rndis.h>
H A Drndis.c42 #include "rndis.h"
1138 #define NAME_TEMPLATE "driver/rndis-%03d"
/linux-4.1.27/drivers/net/hyperv/
H A Drndis_filter.c98 * Set the request id. This field is always after the rndis header for get_rndis_request()
297 "rndis response buffer overflow " rndis_filter_receive_response()
317 "no rndis request found for this response " rndis_filter_receive_response()
361 /* Remove the rndis header and pass it back up the stack */ rndis_filter_receive_data()
371 netdev_err(dev->net_dev->ndev, "rndis message buffer " rndis_filter_receive_data()
379 * Remove the rndis trailer padding from rndis packet message rndis_filter_receive_data()
381 * the data packet to the stack, without the rndis trailer padding rndis_filter_receive_data()
414 /* Make sure the rndis device state is initialized */ rndis_filter_receive()
416 netdev_err(ndev, "got rndis message but no rndis device - " rndis_filter_receive()
424 netdev_err(ndev, "got rndis message but rndis device " rndis_filter_receive()
454 "unhandled rndis message (type %u len %u)\n", rndis_filter_receive()
488 /* Setup the rndis query */ rndis_filter_query_device()
815 /* Setup the rndis set */ rndis_filter_set_packet_filter()
869 /* Setup the rndis set */ rndis_filter_init_device()
918 /* Attempt to do a rndis device halt */ rndis_filter_halt_device()
924 /* Setup the rndis set */ rndis_filter_halt_device()
1033 /* Initialize the rndis device */ rndis_filter_device_add()
1041 /* Send the rndis initialization message */ rndis_filter_device_add()
1164 /* Halt and release the rndis device */ rndis_filter_device_remove()
H A Dnetvsc_drv.c396 /* We will atmost need two pages to describe the rndis netvsc_start_xmit()
454 /* Add the rndis header */ netvsc_start_xmit()
573 /* Start filling in the page buffers with the rndis hdr */ netvsc_start_xmit()
902 * We will use this space to build the rndis netvsc_probe()
H A Dhyperv_net.h29 #include <linux/rndis.h>
665 /* Holds rndis device info */
/linux-4.1.27/drivers/net/usb/
H A Drndis_host.c59 netdev_dbg(dev->net, "rndis status urb, len %d stat %d\n", rndis_status()
82 dev_info(udev, "rndis media connect\n"); rndis_msg_indicate()
85 dev_info(udev, "rndis media disconnect\n"); rndis_msg_indicate()
88 dev_info(udev, "rndis indication: 0x%08x\n", status); rndis_msg_indicate()
175 "rndis reply status %08x\n", rndis_command()
180 "rndis reply id %d expected %d\n", rndis_command()
202 "rndis keepalive err %d\n", rndis_command()
208 "unexpected rndis msg %08x len %d\n", rndis_command()
214 "rndis response error, code %d\n", retval); rndis_command()
218 dev_dbg(&info->control->dev, "rndis response timeout\n"); rndis_command()
428 dev_err(&intf->dev, "rndis get ethaddr, %d\n", retval); generic_rndis_bind()
444 dev_err(&intf->dev, "rndis set packet filter, %d\n", retval); generic_rndis_bind()
477 /* try to clear any rndis state/activity (no i/o from stack!) */ rndis_unbind()
514 netdev_dbg(dev->net, "bad rndis message %d/%d/%d/%d, len %d\n", rndis_rx_fixup()
H A Dcdc_ether.c103 * that rndis uses one different rule.
112 int rndis; usbnet_generic_cdc_bind() local
152 rndis = (is_rndis(&intf->cur_altsetting->desc) || usbnet_generic_cdc_bind()
186 if (rndis) { usbnet_generic_cdc_bind()
227 if (rndis) { usbnet_generic_cdc_bind()
316 if (rndis && (!info->u || android_rndis_quirk)) { usbnet_generic_cdc_bind()
321 "rndis: master #0/%p slave #1/%p\n", usbnet_generic_cdc_bind()
327 } else if (!info->header || !info->u || (!rndis && !info->ether)) { usbnet_generic_cdc_bind()
368 if (rndis && !dev->status) { usbnet_generic_cdc_bind()
/linux-4.1.27/drivers/usb/gadget/legacy/
H A Dmulti.c41 # include "rndis.h"
346 fi_rndis = usb_get_function_instance("rndis"); multi_bind()
363 * If both ecm and rndis are selected then: multi_bind()
364 * 1) rndis borrows the net interface from ecm multi_bind()
366 * twice - in ecm's _and_ rndis' binds, so do it here. multi_bind()
H A Dg_ffs.c31 # include "rndis.h"
366 fi_rndis = usb_get_function_instance("rndis"); gfs_bind()
H A Dether.c101 #include "rndis.h"
396 fi_rndis = usb_get_function_instance("rndis"); eth_bind()
/linux-4.1.27/include/linux/usb/
H A Drndis_host.h23 #include <linux/rndis.h>
75 __le32 major_version; /* of rndis (1.0) */
86 __le32 major_version; /* of rndis (1.0) */
/linux-4.1.27/drivers/usb/musb/
H A Dcppi_dma.c413 /* we may need to change the rndis flag for this cppi channel */ cppi_rndis_update()
549 * Plus, there's allegedly an undocumented constraint that rndis transfer
570 int rndis; cppi_next_tx_segment() local
572 /* TX can use the CPPI "rndis" mode, where we can probably fit this cppi_next_tx_segment()
577 rndis = (maxpacket & 0x3f) == 0 cppi_next_tx_segment()
582 if (rndis) { cppi_next_tx_segment()
596 rndis ? "rndis" : "transparent", cppi_next_tx_segment()
600 cppi_rndis_update(tx, 0, musb->ctrl_base, rndis); cppi_next_tx_segment()
679 * - RX queues in "rndis" mode -- one single BD -- handle (a) correctly, but
717 /* Heuristic, intended to kick in for ethernet/rndis peripheral ONLY
720 * (a) peripheral mode ... since rndis peripherals could pad their
730 * try rx rndis mode
754 * rare cases (mass storage class), and can never use the hardware "rndis"
820 ? (is_rndis ? "rndis" : "onepacket") cppi_next_rx_segment()
1512 * REVISIT does using rndis mode change that? cppi_channel_abort()
H A Dmusb_cppi41.c401 /* gen rndis */ cppi41_configure_channel()
/linux-4.1.27/drivers/staging/rtl8712/
H A Drtl871x_ioctl_rtl.c31 #include <linux/rndis.h>
H A Drtl871x_mp_ioctl.c29 #include <linux/rndis.h>
/linux-4.1.27/include/linux/
H A Drndis.h16 * Codes for "msg_type" field of rndis messages;
/linux-4.1.27/drivers/net/wireless/
H A Drndis_wlan.c95 * based on wireless rndis) has default txpower of 13dBm.
948 netdev_dbg(dev->net, "setting rndis config parameter failed, %d\n", rndis_set_config_parameter()
3405 /* allocate wiphy and rndis private data rndis_wlan_bind()

Completed in 421 milliseconds