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()
694 struct hso_net *odev = netdev_priv(net); in hso_net_open()
724 struct hso_net *odev = netdev_priv(net); in hso_net_close()
740 struct hso_net *odev = urb->context; in write_bulk_callback()
771 struct hso_net *odev = netdev_priv(net); in hso_net_start_xmit()
822 struct hso_net *odev = netdev_priv(net); in hso_net_tx_timeout()
839 static void packetizeRx(struct hso_net *odev, unsigned char *ip_pkt, in packetizeRx()
981 struct hso_net *odev = urb->context; in read_bulk_callback()
2084 struct hso_net *hso_net = dev2net(hso_dev); in hso_start_net_device() local
2086 if (!hso_net) in hso_start_net_device()
2093 usb_fill_bulk_urb(hso_net->mux_bulk_rx_urb_pool[i], in hso_start_net_device()
2096 hso_net->in_endp-> in hso_start_net_device()
2098 hso_net->mux_bulk_rx_buf_pool[i], in hso_start_net_device()
2100 hso_net); in hso_start_net_device()
2103 result = usb_submit_urb(hso_net->mux_bulk_rx_urb_pool[i], in hso_start_net_device()
2117 struct hso_net *hso_net = dev2net(hso_dev); in hso_stop_net_device() local
2119 if (!hso_net) in hso_stop_net_device()
2123 if (hso_net->mux_bulk_rx_urb_pool[i]) in hso_stop_net_device()
2124 usb_kill_urb(hso_net->mux_bulk_rx_urb_pool[i]); in hso_stop_net_device()
2127 if (hso_net->mux_bulk_tx_urb) in hso_stop_net_device()
2128 usb_kill_urb(hso_net->mux_bulk_tx_urb); in hso_stop_net_device()
2352 struct hso_net *hso_net = dev2net(hso_dev); in hso_free_net_device() local
2354 if (!hso_net) in hso_free_net_device()
2357 remove_net_device(hso_net->parent); in hso_free_net_device()
2359 if (hso_net->net) in hso_free_net_device()
2360 unregister_netdev(hso_net->net); in hso_free_net_device()
2364 usb_free_urb(hso_net->mux_bulk_rx_urb_pool[i]); in hso_free_net_device()
2365 kfree(hso_net->mux_bulk_rx_buf_pool[i]); in hso_free_net_device()
2366 hso_net->mux_bulk_rx_buf_pool[i] = NULL; in hso_free_net_device()
2368 usb_free_urb(hso_net->mux_bulk_tx_urb); in hso_free_net_device()
2369 kfree(hso_net->mux_bulk_tx_buf); in hso_free_net_device()
2370 hso_net->mux_bulk_tx_buf = NULL; in hso_free_net_device()
2372 if (hso_net->net) in hso_free_net_device()
2373 free_netdev(hso_net->net); in hso_free_net_device()
2388 struct hso_net *hso_net = netdev_priv(net); in hso_net_init() local
2390 hso_dbg(0x1, "sizeof hso_net is %zu\n", sizeof(*hso_net)); in hso_net_init()
2402 spin_lock_init(&hso_net->net_lock); in hso_net_init()
2446 struct hso_net *hso_net = dev2net(hso_dev); in hso_create_rfkill() local
2447 struct device *dev = &hso_net->net->dev; in hso_create_rfkill()
2450 snprintf(hso_net->name, sizeof(hso_net->name), "hso-%d", in hso_create_rfkill()
2453 hso_net->rfkill = rfkill_alloc(hso_net->name, in hso_create_rfkill()
2457 if (!hso_net->rfkill) in hso_create_rfkill()
2460 if (rfkill_register(hso_net->rfkill) < 0) { in hso_create_rfkill()
2461 rfkill_destroy(hso_net->rfkill); in hso_create_rfkill()
2462 hso_net->rfkill = NULL; in hso_create_rfkill()
2478 struct hso_net *hso_net; in hso_create_net_device() local
2487 net = alloc_netdev(sizeof(struct hso_net), "hso%d", NET_NAME_UNKNOWN, in hso_create_net_device()
2494 hso_net = netdev_priv(net); in hso_create_net_device()
2496 hso_dev->port_data.dev_net = hso_net; in hso_create_net_device()
2497 hso_net->net = net; in hso_create_net_device()
2498 hso_net->parent = hso_dev; in hso_create_net_device()
2500 hso_net->in_endp = hso_get_ep(interface, USB_ENDPOINT_XFER_BULK, in hso_create_net_device()
2502 if (!hso_net->in_endp) { in hso_create_net_device()
2506 hso_net->out_endp = hso_get_ep(interface, USB_ENDPOINT_XFER_BULK, in hso_create_net_device()
2508 if (!hso_net->out_endp) { in hso_create_net_device()
2517 hso_net->mux_bulk_rx_urb_pool[i] = usb_alloc_urb(0, GFP_KERNEL); in hso_create_net_device()
2518 if (!hso_net->mux_bulk_rx_urb_pool[i]) in hso_create_net_device()
2520 hso_net->mux_bulk_rx_buf_pool[i] = kzalloc(MUX_BULK_RX_BUF_SIZE, in hso_create_net_device()
2522 if (!hso_net->mux_bulk_rx_buf_pool[i]) in hso_create_net_device()
2525 hso_net->mux_bulk_tx_urb = usb_alloc_urb(0, GFP_KERNEL); in hso_create_net_device()
2526 if (!hso_net->mux_bulk_tx_urb) in hso_create_net_device()
2528 hso_net->mux_bulk_tx_buf = kzalloc(MUX_BULK_TX_BUF_SIZE, GFP_KERNEL); in hso_create_net_device()
2529 if (!hso_net->mux_bulk_tx_buf) in hso_create_net_device()
2554 kfree(hso_net->mux_bulk_tx_buf); in hso_create_net_device()
2556 usb_free_urb(hso_net->mux_bulk_tx_urb); in hso_create_net_device()
2559 usb_free_urb(hso_net->mux_bulk_rx_urb_pool[i]); in hso_create_net_device()
2560 kfree(hso_net->mux_bulk_rx_buf_pool[i]); in hso_create_net_device()
3049 struct hso_net *hso_net; in hso_resume() local
3068 hso_net = dev2net(network_table[i]); in hso_resume()
3069 if (hso_net->flags & IFF_UP) { in hso_resume()
3072 if (hso_net->skb_tx_buf) { in hso_resume()
3076 hso_net_start_xmit(hso_net->skb_tx_buf, in hso_resume()
3077 hso_net->net); in hso_resume()
3078 hso_net->skb_tx_buf = NULL; in hso_resume()