diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2006-08-14 13:55:07 -0400 |
---|---|---|
committer | Francois Romieu <romieu@fr.zoreil.com> | 2006-08-31 16:15:40 -0400 |
commit | 0ba894d420b845667e2981c2147af974a755fba2 (patch) | |
tree | 86d0332de1632929a1c0dbd8c2575a0f78409969 /drivers/net/8139cp.c | |
parent | c48e9399e895834f26dff9149de1930ba18a0d6c (diff) |
8139cp: ring_info removal for the receive path
The ring_info.len field is not used at all. cp_private.rx_skb is
turned into an array of sk_buff *.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Diffstat (limited to 'drivers/net/8139cp.c')
-rw-r--r-- | drivers/net/8139cp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index ae9bb7511d90..072568120e48 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c | |||
@@ -354,7 +354,7 @@ struct cp_private { | |||
354 | 354 | ||
355 | unsigned rx_tail ____cacheline_aligned; | 355 | unsigned rx_tail ____cacheline_aligned; |
356 | struct cp_desc *rx_ring; | 356 | struct cp_desc *rx_ring; |
357 | struct ring_info rx_skb[CP_RX_RING_SIZE]; | 357 | struct sk_buff *rx_skb[CP_RX_RING_SIZE]; |
358 | unsigned rx_buf_sz; | 358 | unsigned rx_buf_sz; |
359 | 359 | ||
360 | unsigned tx_head ____cacheline_aligned; | 360 | unsigned tx_head ____cacheline_aligned; |
@@ -541,7 +541,7 @@ rx_status_loop: | |||
541 | struct cp_desc *desc; | 541 | struct cp_desc *desc; |
542 | unsigned buflen; | 542 | unsigned buflen; |
543 | 543 | ||
544 | skb = cp->rx_skb[rx_tail].skb; | 544 | skb = cp->rx_skb[rx_tail]; |
545 | BUG_ON(!skb); | 545 | BUG_ON(!skb); |
546 | 546 | ||
547 | desc = &cp->rx_ring[rx_tail]; | 547 | desc = &cp->rx_ring[rx_tail]; |
@@ -596,7 +596,7 @@ rx_status_loop: | |||
596 | 596 | ||
597 | mapping = pci_map_single(cp->pdev, new_skb->data, buflen, | 597 | mapping = pci_map_single(cp->pdev, new_skb->data, buflen, |
598 | PCI_DMA_FROMDEVICE); | 598 | PCI_DMA_FROMDEVICE); |
599 | cp->rx_skb[rx_tail].skb = new_skb; | 599 | cp->rx_skb[rx_tail] = new_skb; |
600 | 600 | ||
601 | cp_rx_skb(cp, skb, desc); | 601 | cp_rx_skb(cp, skb, desc); |
602 | rx++; | 602 | rx++; |
@@ -1097,7 +1097,7 @@ static int cp_refill_rx (struct cp_private *cp) | |||
1097 | 1097 | ||
1098 | mapping = pci_map_single(cp->pdev, skb->data, cp->rx_buf_sz, | 1098 | mapping = pci_map_single(cp->pdev, skb->data, cp->rx_buf_sz, |
1099 | PCI_DMA_FROMDEVICE); | 1099 | PCI_DMA_FROMDEVICE); |
1100 | cp->rx_skb[i].skb = skb; | 1100 | cp->rx_skb[i] = skb; |
1101 | 1101 | ||
1102 | cp->rx_ring[i].opts2 = 0; | 1102 | cp->rx_ring[i].opts2 = 0; |
1103 | cp->rx_ring[i].addr = cpu_to_le64(mapping); | 1103 | cp->rx_ring[i].addr = cpu_to_le64(mapping); |
@@ -1152,11 +1152,11 @@ static void cp_clean_rings (struct cp_private *cp) | |||
1152 | unsigned i; | 1152 | unsigned i; |
1153 | 1153 | ||
1154 | for (i = 0; i < CP_RX_RING_SIZE; i++) { | 1154 | for (i = 0; i < CP_RX_RING_SIZE; i++) { |
1155 | if (cp->rx_skb[i].skb) { | 1155 | if (cp->rx_skb[i]) { |
1156 | desc = cp->rx_ring + i; | 1156 | desc = cp->rx_ring + i; |
1157 | pci_unmap_single(cp->pdev, le64_to_cpu(desc->addr), | 1157 | pci_unmap_single(cp->pdev, le64_to_cpu(desc->addr), |
1158 | cp->rx_buf_sz, PCI_DMA_FROMDEVICE); | 1158 | cp->rx_buf_sz, PCI_DMA_FROMDEVICE); |
1159 | dev_kfree_skb(cp->rx_skb[i].skb); | 1159 | dev_kfree_skb(cp->rx_skb[i]); |
1160 | } | 1160 | } |
1161 | } | 1161 | } |
1162 | 1162 | ||
@@ -1176,7 +1176,7 @@ static void cp_clean_rings (struct cp_private *cp) | |||
1176 | memset(cp->rx_ring, 0, sizeof(struct cp_desc) * CP_RX_RING_SIZE); | 1176 | memset(cp->rx_ring, 0, sizeof(struct cp_desc) * CP_RX_RING_SIZE); |
1177 | memset(cp->tx_ring, 0, sizeof(struct cp_desc) * CP_TX_RING_SIZE); | 1177 | memset(cp->tx_ring, 0, sizeof(struct cp_desc) * CP_TX_RING_SIZE); |
1178 | 1178 | ||
1179 | memset(&cp->rx_skb, 0, sizeof(struct ring_info) * CP_RX_RING_SIZE); | 1179 | memset(cp->rx_skb, 0, sizeof(struct sk_buff *) * CP_RX_RING_SIZE); |
1180 | memset(&cp->tx_skb, 0, sizeof(struct ring_info) * CP_TX_RING_SIZE); | 1180 | memset(&cp->tx_skb, 0, sizeof(struct ring_info) * CP_TX_RING_SIZE); |
1181 | } | 1181 | } |
1182 | 1182 | ||