wifi edimax ew 7106 pcmcia

Robert roby na rgportal.com
Pátek Březen 19 10:52:43 CET 2004


ano, dekuji za upozorneni

precetl jsem readme  ale pri make vypisuje:


rgportal:~/rtl8180_1.5 # make
gcc -O6 -Wall -DMODULE -D__KERNEL__ -DLINUX -I 
/usr/src/linux2.4.21-199-default/
include/ -DRTL_IO_MAP -DRTL_LITTLE_ENDIAN -DRTL_ACT_AS_STA 
-DRTL8180_DRV_ON_PC -
DENABLE_DBG_PRINT -c -o r8180_pci_init.o r8180_pci_init.c
In file included from /usr/include/linux/module.h:20,
                  from r8180_pci_init.c:21:
/usr/include/asm/module.h:54:2: #error unknown processor family
In file included from /usr/include/linux/mm.h:205,
                  from /usr/include/linux/skbuff.h:26,
                  from /usr/include/linux/netdevice.h:147,
                  from r8180_pci_init.c:29:
/usr/include/linux/page-flags.h:119: error: `CONFIG_X86_L1_CACHE_SHIFT' 
undeclar
ed here (not in a function)
/usr/include/linux/page-flags.h:119: error: requested alignment is not a 
constan
t
In file included from r8180_pci_init.c:29:
/usr/include/linux/netdevice.h:165: error: `CONFIG_X86_L1_CACHE_SHIFT' 
undeclare
d here (not in a function)
/usr/include/linux/netdevice.h:165: error: requested alignment is not a 
constant
In file included from /usr/include/linux/irq.h:19,
                  from /usr/include/asm/hardirq.h:6,
                  from /usr/include/linux/interrupt.h:10,
                  from /usr/include/linux/netdevice.h:489,
                  from r8180_pci_init.c:29:
/usr/include/asm/irq.h:16:25: irq_vectors.h: není souborem ani adresářem
In file included from /usr/include/asm/hardirq.h:6,
                  from /usr/include/linux/interrupt.h:10,
                  from /usr/include/linux/netdevice.h:489,
                  from r8180_pci_init.c:29:
/usr/include/linux/irq.h:67: error: `CONFIG_X86_L1_CACHE_SHIFT' 
undeclared here
(not in a function)
/usr/include/linux/irq.h:67: error: requested alignment is not a constant
/usr/include/linux/irq.h:69: error: `NR_IRQS' undeclared here (not in a 
function
)
In file included from /usr/include/linux/irq.h:71,
                  from /usr/include/asm/hardirq.h:6,
                  from /usr/include/linux/interrupt.h:10,
                  from /usr/include/linux/netdevice.h:489,
                  from r8180_pci_init.c:29:
/usr/include/asm/hw_irq.h:28: error: `NR_IRQS' undeclared here (not in a 
functio                                             n)
/usr/include/asm/hw_irq.h:31: error: `NR_IRQS' undeclared here (not in a 
functio                                             n)
In file included from /usr/include/linux/interrupt.h:10,
                  from /usr/include/linux/netdevice.h:489,
                  from r8180_pci_init.c:29:
