Lines Matching refs:hso_net
152 struct hso_net { struct
268 struct hso_net *dev_net;
348 static inline struct hso_net *dev2net(struct hso_device *hso_dev) in dev2net()
720 struct hso_net *odev = netdev_priv(net); in hso_net_open()
750 struct hso_net *odev = netdev_priv(net); in hso_net_close()
766 struct hso_net *odev = urb->context; in write_bulk_callback()
797 struct hso_net *odev = netdev_priv(net); in hso_net_start_xmit()
848 struct hso_net *odev = netdev_priv(net); in hso_net_tx_timeout()
866 static void packetizeRx(struct hso_net *odev, unsigned char *ip_pkt, in packetizeRx()
1010 struct hso_net *odev = urb->context; in read_bulk_callback()
2112 struct hso_net *hso_net = dev2net(hso_dev); in hso_start_net_device() local
2114 if (!hso_net) in hso_start_net_device()
2121 usb_fill_bulk_urb(hso_net->mux_bulk_rx_urb_pool[i], in hso_start_net_device()
2124 hso_net->in_endp-> in hso_start_net_device()
2126 hso_net->mux_bulk_rx_buf_pool[i], in hso_start_net_device()
2128 hso_net); in hso_start_net_device()
2131 result = usb_submit_urb(hso_net->mux_bulk_rx_urb_pool[i], in hso_start_net_device()
2145 struct hso_net *hso_net = dev2net(hso_dev); in hso_stop_net_device() local
2147 if (!hso_net) in hso_stop_net_device()
2151 if (hso_net->mux_bulk_rx_urb_pool[i]) in hso_stop_net_device()
2152 usb_kill_urb(hso_net->mux_bulk_rx_urb_pool[i]); in hso_stop_net_device()
2155 if (hso_net->mux_bulk_tx_urb) in hso_stop_net_device()
2156 usb_kill_urb(hso_net->mux_bulk_tx_urb); in hso_stop_net_device()
2384 struct hso_net *hso_net = dev2net(hso_dev); in hso_free_net_device() local
2386 if (!hso_net) in hso_free_net_device()
2389 remove_net_device(hso_net->parent); in hso_free_net_device()
2391 if (hso_net->net) in hso_free_net_device()
2392 unregister_netdev(hso_net->net); in hso_free_net_device()
2396 usb_free_urb(hso_net->mux_bulk_rx_urb_pool[i]); in hso_free_net_device()
2397 kfree(hso_net->mux_bulk_rx_buf_pool[i]); in hso_free_net_device()
2398 hso_net->mux_bulk_rx_buf_pool[i] = NULL; in hso_free_net_device()
2400 usb_free_urb(hso_net->mux_bulk_tx_urb); in hso_free_net_device()
2401 kfree(hso_net->mux_bulk_tx_buf); in hso_free_net_device()
2402 hso_net->mux_bulk_tx_buf = NULL; in hso_free_net_device()
2404 if (hso_net->net) in hso_free_net_device()
2405 free_netdev(hso_net->net); in hso_free_net_device()
2420 struct hso_net *hso_net = netdev_priv(net); in hso_net_init() local
2422 D1("sizeof hso_net is %d", (int)sizeof(*hso_net)); in hso_net_init()
2434 spin_lock_init(&hso_net->net_lock); in hso_net_init()
2478 struct hso_net *hso_net = dev2net(hso_dev); in hso_create_rfkill() local
2479 struct device *dev = &hso_net->net->dev; in hso_create_rfkill()
2482 snprintf(hso_net->name, sizeof(hso_net->name), "hso-%d", in hso_create_rfkill()
2485 hso_net->rfkill = rfkill_alloc(hso_net->name, in hso_create_rfkill()
2489 if (!hso_net->rfkill) { in hso_create_rfkill()
2493 if (rfkill_register(hso_net->rfkill) < 0) { in hso_create_rfkill()
2494 rfkill_destroy(hso_net->rfkill); in hso_create_rfkill()
2495 hso_net->rfkill = NULL; in hso_create_rfkill()
2511 struct hso_net *hso_net; in hso_create_net_device() local
2520 net = alloc_netdev(sizeof(struct hso_net), "hso%d", NET_NAME_UNKNOWN, in hso_create_net_device()
2527 hso_net = netdev_priv(net); in hso_create_net_device()
2529 hso_dev->port_data.dev_net = hso_net; in hso_create_net_device()
2530 hso_net->net = net; in hso_create_net_device()
2531 hso_net->parent = hso_dev; in hso_create_net_device()
2533 hso_net->in_endp = hso_get_ep(interface, USB_ENDPOINT_XFER_BULK, in hso_create_net_device()
2535 if (!hso_net->in_endp) { in hso_create_net_device()
2539 hso_net->out_endp = hso_get_ep(interface, USB_ENDPOINT_XFER_BULK, in hso_create_net_device()
2541 if (!hso_net->out_endp) { in hso_create_net_device()
2557 hso_net->mux_bulk_rx_urb_pool[i] = usb_alloc_urb(0, GFP_KERNEL); in hso_create_net_device()
2558 if (!hso_net->mux_bulk_rx_urb_pool[i]) { in hso_create_net_device()
2562 hso_net->mux_bulk_rx_buf_pool[i] = kzalloc(MUX_BULK_RX_BUF_SIZE, in hso_create_net_device()
2564 if (!hso_net->mux_bulk_rx_buf_pool[i]) in hso_create_net_device()
2567 hso_net->mux_bulk_tx_urb = usb_alloc_urb(0, GFP_KERNEL); in hso_create_net_device()
2568 if (!hso_net->mux_bulk_tx_urb) { in hso_create_net_device()
2572 hso_net->mux_bulk_tx_buf = kzalloc(MUX_BULK_TX_BUF_SIZE, GFP_KERNEL); in hso_create_net_device()
2573 if (!hso_net->mux_bulk_tx_buf) in hso_create_net_device()
3056 struct hso_net *hso_net; in hso_resume() local
3075 hso_net = dev2net(network_table[i]); in hso_resume()
3076 if (hso_net->flags & IFF_UP) { in hso_resume()
3079 if (hso_net->skb_tx_buf) { in hso_resume()
3083 hso_net_start_xmit(hso_net->skb_tx_buf, in hso_resume()
3084 hso_net->net); in hso_resume()
3085 hso_net->skb_tx_buf = NULL; in hso_resume()