summaryrefslogtreecommitdiffstats
path: root/sys/dev/wi/if_wi.c
Commit message (Collapse)AuthorAgeFilesLines
* Currently, each wireless networking driver has it's own control programphk2001-05-261-0/+376
| | | | | | | | | | | | despite the fact that most people want to set exactly the same settings regardless of which card they have. It has been repeatidly suggested that this configuration should be done via ifconfig. This patch implements the required functionality in ifconfig and add support to the wi and an drivers. It also provides partial, untested support for the awi driver. PR: 25577 Submitted by: Brooks Davis <brooks@one-eyed-alien.net>
* Fix world-breaking typo in previous commit.grog2001-05-111-1/+1
|
* Try to read the station address twice during the probe. I've seenwpaul2001-05-101-1/+7
| | | | | | | a LinkSys card here in the office where reading the station address fails the first time, but works find afterwards. Without this, the probe fails. I don't think this will negatively impact any existing cards, but I want to confirm this before MFC'ing.
* Add more diagnostic output for failure.alfred2001-04-101-13/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | s/1518/ETHER_MAX_LEN Some style changes, add some braces, mostly residual from having a lot of debug hooks added while working on this driver. Bring in a plethora of changes from NetBSD: revision 1.58 date: 2001/03/08 11:07:08; author: ichiro; state: Exp; lines: +17 -1 it wait until busy flag disappears. it was able to prevent some cards with late initializing faling in wi_reset(). revision 1.41 date: 2000/10/13 19:15:08; author: jonathan; state: Exp; lines: +4 -2 Fix wi_intr() to avoid touching card registers during insert/remove events, when sharing an interrupt with other devices: check sc->sc_enabled, and drop the interrupt if its' off. revision 1.30 date: 2000/08/18 04:11:48; author: jhawk; state: Exp; lines: +4 -4 Copy wi_{dst,src}_addr from struct wi_frame into faked-up ether_header instead of addr1 and addr2. THis means that tcpdump -e will show the correct MAC address for communications with access points instead of showing the BSSID. In the future there should be 802.11 support for bpf/libpcap/tcpdump, but that is aways down the road.
* Two minor fixes:imp2001-04-091-4/+5
| | | | | | | o Change the number of init tries from 5 to a #define. o Allow up to 5s rather than 2s for commands to complete. This is still much less than 51 minutes, but makes my intel card init with more reliability than before.
* use correct contants (from net/ethernet.h)alfred2001-04-061-2/+2
| | | | | | | ETHER_TYPE_LEN instead of sizeof(u_int16_t) when looking at an ethernet header ETHERTYPE_IP instead of 0x800
* replace hardcoded 1518 with ETHER_MAX_LENalfred2001-04-061-1/+1
|
* test should be for == 0, not < 0alfred2001-04-051-1/+1
|
* WI_TIMEOUT is 65536alfred2001-04-051-3/+2
| | | | | | 65536 * 10msec == 10 minutes 55 seconds == hung machine Instead wait for the busy bits for a max of ~2 seconds (200 * 10msec)
* Don't leak resources:alfred2001-04-051-5/+12
| | | | | | | | Don't leak iospace when irq allocation fails. (call wi_free()) Call bus_release_resource() with the correct "rid" obtained from bus_alloc_resource() that's saved in the softc instead of a hardcoded 0.
* call a watchdog timeout like it is.alfred2001-04-041-1/+1
|
* Doh! Last second change introduced two compile warnings. Fix them.imp2001-04-041-2/+2
|
* Try to INIT the cards up to 5 times in a row rather than just once.imp2001-04-041-9/+15
| | | | | | | | | | It appears that some of the new PRISM2 cards need it. Fail the probe if we fail to read the MAC address. Fix a comment. Delete the unload printf. The bus system now prints this message.
* Fix a couple style nits, no code changes. Turn one magic number intowpaul2001-03-291-14/+17
| | | | | | a #defined constant, wrap a few long lines, etc... Also remove stupid 'all your base are belong to us' joke from comment that I don't really care to see immortalized in the source tree.
* Add support for the Addtron AWA100 PCI wireless card.alfred2001-03-281-16/+134
| | | | | | | The AWA100 is a PCI board with a PLX 9052 chip that's used to talk to the pccard inserted into the board. Remove a redundant $FreeBSD while I'm here.
* limit the amount of retries when sending data to prevent lockups.alfred2001-03-271-2/+9
|
* change default from adhoc mode to BSS (infrastructure)assar2001-03-121-1/+1
|
* Convert if_multiaddrs from LIST to TAILQ so that it can be traversedphk2001-02-061-1/+1
| | | | | | backwards in the three drivers which want to do that. Reviewed by: mikeh
* Use LIST_FOREACH() to traverse ifp->if_multiaddrs list, instead ofphk2001-02-031-2/+1
| | | | | | | <sys/queue.h> implementation details. Created with: /usr/sbin/sed Reviewed with: /sbin/md5
* wi has been converted to NEWCARD, so included it when pccard isimp2001-01-211-2/+2
| | | | | | | included. Also, I forgot to update this to the new cis[] structure last night, mainly due to the above omission.
* Implement MTX_RECURSE flag for mtx_init().bmilekic2001-01-191-1/+1
| | | | | | | | | | | | | | | | | | | All calls to mtx_init() for mutexes that recurse must now include the MTX_RECURSE bit in the flag argument variable. This change is in preparation for an upcoming (further) mutex API cleanup. The witness code will call panic() if a lock is found to recurse but the MTX_RECURSE bit was not set during the lock's initialization. The old MTX_RECURSE "state" bit (in mtx_lock) has been renamed to MTX_RECURSED, which is more appropriate given its meaning. The following locks have been made "recursive," thus far: eventhandler, Giant, callout, sched_lock, possibly some others declared in the architecture-specific code, all of the network card driver locks in pci/, as well as some other locks in dev/ stuff that I've found to be recursive. Reviewed by: jhb
* Add NEWCARD hooks. This seems to work just fine.peter2001-01-171-2/+32
|
* Move if_wl.c from sys/i386/isa to dev/wi - it is not i386 (or even isa)peter2001-01-091-2/+2
| | | | specific.
* Attempt to read and verify the card's status in wi_stop() before sending itjhb2000-12-181-2/+9
| | | | | | | the disable command. On some systems, writing to the card after it has been ejected causes the machine to hang. Reviewed by: wpaul
* Apply some contributed patches to reduce number of tx buffer allocationwpaul2000-12-151-3/+148
| | | | | | failures and add some support for WEP on Prism II chip. Submitted by: YAMAMOTO Shigeru <shigeru@iij.ad.jp>
* remove unneded sys/ucred.h includesalfred2000-11-301-1/+0
|
* Move suser() and suser_xxx() prototypes and a related #define fromphk2000-10-291-1/+0
| | | | | | | | | <sys/proc.h> to <sys/systm.h>. Correctly document the #includes needed in the manpage. Add one now needed #include of <sys/systm.h>. Remove the consequent 48 unused #includes of <sys/proc.h>.
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Update the wi driver to use mutexes instead of spls.wpaul2000-10-131-18/+39
|
* Close PR #20963. Do not pass encryption keys back to the caller viawpaul2000-09-071-0/+3
| | | | wi_ioctl() unless they're the superuser.
* Make all Ethernet drivers attach using ether_ifattach() and detach usingarchie2000-07-131-6/+3
| | | | | | | | | ether_ifdetach(). The former consolidates the operations of if_attach(), ng_ether_attach(), and bpfattach(). The latter consolidates the corresponding detach operations. Reviewed by: julian, freebsd-net
* Bring the an(4) fixes to wi(4):roberto2000-06-191-3/+10
| | | | | | | - suser check - splx() fix. Reminded by: Aaron Campbell <aaron@openbsd.org>
* Move code to handle BPF and bridging for incoming Ethernet packets outarchie2000-05-141-13/+0
| | | | | | | | | | | | | | | of the individual drivers and into the common routine ether_input(). Also, remove the (incomplete) hack for matching ethernet headers in the ip_fw code. The good news: net result of 1016 lines removed, and this should make bridging now work with *all* Ethernet drivers. The bad news: it's nearly impossible to test every driver, especially for bridging, and I was unable to get much testing help on the mailing lists. Reviewed by: freebsd-net
* Remove ~25 unneeded #include <sys/conf.h>phk2000-04-191-1/+0
| | | | Remove ~60 unneeded #include <sys/malloc.h>
* When in infrastructure mode, use address 3 from the 802.11 header as thewpaul2000-04-171-2/+7
| | | | | | | | source address when receiving frames (and keep using address 2 when in pseudo-IBSS mode). This is apparently necessary in order to obtain the true MAC address of the sending station which is needed for PPPoE. Patch supplied by: Blaz Zupan <blaz@amis.net>
* Modify if_wi.c to call bpfdetach(ifp) before if_detach(ifp), so as torwatson2000-03-191-0/+2
| | | | | | | | prevent a page fault if the card is ejected while BPF is in use. This could happen if DHCP or tcpdump was in use on that interface during ejection. Other drivers may also require this modification. Reviewed by: wes
* Add support for WEP (encryption) for silver and gold WaveLAN/IEEE turbo cards.wpaul2000-02-021-0/+30
| | | | | | | | | | | | Also update wicontrol to enable/disable encryption, set WEP keys and set the TX key index. Silver cards only have 40-bit keys. This is something of a quick hack, but it works well enough for me to commit this from the LinuxWorld exhibit floor. The WEP support only shows up if you have a card that supports it. Would have been approved by: jkh, if he hadn't wandered off somewhere Approved in his place by: msmith, who's standing right here
* Correctly set the data length when transmitting 802.3 frames (we need towpaul2000-01-121-3/+2
| | | | subtract the length of the SNAP header).
* Fix invocation of bus_teardown_intr(). The last arg is supposed to bewpaul1999-12-081-1/+1
| | | | sc->wi_intrhand, not &sc->wi_intrhand.
* Update the WaveLAN/IEEE driver:wpaul1999-11-251-160/+388
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Convert to new bus attachment scheme. Thanks to Blaz Zupan for doing the initial work here. One thing I changed was to have the attach and detach routines work like the PCI drivers, which means that in theory you should be able to load and unload the driver like the PCI NIC drivers, however the pccard support for this hasn't settled down yet so it doesn't quite work. Once the pccard work is done, I'll have to revisit this. - Add device wi0 to PCCARD. If we're lucky, people should be able to install via their WaveLAN cards now. - Add support for signal strength caching. The wicontrol utility has also been updated to allow zeroing and displaying the signal strength cache. - Add a /sys/modules/wi directory and fix a Makefile to builf if_wi.ko. Currently this module is only built for the i386 platform, though once the pccard stuff is done it should be able to work on the alpha too. (Theoretically you should be able to plug one of the WaveLAN/IEEE ISA cards into an alpha with an ISA slot, but we'll see how that turns out. - Update LINT to use only device wi0. There is no true ISA version of the WaveLAN/IEEE so we'll never use an ISA attachment. - Update files.i386 so that if_wi is dependent on card.
* Fix a warning.peter1999-11-181-3/+1
|
* Disable old PCCARD_MODULE code.imp1999-10-291-0/+2
| | | | | | This should fix LINT. Prompted by: phk's explicit message about LINT breakage
* As suggested by phk, unconditionalize BPF support in these drivers. Sincewpaul1999-09-231-9/+0
| | | | | | | there are stubs compiled into the kernel if BPF support is not enabled, there aren't any problems with unresolved symbols. The modules in /modules are compiled with BPF support enabled anyway, so the most this will do is bloat GENERIC a little.
* $Id$ -> $FreeBSD$peter1999-08-281-2/+2
|
* Clean up after removing sys/eventhandler.h from sys/systm.h at the lastmsmith1999-08-211-2/+3
| | | | | minute. This should cover all of the missed cases (and should let LINT build again).
* Implement a new generic mechanism for attaching handler functions tomsmith1999-08-211-6/+7
| | | | | | | | | | | | | events, in order to pave the way for removing a number of the ad-hoc implementations currently in use. Retire the at_shutdown family of functions and replace them with new event handler lists. Rework kern_shutdown.c to take greater advantage of the use of event handlers. Reviewed by: green
* Rename bpfilter to bpf.des1999-07-061-7/+7
|
* Patch the WaveLAN/IEEE driver to detect and reject oversized receivedwpaul1999-07-041-2/+19
| | | | | | | | | | | frames (or just insane received packet lengths generated due to errors reading from the NIC's internal buffers). Anything too large to fit safely into an mbuf cluster buffer is discarded and an error logged. I have not observed this problem with my own cards, but on user has reported it and adding the sanity test seems reasonable in any case. Problem noted and patch provided by: Per Andersson <per@cdg.chalmers.se>
* Small optimization: use wi_seek() in wi_read_record() and wi_write_record()wpaul1999-06-061-27/+9
| | | | | instead of frobbing the buffer access path registers directly. Saves a few lines of duplicated code.
* - Fix up some comments in if_wi.c (no code changes)wpaul1999-05-221-9/+9
| | | | | | | - Mention that the 6Mbps turbo adapters are supported in HARDWARE.TXT and RELNOTES.TXT and the wi.4 man page - Mention turbo adapters in the wicontrol.8 man page and provide a complete table of available transmit speed settings
OpenPOWER on IntegriCloud