Lines Matching refs:tx

38 	struct plfxlc_usb_tx *tx = &usb->tx;  in plfxlc_send_packet_from_data_queue()  local
43 spin_lock_irqsave(&tx->lock, flags); in plfxlc_send_packet_from_data_queue()
47 if (!(tx->station[usb->sidx].flag & STATION_CONNECTED_FLAG)) in plfxlc_send_packet_from_data_queue()
49 if (!(tx->station[usb->sidx].flag & STATION_FIFO_FULL_FLAG)) in plfxlc_send_packet_from_data_queue()
50 skb = skb_peek(&tx->station[usb->sidx].data_list); in plfxlc_send_packet_from_data_queue()
54 skb = skb_dequeue(&tx->station[usb->sidx].data_list); in plfxlc_send_packet_from_data_queue()
57 if (skb_queue_len(&tx->station[usb->sidx].data_list) <= 60) in plfxlc_send_packet_from_data_queue()
60 spin_unlock_irqrestore(&tx->lock, flags); in plfxlc_send_packet_from_data_queue()
71 struct plfxlc_usb_tx *tx; in rx_urb_complete() local
94 tx = &usb->tx; in rx_urb_complete()
108 if (tx->submitted_urbs++ < PURELIFI_URB_RETRY_MAX) { in rx_urb_complete()
110 tx->submitted_urbs++); in rx_urb_complete()
114 tx->submitted_urbs = 0; in rx_urb_complete()
135 tx->mac_fifo_full = 1; in rx_urb_complete()
137 tx->station[sidx].flag |= STATION_FIFO_FULL_FLAG; in rx_urb_complete()
143 tx->station[sidx].flag &= STATION_ACTIVE_FLAG; in rx_urb_complete()
306 struct plfxlc_usb_tx *tx = &usb->tx; in plfxlc_usb_disable_tx() local
309 clear_bit(PLF_BIT_ENABLED, &tx->enabled); in plfxlc_usb_disable_tx()
312 usb_kill_anchored_urbs(&tx->submitted); in plfxlc_usb_disable_tx()
314 spin_lock_irqsave(&tx->lock, flags); in plfxlc_usb_disable_tx()
315 WARN_ON(!skb_queue_empty(&tx->submitted_skbs)); in plfxlc_usb_disable_tx()
316 WARN_ON(tx->submitted_urbs != 0); in plfxlc_usb_disable_tx()
317 tx->submitted_urbs = 0; in plfxlc_usb_disable_tx()
318 spin_unlock_irqrestore(&tx->lock, flags); in plfxlc_usb_disable_tx()
327 struct plfxlc_usb_tx *tx = &usb->tx; in plfxlc_usb_enable_tx() local
330 spin_lock_irqsave(&tx->lock, flags); in plfxlc_usb_enable_tx()
331 set_bit(PLF_BIT_ENABLED, &tx->enabled); in plfxlc_usb_enable_tx()
332 tx->submitted_urbs = 0; in plfxlc_usb_enable_tx()
334 tx->stopped = 0; in plfxlc_usb_enable_tx()
335 spin_unlock_irqrestore(&tx->lock, flags); in plfxlc_usb_enable_tx()
390 struct plfxlc_usb_tx *tx = &usb->tx; in init_usb_tx() local
392 spin_lock_init(&tx->lock); in init_usb_tx()
393 clear_bit(PLF_BIT_ENABLED, &tx->enabled); in init_usb_tx()
394 tx->stopped = 0; in init_usb_tx()
395 skb_queue_head_init(&tx->submitted_skbs); in init_usb_tx()
396 init_usb_anchor(&tx->submitted); in init_usb_tx()
549 struct plfxlc_usb *usb = from_timer(usb, t, tx.tx_retry_timer); in slif_data_plane_sap_timer_callb()
552 timer_setup(&usb->tx.tx_retry_timer, in slif_data_plane_sap_timer_callb()
554 mod_timer(&usb->tx.tx_retry_timer, jiffies + TX_RETRY_BACKOFF_JIFF); in slif_data_plane_sap_timer_callb()
560 struct plfxlc_usb_tx *tx = &usb->tx; in sta_queue_cleanup_timer_callb() local
564 if (!(tx->station[sidx].flag & STATION_CONNECTED_FLAG)) in sta_queue_cleanup_timer_callb()
566 if (tx->station[sidx].flag & STATION_HEARTBEAT_FLAG) { in sta_queue_cleanup_timer_callb()
567 tx->station[sidx].flag ^= STATION_HEARTBEAT_FLAG; in sta_queue_cleanup_timer_callb()
569 eth_zero_addr(tx->station[sidx].mac); in sta_queue_cleanup_timer_callb()
570 tx->station[sidx].flag = 0; in sta_queue_cleanup_timer_callb()
583 struct plfxlc_usb_tx *tx; in probe() local
600 tx = &usb->tx; in probe()
636 tx->mac_fifo_full = 0; in probe()
637 spin_lock_init(&tx->lock); in probe()
672 skb_queue_head_init(&tx->station[i].data_list); in probe()
673 tx->station[i].flag = 0; in probe()
676 tx->station[STA_BROADCAST_INDEX].flag |= STATION_CONNECTED_FLAG; in probe()
678 tx->station[STA_BROADCAST_INDEX].mac[i] = 0xFF; in probe()
680 timer_setup(&tx->tx_retry_timer, slif_data_plane_sap_timer_callb, 0); in probe()
681 tx->tx_retry_timer.expires = jiffies + TX_RETRY_BACKOFF_JIFF; in probe()
682 add_timer(&tx->tx_retry_timer); in probe()
717 del_timer_sync(&usb->tx.tx_retry_timer); in disconnect()