Hi, 
  I just upgraded my laptop to RHEL5.2, kernel 2.6.18-92.el5, yesterday, and then got the newest madwifi version, 0.9.4, since 0.9.3 wouldn't compile anymore, but 0.9.4 doesn't, either. I got the following error: 
 [root@laphep5 current]# make
Checking requirements... ok.
Checking kernel configuration... ok.
make -C /lib/modules/2.6.18-92.el5/build SUBDIRS=/home/local/rpm/wireless/enterasys/madwifi-0.9.4 modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-92.el5-i686'
 CC [M]  /home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/if_ath.o
In file included from :1:
/home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/../include/compat.h:140: error: redefinition of 'skb_end_pointer'
include/linux/skbuff.h:417: error: previous definition of 'skb_end_pointer' was here
/home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/../include/compat.h:145: error: redefinition of 'skb_tail_pointer'
include/linux/skbuff.h:835: error: previous definition of 'skb_tail_pointer' was here
/home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/../include/compat.h:150: error: redefinition of 'skb_set_network_header'
include/linux/skbuff.h:1021: error: previous definition of 'skb_set_network_header' was here
/home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/../include/compat.h:155: error: redefinition of 'skb_reset_network_header'
include/linux/skbuff.h:1016: error: previous definition of 'skb_reset_network_header' was here
/home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/../include/compat.h:160: error: redefinition of 'skb_mac_header'
include/linux/skbuff.h:1036: error: previous definition of 'skb_mac_header' was here
/home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/../include/compat.h:165: error: redefinition of 'skb_reset_mac_header'
include/linux/skbuff.h:1046: error: previous definition of 'skb_reset_mac_header' was here
make[3]: *** [/home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath/if_ath.o] Error 1
make[2]: *** [/home/local/rpm/wireless/enterasys/madwifi-0.9.4/ath] Error 2
make[1]: *** [_module_/home/local/rpm/wireless/enterasys/madwifi-0.9.4] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-92.el5-i686'
make: *** [modules] Error 2
I managed to "fix" it -- well, get it to compile -- by removing the KERNEL_VERSION(2,6,22) section from include/compat.h (see below), since that's where the errors seem to come from. 
  Not sure why that was necessary, since this is still kernel 2.6.18, but I was just glad it worked, and I'll leave the proper fix to you. :) 
  Thanks a lot for a great driver, 
   Horst Severini 
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
#include 
static inline unsigned char *skb_end_pointer(const struct sk_buff *skb)
{
 return skb->end;
}
static inline unsigned char *skb_tail_pointer(const struct sk_buff *skb)
{
 return skb->tail;
}
static inline void skb_set_network_header(struct sk_buff *skb, const int offset)
{
 skb->nh.raw = skb->data + offset;
}
static inline void skb_reset_network_header(struct sk_buff *skb)
{
 skb->nh.raw = skb->data;
}
static inline unsigned char *skb_mac_header(const struct sk_buff *skb)
{
 return skb->mac.raw;
}
static inline void skb_reset_mac_header(struct sk_buff *skb)
{
 skb->mac.raw = skb->data;
}
#endif
  This step will take the built MadWifi, and install it on your system. Once again, make does all of the work for you. 
  This step needs to be done as root, so either type su and enter root's password, or if you have it set up (e.g. Ubuntu), prefix the following command with sudo. 
  To install the driver, type: 
 make install 
 This will copy all of the modules, tools and man pages to the correct directories on your system. You've now completed the basic install. 
 Loading the MadWifi Module ¶
  This step will load the MadWifi driver module into your running system.  This essentially lets all other software know how to talk to your MadWifi hardware. 
  This step needs to be done as root, so either type su and enter root's password, or if you have it set up (e.g. Ubuntu), prefix the following command with sudo. 
  To load the driver module, type: 
 modprobe ath_pci 
If after running this command ifconfig doesn't show the additional wireless interface you might need to reboot. If you have any problems with building the MadWifi driver, please refer to UserDocs/BuildProblems. 
 Creating an Interface ¶
  MADWiFi supports virtual access points, which means you can create more than one wireless device per wireless card. By default, a sta mode VAP is created, which is MadWifi talk for a 'managed mode wireless interface'.  
  If your svn snapshot is more recent than the 23rd January 2006, (r1407) than you can skip the following step: 
  If not, then follow these instructions to make a normal station mode interface. Type (as root): 
 wlanconfig ath0 create wlandev wifi0 wlanmode sta 
 If wlanconfig doesn't work, you retry it after executing 'wlanconfig ath0 destroy'. 
  Now, if you type iwconfig, you should see a list like the following: 
 eth0      no wireless extensions.   lo        no wireless extensions.  wifi0     no wireless extensions.  ath0      IEEE 802.11g  ESSID:""           Mode:Managed  Frequency:2.457 GHz  Access Point: 00:00:00:00:00:00           Bit Rate:0 kb/s   Tx-Power:20 dBm   Sensitivity=0/3           Retry:off   RTS thr:off   Fragment thr:off           Power Management:off           Link Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0           Tx excessive retries:0  Invalid misc:0   Missed beacon:0 
 Then we need to bring up the wireless interface. This is done by typing (as root): 
 ifconfig ath0 up 
 There is more information on the creating of interfaces in UserDocs. 
 Scanning for Access Points ¶
  If you know that there are some APs around, having a quick scan can be an excellent way of getting some instant gratification, and knowledge that everything's working OK. 
  The first step is to insert the scanning module. Type (as root): 
 modprobe wlan_scan_sta 
 Next, you can do the actual scan, which can be done in two ways.  
  The first way is specific to MadWifi. and gives you a nice, succinct results table. 
  This is done by issuing the command (again, as root): 
 wlanconfig ath0 list scan 
 This should give you a list that looks something like this: 
 SSID            BSSID              CHAN RATE  S:N   INT CAPS eddie           00:06:25:e8:3a:05    6   54M 36:0   100 EPs 
The second way is the more usual way of scanning (and works with other wireless cards), it also gives you somewhat more information, and is therefore a bit less easy to read. The command is: 
 iwlist ath0 scan 
 Which gives an output which looks like this: 
 ath0      Scan completed :           Cell 01 - Address: 00:06:25:E8:3A:05                     ESSID:"eddie"                     Mode:Master                     Frequency:2.437 GHz (Channel 6)                     Quality=37/94  Signal level=-58 dBm  Noise level=-95 dBm                     Encryption key:on                     Bit Rate:1 Mb/s                     Bit Rate:2 Mb/s                     Bit Rate:5.5 Mb/s                     Bit Rate:11 Mb/s                     Bit Rate:18 Mb/s                     Bit Rate:24 Mb/s                     Bit Rate:36 Mb/s                     Bit Rate:54 Mb/s                     Bit Rate:6 Mb/s                     Bit Rate:9 Mb/s                     Bit Rate:12 Mb/s                     Bit Rate:48 Mb/s                     Extra:bcn_int=100 
 Especially useful is the line reading Encryption key:on, which indicates that this AP is running some kind of WEP. 
  If you get a message such as: 
 ath0      Failed to read scan data : Resource temporarily unavailable 
 instead of actual scan results, and you are in an environment that requires a shared encryption key, try running: 
 iwconfig ath0 key 
 iwpriv ath0 authmode 2 This will tell the card that it is operating in a restricted, shared-key environment, and thus it needs to use the key you supply with iwconfig. To use an open system key (which is often considered more secure) use iwpriv authmode 1: 
 iwconfig ath0 key  iwpriv ath0 authmode 1  Once this is done, re-run the scan, and you may see proper results. 
        
没有评论:
发表评论