| 
		    
                    
   
注意: PCMCIA 配置文件的确切位置取决于所用的 Linux 分布。 
  
清单 1. Intersil WLAN CF 卡的 PCMCIA 设备条目 
  
    
        
            | 
             card "Intersil PRISM2 11 Mbps Wireless Adapter" 
            manfid 0x0156, 0x0002 
            bind "orinoco_cs" 
              
            device "orinoco_cs" 
            class "wireless" module "orinoco","orinoco_cs","hermes" 
             | 
         
    
 
 
  
用/etc/pcmcia/wireless 和 /etc/pcmcia/wireless.opts 脚本来配置 WEP 关键字和 SSID 这样的参数。 
  
清单 2. 配置 WLAN 特定参数 
  
    
        
            | 
             iwconfig ethX essid <wlan_name> 
            key AAAA-AAAA-AA [1] key BBBB-BBBB-BB [2] key CCCC-CCCC-CC [3] key DDDD-DDDD-DD [4] 
               : Set 64-bit WEP Keys and ESSID in the driver 
            iwconfig ethX  : Display WLAN parameters 
            iwpriv : Get nongeneric, driver-specific parameters 
            iwlist : List Information and statistics from an interface 
            iwspy  : Read quality of link for a set of addresses 
            /proc/net/wireless : Wireless Statistics from the device driver 
             | 
         
    
 
 
  
在插入卡时,orinoco_cs 像传统的网络设备驱动程序一样,调用 register_netdev 来获得分配给 WLAN 接口的 ethX 网络接口名。它还会注册一个中断服务例程的地址以服务收发无线数据时产生的中断。中断处理程序是 orinoco 模块的一部分,并与 Linux 网络栈交互。Linux 网络栈使用主要的数据结构是 sk_buff 结构(定义在 include/linux/skbuff.h 中,请参阅 参考资料,该文件包括关于附加在它上的一个内存块的控制信息)。sk_buffs 为所有网络层提供有效的缓冲器处理和流控制机制。网络设备驱动程序执行一个 dev_alloc_skb 和一个 skb_put,以用 IP 数据填充一个 sk_buff,然后通过调用 netif_rx 将这个sk_buff 传送到 TCP/IP 栈。orinoco 中断服务例程用从 WLAN 接收的数据填充 sk_buffs,并经由 netif_rx 将它传送到 IP 栈。 
  
Linux TCP/IP 应用程序可以在前面谈到的内核模块为 Intersil WLAN CF 卡提供的网络接口上不加更改地运行。 
  
-- 
原文链接: http://linux.ccidnet.com/art/302/20041230/197295_1.html 
		    
                      
		      
		      
		   |