Stefan Schuermans commited on 2012-03-19 23:32:26
Showing 1 changed files, with 2 additions and 0 deletions.
... | ... |
@@ -99,6 +99,8 @@ int eth_rx(void **pptr, unsigned int *psz) |
99 | 99 |
*/ |
100 | 100 |
void eth_tx(const void *ptr, unsigned int sz) |
101 | 101 |
{ |
102 |
+ while(sz & 3) /* pad with zeros up to next 4 byte boundary */ |
|
103 |
+ ((unsigned char *)ptr)[sz++] = 0; |
|
102 | 104 |
eth_ptr[8] = (unsigned int)ptr; /* start */ |
103 | 105 |
eth_ptr[9] = (unsigned int)ptr + sz; /* end */ |
104 | 106 |
eth_ptr[10] = 1; /* set flag */ |
105 | 107 |