* style cleanup
* whitespace cleanup * no functional change
This commit is contained in:
@@ -12,8 +12,6 @@
|
|||||||
* ASIX AX88172/AX88772/AX88178 USB 2.0 Ethernet Driver
|
* ASIX AX88172/AX88772/AX88178 USB 2.0 Ethernet Driver
|
||||||
* (c) 2008 by S.Zharski, <[email protected]>
|
* (c) 2008 by S.Zharski, <[email protected]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef _USB_BECEEM_DEVICE_H_
|
#ifndef _USB_BECEEM_DEVICE_H_
|
||||||
#define _USB_BECEEM_DEVICE_H_
|
#define _USB_BECEEM_DEVICE_H_
|
||||||
|
|
||||||
|
|||||||
@@ -5,12 +5,13 @@
|
|||||||
*
|
*
|
||||||
* Based on GPL code developed by: Beceem Communications Pvt. Ltd
|
* Based on GPL code developed by: Beceem Communications Pvt. Ltd
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _USB_BECEEM_DEVICE_STRUCT_
|
#ifndef _USB_BECEEM_DEVICE_STRUCT_
|
||||||
#define _USB_BECEEM_DEVICE_STRUCT_
|
#define _USB_BECEEM_DEVICE_STRUCT_
|
||||||
|
|
||||||
|
|
||||||
#include "Driver.h"
|
#include "Driver.h"
|
||||||
|
|
||||||
|
|
||||||
typedef struct FirmwareInfo
|
typedef struct FirmwareInfo
|
||||||
{
|
{
|
||||||
void* pvMappedFirmwareAddress;
|
void* pvMappedFirmwareAddress;
|
||||||
@@ -154,27 +155,30 @@ typedef struct _VENDORCFG
|
|||||||
/*
|
/*
|
||||||
ARQ Enable ==> 0xddccbbaa
|
ARQ Enable ==> 0xddccbbaa
|
||||||
aa => 0x01 Enables ARQ
|
aa => 0x01 Enables ARQ
|
||||||
bb => 0x01 Disables the ARQ feature where MS combines ARQ FB and tranport
|
bb => 0x01 Disable the ARQ feature where MS combines ARQ FB and tranport
|
||||||
CID Bw Requests:
|
CID Bw Requests:
|
||||||
cc => 0x01 Enable ARQ FB BW req enh
|
cc => 0x01 Enable ARQ FB BW req enh
|
||||||
dd => 0th bit Disable ARQ Cut thru for Ack Generation
|
dd => 0th bit Disable ARQ Cut thru for Ack Generation
|
||||||
dd => 1st bit enables handling of partial nacking of PDUs, and retxing */
|
dd => 1st bit enable handling of partial nacking of PDUs, and retxing */
|
||||||
uint32 m_u32ArqEnable;
|
uint32 m_u32ArqEnable;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
HARQ Enable ==> 0xddccbbaa
|
HARQ Enable ==> 0xddccbbaa
|
||||||
aa => 0x01 Enables HARQ on Transport;
|
aa => 0x01 Enable HARQ on Transport;
|
||||||
bb => 0 bit Enables HARQ on Management
|
bb => 0 bit Enable HARQ on Management
|
||||||
bb => 1 bit Enables Out of order delivery on non-ARQ Rx ERTPS HARQ connections
|
bb => 1 bit Enable Out of order delivery on non-ARQ Rx ERTPS
|
||||||
bb => 2 bit Enables Out of order delivery on all non-ARQ RX HARQ connections
|
HARQ connections
|
||||||
dd => If set, used as the PDU purge timer on the non-ARQ Rx HARQ RT connections
|
bb => 2 bit Enable Out of order delivery on all non-ARQ RX
|
||||||
ERTPS, RTPS, UGS
|
HARQ connections
|
||||||
HARQ on Management only is NOT Permitted.
|
dd => If set, used as the PDU purge timer on the non-ARQ Rx
|
||||||
Eg. 0x0101 => Enables HARQ on Management and HARQ on Transport Connections
|
HARQ RT connections ERTPS, RTPS, UGS and HARQ on Management
|
||||||
Eg. 0x0301 => Enables HARQ on Management and HARQ on Transport Connections
|
only is NOT Permitted.
|
||||||
Enables out of deliver on the non-ARQ rx ERTPS HARQ connections
|
Examples:
|
||||||
Eg. 0x0501 => Enables HARQ on Management and HARQ on Transport Connections
|
0x0101 Enable HARQ on Management and HARQ on Transport Connections
|
||||||
Enables out of deliver on the non-ARQ RX HARQ connections */
|
0x0301 Enable HARQ on Management and HARQ on Transport Connections
|
||||||
|
Enable out of deliver on the non-ARQ rx ERTPS HARQ connections
|
||||||
|
0x0501 Enable HARQ on Management and HARQ on Transport Connections
|
||||||
|
Enable out of deliver on the non-ARQ RX HARQ connections */
|
||||||
uint32 m_u32HarqEnable;
|
uint32 m_u32HarqEnable;
|
||||||
|
|
||||||
// EEPROM Param Location
|
// EEPROM Param Location
|
||||||
@@ -230,7 +234,7 @@ typedef struct _VENDORCFG
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
PhyParameter2
|
PhyParameter2
|
||||||
[16] Set to 1 for accurate CINR measurement on noise limited scenarios
|
[16] Set 1 for accurate CINR measurement on noise limited scenarios
|
||||||
If set to 1, note the BTS Link Adaptation tables may need change
|
If set to 1, note the BTS Link Adaptation tables may need change
|
||||||
[15:8] Backoff in 0.25dBm steps in Transmit power to be
|
[15:8] Backoff in 0.25dBm steps in Transmit power to be
|
||||||
applied for an uncalibrated unit */
|
applied for an uncalibrated unit */
|
||||||
@@ -513,5 +517,5 @@ volatile bool nvmFlashRaw;
|
|||||||
// GPIO LED bitmap
|
// GPIO LED bitmap
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _USB_BECEEM_DEVICE_STRUCT_
|
|
||||||
|
|
||||||
|
#endif // _USB_BECEEM_DEVICE_STRUCT_
|
||||||
|
|||||||
@@ -98,6 +98,7 @@
|
|||||||
#define STATE_IDLEEXIT 0x80 // IDLEMODE_EXIT
|
#define STATE_IDLEEXIT 0x80 // IDLEMODE_EXIT
|
||||||
#define STATE_HALT 0x00 // SHUTDOWN_EXIT
|
#define STATE_HALT 0x00 // SHUTDOWN_EXIT
|
||||||
|
|
||||||
|
|
||||||
const uint8 kInvalidRequest = 0xff;
|
const uint8 kInvalidRequest = 0xff;
|
||||||
|
|
||||||
// version of bcm driver this was based upon + end .1
|
// version of bcm driver this was based upon + end .1
|
||||||
|
|||||||
@@ -5,34 +5,35 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ByteOrder.h>
|
|
||||||
|
|
||||||
|
#include <ByteOrder.h>
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
convertEndian(bool write, uint32 uiByteCount, uint32* buffer)
|
convertEndian(bool write, uint32 uiByteCount, uint32* buffer)
|
||||||
{
|
{
|
||||||
uint32 uiIndex = 0;
|
uint32 uiIndex = 0;
|
||||||
|
|
||||||
if( write == true ) {
|
if (write == true) {
|
||||||
for(uiIndex = 0; uiIndex < (uiByteCount/sizeof(uint32)); uiIndex++) {
|
for (uiIndex = 0; uiIndex < (uiByteCount / sizeof(uint32)); uiIndex++) {
|
||||||
buffer[uiIndex] = htonl(buffer[uiIndex]);
|
buffer[uiIndex] = htonl(buffer[uiIndex]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for(uiIndex = 0; uiIndex < (uiByteCount/sizeof(uint32)); uiIndex++) {
|
for (uiIndex = 0; uiIndex < (uiByteCount / sizeof(uint32)); uiIndex++) {
|
||||||
buffer[uiIndex] = ntohl(buffer[uiIndex]);
|
buffer[uiIndex] = ntohl(buffer[uiIndex]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint16_t
|
uint16_t
|
||||||
CalculateHWChecksum(uint8_t* pu8Buffer, uint32 u32Size)
|
CalculateHWChecksum(uint8_t* pu8Buffer, uint32 u32Size)
|
||||||
{
|
{
|
||||||
uint16_t u16CheckSum=0;
|
uint16_t u16CheckSum = 0;
|
||||||
while(u32Size--) {
|
while (u32Size--) {
|
||||||
u16CheckSum += (uint8_t)~(*pu8Buffer);
|
u16CheckSum += (uint8_t)~(*pu8Buffer);
|
||||||
pu8Buffer++;
|
pu8Buffer++;
|
||||||
}
|
}
|
||||||
return u16CheckSum;
|
return u16CheckSum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "Driver.h"
|
#include "Driver.h"
|
||||||
|
|
||||||
|
|
||||||
void convertEndian(bool write, uint32 uiByteCount, uint32* buffer);
|
void convertEndian(bool write, uint32 uiByteCount, uint32* buffer);
|
||||||
uint16_t CalculateHWChecksum(uint8_t* pu8Buffer, uint32 u32Size);
|
uint16_t CalculateHWChecksum(uint8_t* pu8Buffer, uint32 u32Size);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user