2 * Beceem WiMax USB Driver.
3 * Copyright (c) 2010 Alexander von Gluck <kallisti5@unixzen.com>
4 * Distributed under the terms of the MIT license.
14 convertEndian(bool write
, uint32 uiByteCount
, uint32
* buffer
)
19 for (uiIndex
= 0; uiIndex
< (uiByteCount
/ sizeof(uint32
)); uiIndex
++) {
20 buffer
[uiIndex
] = htonl(buffer
[uiIndex
]);
23 for (uiIndex
= 0; uiIndex
< (uiByteCount
/ sizeof(uint32
)); uiIndex
++) {
24 buffer
[uiIndex
] = ntohl(buffer
[uiIndex
]);
31 CalculateHWChecksum(uint8_t* pu8Buffer
, uint32 u32Size
)
33 uint16_t u16CheckSum
= 0;
35 u16CheckSum
+= (uint8_t)~(*pu8Buffer
);