ncm 525 drivers/usb/gadget/function/f_ncm.c static inline void ncm_reset_values(struct f_ncm *ncm) ncm 527 drivers/usb/gadget/function/f_ncm.c ncm->parser_opts = &ndp16_opts; ncm 528 drivers/usb/gadget/function/f_ncm.c ncm->is_crc = false; ncm 529 drivers/usb/gadget/function/f_ncm.c ncm->ndp_sign = ncm->parser_opts->ndp_sign; ncm 530 drivers/usb/gadget/function/f_ncm.c ncm->port.cdc_filter = DEFAULT_FILTER; ncm 533 drivers/usb/gadget/function/f_ncm.c ncm->port.header_len = 0; ncm 535 drivers/usb/gadget/function/f_ncm.c ncm->port.fixed_out_len = le32_to_cpu(ntb_parameters.dwNtbOutMaxSize); ncm 536 drivers/usb/gadget/function/f_ncm.c ncm->port.fixed_in_len = NTB_DEFAULT_IN_SIZE; ncm 542 drivers/usb/gadget/function/f_ncm.c static void ncm_do_notify(struct f_ncm *ncm) ncm 544 drivers/usb/gadget/function/f_ncm.c struct usb_request *req = ncm->notify_req; ncm 546 drivers/usb/gadget/function/f_ncm.c struct usb_composite_dev *cdev = ncm->port.func.config->cdev; ncm 551 drivers/usb/gadget/function/f_ncm.c if (atomic_read(&ncm->notify_count)) ncm 555 drivers/usb/gadget/function/f_ncm.c switch (ncm->notify_state) { ncm 561 drivers/usb/gadget/function/f_ncm.c if (ncm->is_open) ncm 569 drivers/usb/gadget/function/f_ncm.c ncm->is_open ? "true" : "false"); ncm 570 drivers/usb/gadget/function/f_ncm.c ncm->notify_state = NCM_NOTIFY_NONE; ncm 585 drivers/usb/gadget/function/f_ncm.c ncm->notify_state = NCM_NOTIFY_CONNECT; ncm 589 drivers/usb/gadget/function/f_ncm.c event->wIndex = cpu_to_le16(ncm->ctrl_id); ncm 591 drivers/usb/gadget/function/f_ncm.c atomic_inc(&ncm->notify_count); ncm 598 drivers/usb/gadget/function/f_ncm.c spin_unlock(&ncm->lock); ncm 599 drivers/usb/gadget/function/f_ncm.c status = usb_ep_queue(ncm->notify, req, GFP_ATOMIC); ncm 600 drivers/usb/gadget/function/f_ncm.c spin_lock(&ncm->lock); ncm 602 drivers/usb/gadget/function/f_ncm.c atomic_dec(&ncm->notify_count); ncm 610 drivers/usb/gadget/function/f_ncm.c static void ncm_notify(struct f_ncm *ncm) ncm 622 drivers/usb/gadget/function/f_ncm.c ncm->notify_state = NCM_NOTIFY_SPEED; ncm 623 drivers/usb/gadget/function/f_ncm.c ncm_do_notify(ncm); ncm 628 drivers/usb/gadget/function/f_ncm.c struct f_ncm *ncm = req->context; ncm 629 drivers/usb/gadget/function/f_ncm.c struct usb_composite_dev *cdev = ncm->port.func.config->cdev; ncm 632 drivers/usb/gadget/function/f_ncm.c spin_lock(&ncm->lock); ncm 637 drivers/usb/gadget/function/f_ncm.c atomic_dec(&ncm->notify_count); ncm 641 drivers/usb/gadget/function/f_ncm.c atomic_set(&ncm->notify_count, 0); ncm 642 drivers/usb/gadget/function/f_ncm.c ncm->notify_state = NCM_NOTIFY_NONE; ncm 647 drivers/usb/gadget/function/f_ncm.c atomic_dec(&ncm->notify_count); ncm 650 drivers/usb/gadget/function/f_ncm.c ncm_do_notify(ncm); ncm 651 drivers/usb/gadget/function/f_ncm.c spin_unlock(&ncm->lock); ncm 659 drivers/usb/gadget/function/f_ncm.c struct f_ncm *ncm = func_to_ncm(f); ncm 675 drivers/usb/gadget/function/f_ncm.c ncm->port.fixed_in_len = in_size; ncm 686 drivers/usb/gadget/function/f_ncm.c struct f_ncm *ncm = func_to_ncm(f); ncm 705 drivers/usb/gadget/function/f_ncm.c if (w_length != 0 || w_index != ncm->ctrl_id) ncm 713 drivers/usb/gadget/function/f_ncm.c ncm->port.cdc_filter = w_value; ncm 729 drivers/usb/gadget/function/f_ncm.c if (w_length == 0 || w_value != 0 || w_index != ncm->ctrl_id) ncm 740 drivers/usb/gadget/function/f_ncm.c if (w_length < 4 || w_value != 0 || w_index != ncm->ctrl_id) ncm 742 drivers/usb/gadget/function/f_ncm.c put_unaligned_le32(ncm->port.fixed_in_len, req->buf); ncm 745 drivers/usb/gadget/function/f_ncm.c ncm->port.fixed_in_len); ncm 751 drivers/usb/gadget/function/f_ncm.c if (w_length != 4 || w_value != 0 || w_index != ncm->ctrl_id) ncm 766 drivers/usb/gadget/function/f_ncm.c if (w_length < 2 || w_value != 0 || w_index != ncm->ctrl_id) ncm 768 drivers/usb/gadget/function/f_ncm.c format = (ncm->parser_opts == &ndp16_opts) ? 0x0000 : 0x0001; ncm 778 drivers/usb/gadget/function/f_ncm.c if (w_length != 0 || w_index != ncm->ctrl_id) ncm 782 drivers/usb/gadget/function/f_ncm.c ncm->parser_opts = &ndp16_opts; ncm 786 drivers/usb/gadget/function/f_ncm.c ncm->parser_opts = &ndp32_opts; ncm 800 drivers/usb/gadget/function/f_ncm.c if (w_length < 2 || w_value != 0 || w_index != ncm->ctrl_id) ncm 802 drivers/usb/gadget/function/f_ncm.c is_crc = ncm->is_crc ? 0x0001 : 0x0000; ncm 812 drivers/usb/gadget/function/f_ncm.c if (w_length != 0 || w_index != ncm->ctrl_id) ncm 816 drivers/usb/gadget/function/f_ncm.c ncm->is_crc = false; ncm 820 drivers/usb/gadget/function/f_ncm.c ncm->is_crc = true; ncm 842 drivers/usb/gadget/function/f_ncm.c ncm->ndp_sign = ncm->parser_opts->ndp_sign | ncm 843 drivers/usb/gadget/function/f_ncm.c (ncm->is_crc ? NCM_NDP_HDR_CRC : 0); ncm 866 drivers/usb/gadget/function/f_ncm.c struct f_ncm *ncm = func_to_ncm(f); ncm 870 drivers/usb/gadget/function/f_ncm.c if (intf == ncm->ctrl_id) { ncm 875 drivers/usb/gadget/function/f_ncm.c usb_ep_disable(ncm->notify); ncm 877 drivers/usb/gadget/function/f_ncm.c if (!(ncm->notify->desc)) { ncm 879 drivers/usb/gadget/function/f_ncm.c if (config_ep_by_speed(cdev->gadget, f, ncm->notify)) ncm 882 drivers/usb/gadget/function/f_ncm.c usb_ep_enable(ncm->notify); ncm 885 drivers/usb/gadget/function/f_ncm.c } else if (intf == ncm->data_id) { ncm 889 drivers/usb/gadget/function/f_ncm.c if (ncm->port.in_ep->enabled) { ncm 891 drivers/usb/gadget/function/f_ncm.c ncm->timer_stopping = true; ncm 892 drivers/usb/gadget/function/f_ncm.c ncm->netdev = NULL; ncm 893 drivers/usb/gadget/function/f_ncm.c gether_disconnect(&ncm->port); ncm 894 drivers/usb/gadget/function/f_ncm.c ncm_reset_values(ncm); ncm 904 drivers/usb/gadget/function/f_ncm.c if (!ncm->port.in_ep->desc || ncm 905 drivers/usb/gadget/function/f_ncm.c !ncm->port.out_ep->desc) { ncm 908 drivers/usb/gadget/function/f_ncm.c ncm->port.in_ep) || ncm 910 drivers/usb/gadget/function/f_ncm.c ncm->port.out_ep)) { ncm 911 drivers/usb/gadget/function/f_ncm.c ncm->port.in_ep->desc = NULL; ncm 912 drivers/usb/gadget/function/f_ncm.c ncm->port.out_ep->desc = NULL; ncm 921 drivers/usb/gadget/function/f_ncm.c ncm->port.is_zlp_ok = ncm 923 drivers/usb/gadget/function/f_ncm.c ncm->port.cdc_filter = DEFAULT_FILTER; ncm 925 drivers/usb/gadget/function/f_ncm.c net = gether_connect(&ncm->port); ncm 928 drivers/usb/gadget/function/f_ncm.c ncm->netdev = net; ncm 929 drivers/usb/gadget/function/f_ncm.c ncm->timer_stopping = false; ncm 932 drivers/usb/gadget/function/f_ncm.c spin_lock(&ncm->lock); ncm 933 drivers/usb/gadget/function/f_ncm.c ncm_notify(ncm); ncm 934 drivers/usb/gadget/function/f_ncm.c spin_unlock(&ncm->lock); ncm 949 drivers/usb/gadget/function/f_ncm.c struct f_ncm *ncm = func_to_ncm(f); ncm 951 drivers/usb/gadget/function/f_ncm.c if (intf == ncm->ctrl_id) ncm 953 drivers/usb/gadget/function/f_ncm.c return ncm->port.in_ep->enabled ? 1 : 0; ncm 956 drivers/usb/gadget/function/f_ncm.c static struct sk_buff *package_for_tx(struct f_ncm *ncm) ncm 964 drivers/usb/gadget/function/f_ncm.c const struct ndp_parser_opts *opts = ncm->parser_opts; ncm 969 drivers/usb/gadget/function/f_ncm.c hrtimer_try_to_cancel(&ncm->task_timer); ncm 971 drivers/usb/gadget/function/f_ncm.c ndp_pad = ALIGN(ncm->skb_tx_data->len, ndp_align) - ncm 972 drivers/usb/gadget/function/f_ncm.c ncm->skb_tx_data->len; ncm 973 drivers/usb/gadget/function/f_ncm.c ndp_index = ncm->skb_tx_data->len + ndp_pad; ncm 974 drivers/usb/gadget/function/f_ncm.c new_len = ndp_index + dgram_idx_len + ncm->skb_tx_ndp->len; ncm 977 drivers/usb/gadget/function/f_ncm.c ntb_iter = (void *) ncm->skb_tx_data->data; ncm 985 drivers/usb/gadget/function/f_ncm.c (ncm->ndp_dgram_count * dgram_idx_len); ncm 986 drivers/usb/gadget/function/f_ncm.c ncm->ndp_dgram_count = 0; ncm 988 drivers/usb/gadget/function/f_ncm.c ntb_iter = (void *) ncm->skb_tx_ndp->data; ncm 993 drivers/usb/gadget/function/f_ncm.c swap(skb2, ncm->skb_tx_data); ncm 994 drivers/usb/gadget/function/f_ncm.c if (ncm->skb_tx_data) { ncm 995 drivers/usb/gadget/function/f_ncm.c dev_consume_skb_any(ncm->skb_tx_data); ncm 996 drivers/usb/gadget/function/f_ncm.c ncm->skb_tx_data = NULL; ncm 1003 drivers/usb/gadget/function/f_ncm.c skb_put_data(skb2, ncm->skb_tx_ndp->data, ncm->skb_tx_ndp->len); ncm 1004 drivers/usb/gadget/function/f_ncm.c dev_consume_skb_any(ncm->skb_tx_ndp); ncm 1005 drivers/usb/gadget/function/f_ncm.c ncm->skb_tx_ndp = NULL; ncm 1016 drivers/usb/gadget/function/f_ncm.c struct f_ncm *ncm = func_to_ncm(&port->func); ncm 1023 drivers/usb/gadget/function/f_ncm.c unsigned max_size = ncm->port.fixed_in_len; ncm 1024 drivers/usb/gadget/function/f_ncm.c const struct ndp_parser_opts *opts = ncm->parser_opts; ncm 1030 drivers/usb/gadget/function/f_ncm.c if (!skb && !ncm->skb_tx_data) ncm 1035 drivers/usb/gadget/function/f_ncm.c if (ncm->is_crc) { ncm 1051 drivers/usb/gadget/function/f_ncm.c if (ncm->skb_tx_data ncm 1052 drivers/usb/gadget/function/f_ncm.c && (ncm->ndp_dgram_count >= TX_MAX_NUM_DPE ncm 1053 drivers/usb/gadget/function/f_ncm.c || (ncm->skb_tx_data->len + ncm 1055 drivers/usb/gadget/function/f_ncm.c ncm->skb_tx_ndp->len + ndp_align + (2 * dgram_idx_len)) ncm 1057 drivers/usb/gadget/function/f_ncm.c skb2 = package_for_tx(ncm); ncm 1062 drivers/usb/gadget/function/f_ncm.c if (!ncm->skb_tx_data) { ncm 1068 drivers/usb/gadget/function/f_ncm.c ncm->skb_tx_data = alloc_skb(max_size, GFP_ATOMIC); ncm 1069 drivers/usb/gadget/function/f_ncm.c if (!ncm->skb_tx_data) ncm 1072 drivers/usb/gadget/function/f_ncm.c ncm->skb_tx_data->dev = ncm->netdev; ncm 1073 drivers/usb/gadget/function/f_ncm.c ntb_data = skb_put_zero(ncm->skb_tx_data, ncb_len); ncm 1084 drivers/usb/gadget/function/f_ncm.c ncm->skb_tx_ndp = alloc_skb((int)(opts->ndp_size ncm 1088 drivers/usb/gadget/function/f_ncm.c if (!ncm->skb_tx_ndp) ncm 1091 drivers/usb/gadget/function/f_ncm.c ncm->skb_tx_ndp->dev = ncm->netdev; ncm 1092 drivers/usb/gadget/function/f_ncm.c ntb_ndp = skb_put(ncm->skb_tx_ndp, opts->ndp_size); ncm 1095 drivers/usb/gadget/function/f_ncm.c put_unaligned_le32(ncm->ndp_sign, ntb_ndp); ncm 1099 drivers/usb/gadget/function/f_ncm.c ncm->ndp_dgram_count = 1; ncm 1105 drivers/usb/gadget/function/f_ncm.c hrtimer_start(&ncm->task_timer, TX_TIMEOUT_NSECS, ncm 1109 drivers/usb/gadget/function/f_ncm.c ntb_ndp = skb_put_zero(ncm->skb_tx_ndp, dgram_idx_len); ncm 1111 drivers/usb/gadget/function/f_ncm.c ncb_len = ncm->skb_tx_data->len; ncm 1119 drivers/usb/gadget/function/f_ncm.c ncm->ndp_dgram_count++; ncm 1122 drivers/usb/gadget/function/f_ncm.c skb_put_zero(ncm->skb_tx_data, dgram_pad); ncm 1123 drivers/usb/gadget/function/f_ncm.c skb_put_data(ncm->skb_tx_data, skb->data, skb->len); ncm 1127 drivers/usb/gadget/function/f_ncm.c } else if (ncm->skb_tx_data && ncm->timer_force_tx) { ncm 1129 drivers/usb/gadget/function/f_ncm.c skb2 = package_for_tx(ncm); ncm 1137 drivers/usb/gadget/function/f_ncm.c ncm->netdev->stats.tx_dropped++; ncm 1141 drivers/usb/gadget/function/f_ncm.c if (ncm->skb_tx_data) ncm 1142 drivers/usb/gadget/function/f_ncm.c dev_kfree_skb_any(ncm->skb_tx_data); ncm 1143 drivers/usb/gadget/function/f_ncm.c if (ncm->skb_tx_ndp) ncm 1144 drivers/usb/gadget/function/f_ncm.c dev_kfree_skb_any(ncm->skb_tx_ndp); ncm 1155 drivers/usb/gadget/function/f_ncm.c struct f_ncm *ncm = container_of(data, struct f_ncm, task_timer); ncm 1158 drivers/usb/gadget/function/f_ncm.c if (!ncm->timer_stopping && ncm->skb_tx_data) { ncm 1159 drivers/usb/gadget/function/f_ncm.c ncm->timer_force_tx = true; ncm 1167 drivers/usb/gadget/function/f_ncm.c ncm->netdev->netdev_ops->ndo_start_xmit(NULL, ncm->netdev); ncm 1169 drivers/usb/gadget/function/f_ncm.c ncm->timer_force_tx = false; ncm 1178 drivers/usb/gadget/function/f_ncm.c struct f_ncm *ncm = func_to_ncm(&port->func); ncm 1187 drivers/usb/gadget/function/f_ncm.c const struct ndp_parser_opts *opts = ncm->parser_opts; ncm 1188 drivers/usb/gadget/function/f_ncm.c unsigned crc_len = ncm->is_crc ? sizeof(uint32_t) : 0; ncm 1228 drivers/usb/gadget/function/f_ncm.c if (get_unaligned_le32(tmp) != ncm->ndp_sign) { ncm 1267 drivers/usb/gadget/function/f_ncm.c if (ncm->is_crc) { ncm 1290 drivers/usb/gadget/function/f_ncm.c skb2 = netdev_alloc_skb_ip_align(ncm->netdev, ncm 1321 drivers/usb/gadget/function/f_ncm.c struct f_ncm *ncm = func_to_ncm(f); ncm 1326 drivers/usb/gadget/function/f_ncm.c if (ncm->port.in_ep->enabled) { ncm 1327 drivers/usb/gadget/function/f_ncm.c ncm->timer_stopping = true; ncm 1328 drivers/usb/gadget/function/f_ncm.c ncm->netdev = NULL; ncm 1329 drivers/usb/gadget/function/f_ncm.c gether_disconnect(&ncm->port); ncm 1332 drivers/usb/gadget/function/f_ncm.c if (ncm->notify->enabled) { ncm 1333 drivers/usb/gadget/function/f_ncm.c usb_ep_disable(ncm->notify); ncm 1334 drivers/usb/gadget/function/f_ncm.c ncm->notify->desc = NULL; ncm 1360 drivers/usb/gadget/function/f_ncm.c struct f_ncm *ncm = func_to_ncm(&geth->func); ncm 1362 drivers/usb/gadget/function/f_ncm.c DBG(ncm->port.func.config->cdev, "%s\n", __func__); ncm 1364 drivers/usb/gadget/function/f_ncm.c spin_lock(&ncm->lock); ncm 1365 drivers/usb/gadget/function/f_ncm.c ncm->is_open = true; ncm 1366 drivers/usb/gadget/function/f_ncm.c ncm_notify(ncm); ncm 1367 drivers/usb/gadget/function/f_ncm.c spin_unlock(&ncm->lock); ncm 1372 drivers/usb/gadget/function/f_ncm.c struct f_ncm *ncm = func_to_ncm(&geth->func); ncm 1374 drivers/usb/gadget/function/f_ncm.c DBG(ncm->port.func.config->cdev, "%s\n", __func__); ncm 1376 drivers/usb/gadget/function/f_ncm.c spin_lock(&ncm->lock); ncm 1377 drivers/usb/gadget/function/f_ncm.c ncm->is_open = false; ncm 1378 drivers/usb/gadget/function/f_ncm.c ncm_notify(ncm); ncm 1379 drivers/usb/gadget/function/f_ncm.c spin_unlock(&ncm->lock); ncm 1389 drivers/usb/gadget/function/f_ncm.c struct f_ncm *ncm = func_to_ncm(f); ncm 1441 drivers/usb/gadget/function/f_ncm.c ncm->ctrl_id = status; ncm 1454 drivers/usb/gadget/function/f_ncm.c ncm->data_id = status; ncm 1466 drivers/usb/gadget/function/f_ncm.c ncm->port.in_ep = ep; ncm 1471 drivers/usb/gadget/function/f_ncm.c ncm->port.out_ep = ep; ncm 1476 drivers/usb/gadget/function/f_ncm.c ncm->notify = ep; ncm 1481 drivers/usb/gadget/function/f_ncm.c ncm->notify_req = usb_ep_alloc_request(ep, GFP_KERNEL); ncm 1482 drivers/usb/gadget/function/f_ncm.c if (!ncm->notify_req) ncm 1484 drivers/usb/gadget/function/f_ncm.c ncm->notify_req->buf = kmalloc(NCM_STATUS_BYTECOUNT, GFP_KERNEL); ncm 1485 drivers/usb/gadget/function/f_ncm.c if (!ncm->notify_req->buf) ncm 1487 drivers/usb/gadget/function/f_ncm.c ncm->notify_req->context = ncm; ncm 1488 drivers/usb/gadget/function/f_ncm.c ncm->notify_req->complete = ncm_notify_complete; ncm 1516 drivers/usb/gadget/function/f_ncm.c ncm->port.open = ncm_open; ncm 1517 drivers/usb/gadget/function/f_ncm.c ncm->port.close = ncm_close; ncm 1519 drivers/usb/gadget/function/f_ncm.c hrtimer_init(&ncm->task_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_SOFT); ncm 1520 drivers/usb/gadget/function/f_ncm.c ncm->task_timer.function = ncm_tx_timeout; ncm 1525 drivers/usb/gadget/function/f_ncm.c ncm->port.in_ep->name, ncm->port.out_ep->name, ncm 1526 drivers/usb/gadget/function/f_ncm.c ncm->notify->name); ncm 1533 drivers/usb/gadget/function/f_ncm.c if (ncm->notify_req) { ncm 1534 drivers/usb/gadget/function/f_ncm.c kfree(ncm->notify_req->buf); ncm 1535 drivers/usb/gadget/function/f_ncm.c usb_ep_free_request(ncm->notify, ncm->notify_req); ncm 1550 drivers/usb/gadget/function/f_ncm.c USB_ETHERNET_CONFIGFS_ITEM(ncm); ncm 1553 drivers/usb/gadget/function/f_ncm.c USB_ETHERNET_CONFIGFS_ITEM_ATTR_DEV_ADDR(ncm); ncm 1556 drivers/usb/gadget/function/f_ncm.c USB_ETHERNET_CONFIGFS_ITEM_ATTR_HOST_ADDR(ncm); ncm 1559 drivers/usb/gadget/function/f_ncm.c USB_ETHERNET_CONFIGFS_ITEM_ATTR_QMULT(ncm); ncm 1562 drivers/usb/gadget/function/f_ncm.c USB_ETHERNET_CONFIGFS_ITEM_ATTR_IFNAME(ncm); ncm 1631 drivers/usb/gadget/function/f_ncm.c struct f_ncm *ncm; ncm 1634 drivers/usb/gadget/function/f_ncm.c ncm = func_to_ncm(f); ncm 1636 drivers/usb/gadget/function/f_ncm.c kfree(ncm); ncm 1644 drivers/usb/gadget/function/f_ncm.c struct f_ncm *ncm = func_to_ncm(f); ncm 1648 drivers/usb/gadget/function/f_ncm.c hrtimer_cancel(&ncm->task_timer); ncm 1656 drivers/usb/gadget/function/f_ncm.c if (atomic_read(&ncm->notify_count)) { ncm 1657 drivers/usb/gadget/function/f_ncm.c usb_ep_dequeue(ncm->notify, ncm->notify_req); ncm 1658 drivers/usb/gadget/function/f_ncm.c atomic_set(&ncm->notify_count, 0); ncm 1661 drivers/usb/gadget/function/f_ncm.c kfree(ncm->notify_req->buf); ncm 1662 drivers/usb/gadget/function/f_ncm.c usb_ep_free_request(ncm->notify, ncm->notify_req); ncm 1667 drivers/usb/gadget/function/f_ncm.c struct f_ncm *ncm; ncm 1672 drivers/usb/gadget/function/f_ncm.c ncm = kzalloc(sizeof(*ncm), GFP_KERNEL); ncm 1673 drivers/usb/gadget/function/f_ncm.c if (!ncm) ncm 1681 drivers/usb/gadget/function/f_ncm.c status = gether_get_host_addr_cdc(opts->net, ncm->ethaddr, ncm 1682 drivers/usb/gadget/function/f_ncm.c sizeof(ncm->ethaddr)); ncm 1684 drivers/usb/gadget/function/f_ncm.c kfree(ncm); ncm 1688 drivers/usb/gadget/function/f_ncm.c ncm_string_defs[STRING_MAC_IDX].s = ncm->ethaddr; ncm 1690 drivers/usb/gadget/function/f_ncm.c spin_lock_init(&ncm->lock); ncm 1691 drivers/usb/gadget/function/f_ncm.c ncm_reset_values(ncm); ncm 1692 drivers/usb/gadget/function/f_ncm.c ncm->port.ioport = netdev_priv(opts->net); ncm 1694 drivers/usb/gadget/function/f_ncm.c ncm->port.is_fixed = true; ncm 1695 drivers/usb/gadget/function/f_ncm.c ncm->port.supports_multi_frame = true; ncm 1697 drivers/usb/gadget/function/f_ncm.c ncm->port.func.name = "cdc_network"; ncm 1699 drivers/usb/gadget/function/f_ncm.c ncm->port.func.bind = ncm_bind; ncm 1700 drivers/usb/gadget/function/f_ncm.c ncm->port.func.unbind = ncm_unbind; ncm 1701 drivers/usb/gadget/function/f_ncm.c ncm->port.func.set_alt = ncm_set_alt; ncm 1702 drivers/usb/gadget/function/f_ncm.c ncm->port.func.get_alt = ncm_get_alt; ncm 1703 drivers/usb/gadget/function/f_ncm.c ncm->port.func.setup = ncm_setup; ncm 1704 drivers/usb/gadget/function/f_ncm.c ncm->port.func.disable = ncm_disable; ncm 1705 drivers/usb/gadget/function/f_ncm.c ncm->port.func.free_func = ncm_free; ncm 1707 drivers/usb/gadget/function/f_ncm.c ncm->port.wrap = ncm_wrap_ntb; ncm 1708 drivers/usb/gadget/function/f_ncm.c ncm->port.unwrap = ncm_unwrap_ntb; ncm 1710 drivers/usb/gadget/function/f_ncm.c return &ncm->port.func; ncm 1713 drivers/usb/gadget/function/f_ncm.c DECLARE_USB_FUNCTION_INIT(ncm, ncm_alloc_inst, ncm_alloc); ncm 2033 net/ipv4/devinet.c struct netconfmsg *ncm; ncm 2044 net/ipv4/devinet.c ncm = nlmsg_data(nlh); ncm 2045 net/ipv4/devinet.c ncm->ncm_family = AF_INET; ncm 2232 net/ipv4/devinet.c struct netconfmsg *ncm; ncm 2234 net/ipv4/devinet.c if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*ncm))) { ncm 2239 net/ipv4/devinet.c if (nlmsg_attrlen(nlh, sizeof(*ncm))) { ncm 519 net/ipv6/addrconf.c struct netconfmsg *ncm; ncm 530 net/ipv6/addrconf.c ncm = nlmsg_data(nlh); ncm 531 net/ipv6/addrconf.c ncm->ncm_family = AF_INET6; ncm 713 net/ipv6/addrconf.c struct netconfmsg *ncm; ncm 715 net/ipv6/addrconf.c if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*ncm))) { ncm 720 net/ipv6/addrconf.c if (nlmsg_attrlen(nlh, sizeof(*ncm))) { ncm 1136 net/mpls/af_mpls.c struct netconfmsg *ncm; ncm 1147 net/mpls/af_mpls.c ncm = nlmsg_data(nlh); ncm 1148 net/mpls/af_mpls.c ncm->ncm_family = AF_MPLS; ncm 1312 net/mpls/af_mpls.c struct netconfmsg *ncm; ncm 1314 net/mpls/af_mpls.c if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*ncm))) { ncm 1319 net/mpls/af_mpls.c if (nlmsg_attrlen(nlh, sizeof(*ncm))) { ncm 50 net/ncsi/ncsi-aen.c struct ncsi_channel_mode *ncm; ncm 68 net/ncsi/ncsi-aen.c ncm = &nc->modes[NCSI_MODE_LINK]; ncm 69 net/ncsi/ncsi-aen.c old_data = ncm->data[2]; ncm 71 net/ncsi/ncsi-aen.c ncm->data[2] = data; ncm 72 net/ncsi/ncsi-aen.c ncm->data[4] = ntohl(lsc->oem_status); ncm 106 net/ncsi/ncsi-aen.c ncm = &nc->modes[NCSI_MODE_TX_ENABLE]; ncm 110 net/ncsi/ncsi-aen.c } else if (ncm->enable) { ncm 123 net/ncsi/ncsi-aen.c ncm = &tmp->modes[NCSI_MODE_TX_ENABLE]; ncm 124 net/ncsi/ncsi-aen.c if (ncm->enable && ncm 176 net/ncsi/ncsi-aen.c struct ncsi_channel_mode *ncm; ncm 186 net/ncsi/ncsi-aen.c ncm = &nc->modes[NCSI_MODE_LINK]; ncm 188 net/ncsi/ncsi-aen.c ncm->data[3] = ntohl(hncdsc->status); ncm 192 net/ncsi/ncsi-aen.c ncm->data[3] & 0x1 ? "" : "not ", nc->id); ncm 92 net/ncsi/ncsi-manage.c struct ncsi_channel_mode *ncm; ncm 139 net/ncsi/ncsi-manage.c ncm = &nc->modes[NCSI_MODE_LINK]; ncm 142 net/ncsi/ncsi-manage.c ncm->data[2] &= ~0x1; ncm 780 net/ncsi/ncsi-manage.c struct ncsi_channel_mode *ncm; ncm 791 net/ncsi/ncsi-manage.c ncm = &channel->modes[NCSI_MODE_TX_ENABLE]; ncm 792 net/ncsi/ncsi-manage.c if (ncm->enable) ncm 1146 net/ncsi/ncsi-manage.c struct ncsi_channel_mode *ncm; ncm 1183 net/ncsi/ncsi-manage.c ncm = &nc->modes[NCSI_MODE_LINK]; ncm 1184 net/ncsi/ncsi-manage.c if (ncm->data[2] & 0x1) { ncm 1202 net/ncsi/ncsi-manage.c ncm->data[2] & 0x1 ? "up" : "down"); ncm 153 net/ncsi/ncsi-rsp.c struct ncsi_channel_mode *ncm; ncm 162 net/ncsi/ncsi-rsp.c ncm = &nc->modes[NCSI_MODE_ENABLE]; ncm 163 net/ncsi/ncsi-rsp.c if (ncm->enable) ncm 166 net/ncsi/ncsi-rsp.c ncm->enable = 1; ncm 175 net/ncsi/ncsi-rsp.c struct ncsi_channel_mode *ncm; ncm 189 net/ncsi/ncsi-rsp.c ncm = &nc->modes[NCSI_MODE_ENABLE]; ncm 190 net/ncsi/ncsi-rsp.c if (!ncm->enable) ncm 193 net/ncsi/ncsi-rsp.c ncm->enable = 0; ncm 224 net/ncsi/ncsi-rsp.c struct ncsi_channel_mode *ncm; ncm 233 net/ncsi/ncsi-rsp.c ncm = &nc->modes[NCSI_MODE_TX_ENABLE]; ncm 234 net/ncsi/ncsi-rsp.c if (ncm->enable) ncm 237 net/ncsi/ncsi-rsp.c ncm->enable = 1; ncm 246 net/ncsi/ncsi-rsp.c struct ncsi_channel_mode *ncm; ncm 255 net/ncsi/ncsi-rsp.c ncm = &nc->modes[NCSI_MODE_TX_ENABLE]; ncm 256 net/ncsi/ncsi-rsp.c if (!ncm->enable) ncm 259 net/ncsi/ncsi-rsp.c ncm->enable = 0; ncm 269 net/ncsi/ncsi-rsp.c struct ncsi_channel_mode *ncm; ncm 279 net/ncsi/ncsi-rsp.c ncm = &nc->modes[NCSI_MODE_AEN]; ncm 280 net/ncsi/ncsi-rsp.c if (ncm->enable) ncm 285 net/ncsi/ncsi-rsp.c ncm->enable = 1; ncm 286 net/ncsi/ncsi-rsp.c ncm->data[0] = cmd->mc_id; ncm 287 net/ncsi/ncsi-rsp.c ncm->data[1] = ntohl(cmd->mode); ncm 298 net/ncsi/ncsi-rsp.c struct ncsi_channel_mode *ncm; ncm 308 net/ncsi/ncsi-rsp.c ncm = &nc->modes[NCSI_MODE_LINK]; ncm 309 net/ncsi/ncsi-rsp.c ncm->data[0] = ntohl(cmd->mode); ncm 310 net/ncsi/ncsi-rsp.c ncm->data[1] = ntohl(cmd->oem_mode); ncm 320 net/ncsi/ncsi-rsp.c struct ncsi_channel_mode *ncm; ncm 330 net/ncsi/ncsi-rsp.c ncm = &nc->modes[NCSI_MODE_LINK]; ncm 331 net/ncsi/ncsi-rsp.c ncm->data[2] = ntohl(rsp->status); ncm 332 net/ncsi/ncsi-rsp.c ncm->data[3] = ntohl(rsp->other); ncm 333 net/ncsi/ncsi-rsp.c ncm->data[4] = ntohl(rsp->oem_status); ncm 389 net/ncsi/ncsi-rsp.c struct ncsi_channel_mode *ncm; ncm 399 net/ncsi/ncsi-rsp.c ncm = &nc->modes[NCSI_MODE_VLAN]; ncm 400 net/ncsi/ncsi-rsp.c if (ncm->enable) ncm 405 net/ncsi/ncsi-rsp.c ncm->enable = 1; ncm 406 net/ncsi/ncsi-rsp.c ncm->data[0] = ntohl(cmd->mode); ncm 416 net/ncsi/ncsi-rsp.c struct ncsi_channel_mode *ncm; ncm 426 net/ncsi/ncsi-rsp.c ncm = &nc->modes[NCSI_MODE_VLAN]; ncm 427 net/ncsi/ncsi-rsp.c if (!ncm->enable) ncm 431 net/ncsi/ncsi-rsp.c ncm->enable = 0; ncm 487 net/ncsi/ncsi-rsp.c struct ncsi_channel_mode *ncm; ncm 496 net/ncsi/ncsi-rsp.c ncm = &nc->modes[NCSI_MODE_BC]; ncm 497 net/ncsi/ncsi-rsp.c if (ncm->enable) ncm 502 net/ncsi/ncsi-rsp.c ncm->enable = 1; ncm 503 net/ncsi/ncsi-rsp.c ncm->data[0] = ntohl(cmd->mode); ncm 513 net/ncsi/ncsi-rsp.c struct ncsi_channel_mode *ncm; ncm 522 net/ncsi/ncsi-rsp.c ncm = &nc->modes[NCSI_MODE_BC]; ncm 523 net/ncsi/ncsi-rsp.c if (!ncm->enable) ncm 527 net/ncsi/ncsi-rsp.c ncm->enable = 0; ncm 528 net/ncsi/ncsi-rsp.c ncm->data[0] = 0; ncm 539 net/ncsi/ncsi-rsp.c struct ncsi_channel_mode *ncm; ncm 549 net/ncsi/ncsi-rsp.c ncm = &nc->modes[NCSI_MODE_MC]; ncm 550 net/ncsi/ncsi-rsp.c if (ncm->enable) ncm 555 net/ncsi/ncsi-rsp.c ncm->enable = 1; ncm 556 net/ncsi/ncsi-rsp.c ncm->data[0] = ntohl(cmd->mode); ncm 566 net/ncsi/ncsi-rsp.c struct ncsi_channel_mode *ncm; ncm 575 net/ncsi/ncsi-rsp.c ncm = &nc->modes[NCSI_MODE_MC]; ncm 576 net/ncsi/ncsi-rsp.c if (!ncm->enable) ncm 580 net/ncsi/ncsi-rsp.c ncm->enable = 0; ncm 581 net/ncsi/ncsi-rsp.c ncm->data[0] = 0; ncm 592 net/ncsi/ncsi-rsp.c struct ncsi_channel_mode *ncm; ncm 602 net/ncsi/ncsi-rsp.c ncm = &nc->modes[NCSI_MODE_FC]; ncm 603 net/ncsi/ncsi-rsp.c if (ncm->enable) ncm 608 net/ncsi/ncsi-rsp.c ncm->enable = 1; ncm 609 net/ncsi/ncsi-rsp.c ncm->data[0] = cmd->mode;