Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb62f3ea authored by Pekka Enberg's avatar Pekka Enberg Committed by Greg Kroah-Hartman
Browse files

Staging: w35und: typedef removal



This patch removes some typedefs from the driver code. I also removed some
unused structs I spotted while removing the typedefs.

Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Acked-by: default avatarPavel Machek <pavel@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0c59dbaa
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -51,12 +51,6 @@ static int retryrate_rec[MTO_MAX_DATA_RATE_LEVELS];//this record the retry rate
static int PeriodTotalTxPkt = 0;
static int PeriodTotalTxPktRetry = 0;

typedef struct
{
	s32 RSSI;
	u8  TxRate;
}RSSI2RATE;

static u8 boSparseTxTraffic = false;

void MTO_Init(MTO_FUNC_INPUT);
+8 −8
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ static u16 Wb35Rx_indicate(struct ieee80211_hw *hw)
	struct wbsoft_priv *priv = hw->priv;
	phw_data_t pHwData = &priv->sHwData;
	DESCRIPTOR	RxDes;
	PWB35RX	pWb35Rx = &pHwData->Wb35Rx;
	struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;
	u8 *		pRxBufferAddress;
	u16		PacketSize;
	u16		stmp, BufferSize, stmp2 = 0;
@@ -162,7 +162,7 @@ static void Wb35Rx_Complete(struct urb *urb)
	struct ieee80211_hw *hw = urb->context;
	struct wbsoft_priv *priv = hw->priv;
	phw_data_t pHwData = &priv->sHwData;
	PWB35RX		pWb35Rx = &pHwData->Wb35Rx;
	struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;
	u8 *		pRxBufferAddress;
	u32		SizeCheck;
	u16		BulkLength;
