Skip to content
Snippets Groups Projects
Select Git revision
  • 0c1eb722be85dd2c7844a9a0408be63b57afa824
  • master default protected
  • android-msm-bullhead-3.10-nougat_kgdb_less_changes
  • android-msm-bullhead-3.10-nougat_kgdb
  • android-msm-bullhead-3.10-nougat_klist
  • android-4.4
  • android-msm-vega-4.4-oreo-daydream
  • android-msm-wahoo-4.4-p-preview-5
  • android-msm-wahoo-4.4-pie
  • android-msm-marlin-3.18-p-preview-5
  • android-msm-marlin-3.18-pie
  • android-msm-wahoo-2018.07-oreo-m2
  • android-msm-wahoo-2018.07-oreo-m4
  • android-msm-wahoo-4.4-p-preview-4
  • android-msm-bullhead-3.10-oreo-m6
  • android-msm-angler-3.10-oreo-m6
  • android-msm-marlin-3.18-p-preview-4
  • android-msm-stargazer-3.18-oreo-wear-dr
  • android-msm-catshark-3.18-oreo-wear-dr
  • android-msm-wahoo-4.4-oreo-m2
  • android-msm-wahoo-4.4-oreo-m4
  • android-daydreamos-8.0.0_r0.5
  • android-8.1.0_r0.92
  • android-8.1.0_r0.91
  • android-daydreamos-8.0.0_r0.4
  • android-p-preview-5_r0.2
  • android-p-preview-5_r0.1
  • android-9.0.0_r0.5
  • android-9.0.0_r0.4
  • android-9.0.0_r0.2
  • android-9.0.0_r0.1
  • android-8.1.0_r0.81
  • android-8.1.0_r0.80
  • android-8.1.0_r0.78
  • android-8.1.0_r0.76
  • android-8.1.0_r0.75
  • android-8.1.0_r0.72
  • android-8.1.0_r0.70
  • android-p-preview-4_r0.2
  • android-p-preview-4_r0.1
  • android-wear-8.0.0_r0.30
41 results

wl3501_cs.c

Blame
  • wl3501_cs.c 53.61 KiB
    /*
     * WL3501 Wireless LAN PCMCIA Card Driver for Linux
     * Written originally for Linux 2.0.30 by Fox Chen, mhchen@golf.ccl.itri.org.tw
     * Ported to 2.2, 2.4 & 2.5 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
     * Wireless extensions in 2.4 by Gustavo Niemeyer <niemeyer@conectiva.com>
     *
     * References used by Fox Chen while writing the original driver for 2.0.30:
     *
     *   1. WL24xx packet drivers (tooasm.asm)
     *   2. Access Point Firmware Interface Specification for IEEE 802.11 SUTRO
     *   3. IEEE 802.11
     *   4. Linux network driver (/usr/src/linux/drivers/net)
     *   5. ISA card driver - wl24.c
     *   6. Linux PCMCIA skeleton driver - skeleton.c
     *   7. Linux PCMCIA 3c589 network driver - 3c589_cs.c
     *
     * Tested with WL2400 firmware 1.2, Linux 2.0.30, and pcmcia-cs-2.9.12
     *   1. Performance: about 165 Kbytes/sec in TCP/IP with Ad-Hoc mode.
     *      rsh 192.168.1.3 "dd if=/dev/zero bs=1k count=1000" > /dev/null
     *      (Specification 2M bits/sec. is about 250 Kbytes/sec., but we must deduct
     *       ETHER/IP/UDP/TCP header, and acknowledgement overhead)
     *
     * Tested with Planet AP in 2.4.17, 184 Kbytes/s in UDP in Infrastructure mode,
     * 173 Kbytes/s in TCP.
     *
     * Tested with Planet AP in 2.5.73-bk, 216 Kbytes/s in Infrastructure mode
     * with a SMP machine (dual pentium 100), using pktgen, 432 pps (pkt_size = 60)
     */
    
    #include <linux/delay.h>
    #include <linux/types.h>
    #include <linux/init.h>
    #include <linux/interrupt.h>
    #include <linux/in.h>
    #include <linux/kernel.h>
    #include <linux/module.h>
    #include <linux/fcntl.h>
    #include <linux/if_arp.h>
    #include <linux/ioport.h>
    #include <linux/netdevice.h>
    #include <linux/etherdevice.h>
    #include <linux/skbuff.h>
    #include <linux/slab.h>
    #include <linux/string.h>
    #include <linux/wireless.h>
    #include <linux/ieee80211.h>
    
    #include <net/iw_handler.h>
    
    #include <pcmcia/cistpl.h>
    #include <pcmcia/cisreg.h>
    #include <pcmcia/ds.h>
    
    #include <asm/io.h>
    #include <asm/uaccess.h>
    
    #include "wl3501.h"
    
    #ifndef __i386__
    #define slow_down_io()
    #endif
    
    /* For rough constant delay */
    #define WL3501_NOPLOOP(n) { int x = 0; while (x++ < n) slow_down_io(); }
    
    
    
    #define wl3501_outb(a, b) { outb(a, b); slow_down_io(); }
    #define wl3501_outb_p(a, b) { outb_p(a, b); slow_down_io(); }
    #define wl3501_outsb(a, b, c) { outsb(a, b, c); slow_down_io(); }