/usr/include/asm/hardirq.h:13: error: `CONFIG_X86_L1_CACHE_SHIFT' 
undeclared her                                             e (not in a 
function)
/usr/include/asm/hardirq.h:13: error: requested alignment is not a constant
In file included from r8180_pci_init.c:40:
r8180_type.h:62:1: warning: "ENABLE_DBG_PRINT" redefined
<command line>:11:1: warning: this is the location of the previous 
definition
In file included from r8180_pci_init.c:40:
r8180_type.h:149: error: conflicting types for `timer_t'
/usr/include/linux/types.h:31: error: previous declaration of `timer_t'
make: *** [r8180_pci_init.o] Error 1

mam zdrojaky jadra, binutils, gcc a neco porad zrejme zapominam udelat .

v priloze posilam readme a makefile kdybyste nekdo videl to co ja pres 
svou mladisvou nerozvaznost nevidim (instaluji ovladac hw uplne poprve)

dekuji
Robert Gritz
------------- další část ---------------
RTL8180 Linux Driver version 1.4

  - Support Client mode for either infrastructure or adhoc mode
  - Support AP mode

RTL8180 Linux Driver version 1.5

  - Turn on Dynamic Carrier Sense Function.


===============================================================================================
< Component >
The driver is composed of several parts:
    (1)source code
         driver module initialization and interface between rtl8180 driver and system call.
         r8180_pci_init.c    driver module initialization and register/unregister network device
         r8180_pci_init.h    include file
         r8180_if.c          interface between rtl8180 driver and system call
         r8180_if.h          include file
         r8180_type.h        type definition for rtl8180 driver
         r8180_export.h      exported function name from rtl8180 driver

    (2)object code
         rtl8180 driver
         priv_part.o         rtl8180 driver object code

    (3)Default driver
         rtl8180_24x.o       default driver module compiled in kernel 2.4.18.

    (4)Makefile
         PLEASE SPECIFY INCLUDEPATH CORRECTLY ACCORDING TO YOUR LINUX ENVIRONMENT.
         FOR EXAMPLE, " INCLUDEPATH=-I /usr/src/linux-2.4.18-3/include/ " in RedHat7.3.
         FOR EXAMPLE, " INCLUDEPATH=-I /usr/src/linux-2.4.18-14/include/ " in RedHat8.0.

    (5)wlanup/wlandown
         simple script file to activate/shut_down wireless lan.





< Installation >
Please try to load linux_24x.o first by "insmod -f rtl8180_24x.o".
If it doesn't work, you are suggested to compile loadable driver module following the steps as:

	(0)Make sure the C-compile version. Run "gcc -v".
       If gcc version is 2.xx, use release driver RTL8180_24x_RH73.zip.
       If gcc version is 3.xx, use release driver RTL8180_24x_RH90.zip.

	(1)Modify macros in Makefile.
         KERNELRELEASE - represent kernel release version
         IO_FLAGS - pci I/O space mapping
         ENDIAN_FLAGS - big/little endian
         OP_MODE_FLAGS - Operation on either AP or Client mode
         DRV_FLAGS - Driver debugging messge ...etc.

    (2)Check pci module initialization and system call interfaces in the provided source code,
       r8180_pci_init.c ....etc.

	(3)Run 'make' to generate new driver module.

        (4)Run 'make install' to install new driver module.

	(5)Refer to < Set wireless lan MIBs > and modify script files, 
             wlanup/wlandown, to set Wireless LAN specific parameters.
             Run wlanup/wlandown to activate/shut_down wireless lan.
             Usage:
               ./wlanup {ap|infra|adhoc}
               ./wlandown
             Note:
               - "./wlanup ap" works if OP_MODE_FLAGS is assigned RTL_ACT_AS_AP in Makefile.
               - "./wlanup {infra|adhoc}" works if OP_MODE_FLAGS is assigned RTL_ACT_AS_AP
                 in Makefile.




< Set wireless lan MIBs >
This driver uses Wireless Extension as an interface allowing you to set
Wireless LAN specific parameters.
Current driver supports "iwpriv", manipulate driver private ioctls, to set MIBs.

        iwpriv wlan0 wlan_para [parameters]=[val]
where

        parameter explaination      [parameters]        [val] constraints
        -----------------------     -------------       ------------------
        Set beacon interval         bcnint              {20~1000} msec
        Set channel number          channel             {1~14}
        Set basic rates             basicrates          {bit0 = 1Mbps, bit1 = 2Mbps, bit2 = 5.5Mbps, bit3 = 11 Mbps}
        Set operational rates       oprates             {bit0 = 1Mbps, bit1 = 2Mbps, bit2 = 5.5Mbps, bit3 = 11 Mbps}
        Set authentication type     authtype            {opensystem, sharedkey, both<only AP mode>}
        Set desired ssid to scan    ssid2scan           {0~z, less than 32 characters}
        Set RTS threshold           rtsthres            {256~2304}
        Set fragment threshold      fragthres           {256~2304}
        Set preamble mode           preamble            {short,long,auto}
        Set network type            networktype         {infra,adhoc,auto}
        Set WEP mode                wepmode             {off,wep40,wep104}
        Set WEP default key ID      wepdkeyid           {0~3}
        Set 1st WEP40 key value     wepkey40_1          {0~f, total 10 characters}
        Set 2st WEP40 key value     wepkey40_2          {0~f, total 10 characters}
        Set 3st WEP40 key value     wepkey40_3          {0~f, total 10 characters}
        Set 4st WEP40 key value     wepkey40_4          {0~f, total 10 characters}
        Set 1st WEP104 key value    wepkey104_1         {0~f, total 26 characters}
        Set 2st WEP104 key value    wepkey104_2         {0~f, total 26 characters}
        Set 3st WEP104 key value    wepkey104_3         {0~f, total 26 characters}
        Set 4st WEP104 key value    wepkey104_4         {0~f, total 26 characters}
        Set AP ssid                 ssid                {0~z, less than 32 characters}
        Set Mac address             macaddr             {0~f, total 6 characters}
        Set DTIM period             dtimperiod          {1~255}
        Set hidden AP               hiddenAP            {true,false}
        Set mac filter policy       addmac              {0~f, total 6 characters}
        Delete mac filter policy    delmac              {0~f, total 6 characters}
        Set deny mac filter policy  denymacaddr         {0~f, total 6 characters}
        Delete deny mac filter      deldenymacaddr      {0~f, total 6 characters}
        Set sta expired time        expired_time        {1~100000} *10 msec
        Set rate adaptive           autorate            {true,false}
        Print help message          help

For example:

        iwpriv wlan0 wlan_para bcnint=100
        iwpriv wlan0 wlan_para channel=1
        iwpriv wlan0 wlan_para basicrates=0xf
        iwpriv wlan0 wlan_para oprates=0xf
        iwpriv wlan0 wlan_para authtype=opensystem
        iwpriv wlan0 wlan_para ssid2scan=testssid
        iwpriv wlan0 wlan_para fragthres=512
        iwpriv wlan0 wlan_para preamble=long
        iwpriv wlan0 wlan_para wepmode=off
        iwpriv wlan0 wlan_para wepdkeyid=0
        iwpriv wlan0 wlan_para wepkey40_1=0123456789
        iwpriv wlan0 wlan_para wepkey104_1=01234567890123456789012345
        iwpriv wlan0 wlan_para networktype=infra
        iwpriv wlan0 wlan_para ssid=apssid
        iwpriv wlan0 wlan_para macaddr=00e04c8180ff
        iwpriv wlan0 wlan_para hiddenAP=true
        iwpriv wlan0 wlan_para addmac=00e04c8180ff
        iwpriv wlan0 wlan_para denymacaddr=00e04c8180ff
        iwpriv wlan0 wlan_para help;


Also, you could set parameters as follow:

        iwpriv wlan0 wlan_para bcnint=100,channel=1,basicrates=0xf,authtype=opensystem,ssid2scan=testssid






< Driver status >
The driver status is reported by /proc filesystem.

  /proc/rtl8180/status     (link status for client mode)
  /proc/rtl8180/ap_status  (link status for ap mode)

  
------------- další část ---------------

#-----------------------------------------------
#Specify kernel version and include path
#-----------------------------------------------
KERNELRELEASE=$(shell uname -r)
INCLUDEPATH=-I /usr/src/linux$(KERNELRELEASE)/include/
INSTALLPATH=/lib/modules/$(KERNELRELEASE)/kernel/drivers/net/wireless


#-----------------------------------------------
#Specify compiler and compile flags.
#-----------------------------------------------
XCC = gcc
LD = ld
MODCFLAGS := -O6 -Wall -DMODULE -D__KERNEL__ -DLINUX


#-----------------------------------------------
#IO_FLAGS
#Specify pci I/O space mapping
#if High memory configuration has been turned on,
#RTL_IO_MAP is the suggestion since ioremap 
#would fail. 
#-----------------------------------------------
#IO_FLAGS = RTL_MEM_MAP
IO_FLAGS = RTL_IO_MAP

#-----------------------------------------------
#ENDIAN_FLAGS
#Specify memory access mothed. 
#RTL_LITTLE_ENDIAN is the suggestion on i386.
#-----------------------------------------------
#ENDIAN_FLAGS = RTL_BIG_ENDIAN
ENDIAN_FLAGS = RTL_LITTLE_ENDIAN


#-----------------------------------------------
# Wireless LAN operation mode. 
#-----------------------------------------------
#OP_MODE_FLAGS = RTL_ACT_AS_AP
OP_MODE_FLAGS = RTL_ACT_AS_STA



#-----------------------------------------------
# Wireless LAN driver flags.
#-----------------------------------------------
DRV_FLAGS = -D$(IO_FLAGS) -D$(ENDIAN_FLAGS) -D${OP_MODE_FLAGS} -DRTL8180_DRV_ON_PC -DENABLE_DBG_PRINT


#-----------------------------------------------
# Driver Target
#-----------------------------------------------
RTL8180_TARGET = rtl8180_24x21.o


#-----------------------------------------------
#module initialization and interface.
#-----------------------------------------------
OPEN_SRCS = r8180_pci_init.c r8180_if.c

OPEN_OBJS = ${OPEN_SRCS:.c=.o}



# SUFFIXES fules
.SUFFIXES: .c .o
.c.o:
	$(XCC) $(MODCFLAGS) $(INCLUDEPATH) ${DRV_FLAGS} -c -o $*.o $<


#.PHONY: all clean

all: $(RTL8180_TARGET)


$(RTL8180_TARGET): open_part
	@echo "--- Generate rtl8180 linux driver  $(RTL8180_TARGET) on $(KERNELRELEASE) ---"
	@$(LD) -r -o $@ ${^:=.o} priv_part.o
	@rm -f ${^:=.o};
	@echo ""

open_part: ${OPEN_OBJS}
	@echo "--- Generate open part open_part.o ---"
	@$(LD) -r -o $@.o ${OPEN_OBJS}
	@rm -f ${OPEN_OBJS}
	@echo ""


${OPEN_OBJS}: %.o: %.h r8180_type.h r8180_export.h

install:
	cp $(RTL8180_TARGET) $(INSTALLPATH)


clean:
	mv priv_part.o priv_part;\
	rm -f *.o;\
	mv priv_part priv_part.o



Další informace o konferenci Linux