@@ -239,7 +239,7 @@ static void Wb35Rx(struct ieee80211_hw *hw)
{
	struct wbsoft_priv *priv = hw->priv;
	phw_data_t pHwData = &priv->sHwData;
	PWB35RX	pWb35Rx = &pHwData->Wb35Rx;
	struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;
	u8 *	pRxBufferAddress;
	struct urb *urb = pWb35Rx->RxUrb;
	int	retv;
@@ -302,7 +302,7 @@ void Wb35Rx_start(struct ieee80211_hw *hw)
{
	struct wbsoft_priv *priv = hw->priv;
	phw_data_t pHwData = &priv->sHwData;
	PWB35RX pWb35Rx = &pHwData->Wb35Rx;
	struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;

	// Allow only one thread to run into the Wb35Rx() function
	if (atomic_inc_return(&pWb35Rx->RxFireCounter) == 1) {
@@ -315,7 +315,7 @@ void Wb35Rx_start(struct ieee80211_hw *hw)
//=====================================================================================
static void Wb35Rx_reset_descriptor(  phw_data_t pHwData )
{
	PWB35RX pWb35Rx = &pHwData->Wb35Rx;
	struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;
	u32	i;

	pWb35Rx->ByteReceived = 0;
@@ -331,7 +331,7 @@ static void Wb35Rx_reset_descriptor( phw_data_t pHwData )

unsigned char Wb35Rx_initial(phw_data_t pHwData)
{
	PWB35RX pWb35Rx = &pHwData->Wb35Rx;
	struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;

	// Initial the Buffer Queue
	Wb35Rx_reset_descriptor( pHwData );
@@ -342,7 +342,7 @@ unsigned char Wb35Rx_initial(phw_data_t pHwData)

void Wb35Rx_stop(phw_data_t pHwData)
{
	PWB35RX pWb35Rx = &pHwData->Wb35Rx;
	struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;

	// Canceling the Irp if already sends it out.
	if (pWb35Rx->EP3vm_state == VM_RUNNING) {
@@ -356,7 +356,7 @@ void Wb35Rx_stop(phw_data_t pHwData)
// Needs process context
void Wb35Rx_destroy(phw_data_t pHwData)
{
	PWB35RX pWb35Rx = &pHwData->Wb35Rx;
	struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;

	do {
		msleep(10); // Delay for waiting function enter 940623.1.a
+2 −6
Original line number Diff line number Diff line
@@ -15,8 +15,7 @@
//====================================
// Internal variable for module
//====================================
typedef struct _WB35RX
{
struct wb35_rx {
	u32			ByteReceived;// For calculating throughput of BulkIn
	atomic_t		RxFireCounter;// Does Wb35Rx module fire?

@@ -42,7 +41,4 @@ typedef struct _WB35RX

	int		EP3VM_status;
	u8 *	pDRx;

} WB35RX, *PWB35RX;

};
+11 −11
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
unsigned char
Wb35Tx_get_tx_buffer(phw_data_t pHwData, u8 **pBuffer)
{
	PWB35TX pWb35Tx = &pHwData->Wb35Tx;
	struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;

	*pBuffer = pWb35Tx->TxBuffer[0];
	return true;
@@ -29,7 +29,7 @@ static void Wb35Tx_complete(struct urb * pUrb)
{
	struct wbsoft_priv *adapter = pUrb->context;
	phw_data_t	pHwData = &adapter->sHwData;
	PWB35TX		pWb35Tx = &pHwData->Wb35Tx;
	struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
	PMDS		pMds = &adapter->Mds;

	printk("wb35: tx complete\n");
@@ -65,7 +65,7 @@ static void Wb35Tx_complete(struct urb * pUrb)
static void Wb35Tx(struct wbsoft_priv *adapter)
{
	phw_data_t	pHwData = &adapter->sHwData;
	PWB35TX		pWb35Tx = &pHwData->Wb35Tx;
	struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
	u8		*pTxBufferAddress;
	PMDS		pMds = &adapter->Mds;
	struct urb *	pUrb = (struct urb *)pWb35Tx->Tx4Urb;
@@ -116,7 +116,7 @@ static void Wb35Tx(struct wbsoft_priv *adapter)
void Wb35Tx_start(struct wbsoft_priv *adapter)
{
	phw_data_t pHwData = &adapter->sHwData;
	PWB35TX pWb35Tx = &pHwData->Wb35Tx;
	struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;

	// Allow only one thread to run into function
	if (atomic_inc_return(&pWb35Tx->TxFireCounter) == 1) {
@@ -128,7 +128,7 @@ void Wb35Tx_start(struct wbsoft_priv *adapter)

unsigned char Wb35Tx_initial(phw_data_t pHwData)
{
	PWB35TX pWb35Tx = &pHwData->Wb35Tx;
	struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;

	pWb35Tx->Tx4Urb = usb_alloc_urb(0, GFP_ATOMIC);
	if (!pWb35Tx->Tx4Urb)
@@ -147,7 +147,7 @@ unsigned char Wb35Tx_initial(phw_data_t pHwData)
//======================================================
void Wb35Tx_stop(phw_data_t pHwData)
{
	PWB35TX pWb35Tx = &pHwData->Wb35Tx;
	struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;

	// Trying to canceling the Trp of EP2
	if (pWb35Tx->EP2vm_state == VM_RUNNING)
@@ -167,7 +167,7 @@ void Wb35Tx_stop(phw_data_t pHwData)
//======================================================
void Wb35Tx_destroy(phw_data_t pHwData)
{
	PWB35TX pWb35Tx = &pHwData->Wb35Tx;
	struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;

	// Wait for VM stop
	do {
@@ -189,7 +189,7 @@ void Wb35Tx_destroy(phw_data_t pHwData)
void Wb35Tx_CurrentTime(struct wbsoft_priv *adapter, u32 TimeCount)
{
	phw_data_t pHwData = &adapter->sHwData;
	PWB35TX pWb35Tx = &pHwData->Wb35Tx;
	struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
	unsigned char Trigger = false;

	if (pWb35Tx->TxTimer > TimeCount)
@@ -210,7 +210,7 @@ static void Wb35Tx_EP2VM_complete(struct urb * pUrb)
	struct wbsoft_priv *adapter = pUrb->context;
	phw_data_t	pHwData = &adapter->sHwData;
	T02_DESCRIPTOR	T02, TSTATUS;
	PWB35TX		pWb35Tx = &pHwData->Wb35Tx;
	struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
	u32 *		pltmp = (u32 *)pWb35Tx->EP2_buf;
	u32		i;
	u16		InterruptInLength;
@@ -257,7 +257,7 @@ static void Wb35Tx_EP2VM_complete(struct urb * pUrb)
static void Wb35Tx_EP2VM(struct wbsoft_priv *adapter)
{
	phw_data_t	pHwData = &adapter->sHwData;
	PWB35TX pWb35Tx = &pHwData->Wb35Tx;
	struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
	struct urb *	pUrb = (struct urb *)pWb35Tx->Tx2Urb;
	u32 *	pltmp = (u32 *)pWb35Tx->EP2_buf;
	int		retv;
@@ -293,7 +293,7 @@ static void Wb35Tx_EP2VM(struct wbsoft_priv *adapter)
void Wb35Tx_EP2VM_start(struct wbsoft_priv *adapter)
{
	phw_data_t pHwData = &adapter->sHwData;
	PWB35TX pWb35Tx = &pHwData->Wb35Tx;
	struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;

	// Allow only one thread to run into function
	if (atomic_inc_return(&pWb35Tx->TxResultCount) == 1) {
+2 −4
Original line number Diff line number Diff line
@@ -18,8 +18,7 @@
//====================================


typedef struct _WB35TX
{
struct wb35_tx {
	// For Tx buffer
	u8	TxBuffer[ MAX_USB_TX_BUFFER_NUMBER ][ MAX_USB_TX_BUFFER ];

@@ -43,7 +42,6 @@ typedef struct _WB35TX

	u32	TxFillCount; // 20060928
	u32	TxTimer; // 20060928 Add if sending packet not great than 13

} WB35TX, *PWB35TX;
};

#endif
Loading