From: Pavel Machek <pavel@ucw.cz>
To: kernel list <linux-kernel@vger.kernel.org>,
kaszak@gmail.com, lcostantino@gmail.com,
linux-wireless@vger.kernel.org
Subject: w35und: some more code removal
Date: Mon, 5 May 2008 22:09:27 +0200 [thread overview]
Message-ID: <20080505200927.GA7273@elf.ucw.cz> (raw)
Remove some more unneccessary code
---
commit 5b251c6315097d5f9ab5d30c43813fe74c1db4e4
tree 5ca21582f55886d5f0249f7ca139687450024581
parent e44ccdabb97fa4a6cdc1a95adcad7bcc469d0c16
author Pavel <pavel@amd.ucw.cz> Mon, 05 May 2008 22:08:51 +0200
committer Pavel <pavel@amd.ucw.cz> Mon, 05 May 2008 22:08:51 +0200
drivers/net/wireless/winbond/winbondport/mds.c | 46 +++-----------------
drivers/net/wireless/winbond/winbondport/wblinux.c | 8 +--
2 files changed, 11 insertions(+), 43 deletions(-)
diff --git a/drivers/net/wireless/winbond/winbondport/mds.c b/drivers/net/wireless/winbond/winbondport/mds.c
index ad09d0b..44f3b61 100644
--- a/drivers/net/wireless/winbond/winbondport/mds.c
+++ b/drivers/net/wireless/winbond/winbondport/mds.c
@@ -46,10 +46,8 @@ Mds_Tx(PADAPTER Adapter)
unsigned char BufferFilled = FALSE, MICAdd = 0;
- //931130.5.a
if (pMds->TxPause)
return;
- // 20060717.3 Add
if (!hal_driver_init_OK(pHwData))
return;
@@ -195,9 +193,7 @@ Mds_SendComplete(PADAPTER Adapter, PT02_
RetryCount = (u8)pT02->T02_MPDU_Cnt;
if (pT02->value & FLAG_ERROR_TX_MASK) {
SendOK = FALSE;
- #ifdef _PE_DTO_DUMP_
- WBDEBUG(("Mds Tx Fail[%d] = %8x\n", PacketId, pT02->value ));
- #endif
+
if (pT02->T02_transmit_abort || pT02->T02_out_of_MaxTxMSDULiftTime) {
//retry error
pHwData->dto_tx_retry_count += (RetryCount+1);
@@ -226,25 +222,6 @@ Mds_SendComplete(PADAPTER Adapter, PT02_
MTO_SetTxCount(Adapter, TxRate, RetryCount);
}
- // Return result
- if( pMds->TxDesFrom[ PacketId ] == 3 )
- { BUG(); }
- else if( pMds->TxDesFrom[ PacketId ] == 2 )
- { }
- else if( pMds->TxDesFrom[ PacketId ] == 1 )
- { BUG(); }
-
- //The next 802.1x message callback after 2 MIC error occur within 60s
- //TODO: ?? Don't care whether the next 802.1x message is transmitted successfully??
- if (pMds->TxInfo[PacketId] == 1) {
- // It needs to send disassoc. frame no matter the connection is still
- // alive or not(AP disassoc. us).
- #ifdef _PE_STATE_DUMP_
- WBDEBUG(("!!Countermeasure, disassoc !!\n"));
- #endif
- pMds->TxInfo[PacketId] = 0;
- WARN_ON(1);
- }
// Clear send result buffer
pMds->TxResult[ PacketId ] = 0;
} else
@@ -391,37 +368,31 @@ Mds_BodyCopy(PADAPTER Adapter, PDESCRIPT
stmp &= ~0x03;//4n Alignment
Size += stmp;// Current 4n offset of mpdu
- while( CopySize )
- {
+ while (CopySize) {
// Copy body
src_buffer = pDes->buffer_address[buf_index];
CopyLeft = CopySize;
- if( CopySize >= pDes->buffer_size[buf_index] )
- {
+ if (CopySize >= pDes->buffer_size[buf_index]) {
CopyLeft = pDes->buffer_size[buf_index];
// Get the next buffer of descriptor
buf_index++;
buf_index %= MAX_DESCRIPTOR_BUFFER_INDEX;
- }
- else
- {
+ } else {
PUCHAR pctmp = pDes->buffer_address[buf_index];
pctmp += CopySize;
pDes->buffer_address[buf_index] = pctmp;
pDes->buffer_size[buf_index] -= CopySize;
}
- memcpy( buffer, src_buffer, CopyLeft );
+ memcpy(buffer, src_buffer, CopyLeft);
buffer += CopyLeft;
CopySize -= CopyLeft;
}
// 931130.5.n
- if( pMds->MicAdd )
- {
- if( !SizeLeft ) //931130.5.o
- {
+ if (pMds->MicAdd) {
+ if (!SizeLeft) {
pMds->MicWriteAddress[ pMds->MicWriteIndex ] = buffer - pMds->MicAdd;
pMds->MicWriteSize[ pMds->MicWriteIndex ] = pMds->MicAdd;
pMds->MicAdd = 0;
@@ -436,8 +407,7 @@ Mds_BodyCopy(PADAPTER Adapter, PDESCRIPT
}
// Does it need to generate the new header for next mpdu?
- if( SizeLeft )
- {
+ if (SizeLeft) {
buffer = TargetBuffer + Size; // Get the next 4n start address
memcpy( buffer, TargetBuffer, 32 );//Copy 8B USB +24B 802.11
pT00 = (PT00_DESCRIPTOR)buffer;
diff --git a/drivers/net/wireless/winbond/winbondport/wblinux.c b/drivers/net/wireless/winbond/winbondport/wblinux.c
index 3e6a0d3..d2b86cb 100644
--- a/drivers/net/wireless/winbond/winbondport/wblinux.c
+++ b/drivers/net/wireless/winbond/winbondport/wblinux.c
@@ -256,8 +256,7 @@ #endif
}
while(FALSE);
- switch( InitStep )
- {
+ switch (InitStep) {
case 5:
case 4:
case 3: Mds_Destroy( Adapter );
@@ -270,11 +269,10 @@ #endif
return FALSE;
}
-// 20060802
void WBLINUX_ConnectStatus(PADAPTER Adapter, u32 flag)
{
- PWBLINUX pWbLinux = &Adapter->WbLinux;
+ PWBLINUX pWbLinux = &Adapter->WbLinux;
- pWbLinux->LinkStatus = flag; // OS_DISCONNECTED or OS_CONNECTED
+ pWbLinux->LinkStatus = flag; // OS_DISCONNECTED or OS_CONNECTED
}
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next reply other threads:[~2008-05-05 20:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-05 20:09 Pavel Machek [this message]
2008-05-05 20:17 ` w35und: some more code removal Johannes Berg
2008-05-05 20:21 ` Pavel Machek
2008-05-05 20:23 ` Johannes Berg
2008-05-05 21:13 ` Pavel Machek
2008-05-05 21:26 ` Johannes Berg
2008-05-06 7:28 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080505200927.GA7273@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=kaszak@gmail.com \
--cc=lcostantino@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.