]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/net/stmmac/norm_desc.c
stmmac: use one memset() to reset TDES01
[net-next-2.6.git] / drivers / net / stmmac / norm_desc.c
index 51f4440ab98bddeb1521daa25ad27eb8641300fb..0dce90cb81247b68418d40a23a17a50a53fbac36 100644 (file)
@@ -174,22 +174,7 @@ static void ndesc_release_tx_desc(struct dma_desc *p)
 {
        int ter = p->des01.tx.end_ring;
 
-       /* clean field used within the xmit */
-       p->des01.tx.first_segment = 0;
-       p->des01.tx.last_segment = 0;
-       p->des01.tx.buffer1_size = 0;
-
-       /* clean status reported */
-       p->des01.tx.error_summary = 0;
-       p->des01.tx.underflow_error = 0;
-       p->des01.tx.no_carrier = 0;
-       p->des01.tx.loss_carrier = 0;
-       p->des01.tx.excessive_deferral = 0;
-       p->des01.tx.excessive_collisions = 0;
-       p->des01.tx.late_collision = 0;
-       p->des01.tx.heartbeat_fail = 0;
-       p->des01.tx.deferred = 0;
-
+       memset(p, 0, offsetof(struct dma_desc, des2));
        /* set termination field */
        p->des01.tx.end_ring = ter;
 }