Lines Matching defs:rxq

80  * + A list of pre-allocated SKBs is stored in iwl->rxq->rx_free.  When
81 * iwl->rxq->free_count drops to or below RX_LOW_WATERMARK, work is scheduled
82 * to replenish the iwl->rxq->rx_free.
84 * iwl->rxq is replenished and the READ INDEX is updated (updating the
87 * detached from the iwl->rxq. The driver 'processed' index is updated.
88 * + The Host/Firmware iwl->rxq is replenished at tasklet time from the rx_free
89 * list. If there are no allocated buffers in iwl->rxq->rx_free, the READ
204 struct iwl_rx_queue *rxq = &trans_pcie->rxq;
209 spin_lock_irqsave(&rxq->lock, flags);
210 while ((iwl_rx_queue_space(rxq) > 0) && (rxq->free_count)) {
212 rxb = rxq->queue[rxq->write];
216 element = rxq->rx_free.next;
221 rxq->bd[rxq->write] = iwlagn_dma_addr2rbd_ptr(rxb->page_dma);
222 rxq->queue[rxq->write] = rxb;
223 rxq->write = (rxq->write + 1) & RX_QUEUE_MASK;
224 rxq->free_count--;
226 spin_unlock_irqrestore(&rxq->lock, flags);
229 if (rxq->free_count <= RX_LOW_WATERMARK)
235 if (rxq->write_actual != (rxq->write & ~0x7)) {
236 spin_lock_irqsave(&rxq->lock, flags);
237 rxq->need_update = 1;
238 spin_unlock_irqrestore(&rxq->lock, flags);
239 iwl_rx_queue_update_write_ptr(trans, rxq);
256 struct iwl_rx_queue *rxq = &trans_pcie->rxq;
264 spin_lock_irqsave(&rxq->lock, flags);
265 if (list_empty(&rxq->rx_used)) {
266 spin_unlock_irqrestore(&rxq->lock, flags);
269 spin_unlock_irqrestore(&rxq->lock, flags);
271 if (rxq->free_count > RX_LOW_WATERMARK)
286 if ((rxq->free_count <= RX_LOW_WATERMARK) &&
292 rxq->free_count);
299 spin_lock_irqsave(&rxq->lock, flags);
301 if (list_empty(&rxq->rx_used)) {
302 spin_unlock_irqrestore(&rxq->lock, flags);
306 element = rxq->rx_used.next;
310 spin_unlock_irqrestore(&rxq->lock, flags);
323 spin_lock_irqsave(&rxq->lock, flags);
325 list_add_tail(&rxb->list, &rxq->rx_free);
326 rxq->free_count++;
328 spin_unlock_irqrestore(&rxq->lock, flags);
363 struct iwl_rx_queue *rxq = &trans_pcie->rxq;
447 spin_lock_irqsave(&rxq->lock, flags);
453 list_add_tail(&rxb->list, &rxq->rx_free);
454 rxq->free_count++;
456 list_add_tail(&rxb->list, &rxq->rx_used);
457 spin_unlock_irqrestore(&rxq->lock, flags);
470 struct iwl_rx_queue *rxq = &trans_pcie->rxq;
478 r = le16_to_cpu(rxq->rb_stts->closed_rb_num) & 0x0FFF;
479 i = rxq->read;
486 total_empty = r - rxq->write_actual;
496 rxb = rxq->queue[i];
497 rxq->queue[i] = NULL;
509 rxq->read = i;
517 rxq->read = i;
1046 iwl_rx_queue_update_write_ptr(trans, &trans_pcie->rxq);