staging: vt6655: card.c, srom.c, vntwifi.c: Code cleanup
PATCH 3/3 staging: vt6655: card.c, srom.c, vntwifi.c: Code cleanup
This patch removes commented code, useless comments, blank lines and fix coding style of the headers of functions.
--- drivers/staging/vt6655/card.c | 115 +--------------------- drivers/staging/vt6655/srom.c | 198 ++++++-------------------------------- drivers/staging/vt6655/vntwifi.h | 35 ------- 3 files changed, 36 insertions(+), 312 deletions(-)
drivers/staging/vt6655/card.c +6 -109
@@ -58,9 +58,6 @@#include "country.h" #include "channel.h" -/*--------------------- Static Definitions -------------------------*/ - -//static int msglevel =MSG_LEVEL_DEBUG; static int msglevel =MSG_LEVEL_INFO ;#define C_SIFS_A 16 // micro sec.
@@ -88,16 +85,9 @@ static unsigned char abyDefaultSuppRatesA[] = {WLAN_EID_SUPP_RATES, 8, 0x0C, 0x1//1M, 2M, 5M, 11M, static unsigned char abyDefaultSuppRatesB[] = {WLAN_EID_SUPP_RATES ,4 ,0x02 ,0x04 ,0x0B ,0x16 }; - -/*--------------------- Static Variables --------------------------*/ - -const unsigned short cwRXBCNTSFOff[MAX_RATE ] = {17 ,17 ,17 ,17 ,34 ,23 ,17 ,11 ,8 ,5 ,4 ,3 }; - -/*--------------------- Static Functions --------------------------*/ -static void s_vCaculateOFDMRParameter(
@@ -107,22 +97,8 @@ s_vCaculateOFDMRParameter(unsigned char *pbyRsvTime ); - -/*--------------------- Export Functions --------------------------*/ -/* -* Description: Caculate TxRate and RsvTime fields for RSPINF in OFDM mode. -* -* Parameters: -* In: -* wRate - Tx Rate -* byPktType - Tx Packet type -* Out: -* pbyTxRate - pointer to RSPINF TxRate field -* pbyRsvTime - pointer to RSPINF RsvTime field -* -* Return Value: none -* +* Caculate TxRate and RsvTime fields for RSPINF in OFDM mode */ static void
@@ -225,19 +201,8 @@ s_vCaculateOFDMRParameter ( } } - -/* -* Description: Set RSPINF -* -* Parameters: -* In: -* pDevice - The adapter to be set -* Out: -* none -* -* Return Value: None. -* +* Set RSPINF */ static void
@@ -351,51 +316,8 @@ s_vSetRSPINF (PSDevice pDevice, CARD_PHY_TYPE ePHYType, void *pvSupportRateIEs,MACvSelectPage0 (pDevice->PortOffset); } -/*--------------------- Export Functions --------------------------*/ -/* -* Description: Card Send packet function -* -* Parameters: -* In: -* pDeviceHandler - The adapter to be set -* pPacket - Packet buffer pointer -* ePktType - Packet type -* uLength - Packet length -* Out: -* none -* -* Return Value: true if succeeded; false if failed. -* -*/ -/* -bool CARDbSendPacket (void *pDeviceHandler, void *pPacket, CARD_PKT_TYPE ePktType, unsigned int uLength) -{ -PSDevice pDevice = (PSDevice) pDeviceHandler; -if (ePktType == PKT_TYPE_802_11_MNG) { -return TXbTD0Send(pDevice, pPacket, uLength); -} else if (ePktType == PKT_TYPE_802_11_BCN) { -return TXbBeaconSend(pDevice, pPacket, uLength); -} if (ePktType == PKT_TYPE_802_11_DATA) { -return TXbTD1Send(pDevice, pPacket, uLength); -} - -return (true); -} -*/ - - -/* -* Description: Get Card short preamble option value -* -* Parameters: -* In: -* pDevice - The adapter to be set -* Out: -* none -* -* Return Value: true if short preamble; otherwise false -* +* Get Card short preamble option value */ bool CARDbIsShortPreamble (void *pDeviceHandler) {
@@ -407,16 +329,7 @@ bool CARDbIsShortPreamble (void *pDeviceHandler) }/* -* Description: Get Card short slot time option value -* -* Parameters: -* In: -* pDevice - The adapter to be set -* Out: -* none -* -* Return Value: true if short slot time; otherwise false -* +* Get Card short slot time option value */ bool CARDbIsShorSlotTime (void *pDeviceHandler) {
@@ -424,7 +337,6 @@ bool CARDbIsShorSlotTime (void *pDeviceHandler)return (pDevice->bShortSlotTime); } -/* * Description: Update IFS *
@@ -445,11 +357,9 @@ bool CARDbSetPhyParameter (void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigneunsigned char bySIFS =0 ;unsigned char byDIFS =0 ;unsigned char byData; -// PWLAN_IE_SUPP_RATES pRates = NULL; PWLAN_IE_SUPP_RATES pSupportRates = (PWLAN_IE_SUPP_RATES ) pvSupportRateIEs;PWLAN_IE_SUPP_RATES pExtSupportRates = (PWLAN_IE_SUPP_RATES ) pvExtSupportRateIEs; -//Set SIFS, DIFS, EIFS, SlotTime, CwMin if (ePHYType ==PHY_TYPE_11A ) {if (pSupportRates ==NULL ) {
@@ -644,20 +554,9 @@ bool CARDbUpdateTSF (void *pDeviceHandler, unsigned char byRxRate, QWORD qwBSSTireturn (true); } -/* -* Description: Set NIC TSF counter for first Beacon time -* Get NEXTTBTT from adjusted TSF and Beacon Interval -* -* Parameters: -* In: -* pDevice - The adapter to be set. -* wBeaconInterval - Beacon Interval -* Out: -* none -* -* Return Value: true if succeed; otherwise false -* +* Set NIC TSF counter for first Beacon time +* Get NEXTTBTT from adjusted TSF and Beacon Interval */ bool CARDbSetBeaconPeriod (void *pDeviceHandler,unsigned short wBeaconInterval) {
@@ -698,8 +597,6 @@ bool CARDbSetBeaconPeriod (void *pDeviceHandler, unsigned short wBeaconInterval)return (true); } - -/* * Description: Card Stop Hardware Tx *
drivers/staging/vt6655/srom.c +30 -168
298 lines not on this page · raw message
drivers/staging/vt6655/vntwifi.h +0 -35
@@ -35,7 +35,6 @@#include "card.h" #include "wpa2.h" -/*--------------------- Export Definitions -------------------------*/ #define RATE_1M 0#define RATE_2M 1#define RATE_5M 2
@@ -91,7 +90,6 @@ typedef enum tagWMAC_ENCRYPTION_MODE { }WMAC_ENCRYPTION_MODE , *PWMAC_ENCRYPTION_MODE ;// Pre-configured Mode (from XP) - typedef enum tagWMAC_CONFIG_MODE { WMAC_CONFIG_ESS_STA = 0,
@@ -101,8 +99,6 @@ typedef enum tagWMAC_CONFIG_MODE { }WMAC_CONFIG_MODE , *PWMAC_CONFIG_MODE ; - - typedef enum tagWMAC_POWER_MODE { WMAC_POWER_CAM,
@@ -129,17 +125,6 @@ typedef enum tagWMAC_POWER_MODE {#define VNTWIFIbIsESS (wCapInfo) \ WLAN_GET_CAP_INFO_ESS(wCapInfo) \ - -/*--------------------- Export Classes ----------------------------*/ - -/*--------------------- Export Variables --------------------------*/ - - -/*--------------------- Export Types ------------------------------*/ - - -/*--------------------- Export Functions --------------------------*/ - void VNTWIFIvSetIBSSParameter ( void *pMgmtHandle,
@@ -218,8 +203,6 @@ VNTWIFIvGetNextBSS (void **pvNextBSS ); - - void VNTWIFIvUpdateNodeTxCounter( void *pMgmtHandle,
@@ -229,7 +212,6 @@ VNTWIFIvUpdateNodeTxCounter(unsigned char *pbyTxFailCount ); - void VNTWIFIvGetTxRate( void *pMgmtHandle,
@@ -239,13 +221,6 @@ VNTWIFIvGetTxRate(unsigned char *pbyCCKBasicRate, unsigned char *pbyOFDMBasicRate ); -/* -bool -VNTWIFIbInit( -void *pAdapterHandler, -void **pMgmtHandler -); -*/ unsigned char VNTWIFIbyGetKeyCypher(
@@ -253,9 +228,6 @@ VNTWIFIbyGetKeyCypher(bool bGroupKey ); - - - bool VNTWIFIbSetPMKIDCache ( void *pMgmtObject,
@@ -296,12 +268,5 @@ VNTWIFIbChannelSwitch(void *pMgmtObject, unsigned char byNewChannel ); -/* -bool -VNTWIFIbRadarPresent( -void *pMgmtObject, -unsigned char byChannel -); -*/ #endif //__VNTWIFI_H__
Signature · 1 line
1.7.4.4
Quoted 15 lines · Marcos Paulo de Souza
This patch removes commented code, useless comments, blank lines and fix coding style of the headers of functions.
Signed-off-by Marcos Paulo de Souza <[email protected]>Cc Greg Kroah-Hartman <[email protected]>---
/*
- * Description: Test if bits off in eeprom
- *
- * Parameters:
- * In:- * dwIoBase - I/O base address - * byContntOffset - address of EEPROM - * byTestBits - bits to test
Quoted 7 lines
- * Out:
- * none
- *
- * Return Value: true if all test bits off; otherwise false
- *
+ * Test if bits off in eeprom
*/
Some of these seems sort of useful. It might be better to change them to doc-book format instead of deleting them:
/**
* SROMbIsRegBitsOff() - Test if bits off in eeprom
* @dwIoBase: I/O base address
* @byContntOffset: Address of EEPROM
* @byTestBits: Bits to test
*
* Returns true if all test bits off; otherwise false. */
There is a howto in Documentation/kernel-doc-nano-HOWTO.txt.
regards,
dan carpenter
Quoted 36 lines · Dan Carpenter
Quoted 15 lines · Marcos Paulo de Souza
This patch removes commented code, useless comments, blank lines and fix coding style of the headers of functions.
Signed-off-by Marcos Paulo de Souza <[email protected]>Cc Greg Kroah-Hartman <[email protected]>---
/*
- * Description: Test if bits off in eeprom
- *
- * Parameters:
- * In:- * dwIoBase - I/O base address - * byContntOffset - address of EEPROM - * byTestBits - bits to testQuoted 7 lines
- * Out:
- * none
- *
- * Return Value: true if all test bits off; otherwise false
- *
+ * Test if bits off in eeprom
*/Some of these seems sort of useful. It might be better to change them to doc-book format instead of deleting them:
/**
*SROMbIsRegBitsOff()- Test if bits off in eeprom
* @dwIoBase: I/O base address
* @byContntOffset: Address of EEPROM
* @byTestBits: Bits to test
*
* Returns true if all test bits off; otherwise false. */
Quoted 1 line
There is a howto in
Documentation/kernel-doc-nano-HOWTO.txt.
Thanks for the suggestion Dan. I will do it for these 3 patches.
Greg, please delte this patches, I will sent them again.
Regards,
Marcos Paulo de Souza
Quoted 4 lines
regards,
dan carpenter
Quoted 37 lines · Marcos Paulo de Souza
Quoted 36 lines · Dan Carpenter
Quoted 15 lines · Marcos Paulo de Souza
This patch removes commented code, useless comments, blank lines and fix coding style of the headers of functions.
Signed-off-by Marcos Paulo de Souza <[email protected]>Cc Greg Kroah-Hartman <[email protected]>---
/*
- * Description: Test if bits off in eeprom
- *
- * Parameters:
- * In:- * dwIoBase - I/O base address - * byContntOffset - address of EEPROM - * byTestBits - bits to testQuoted 7 lines
- * Out:
- * none
- *
- * Return Value: true if all test bits off; otherwise false
- *
+ * Test if bits off in eeprom
*/Some of these seems sort of useful. It might be better to change them to doc-book format instead of deleting them:
/**
*SROMbIsRegBitsOff()- Test if bits off in eeprom
* @dwIoBase: I/O base address
* @byContntOffset: Address of EEPROM
* @byTestBits: Bits to test
*
* Returns true if all test bits off; otherwise false. */
Quoted 5 lines
Quoted 1 line
There is a howto in
Documentation/kernel-doc-nano-HOWTO.txt.Thanks for the suggestion Dan. I will do it for these 3 patches.
Greg, please delte this patches, I will sent them again.
Ugh, "which" patches are you referring to?
I see lots here from you, with different back-and-forth from Dan, and I don't really see an easy way to tell which thread from which, given that you didn't thread the patches using git-send-email.
So, I've dropped all patches from you from my patch queue, can you please resend the ones that I am supposed to apply that have been reviewed by Dan as being acceptable?
thanks,
greg k-h