aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/an/if_an.c
Commit message (Collapse)AuthorAgeFilesLines
...
* While setting up a transmit packet disable interupts on the card thenDoug Ambrisko2004-06-171-0/+6
| | | | | | | | re-enable them after we are done setting up the packet. This seems to fix the MPI350 newer firmware hangs. Notes: svn path=/head/; revision=130620
* We don't need to initialize if_output, ether_ifattach() does itMaxime Henrion2004-05-231-1/+0
| | | | | | | for us. Notes: svn path=/head/; revision=129616
* Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson2004-03-171-2/+2
| | | | | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
* Announce ethernet MAC addresss in ether_ifattach().Matthew N. Dodd2004-03-141-3/+0
| | | | Notes: svn path=/head/; revision=126966
* Remove the HACK section it breaks the older firmware and doesn't totallyDoug Ambrisko2004-01-101-21/+0
| | | | | | | fix the new firmware so remove it. Notes: svn path=/head/; revision=124324
* - Bump up the general and status RID sizesDoug Ambrisko2003-12-301-8/+40
| | | | | | | | | | | | | | - Clear out an_dma_vaddr on free so we can test to see if dma is setup when the card is kldunloaded/kldloaded etc. only for MPI350 - Use a common detach like wi(4) - Notify on RID read overflow and truncate this currently causes a panic in -stable when the stack during an ifconfig an0 is done with newer firmware - Convert from UNLOCK/tsleep/LOCK to msleep. I thought I did that a while ago. Notes: svn path=/head/; revision=123978
* Drop the driver lock around calls to if_input to avoid a LOR whenSam Leffler2003-11-141-0/+4
| | | | | | | | | | | the packets are immediately returned for sending (e.g. when bridging or packet forwarding). There are more efficient ways to do this but for now use the least intrusive approach. Reviewed by: imp, rwatson Notes: svn path=/head/; revision=122689
* Replace the if_name and if_unit members of struct ifnet with new membersBrooks Davis2003-10-311-2/+3
| | | | | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname) Notes: svn path=/head/; revision=121816
* Use __FBSDID().David E. O'Brien2003-08-241-4/+3
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* Fix panic from having multiple locks held when updating firmware. AN_LOCKDoug Ambrisko2003-08-201-9/+11
| | | | | | | was asserted during a tsleep resulting in a panic in tsleep. Notes: svn path=/head/; revision=119163
* - Add support for Cisco latest firmware RID sizes that supports 25 SSIDs!Doug Ambrisko2003-08-201-73/+137
| | | | | | | | | | | | | | | - Fix up TX speed changes. - Make mpi-350 cards sort-of work with new firmware. It RXs okay but TXs only work for about 14 packets then fails to get an interrupt. The TX watchdog fires. It has been reported that my hack for now doesn't break cards with the older firmware. It appears my card has lost the ability to RX or TX at all but other peoples cards work. I assume it got damaged in tansport. MFC: 1 week. Notes: svn path=/head/; revision=119156
* update for new 802.11 supportSam Leffler2003-06-281-8/+8
| | | | Notes: svn path=/head/; revision=116951
* Remove break after return.Poul-Henning Kamp2003-06-011-1/+1
| | | | | | | | | Add XXX comment where intent is unclear. Found by: FlexeLint Notes: svn path=/head/; revision=115615
* Don't lock in the attach routine. It isn't required. Register theWarner Losh2003-04-101-19/+10
| | | | | | | | | | interrupt handler last. This gets rid of the sleep while locked messages. Reviewed by: ambrisko Notes: svn path=/head/; revision=113316
* Use __FBSDID rather than rcsid[].David E. O'Brien2003-04-031-7/+3
| | | | Notes: svn path=/head/; revision=113038
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-5/+5
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* - Fixes for suspend/resume code (MPI-350)Doug Ambrisko2003-02-081-48/+52
| | | | | | | | | | | | | | | | - Cache temp. keys so they are preserved across suspend/resume (MPI-350) - Reads and writes are real fast to the MPI-350 causing early timeouts so wait do some DELAYs to slow things down in the spin loops. - Stream line setting RIDs when they are better to be set via another function - Add better support for setting home key via "ifconfig an0 wepkey 9:<key>" Tested by: Peter Radcliffe <pir@pir.net> (in -stable) myself in -current & -stable MFC in: 3 days Notes: svn path=/head/; revision=110531
* Support for suspend/resume in laptops. Loosely based on the wi(4) patchesDoug Ambrisko2003-02-051-0/+20
| | | | | | | | | | but not quite. The memory descriptors and most of the card parameters need to be writen to the card. MFC in: 3 days Notes: svn path=/head/; revision=110362
* Some small enhancmentsDoug Ambrisko2003-02-021-63/+69
| | | | | | | | | | | | | - Implement TX power control with hints to code in Linux driver by Douglas S. J. De Couto <decouto@lcs.mit.edu> - Update ifmedia support to use ieee80211_rate2media and ieee80211_media2rate. Note doesn't work with stock ifconfig since there seems to be an issue with the setmedia code. "ancontrol -t" works now, before it did nothing. - Fix spelling error in header. Notes: svn path=/head/; revision=110253
* Fix some style and incorrect indentation level bugs.Doug Ambrisko2003-01-301-24/+24
| | | | | | | Questioned by: phk (for the indentation problem) Notes: svn path=/head/; revision=110104
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-5/+5
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* Add support for MPI-350 the mini-pci Cisco Aironet card. This needs moreDoug Ambrisko2002-12-291-290/+1047
| | | | | | | | | | | | | | | | | | | | | | | | | work. The interface was gleaned from the Linux driver. Currently only one RX & one TX buffer are used. Firmware support is not tested so for the MPI-350 so it is disabled. Signal cache and monitor mode are not supported yet. Signal cache is not supported since in encapsulation mode ethernet frames are returned by the chip. LAN monitor mode support will be added shortly. Thanks to Warner for the MPI-350 card he sent me. Add support for RSSI map from PR kern/32880 which was incomplete. Enhanced with the ability to select the cache mode of raw, dbm or per-cent. Clean up Signal/Noise/Quality structures and units with help from Marco Molteni. Change flash to use a malloc'ed buffer when needed. PR: kern/32880 Submitted by: Douglas S. J. De Couto decouto@pdos.lcs.mit.edu, Marco Molteni MFC: 3 weeks Notes: svn path=/head/; revision=108401
* Require privilege to flush the signal cache on if_an and if_wi 802.11Robert Watson2002-12-241-0/+3
| | | | | | | | | cards. Reviewed by: imp (if_wi) Notes: svn path=/head/; revision=108259
* network interface driver changes:Sam Leffler2002-11-141-14/+9
| | | | | | | | | | | | | | | | | o don't strip the Ethernet header from inbound packets; pass packets up the stack intact (required significant changes to some drivers) o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN) o track ether_ifattach/ether_ifdetach API changes o track bpf changes (use BPF_TAP and BPF_MTAP) o track vlan changes (ifnet capabilities, revised processing scheme, etc.) o use if_input to pass packets "up" o call ether_ioctl for default handling of ioctls Reviewed by: many Approved by: re Notes: svn path=/head/; revision=106937
* Fix warning where sizeof(size_t) != sizeof(int).John Baldwin2002-11-061-1/+1
| | | | Notes: svn path=/head/; revision=106512
* Be consistent about "static" functions: if the function is markedPoul-Henning Kamp2002-09-281-1/+1
| | | | | | | | | static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512 Notes: svn path=/head/; revision=104094
* Fix location and name of if_an_pci.c in comment.Bill Fenner2002-07-271-1/+1
| | | | Notes: svn path=/head/; revision=100770
* Change callers of mtx_init() to pass in an appropriate lock type name. InJohn Baldwin2002-04-041-2/+2
| | | | | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64 Notes: svn path=/head/; revision=93818
* Change the suser() API to take advantage of td_ucred as well as do aJohn Baldwin2002-04-011-5/+5
| | | | | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@ Notes: svn path=/head/; revision=93593
* Remove __P.Alfred Perlstein2002-03-201-38/+36
| | | | Notes: svn path=/head/; revision=92739
* Only allow super user to perform the Linux compatible ioctls since someDoug Ambrisko2002-03-141-0/+4
| | | | | | | | | of the things they do, shouldn't be done by normal users. MFC after: 2 days Notes: svn path=/head/; revision=92292
* In ad-hoc mode, the "associate" bit is valid to check to see if it isDoug Ambrisko2002-02-261-3/+1
| | | | | | | | | | part of an ad-hoc network. This means another station needs to be around so they can both associate. MFC after: 1 week Notes: svn path=/head/; revision=91283
* Add missing m_free() so we actually drain the send buffer in monitor mode.Brooks Davis2002-02-201-0/+2
| | | | | | | Submitted by: Kenjiro Cho <kjc@csl.sony.co.jp> Notes: svn path=/head/; revision=90990
* Staticise the flash buffer, since it isn't needed anywhere else.Mike Smith2002-01-081-1/+1
| | | | Notes: svn path=/head/; revision=89063
* Save stack space by converting areq in sc->areq.Doug Ambrisko2001-12-311-88/+84
| | | | | | | | | | Reviewed by: Brooks Davis <brooks@freebsd.org> Warner Losh <imp@freebsd.org> Approved by: Brooks Davis <brooks@freebsd.org> Warner Losh <imp@freebsd.org> Notes: svn path=/head/; revision=88749
* Fix bugs in the structure for rx_frame by making gap length one byte andDoug Ambrisko2001-12-311-15/+602
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a packed array so sizeof work. This broke RFMON mode and passing up 802.11 packets. The Linux emulation code was derived from the open source Linux driver to maintain compatibility. LEAP support is added, hints from Richard Johnson. I've verified this locally with PC350v42510.img firmware. More bug fixing from Marco to fix long passwords. Change DELAYs in flash part of driver to FLASH_DELAY which uses tsleep so it doesn't look like your system died during a flash update. Install header files in /usr/include/dev/an Cleanup some ifmedia bugs add "Home" key mode to ifmedia and ancontrol. This way you can manage 2 keys a little easier. Map the home mode into key 5. Enhance ifconfig to dump the various configured SSIDs. I use a bunch of different ones and roam between them. Use the syntax similar to the WEP keys to deal with setting difference SSIDs. Bump up up the Card capabilities RID since they added 2 bytes to it in the latest firmware. Thankfully we changed it from a terminal failure so the card still worked but the driver whined. Some cleanup patches from Marco Molteni. Submitted by: Richard Johnson <raj@cisco.com> Marco Molteni <molter@tin.it> and myself Various checks: David Wolfskill <david@catwhisker.org> Reviewed by: Brooks Davis <brooks@freebsd.org> Warner Losh <imp@freebsd.org> Approved by: Brooks Davis <brooks@freebsd.org> Warner Losh <imp@freebsd.org> Obtained from: Linux emulation API's from Aironet driver. Notes: svn path=/head/; revision=88748
* Fix comments about 'current' state of hardware/softwareWarner Losh2001-11-151-4/+1
| | | | Notes: svn path=/head/; revision=86381
* fix typo.Poul-Henning Kamp2001-11-111-1/+1
| | | | | | | | PR: 31898 Submitted by: Michael Lyngbøl <lyngbol@bifrost.lyngbol.dk> Notes: svn path=/head/; revision=86259
* Add missing includes of sys/lock.h.John Baldwin2001-10-111-0/+1
| | | | Notes: svn path=/head/; revision=84811
* KSE Milestone 2Julian Elischer2001-09-121-0/+1
| | | | | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha Notes: svn path=/head/; revision=83366
* Lots of style(9) related white space fixes. Mostly missing spacesBrooks Davis2001-09-101-96/+120
| | | | | | | | after if, for, while, switch, '{', and '}' plus a bunch of bogus whitespace at the end of lines. Notes: svn path=/head/; revision=83270
* Add support for monitor mode. This means that after enabling theBrooks Davis2001-09-101-93/+255
| | | | | | | | | | | correct mode via ancontrol, you can use bpf to sniff raw 802.11 frames. Who want's to port AirSnort. ;-) Submitted by: Doug Ambrisko <ambrisko@ambrisko.com> (author) David Wolfskill <david@catwhisker.org> (port to current) Notes: svn path=/head/; revision=83269
* Wrap array accesses in macros, which also happen to be lvalues:Jonathan Lemon2001-09-061-1/+1
| | | | | | | | | | ifnet_addrs[i - 1] -> ifaddr_byindex(i) ifindex2ifnet[i] -> ifnet_byindex(i) This is intended to ease the conversion to SMPng. Notes: svn path=/head/; revision=83130
* Fix a number of bugs in the implementation of the WEP related statusBrooks Davis2001-06-221-65/+154
| | | | | | | | | | | | | | | | functions in ifconfig. "ifconfig an0" should output the correct status now. Also, make the read and write functions both more robust and more consistant. This should stop most of the incorrect size complaints and eliminate the possiability of panics from firmware that increases resource sizes. PR: kern/27826 Reviewed by: imp, jlemon Submitted by: Doug Ambrisko <ambrisko@ambrisko.com> David Wolfskill <dhw@whistle.com> Notes: svn path=/head/; revision=78639
* Fix warnings:Peter Wemm2001-06-151-1/+0
| | | | | | | | 1831: warning: unused variable `noise' 1831: warning: unused variable `sig' Notes: svn path=/head/; revision=78232
* Currently, each wireless networking driver has it's own control programPoul-Henning Kamp2001-05-261-3/+497
| | | | | | | | | | | | | | | 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> Notes: svn path=/head/; revision=77217
* A few fixes..Archie Cobbs2001-03-231-37/+6
| | | | | | | | | | | | | | | | 1 Make promiscuous mode work 2 A few header additions 3 Allow device config before IFF_UP These were (respectively)... Submitted by: Allan Saddi <asaddi@philosophysw.com> Submitted by: Dave Cornejo <dave@dogwood.com> Submitted by: Doug Ambrisko <ambrisko@ambrisko.com> Tested by: David Wolfskill <dhw@whistle.com> Notes: svn path=/head/; revision=74698
* change the default mode from adhoc to bss (infrastructure)Assar Westerlund2001-03-121-1/+1
| | | | | | | Reviewed by: Brooks Davis <brooks@one-eyed-alien.net> Notes: svn path=/head/; revision=74144
* Implement MTX_RECURSE flag for mtx_init().Bosko Milekic2001-01-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=71228
* remove unneded sys/ucred.h includesAlfred Perlstein2000-11-301-1/+0
| | | | Notes: svn path=/head/; revision=69399