Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255422
b: refs/heads/master
c: 34ddb20
h: refs/heads/master
v: v3
  • Loading branch information
Mike McCormack authored and John W. Linville committed Jun 3, 2011
1 parent 6d01646 commit 5ec6f87
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f2ea312cf4338ae187212e41b3dce97a666e3912
refs/heads/master: 34ddb2077e5ced1a09a1dd2cbb82f807bfc5f88b
20 changes: 8 additions & 12 deletions trunk/drivers/net/wireless/rtlwifi/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,22 +644,23 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
.noise = -98,
.rate = 0,
};
int index = rtlpci->rx_ring[rx_queue_idx].idx;

/*RX NORMAL PKT */
while (count--) {
/*rx descriptor */
struct rtl_rx_desc *pdesc = &rtlpci->rx_ring[rx_queue_idx].desc[
rtlpci->rx_ring[rx_queue_idx].idx];
index];
/*rx pkt */
struct sk_buff *skb = rtlpci->rx_ring[rx_queue_idx].rx_buf[
rtlpci->rx_ring[rx_queue_idx].idx];
index];

own = (u8) rtlpriv->cfg->ops->get_desc((u8 *) pdesc,
false, HW_DESC_OWN);

if (own) {
/*wait data to be filled by hardware */
return;
break;
} else {
struct ieee80211_hdr *hdr;
__le16 fc;
Expand Down Expand Up @@ -770,10 +771,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)

skb = new_skb;

rtlpci->rx_ring[rx_queue_idx].rx_buf[rtlpci->
rx_ring
[rx_queue_idx].
idx] = skb;
rtlpci->rx_ring[rx_queue_idx].rx_buf[index] = skb;
*((dma_addr_t *) skb->cb) =
pci_map_single(rtlpci->pdev, skb_tail_pointer(skb),
rtlpci->rxbuffersize,
Expand All @@ -792,17 +790,15 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
HW_DESC_RXPKT_LEN,
(u8 *)&rtlpci->rxbuffersize);

if (rtlpci->rx_ring[rx_queue_idx].idx ==
rtlpci->rxringcount - 1)
if (index == rtlpci->rxringcount - 1)
rtlpriv->cfg->ops->set_desc((u8 *)pdesc, false,
HW_DESC_RXERO,
(u8 *)&tmp_one);

rtlpci->rx_ring[rx_queue_idx].idx =
(rtlpci->rx_ring[rx_queue_idx].idx + 1) %
rtlpci->rxringcount;
index = (index + 1) % rtlpci->rxringcount;
}

rtlpci->rx_ring[rx_queue_idx].idx = index;
}

static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
Expand Down

0 comments on commit 5ec6f87

Please sign in to comment.