Skip to contentSkip to conversation

w35und: remove some more unneccessary code

PATCH Pavel Machek 2 participants 5 messages Apr 19, 2008 – Apr 25, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

I can still associate and ping...

drivers/net/wireless/winbond/winbondport/bssdbase.c +0 -31
index ffa6f40..e69de29 100644
@@ -1,31 +0,0 @@
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//	bssdbase.c
-//		manage BSS descriptor data base
-//	history :
-//
-//	Description:
-//		BSS descriptor data base will store the information of the stations at the
-//		surrounding environment. The first entry( psBSS(0) ) will not be used and the
-//		second one( psBSS(1) ) will be used for the broadcast address.
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-
-#include "os_common.h"
-
-//Get an empty BSS descriptor entry
-u16 wBSSGetEntry(PWB32_ADAPTER Adapter)
-{
-	BUG(); /* foo */
-}
-
-u16 wBSSsearchMACaddr(PWB32_ADAPTER Adapter, u8 *pbMacAddr, u8 band)
-{
-	BUG(); /* foo */
-}
-
-// NOTE: return(1) means 'EQ', return(0) means 'NEQ'
-unsigned char boCmpMacAddr( PUCHAR adr1, PUCHAR adr2 )
-{
-	return OS_MEMORY_COMPARE( adr1, adr2, MAC_ADDR_LENGTH );	/* foo */
-}
drivers/net/wireless/winbond/winbondport/ds_tkip.c +0 -16
index de4cc7b..e69de29 100644
@@ -1,16 +0,0 @@
-#include "os_common.h"
-
-void
-_append_data( PUCHAR pData, u16 size, tkip_t *p )
-{
-	BUG();
-}
-
-
-void
-Mds_MicFill(  void* p1,  void* p2,  PUCHAR XmitBufAddress )
-{
-	BUG();
-}
-
-
drivers/net/wireless/winbond/winbondport/knl.c +0 -27
index 442435c..e69de29 100644
@@ -1,27 +0,0 @@
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//	knl.c
-//		Kernel module
-//	history -- 01/14/03' created 
-//
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-#include "os_common.h"
-
-void vKNL_StateMachine(PWB32_ADAPTER Adapter, const K_TRANS** psStateMachineTable,
-                       u16 wStateData, pK_MSG psMsg)
-{
-	const K_TRANS* psStateTableEntry;
-	
-	if (wStateData == K_NULL_STATE)
-		return;
-	psStateTableEntry = psStateMachineTable[wStateData];
-	while ((psStateTableEntry->wMsg != K_NULL_MSG) && (psStateTableEntry->wMsg != psMsg->wMsgType))
-		psStateTableEntry++;
-	if (psStateTableEntry->rActionFunction != K_NULL_ROUTINE)
-		(*psStateTableEntry->rActionFunction)(Adapter, psMsg);
-}
-
-void vProc_Null(PWB32_ADAPTER Adapter, pK_MSG psMsg)
-{
-}
-
-
drivers/net/wireless/winbond/winbondport/knl.h +0 -33
index 98f3bd2..e69de29 100644
@@ -1,33 +0,0 @@
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//	knl.h
-//  	Definitions of the kernel 
-//	history -- 01/14/03' created 
-//
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-
-typedef struct K_MSG
-{
-	u16 wMsgType;
-	u16 wInstance;
-	void *pMsgPtr;
-} K_MSG, *pK_MSG;
-
-typedef void (* K_Trans_Proc)(PWB32_ADAPTER, pK_MSG);
-
-typedef struct K_TRANS
-{
-	u16			wMsg;
-	K_Trans_Proc	rActionFunction;
-} K_TRANS;
-
-#define KNLMSG_RESET					(250)
-#define K_NULL_MSG                      (u16) 0
-#define K_IDLE_STATE					(u16) 0
-#define K_NULL_STATE                    (u16) (~0)
-#define K_NULL_ROUTINE                  (K_Trans_Proc) 0
-
-
-void vKNL_StateMachine(PWB32_ADAPTER, const K_TRANS** psStateMachineTable,
-                       u16 wStateData, pK_MSG psMsg);
-void vProc_Null(PWB32_ADAPTER, pK_MSG);
drivers/net/wireless/winbond/winbondport/linux/new_wireless.c +0 -67

67 lines not on this page · raw message

