Lines Matching refs:hso_net
128 struct hso_net { struct
244 struct hso_net *dev_net;
324 static inline struct hso_net *dev2net(struct hso_device *hso_dev) in dev2net()
696 struct hso_net *odev = netdev_priv(net); in hso_net_open()
726 struct hso_net *odev = netdev_priv(net); in hso_net_close()
742 struct hso_net *odev = urb->context; in write_bulk_callback()
773 struct hso_net *odev = netdev_priv(net); in hso_net_start_xmit()
824 struct hso_net *odev = netdev_priv(net); in hso_net_tx_timeout()
841 static void packetizeRx(struct hso_net *odev, unsigned char *ip_pkt, in packetizeRx()
983 struct hso_net *odev = urb->context; in read_bulk_callback()
2092 struct hso_net *hso_net = dev2net(hso_dev); in hso_start_net_device() local
2094 if (!hso_net) in hso_start_net_device()
2101 usb_fill_bulk_urb(hso_net->mux_bulk_rx_urb_pool[i], in hso_start_net_device()
2104 hso_net->in_endp-> in hso_start_net_device()
2106 hso_net->mux_bulk_rx_buf_pool[i], in hso_start_net_device()
2108 hso_net); in hso_start_net_device()
2111 result = usb_submit_urb(hso_net->mux_bulk_rx_urb_pool[i], in hso_start_net_device()
2125 struct hso_net *hso_net = dev2net(hso_dev); in hso_stop_net_device() local
2127 if (!hso_net) in hso_stop_net_device()
2131 if (hso_net->mux_bulk_rx_urb_pool[i]) in hso_stop_net_device()
2132 usb_kill_urb(hso_net->mux_bulk_rx_urb_pool[i]); in hso_stop_net_device()
2135 if (hso_net->mux_bulk_tx_urb) in hso_stop_net_device()
2136 usb_kill_urb(hso_net->mux_bulk_tx_urb); in hso_stop_net_device()
2360 struct hso_net *hso_net = dev2net(hso_dev); in hso_free_net_device() local
2362 if (!hso_net) in hso_free_net_device()
2365 remove_net_device(hso_net->parent); in hso_free_net_device()
2367 if (hso_net->net) in hso_free_net_device()
2368 unregister_netdev(hso_net->net); in hso_free_net_device()
2372 usb_free_urb(hso_net->mux_bulk_rx_urb_pool[i]); in hso_free_net_device()
2373 kfree(hso_net->mux_bulk_rx_buf_pool[i]); in hso_free_net_device()
2374 hso_net->mux_bulk_rx_buf_pool[i] = NULL; in hso_free_net_device()
2376 usb_free_urb(hso_net->mux_bulk_tx_urb); in hso_free_net_device()
2377 kfree(hso_net->mux_bulk_tx_buf); in hso_free_net_device()
2378 hso_net->mux_bulk_tx_buf = NULL; in hso_free_net_device()
2380 if (hso_net->net) in hso_free_net_device()
2381 free_netdev(hso_net->net); in hso_free_net_device()
2396 struct hso_net *hso_net = netdev_priv(net); in hso_net_init() local
2398 hso_dbg(0x1, "sizeof hso_net is %zu\n", sizeof(*hso_net)); in hso_net_init()
2410 spin_lock_init(&hso_net->net_lock); in hso_net_init()
2454 struct hso_net *hso_net = dev2net(hso_dev); in hso_create_rfkill() local
2455 struct device *dev = &hso_net->net->dev; in hso_create_rfkill()
2458 snprintf(hso_net->name, sizeof(hso_net->name), "hso-%d", in hso_create_rfkill()
2461 hso_net->rfkill = rfkill_alloc(hso_net->name, in hso_create_rfkill()
2465 if (!hso_net->rfkill) in hso_create_rfkill()
2468 if (rfkill_register(hso_net->rfkill) < 0) { in hso_create_rfkill()
2469 rfkill_destroy(hso_net->rfkill); in hso_create_rfkill()
2470 hso_net->rfkill = NULL; in hso_create_rfkill()
2486 struct hso_net *hso_net; in hso_create_net_device() local
2495 net = alloc_netdev(sizeof(struct hso_net), "hso%d", NET_NAME_UNKNOWN, in hso_create_net_device()
2502 hso_net = netdev_priv(net); in hso_create_net_device()
2504 hso_dev->port_data.dev_net = hso_net; in hso_create_net_device()
2505 hso_net->net = net; in hso_create_net_device()
2506 hso_net->parent = hso_dev; in hso_create_net_device()
2508 hso_net->in_endp = hso_get_ep(interface, USB_ENDPOINT_XFER_BULK, in hso_create_net_device()
2510 if (!hso_net->in_endp) { in hso_create_net_device()
2514 hso_net->out_endp = hso_get_ep(interface, USB_ENDPOINT_XFER_BULK, in hso_create_net_device()
2516 if (!hso_net->out_endp) { in hso_create_net_device()
2525 hso_net->mux_bulk_rx_urb_pool[i] = usb_alloc_urb(0, GFP_KERNEL); in hso_create_net_device()
2526 if (!hso_net->mux_bulk_rx_urb_pool[i]) in hso_create_net_device()
2528 hso_net->mux_bulk_rx_buf_pool[i] = kzalloc(MUX_BULK_RX_BUF_SIZE, in hso_create_net_device()
2530 if (!hso_net->mux_bulk_rx_buf_pool[i]) in hso_create_net_device()
2533 hso_net->mux_bulk_tx_urb = usb_alloc_urb(0, GFP_KERNEL); in hso_create_net_device()
2534 if (!hso_net->mux_bulk_tx_urb) in hso_create_net_device()
2536 hso_net->mux_bulk_tx_buf = kzalloc(MUX_BULK_TX_BUF_SIZE, GFP_KERNEL); in hso_create_net_device()
2537 if (!hso_net->mux_bulk_tx_buf) in hso_create_net_device()
2562 kfree(hso_net->mux_bulk_tx_buf); in hso_create_net_device()
2564 usb_free_urb(hso_net->mux_bulk_tx_urb); in hso_create_net_device()
2567 usb_free_urb(hso_net->mux_bulk_rx_urb_pool[i]); in hso_create_net_device()
2568 kfree(hso_net->mux_bulk_rx_buf_pool[i]); in hso_create_net_device()
3057 struct hso_net *hso_net; in hso_resume() local
3076 hso_net = dev2net(network_table[i]); in hso_resume()
3077 if (hso_net->flags & IFF_UP) { in hso_resume()
3080 if (hso_net->skb_tx_buf) { in hso_resume()
3084 hso_net_start_xmit(hso_net->skb_tx_buf, in hso_resume()
3085 hso_net->net); in hso_resume()
3086 hso_net->skb_tx_buf = NULL; in hso_resume()