diff options
Diffstat (limited to 'drivers/net/stmmac/enh_desc.c')
-rw-r--r-- | drivers/net/stmmac/enh_desc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/stmmac/enh_desc.c b/drivers/net/stmmac/enh_desc.c index f612f986a7e1..e5dfb6a30182 100644 --- a/drivers/net/stmmac/enh_desc.c +++ b/drivers/net/stmmac/enh_desc.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include "common.h" | 25 | #include "common.h" |
26 | 26 | ||
27 | static int enh_desc_get_tx_status(void *data, struct stmmac_extra_stats *x, | 27 | static int enh_desc_get_tx_status(void *data, struct stmmac_extra_stats *x, |
28 | struct dma_desc *p, unsigned long ioaddr) | 28 | struct dma_desc *p, void __iomem *ioaddr) |
29 | { | 29 | { |
30 | int ret = 0; | 30 | int ret = 0; |
31 | struct net_device_stats *stats = (struct net_device_stats *)data; | 31 | struct net_device_stats *stats = (struct net_device_stats *)data; |
@@ -284,7 +284,7 @@ static void enh_desc_release_tx_desc(struct dma_desc *p) | |||
284 | { | 284 | { |
285 | int ter = p->des01.etx.end_ring; | 285 | int ter = p->des01.etx.end_ring; |
286 | 286 | ||
287 | memset(p, 0, sizeof(struct dma_desc)); | 287 | memset(p, 0, offsetof(struct dma_desc, des2)); |
288 | p->des01.etx.end_ring = ter; | 288 | p->des01.etx.end_ring = ter; |
289 | } | 289 | } |
290 | 290 | ||
@@ -318,7 +318,7 @@ static int enh_desc_get_rx_frame_len(struct dma_desc *p) | |||
318 | return p->des01.erx.frame_length; | 318 | return p->des01.erx.frame_length; |
319 | } | 319 | } |
320 | 320 | ||
321 | struct stmmac_desc_ops enh_desc_ops = { | 321 | const struct stmmac_desc_ops enh_desc_ops = { |
322 | .tx_status = enh_desc_get_tx_status, | 322 | .tx_status = enh_desc_get_tx_status, |
323 | .rx_status = enh_desc_get_rx_status, | 323 | .rx_status = enh_desc_get_rx_status, |
324 | .get_tx_len = enh_desc_get_tx_len, | 324 | .get_tx_len = enh_desc_get_tx_len, |