drivers/net/wireless/winbond/winbondport/mds.c +0 -1
index 97a978a..743a2f2 100644
@@ -223,7 +223,6 @@ Mds_SendComplete(PADAPTER Adapter, PT02_
 	u8	PacketId = (u8)pT02->T02_Tx_PktID;
 	unsigned char	SendOK = TRUE;
 	u8	RetryCount, TxRate;
-	K_MSG	sSmeMsg;
 	u16	wIndex, wReasonCode;
 
 
drivers/net/wireless/winbond/winbondport/mlme_assoc.c +0 -46

46 lines not on this page · raw message

drivers/net/wireless/winbond/winbondport/mlme_auth.c +0 -9
index a387bba..e69de29 100644
@@ -1,9 +0,0 @@
-// Authentication.c - this processes and creates authentication messages
-// PE23 20021023 update algorithm
-// the authentication frame body structure contains space for the first 3
-// elements of each authentication frame (algorithm type, sequence # and status
-// code). The following bits will have, if present, algorithm specific infor-
-// mation (like a challenge sequence)
-
-#include "os_common.h"
-
drivers/net/wireless/winbond/winbondport/mlme_f.h +0 -48

48 lines not on this page · raw message

drivers/net/wireless/winbond/winbondport/mlmetask.c +0 -10
index aaaf88d..e69de29 100644
@@ -1,10 +0,0 @@
-//NOTE: Check if the order of necessary operations and state modificaton in every
-//		action is correct --WKCHEN 4/17/03'
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//	MlmeModule.c
-//		MLME module
-//	history -- 01/14/03' created 
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-#include "os_common.h"
drivers/net/wireless/winbond/winbondport/mlmetxrx.c +1 -113

132 lines not on this page · raw message

drivers/net/wireless/winbond/winbondport/rxisr.c +0 -425

433 lines not on this page · raw message

drivers/net/wireless/winbond/winbondport/scan_f.h +0 -14
index 833b835..e69de29 100644
@@ -1,14 +0,0 @@
-//
-// SCAN task global functions
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-//Global Functions
-extern void Scan_Init(PWB32_ADAPTER Adapter);
-extern void Scan_ResetPara(PWB32_ADAPTER Adapter);
-extern void Scan_Entry(PWB32_ADAPTER Adapter, K_MSG* psScanMsg);
-extern void SCAN_Halt(PWB32_ADAPTER Adapter);
-extern void Scan_Stop(PWB32_ADAPTER Adapter);
-extern void vScanTimerStop(PWB32_ADAPTER Adapter);
-extern void Scan_SetScanChanRange(PWB32_ADAPTER Adapter, psSCAN_REQ_PARA pScanPara);
drivers/net/wireless/winbond/winbondport/scan_probe.c +0 -22
index 16bc366..e69de29 100644
@@ -1,22 +0,0 @@
-//============================================================================
-//  PROBE.C -
-//
-//  Description:
-//
-//  Revision history:
-//  --------------------------------------------------------------------------
-//           200209    UN20 Frank
-//                     Initial release
-//           200211    PD43 Austin Liu
-//                     Modify for HW-MAC version
-//
-//  Copyright (c) 2002 Winbond Electronics Corp. All rights reserved.
-//============================================================================
-#include "os_common.h"
-
-//============================================================================
-int SendProbeRequest(PWB32_ADAPTER Adapter, struct SSID_Element *SSID)
-{
-	BUG();
-}
-
drivers/net/wireless/winbond/winbondport/sme_f.h +0 -45

45 lines not on this page · raw message

drivers/net/wireless/winbond/winbondport/wbhal.c +0 -11
index 0622ecb..439023c 100644
@@ -1020,7 +1020,6 @@ void hal_led_control(  void* S1,  phw_da
 			pHwData->NullPacketCount += TimeInterval;
 			if( pHwData->NullPacketCount >= DEFAULT_NULL_PACKET_COUNT )
 			{
-				SME_SEND_NULL_PACKET( Adapter,PWR_ACTIVE );
 				pHwData->NullPacketCount = 0;
 			}
 		}
@@ -1095,16 +1094,6 @@ void hal_set_radio_mode( phw_data_t pHwD
 	Wb35Reg_Write( pHwData, 0x0824, pWb35Reg->M24_MacControl );
 }
 
-void hal_descriptor_indicate(phw_data_t pHwData, PDESCRIPTOR pRxDes)
-{
-	PADAPTER Adapter = pHwData->Adapter;
-
-	if (!pHwData->IsInitOK)
-		return;
-
-	{ Mds_MpduProcess(Adapter, pRxDes); }	/* Ouch, MpduProcess has three parameters but we only pass two?! */
-}
-
 u8 hal_get_antenna_number(  phw_data_t pHwData )
 {
 	PWB35REG	pWb35Reg = &pHwData->Wb35Reg;
drivers/net/wireless/winbond/winbondport/wbndis.c +0 -1
index 3bab529..e69de29 100644
@@ -1 +0,0 @@
-/* No more Window$ c0d3 */
drivers/net/wireless/winbond/winbondport/wbndis51.c +0 -1
index db124b9..e69de29 100644
@@ -1 +0,0 @@
-/* We don't need no windows code */
drivers/net/wireless/winbond/winbondport/wbndis_entry.c +0 -1
index 7cae451..e69de29 100644
@@ -1 +0,0 @@
-/* No windows code needed...? */
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#1 lore raw

Hi!

I committed all your previous works, plus I created a branch for your code, because You went another way than us. (linux subdir etc.). I have a question: what type of RF chip do You have with the w89c35d? I have an Airoha 2230, and Im courius if You have the same.

KK

#2 lore raw

Hi!

Quoted 2 lines

I committed all your previous works, plus I created a branch for your code, because You went another way than us. (linux subdir etc.).

Ok, thanks!

Quoted 2 lines

I have a question: what type of RF chip do You have with the w89c35d? I have an Airoha 2230, and Im courius if You have the same.

Do you have a good place where to put printk?
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#3 lore raw

linux/wb35reg.c, at line 566. I attached a little patch, generated with svn di. It makes the stuff compilable again out-of-tree too. I would also recommend merging the linux/ subdir into the base and destroying the 0 byte files and os_common.h.
My card outputs "16", which is Airoha AL2230
(http://www.airoha.com.tw/AL2230.htm).

KK

---

sysdef.h (working copy) renamed from sysdef.h (revision 27) +0 -5
Index: linux/sysdef.h
===================================================================
@@ -49,7 +49,6 @@
 #include "../scan_s.h"
 #include "../mds_s.h"
 #include "../mlme_s.h"
-#include "../roam_s.h"
 #include "../bssdscpt.h"
 #include "../sme_api.h"
 #include "../gl_80211.h"
@@ -58,9 +57,6 @@
 #include "../wbhal_s.h"
 #include "teststa.h"
 
-
-#include "../wpa/wb_wpa.h" // 20060802
-
 #include "../adapter.h"
 
 #include "../mlme_mib.h"
@@ -71,7 +67,6 @@
 #include "../mds_f.h"
 #include "../bss_f.h"
 #include "../mlmetxrx_f.h"
-#include "../roam_f.h"
 #include "../mto_f.h"
 #include "../wbhal_f.h"
 #include "../wblinux_f.h"
wb35reg.c (working copy) renamed from wb35reg.c (revision 27) +4 -0
Index: linux/wb35reg.c
===================================================================
@@ -562,6 +562,10 @@
        // 16V AL2230, 17 - AL7230, 18 - AL2230S
        // 32 Reserved
        // 33 - W89RF242(TxVGA 0~19), 34 - W89RF242(TxVGA 0~34)
+
+       //See above for type
+       printk("RF chip is %i\n", pWb35Reg->EEPROMPhyType);
+
        if (pWb35Reg->EEPROMPhyType != RF_DECIDE_BY_INF) {
                if( (pWb35Reg->EEPROMPhyType == RF_MAXIM_2825)  ||
                        (pWb35Reg->EEPROMPhyType == RF_MAXIM_2827)      ||
Makefile (working copy) renamed from Makefile (revision 27) +1 -2
Index: linux/Makefile
===================================================================
@@ -11,17 +11,13 @@
 
        KERNELDIR := /lib/modules/$(shell uname -r)/build
        PWD := $(shell pwd)
-       WPA_DIR=../wpa
 
 obj-m := w35und.o
 
-w35und-objs := new_wireless.o wbusb.o wb35reg.o wb35rx.o wb35tx.o\
+w35und-objs := wbusb.o wb35reg.o wb35rx.o wb35tx.o\
        ../bssdbase.o ../ds_tkip.o ../knl.o ../mds.o ../mlme_assoc.o

../mlme_auth.o ../mlmetask.o ../mlmetxrx.o \
- ../mto.o ../phy_calibration.o ../reg.o ../roamtask.o
../rxisr.o ../scan_probe.o ../scantask.o \
- ../sme_api.o ../smetask.o ../wbhal.o ../wblinux.o \
- $(WPA_DIR)/eap.o $(WPA_DIR)/4Way.o $(WPA_DIR)/Adapter_Bridge.o
$(WPA_DIR)/STLFunction.o \
- $(WPA_DIR)/passphrase.o $(WPA_DIR)/prf.o $(WPA_DIR)/rc4.o
$(WPA_DIR)/sha1.o $(WPA_DIR)/hmac_sha1.o \
- $(WPA_DIR)/hmac_md5.o $(WPA_DIR)/md5.o $(WPA_DIR)/aes.o
$(WPA_DIR)/aes_wrap.o
+ ../mto.o ../phy_calibration.o ../reg.o ../rxisr.o ../scan_probe.o \
+ ../sme_api.o ../wbhal.o ../wblinux.o

all:

        $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
@@ -30,5 +26,4 @@
        cp w35und.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless/
 clean:
        rm -f *.o *~ .*.cmd *.ko *.mod.c ../*.o ../*~ ../.*.cmd

../*.ko ../*.mod.c
- rm -f $(WPA_DIR)/*.o $(WPA_DIR)/*~ $(WPA_DIR)/.*.cmd $(WPA_DIR)/*.mod.c
rm -rf Module*.symvers .tmp_versions

#4 lore raw

Hi!

Quoted 2 lines

linux/wb35reg.c, at line 566. I attached a little patch, generated with svn di. It makes the stuff compilable again out-of-tree too. I

I tried to apply, but it diff complained about malformed part, so I took just the hwtype patch.

Quoted 4 lines

would also recommend merging the linux/ subdir into the base and destroying the 0 byte files and os_common.h.
My card outputs "16", which is Airoha AL2230
(http://www.airoha.com.tw/AL2230.htm).

My card outputs 16, too.
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html