w35und: Kill dead HAL macros in wbhal_f.h
PATCH 1/7 w35und: Kill dead HAL macros in wbhal_f.h
Fixes an uninitialized variable access in _rx_iq_calibration_loop_winbond():
CC [M] drivers/staging/winbond/phy_calibration.o
drivers/staging/winbond/phy_calibration.c: In function ‘_rx_iq_calibration_loop_winbond’:
drivers/staging/winbond/phy_calibration.c:1138: warning: ‘val’ is used uninitialized in this function
--- drivers/staging/winbond/phy_calibration.c | 20 -------------------- drivers/staging/winbond/wbhal_f.h | 10 ---------- 2 files changed, 0 insertions(+), 30 deletions(-)
drivers/staging/winbond/phy_calibration.c +0 -20
@@ -1132,18 +1132,6 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 frePHY_DEBUG (("[CAL] -> [5]_rx_iq_calibration_loop()\n" ));PHY_DEBUG (("[CAL] ** factor = %d\n" , factor)); - -/* RF Control Override */ -hw_get_cxx_reg (phw_data,0x80 , &val); - val |=BIT (19 ); -hw_set_cxx_reg (phw_data,0x80 , val); - -/* RF_Ctrl */ -hw_get_cxx_reg (phw_data,0xE4 , &val); - val |=BIT (0 ); -hw_set_cxx_reg (phw_data,0xE4 , val); -PHY_DEBUG (("[CAL] ** RF_CTRL(0xE4) = 0x%08X" , val)); -hw_set_dxx_reg (phw_data,0x58 ,0x44444444 );/* IQ_Alpha */ /* b. */
@@ -1461,13 +1449,8 @@ void phy_calibration_winbond(struct hw_data *phw_data, u32 frequency)PHY_DEBUG (("[CAL] -> phy_calibration_winbond()\n" )); -/* 20040701 1.1.25.1000 kevin */ -hw_get_cxx_reg (phw_data,0x80 , &mac_ctrl); -hw_get_cxx_reg (phw_data,0xE4 , &rf_ctrl);hw_get_dxx_reg (phw_data,0x58 , &iq_alpha); - -_rxadc_dc_offset_cancellation_winbond (phw_data, frequency);/* _txidac_dc_offset_cancellation_winbond(phw_data); */ /* _txqdac_dc_offset_cacellation_winbond(phw_data); */
@@ -1482,11 +1465,8 @@ void phy_calibration_winbond(struct hw_data *phw_data, u32 frequency)PHY_DEBUG (("[CAL] MODE_CTRL (write) = 0x%08X\n" , reg_mode_ctrl));/* i. Set RFIC to "Normal mode" */ -hw_set_cxx_reg (phw_data,0x80 , mac_ctrl); -hw_set_cxx_reg (phw_data,0xE4 , rf_ctrl);hw_set_dxx_reg (phw_data,0x58 , iq_alpha); -/*********************************************************************/ phy_init_rf (phw_data);
drivers/staging/winbond/wbhal_f.h +0 -10
@@ -78,14 +78,4 @@ u32 hal_get_bss_pk_cnt(struct hw_data *hw_data);#define hal_get_time_count (_P) (_P->time_count / 10)#define hal_detect_error (_P) (_P->WbUsb.DetectCount) -/* The follow function is unused for IS89C35 */ -#define hal_disable_interrupt (_A) -#define hal_enable_interrupt (_A) -#define hal_get_interrupt_type (_A) -#define hal_get_clear_interrupt (_A)#define hal_ibss_disconnect (_A) (hal_stop_sync_bss(_A)) -#define hal_join_request_stop (_A) -#define hw_get_cxx_reg (_A, _B, _C) -#define hw_set_cxx_reg (_A, _B, _C) - -
Signature · 1 line
1.6.3.3
PATCH 2/7 w35und: Remove remaining typedef declarations
This patch removes remaining typedef declarations from the w35und driver. Most of them were unused so I just killed them off completely.
--- drivers/staging/winbond/TODO | 1 - drivers/staging/winbond/core.h | 2 +- drivers/staging/winbond/mac_structures.h | 17 --------- drivers/staging/winbond/mds.c | 34 +++++++++--------- drivers/staging/winbond/mds_f.h | 2 +- drivers/staging/winbond/mlme_s.h | 32 +----------------- drivers/staging/winbond/mlmetxrx.c | 5 --- drivers/staging/winbond/scan_s.h | 53 ------------------------------ drivers/staging/winbond/wb35rx.c | 2 +- drivers/staging/winbond/wb35tx.c | 2 +- drivers/staging/winbond/wbhal_s.h | 37 ++++++++++----------- 11 files changed, 41 insertions(+), 146 deletions(-)
drivers/staging/winbond/TODO +0 -1
@@ -3,7 +3,6 @@ TODO: - checkpatch cleanups - kerneldoc cleanups - fix severeCamelCaseInfestation - - remove typedefs - remove unused ioctls - use cfg80211 for regulatory stuff - fix 4k stack problems
drivers/staging/winbond/core.h +1 -1
@@ -18,7 +18,7 @@ struct wbsoft_priv {struct wb_local_para sLocalPara;/* Myself connected parameters */ -MLME_FRAME sMlmeFrame;/* connect to peerSTA parameters */ +struct mlme_frame sMlmeFrame;/* connect to peerSTA parameters */ struct wb35_mto_params sMtoPara;/* MTO_struct ... */ struct hw_data sHwData;/*For HAL */
drivers/staging/winbond/mac_structures.h +0 -17
@@ -177,23 +177,6 @@ enum enum_MMPDUResultCode} WB_MMPDURESULTCODE, *PWB_MMPDURESULTCODE; */ -/*=========================================================== -// enum_TxRate -- -// Define the transmission constants based on W89C32 MAC -// target specification. -//===========================================================*/ -typedef enum enum_TxRate { -TXRATE_1M =0 , -TXRATE_2MLONG =2 , -TXRATE_2MSHORT =3 , -TXRATE_55MLONG =4 , -TXRATE_55MSHORT =5 , -TXRATE_11MLONG =6 , -TXRATE_11MSHORT =7 , -TXRATE_AUTO =255 /* PD43 20021108 */ -}WB_TXRATE , *PWB_TXRATE ; - -#define RATE_BITMAP_1M 1#define RATE_BITMAP_2M 2#define RATE_BITMAP_5dot5M 5
drivers/staging/winbond/mds.c +17 -17
@@ -24,12 +24,12 @@ Mds_Destroy(struct wbsoft_priv *adapter)static void Mds_DurationSet (struct wbsoft_priv *adapter,struct wb35_descriptor *pDes,u8 *buffer) { -PT00_DESCRIPTOR pT00; -PT01_DESCRIPTOR pT01; +struct T00_descriptor *pT00; +struct T01_descriptor *pT01;u16 Duration, NextBodyLen, OffsetSize;u8 Rate, i;unsigned char CTS_on = false, RTS_on = false; -PT00_DESCRIPTOR pNextT00; +struct T00_descriptor *pNextT00;u16 BodyLen =0 ;unsigned char boGroupAddr = false;
@@ -39,9 +39,9 @@ static void Mds_DurationSet(struct wbsoft_priv *adapter, struct wb35_descriptorif (!Rate) Rate =1 ; - pT00 = (PT00_DESCRIPTOR )buffer; - pT01 = (PT01_DESCRIPTOR )(buffer+4 ); - pNextT00 = (PT00_DESCRIPTOR )(buffer+OffsetSize); + pT00 = (struct T00_descriptor *)buffer; + pT01 = (struct T01_descriptor *)(buffer+4 ); + pNextT00 = (struct T00_descriptor *)(buffer+OffsetSize);if ( buffer[DOT_11_DA_OFFSET +8 ] &0x1 )/* +8 for USB hdr */ boGroupAddr = true;
@@ -176,9 +176,9 @@ static void Mds_DurationSet(struct wbsoft_priv *adapter, struct wb35_descriptor/* ----end 20061009 add by anson's endian */ buffer += OffsetSize; - pT01 = (PT01_DESCRIPTOR )(buffer+4 ); + pT01 = (struct T01_descriptor *)(buffer+4 );if (i !=1 )/* The last fragment will not have the next fragment */ - pNextT00 = (PT00_DESCRIPTOR )(buffer+OffsetSize); + pNextT00 = (struct T00_descriptor *)(buffer+OffsetSize); }/*******************************************
@@ -219,7 +219,7 @@ static void Mds_DurationSet(struct wbsoft_priv *adapter, struct wb35_descriptor/* The function return the 4n size of usb pk */ static u16 Mds_BodyCopy (struct wbsoft_priv *adapter,struct wb35_descriptor *pDes,u8 *TargetBuffer) { -PT00_DESCRIPTOR pT00; +struct T00_descriptor *pT00;struct wb35_mds *pMds = &adapter->Mds;u8 *buffer;u8 *src_buffer;
@@ -234,9 +234,9 @@ static u16 Mds_BodyCopy(struct wbsoft_priv *adapter, struct wb35_descriptor *pDe SizeLeft = pDes->buffer_total_size; buf_index = pDes->buffer_start_index; - pT00 = (PT00_DESCRIPTOR )buffer; + pT00 = (struct T00_descriptor *)buffer;while (SizeLeft) { - pT00 = (PT00_DESCRIPTOR )buffer; + pT00 = (struct T00_descriptor *)buffer; CopySize = SizeLeft;if (SizeLeft > pDes->FragmentThreshold) { CopySize = pDes->FragmentThreshold;
@@ -303,7 +303,7 @@ static u16 Mds_BodyCopy(struct wbsoft_priv *adapter, struct wb35_descriptor *pDeif (SizeLeft) { buffer = TargetBuffer + Size;/* Get the next 4n start address */ memcpy ( buffer, TargetBuffer,32 );/* Copy 8B USB +24B 802.11 */ - pT00 = (PT00_DESCRIPTOR )buffer; + pT00 = (struct T00_descriptor *)buffer; pT00->T00_first_mpdu =0 ; }
@@ -322,8 +322,8 @@ static void Mds_HeaderCopy(struct wbsoft_priv *adapter, struct wb35_descriptor * {struct wb35_mds *pMds = &adapter->Mds;u8 *src_buffer = pDes->buffer_address[0 ];/* 931130.5.g */ -PT00_DESCRIPTOR pT00; -PT01_DESCRIPTOR pT01; +struct T00_descriptor *pT00; +struct T01_descriptor *pT01;u16 stmp;u8 i, ctmp1, ctmp2, ctmpf;u16 FragmentThreshold =CURRENT_FRAGMENT_THRESHOLD ;
@@ -333,9 +333,9 @@ static void Mds_HeaderCopy(struct wbsoft_priv *adapter, struct wb35_descriptor */* * Set USB header 8 byte */ - pT00 = (PT00_DESCRIPTOR )TargetBuffer; + pT00 = (struct T00_descriptor *)TargetBuffer; TargetBuffer +=4 ; - pT01 = (PT01_DESCRIPTOR )TargetBuffer; + pT01 = (struct T01_descriptor *)TargetBuffer; TargetBuffer +=4 ; pT00->value =0 ;/* Clear */
@@ -550,7 +550,7 @@ Mds_Tx(struct wbsoft_priv *adapter) }void -Mds_SendComplete (struct wbsoft_priv *adapter,PT02_DESCRIPTOR pT02) +Mds_SendComplete (struct wbsoft_priv *adapter,struct T02_descriptor *pT02) {struct wb35_mds *pMds = &adapter->Mds;struct hw_data *pHwData = &adapter->sHwData;
drivers/staging/winbond/mds_f.h +1 -1
@@ -7,7 +7,7 @@unsigned char Mds_initial (struct wbsoft_priv *adapter);void Mds_Destroy (struct wbsoft_priv *adapter);void Mds_Tx (struct wbsoft_priv *adapter); -void Mds_SendComplete (struct wbsoft_priv *adapter,PT02_DESCRIPTOR pt02); +void Mds_SendComplete (struct wbsoft_priv *adapter,struct T02_descriptor *pt02);void Mds_MpduProcess (struct wbsoft_priv *adapter,struct wb35_descriptor *prxdes);extern void DataDmp (u8 *pdata,u32 len,u32 offset);
drivers/staging/winbond/mlme_s.h +2 -30
@@ -132,7 +132,7 @@#define boMLME_IdleScanState (_BB_) (_BB_->wState == IDLE_SCAN)#define boMLME_FoundSTAinfo (_CC_) (_CC_->wState >= IDLE_SCAN) -typedef struct _MLME_FRAME { +struct mlme_frame {s8 *pMMPDU;u16 len;u8 DataType;
@@ -155,34 +155,6 @@ typedef struct _MLME_FRAME {u16 wNumRxMMPDUInMLME;/* Number of the Rx MMPDU */ u16 reserved_1;/* in MLME. */ /* excluding the discarded */ -}MLME_FRAME , *psMLME_FRAME; - -typedef struct _AUTHREQ { - -u8 peerMACaddr[MAC_ADDR_LENGTH ]; -u16 wAuthAlgorithm; -}MLME_AUTHREQ_PARA , *psMLME_AUTHREQ_PARA ; - -typedef struct _ASSOCREQ { -u8 PeerSTAAddr[MAC_ADDR_LENGTH ]; -u16 CapabilityInfo; -u16 ListenInterval; -} __attribute__ ((packed))MLME_ASSOCREQ_PARA , *psMLME_ASSOCREQ_PARA ; - -typedef struct _REASSOCREQ { -u8 NewAPAddr[MAC_ADDR_LENGTH ]; -u16 CapabilityInfo; -u16 ListenInterval; -} __attribute__ ((packed))MLME_REASSOCREQ_PARA , *psMLME_REASSOCREQ_PARA ; - -typedef struct _MLMECALLBACK { -u8 *psFramePtr; -u8 bResult; -}MLME_TXCALLBACK , *psMLME_TXCALLBACK ; - -typedef struct _RXDATA { -s32 FrameLength; -u8 __attribute__ ((packed)) *pbFramePtr; -} __attribute__ ((packed))RXDATA , *psRXDATA ; +};#endif
drivers/staging/winbond/mlmetxrx.c +0 -5
@@ -76,15 +76,10 @@ static void MLMEfreeMMPDUBuffer(struct wbsoft_priv *adapter, s8 *pData)void MLME_SendComplete (struct wbsoft_priv *adapter,u8 PacketID,unsigned char SendOK) { -MLME_TXCALLBACK TxCallback; -/* Reclaim the data buffer */ adapter->sMlmeFrame.len =0 ;MLMEfreeMMPDUBuffer (adapter, adapter->sMlmeFrame.pMMPDU); - - TxCallback.bResult =MLME_SUCCESS ; -/* Return resource */ adapter->sMlmeFrame.IsInUsed =PACKET_FREE_TO_USE ; }
drivers/staging/winbond/scan_s.h +0 -53
59 lines not on this page · raw message
drivers/staging/winbond/wb35rx.c +1 -1
@@ -160,7 +160,7 @@ static void Wb35Rx_Complete(struct urb *urb)u32 SizeCheck;u16 BulkLength;u32 RxBufferId; -R00_DESCRIPTOR R00 ; +struct R00_descriptor R00 ;/* Variable setting */ pWb35Rx->EP3vm_state =VM_COMPLETED ;
drivers/staging/winbond/wb35tx.c +1 -1
@@ -210,7 +210,7 @@ static void Wb35Tx_EP2VM_complete(struct urb * pUrb) {struct wbsoft_priv *adapter = pUrb->context;struct hw_data * pHwData = &adapter->sHwData; -T02_DESCRIPTOR T02 ,TSTATUS ; +struct T02_descriptor T02 ,TSTATUS ;struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;u32 * pltmp = (u32 *)pWb35Tx->EP2_buf;u32 i;
drivers/staging/winbond/wbhal_s.h +18 -19
@@ -105,7 +105,7 @@ enum {#define FLAG_BAND_RX_MASK 0x10000000/* Bit 28 */ -typedef struct _R00_DESCRIPTOR { +struct R00_descriptor {union {u32 value;#ifdef _BIG_ENDIAN_
@@ -126,9 +126,9 @@ typedef struct _R00_DESCRIPTOR { };#endif }; -} R00_DESCRIPTOR, *PR00_DESCRIPTOR; +}; -typedef struct _T00_DESCRIPTOR { +struct T00_descriptor {union {u32 value;#ifdef _BIG_ENDIAN_
@@ -157,9 +157,9 @@ typedef struct _T00_DESCRIPTOR { };#endif }; -} T00_DESCRIPTOR, *PT00_DESCRIPTOR; +}; -typedef struct _R01_DESCRIPTOR { +struct R01_descriptor {union {u32 value;#ifdef _BIG_ENDIAN_
@@ -208,9 +208,9 @@ typedef struct _R01_DESCRIPTOR { };#endif }; -} R01_DESCRIPTOR, *PR01_DESCRIPTOR; +}; -typedef struct _T01_DESCRIPTOR { +struct T01_descriptor {union {u32 value;#ifdef _BIG_ENDIAN_
@@ -245,9 +245,9 @@ typedef struct _T01_DESCRIPTOR { };#endif }; -} T01_DESCRIPTOR, *PT01_DESCRIPTOR; +}; -typedef struct _T02_DESCRIPTOR { +struct T02_descriptor {union {u32 value;#ifdef _BIG_ENDIAN_
@@ -290,7 +290,7 @@ typedef struct _T02_DESCRIPTOR { };#endif }; -}T02_DESCRIPTOR , *PT02_DESCRIPTOR ; +}; struct wb35_descriptor { /* Skip length = 8 DWORD *//* ID for descriptor ---, The field doesn't be cleard in the operation of Descriptor definition */
@@ -309,20 +309,20 @@ struct wb35_descriptor { /* Skip length = 8 DWORD *//* For R00 and T00 ------------------------------ */ union { -R00_DESCRIPTOR R00; -T00_DESCRIPTOR T00; +struct R00_descriptor R00; +struct T00_descriptor T00; };/* For R01 and T01 ------------------------------ */ union { -R01_DESCRIPTOR R01; -T01_DESCRIPTOR T01; +struct R01_descriptor R01; +struct T01_descriptor T01; };/* For R02 and T02 ------------------------------ */ union {u32 R02; -T02_DESCRIPTOR T02; +struct T02_descriptor T02; };/* For R03 and T03 ------------------------------ */
@@ -348,11 +348,10 @@ struct wb35_descriptor { /* Skip length = 8 DWORD */#define MAX_TXVGA_EEPROM 9/* How many word(u16) of EEPROM will be used for TxVGA */ #define MAX_RF_PARAMETER 32 -typedef struct _TXVGA_FOR_50 { +struct txvga_for_50 {u8 ChanNo;u8 TxVgaValue; -}TXVGA_FOR_50 ; - +};/* * ==============================================
@@ -479,7 +478,7 @@ struct hw_data {u8 TxVgaSettingInEEPROM[(((MAX_TXVGA_EEPROM *2 ) +3 ) & ~0x03 )];/* For EEPROM value */ u8 TxVgaFor24[16 ];/* Max is 14, 2 for alignment */ -TXVGA_FOR_50 TxVgaFor50[36 ];/* 35 channels in 5G. 35x2 = 70 byte. 2 for alignments */ +struct txvga_for_50 TxVgaFor50[36 ];/* 35 channels in 5G. 35x2 = 70 byte. 2 for alignments */ u16 Scan_Interval;u16 RESERVED6 ;
Signature · 1 line
1.6.3.3
PATCH 3/7 w35und: Kill unused scan_s.h header
The scan_s.h header is not actually used for anything so just kill it off.
--- drivers/staging/winbond/mds_s.h | 1 - drivers/staging/winbond/scan_s.h | 57 -------------------------------------- 2 files changed, 0 insertions(+), 58 deletions(-) delete mode 100644 drivers/staging/winbond/scan_s.h
drivers/staging/winbond/mds_s.h +0 -1
@@ -7,7 +7,6 @@#include "localpara.h" #include "mac_structures.h" -#include "scan_s.h" /* Preamble_Type, see <SFS-802.11G-MIB-203> */ enum {
drivers/staging/winbond/scan_s.h deleted +0 -57
57 lines not on this page · raw message
Signature · 1 line
1.6.3.3
PATCH 4/7 w35und: Remove dead code from mlme_s.h
There's bunch of macros in mlme_s.h that aren't used for anything. Kill them off.
--- drivers/staging/winbond/mlme_s.h | 116 -------------------------------------- 1 files changed, 0 insertions(+), 116 deletions(-)
drivers/staging/winbond/mlme_s.h +0 -116
@@ -8,112 +8,6 @@#include "mds_s.h" /* -* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -* Mlme.h -* Define the related definitions of MLME module -* -* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -*/ - -#define AUTH_REJECT_REASON_CHALLENGE_FAIL 1 - -/* the state of MLME module */ -#define INACTIVE 0x0 -#define IDLE_SCAN 0x1 - -/* the state of MLME/ESS module */ -#define STATE_1 0x2 -#define AUTH_REQ 0x3 -#define AUTH_WEP 0x4 -#define STATE_2 0x5 -#define ASSOC_REQ 0x6 -#define STATE_3 0x7 - -/* the state of MLME/IBSS module */ -#define IBSS_JOIN_SYNC 0x8 -#define IBSS_AUTH_REQ 0x9 -#define IBSS_AUTH_CHANLGE 0xa -#define IBSS_AUTH_WEP 0xb -#define IBSS_AUTH_IND 0xc -#define IBSS_STATE_2 0xd - - - -/* -* ========================================= -* depend on D5C(MAC timing control 03 register): -* MaxTxMSDULifeTime default 0x80000us -*/ -#define AUTH_FAIL_TIMEOUT 550 -#define ASSOC_FAIL_TIMEOUT 550 -#define REASSOC_FAIL_TIMEOUT 550 - -/* MLME task global CONSTANTS, STRUCTURE, variables */ - -/* ========================================= -* enum_ResultCode -- -* Result code returned from MLME to SME. -* ========================================= -*/ -#define MLME_SUCCESS 0/* follow spec. */ -#define INVALID_PARAMETERS 1/* Not following spec. */ -#define NOT_SUPPPORTED 2 -#define TIMEOUT 3 -#define TOO_MANY_SIMULTANEOUS_REQUESTS 4 -#define REFUSED 5 -#define BSS_ALREADY_STARTED_OR_JOINED 6 -#define TRANSMIT_FRAME_FAIL 7 -#define NO_BSS_FOUND 8 -#define RETRY 9 -#define GIVE_UP 10 - - -#define OPEN_AUTH 0 -#define SHARE_AUTH 1 -#define ANY_AUTH 2 -#define WPA_AUTH 3/* for WPA */ -#define WPAPSK_AUTH 4 -#define WPANONE_AUTH 5 -#ifdef _WPA2_ -#define WPA2_AUTH 6/* for WPA2 */ -#define WPA2PSK_AUTH 7 -#endif /* end def _WPA2_ */ - -/* -* ========================================= -* define the msg type of MLME module -* ========================================= -*/ - -/* from SME */ -#define MLMEMSG_AUTH_REQ 0x0b -#define MLMEMSG_DEAUTH_REQ 0x0c -#define MLMEMSG_ASSOC_REQ 0x0d -#define MLMEMSG_REASSOC_REQ 0x0e -#define MLMEMSG_DISASSOC_REQ 0x0f -#define MLMEMSG_START_IBSS_REQ 0x10 -#define MLMEMSG_IBSS_NET_CFM 0x11 - -/* from RX */ -#define MLMEMSG_RCV_MLMEFRAME 0x20 -#define MLMEMSG_RCV_ASSOCRSP 0x22 -#define MLMEMSG_RCV_REASSOCRSP 0x24 -#define MLMEMSG_RCV_DISASSOC 0x2b -#define MLMEMSG_RCV_AUTH 0x2c -#define MLMEMSG_RCV_DEAUTH 0x2d - - -/* from TX callback */ -#define MLMEMSG_TX_CALLBACK 0x40 -#define MLMEMSG_ASSOCREQ_CALLBACK 0x41 -#define MLMEMSG_REASSOCREQ_CALLBACK 0x43 -#define MLMEMSG_DISASSOC_CALLBACK 0x4a -#define MLMEMSG_AUTH_CALLBACK 0x4c -#define MLMEMSG_DEAUTH_CALLBACK 0x4d - -#define MLMEMSG_TIMEOUT 0x50 - -/* * ============================================== * Global data structures * ==============================================
@@ -122,16 +16,6 @@#define MAX_MMPDU_SIZE 1512#define MAX_NUM_RX_MMPDU 6 - -/* -* ============================================== -* MACRO -* ============================================== -*/ -#define boMLME_InactiveState (_AA_) (_AA_->wState == INACTIVE) -#define boMLME_IdleScanState (_BB_) (_BB_->wState == IDLE_SCAN) -#define boMLME_FoundSTAinfo (_CC_) (_CC_->wState >= IDLE_SCAN) -struct mlme_frame {s8 *pMMPDU;u16 len;
Signature · 1 line
1.6.3.3
PATCH 5/7 w35und: Inline mlme_s.h to core.h
The mlme_s.h header is included in one place. As the header is very small, just inline it to core.h.
--- drivers/staging/winbond/core.h | 35 +++++++++++++++++++++++++++++- drivers/staging/winbond/mlme_s.h | 44 -------------------------------------- 2 files changed, 34 insertions(+), 45 deletions(-) delete mode 100644 drivers/staging/winbond/mlme_s.h
drivers/staging/winbond/core.h +34 -1
@@ -1,12 +1,45 @@#ifndef __WINBOND_CORE_H#define __WINBOND_CORE_H +#include <linux/spinlock.h> #include <linux/wireless.h> +#include <linux/types.h> -#include "mlme_s.h" #include "wbhal_s.h" #include "mto.h" +#include "mac_structures.h" +#include "mds_s.h" + +#define MAX_NUM_TX_MMPDU 2 +#define MAX_MMPDU_SIZE 1512 +#define MAX_NUM_RX_MMPDU 6 + +struct mlme_frame { +s8 *pMMPDU; +u16 len; +u8 DataType; +u8 IsInUsed; + +spinlock_t MLMESpinLock; + +u8 TxMMPDU[MAX_NUM_TX_MMPDU ][MAX_MMPDU_SIZE ]; +u8 TxMMPDUInUse[(MAX_NUM_TX_MMPDU +3 ) & ~0x03 ]; + +u16 wNumTxMMPDU; +u16 wNumTxMMPDUDiscarded; + +u8 RxMMPDU[MAX_NUM_RX_MMPDU ][MAX_MMPDU_SIZE ]; +u8 SaveRxBufSlotInUse[(MAX_NUM_RX_MMPDU +3 ) & ~0x03 ]; + +u16 wNumRxMMPDU; +u16 wNumRxMMPDUDiscarded; + +u16 wNumRxMMPDUInMLME;/* Number of the Rx MMPDU */ +u16 reserved_1;/* in MLME. */ +/* excluding the discarded */ +}; +#define WBLINUX_PACKET_ARRAY_SIZE (ETHERNET_TX_DESCRIPTORS*4)#define WB_MAX_LINK_NAME_LEN 40
drivers/staging/winbond/mlme_s.h deleted +0 -44
44 lines not on this page · raw message
Signature · 1 line
1.6.3.3
PATCH 6/7 w35und: Remove unused spinlocks
This patch removes unused spinlocks from "struct mlme_frame" and "struct wbsoft_priv".
--- drivers/staging/winbond/core.h | 5 ----- drivers/staging/winbond/wbusb.c | 2 -- 2 files changed, 0 insertions(+), 7 deletions(-)
drivers/staging/winbond/core.h +0 -5
@@ -1,7 +1,6 @@#ifndef __WINBOND_CORE_H#define __WINBOND_CORE_H -#include <linux/spinlock.h> #include <linux/wireless.h> #include <linux/types.h>
@@ -21,8 +20,6 @@ struct mlme_frame {u8 DataType;u8 IsInUsed; -spinlock_t MLMESpinLock; -u8 TxMMPDU[MAX_NUM_TX_MMPDU ][MAX_MMPDU_SIZE ];u8 TxMMPDUInUse[(MAX_NUM_TX_MMPDU +3 ) & ~0x03 ];
@@ -57,8 +54,6 @@ struct wbsoft_priv {struct hw_data sHwData;/*For HAL */ struct wb35_mds Mds; -spinlock_t SpinLock; -atomic_t ThreadCount;u32 RxByteCount;
drivers/staging/winbond/wbusb.c +0 -2
@@ -783,8 +783,6 @@ static int wb35_probe(struct usb_interface *intf, priv = dev->priv; -spin_lock_init (&priv->SpinLock); - pWbUsb = &priv->sHwData.WbUsb; pWbUsb->udev = udev;
Signature · 1 line
1.6.3.3
PATCH 7/7 w35und: Remove unused fields from struct wbsoft_priv
This patch removes unused fields from "struct wbsoft_priv".
--- drivers/staging/winbond/core.h | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-)
drivers/staging/winbond/core.h +0 -7
@@ -42,9 +42,6 @@ struct mlme_frame {#define WB_MAX_LINK_NAME_LEN 40struct wbsoft_priv { -u32 adapterIndex;/* 20060703.4 Add for using padapterContext -global adapter point */ -struct wb_local_para sLocalPara;/* Myself connected parameters */
@@ -59,10 +56,6 @@ struct wbsoft_priv {u32 RxByteCount;u32 TxByteCount; -struct sk_buff *packet_return; -s32 netif_state_stop;/* 1: stop 0: normal */ -struct iw_statistics iw_stats; -u8 LinkName[WB_MAX_LINK_NAME_LEN ];bool enabled;
Signature · 1 line
1.6.3.3
Re: [PATCH 2/7] w35und: Remove remaining typedef declarations
In reply to Pekka EnbergQuoted 7 lines · Pekka Enberg
This patch removes remaining typedef declarations from the w35und driver. Most of them were unused so I just killed them off completely.
Cc Lars Lindley <[email protected]>Cc Pavel Machek <[email protected]>Cc Ruslan Pisarev <[email protected]>Signed-off-by Pekka Enberg <[email protected]>
ACK.
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Hi!
Quoted 6 lines
Fixes an uninitialized variable access in
_rx_iq_calibration_loop_winbond():CC [M]
drivers/staging/winbond/phy_calibration.o
drivers/staging/winbond/phy_calibration.c: In function ???_rx_iq_calibration_loop_winbond???:
drivers/staging/winbond/phy_calibration.c:1138: warning: ???val??? is used uninitialized in this function
Are you sure this is correct?
drivers/staging/winbond/phy_calibration.c u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre · line 1140
Quoted 10 lines
drivers/staging/winbond/phy_calibration.c +0
-6@@ -1132,18 +1132,6 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 frePHY_DEBUG (("[CAL] -> [5]_rx_iq_calibration_loop()\n" ));PHY_DEBUG (("[CAL] ** factor = %d\n" , factor)); - -/* RF Control Override */ -hw_get_cxx_reg (phw_data,0x80 , &val); - val |=BIT (19 ); -hw_set_cxx_reg (phw_data,0x80 , val); -
We pass pointer to val somewhere, set a bit, write it back. Seems ok to me...?
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Hi!
Quoted 6 lines
Fixes an uninitialized variable access in
_rx_iq_calibration_loop_winbond():CC [M]
drivers/staging/winbond/phy_calibration.o
drivers/staging/winbond/phy_calibration.c: In function ???_rx_iq_calibration_loop_winbond???:
drivers/staging/winbond/phy_calibration.c:1138: warning: ???val??? is used uninitialized in this function
Aha, I should have read the description.
Quoted 13 lines
Cc Pavel Machek <[email protected]>Cc Ruslan Pisarev <[email protected]>Signed-off-by Pekka Enberg <[email protected]>--- drivers/staging/winbond/phy_calibration.c | 20 -------------------- drivers/staging/winbond/wbhal_f.h | 10 ---------- 2 files changed, 0 insertions(+), 30 deletions(-)drivers/staging/winbond/phy_calibration.c +0
-0
drivers/staging/winbond/phy_calibration.c u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre · line 1140
Quoted 9 lines
drivers/staging/winbond/phy_calibration.c +0
-6@@ -1132,18 +1132,6 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 frePHY_DEBUG (("[CAL] -> [5]_rx_iq_calibration_loop()\n" ));PHY_DEBUG (("[CAL] ** factor = %d\n" , factor)); - -/* RF Control Override */ -hw_get_cxx_reg (phw_data,0x80 , &val); - val |=BIT (19 ); -hw_set_cxx_reg (phw_data,0x80 , val); -
These are macros that do nothing. ACK the patch.
Pavel
Quoted 17 lines
drivers/staging/winbond/wbhal_f.h +0
-10@@ -78,14 +78,4 @@ u32 hal_get_bss_pk_cnt(struct hw_data *hw_data);#define hal_get_time_count (_P) (_P->time_count / 10)#define hal_detect_error (_P) (_P->WbUsb.DetectCount) -/* The follow function is unused for IS89C35 */ -#define hal_disable_interrupt (_A) -#define hal_enable_interrupt (_A) -#define hal_get_interrupt_type (_A) -#define hal_get_clear_interrupt (_A)#define hal_ibss_disconnect (_A) (hal_stop_sync_bss(_A)) -#define hal_join_request_stop (_A) -#define hw_get_cxx_reg (_A, _B, _C) -#define hw_set_cxx_reg (_A, _B, _C) - -
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html