summaryrefslogtreecommitdiffstats
path: root/sys/dev/an
Commit message (Collapse)AuthorAgeFilesLines
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-091-12/+12
| | | | | | | | | | | | | | IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field. Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so. Reviewed by: pjd, bz MFC after: 7 days
* Minor style nits.imp2005-08-031-6/+4
|
* Do not lock an to check gone flag. Only need to hold the lock to setemax2005-08-021-2/+1
| | | | | | | the gone flag. Reviewed by: imp MFC after: 1 day
* Reorganize an_detach() a bit. Make sure ether_ifdetach() and if_free()emax2005-07-271-3/+4
| | | | | | | | | | | are called outside of AN_LOCK()/AN_UNLOCK. This fixes the following WITNESS warning (produced when an(4) PCMCIA card is detached). taskqueue_drain with the following non-sleepable locks held: exclusive sleep mutex an0 (network driver) r = 0 (0xc59af168) locked @ /usr/src/sys/dev/an/if_an.c:2836 MFC after: 3 days Silence from: current@
* Eliminate unused argument in PCMCIA_CARD macro.imp2005-06-241-4/+4
| | | | | | | | Provide a backwards compatible way to have the extra macro by defining PCCARD_API_LEVEL 5 before including pccarddevs for driver writers that want/need to have the same driver on 5 and 6 with pccard attachments. Approved by: re (dwhite)
* Initialize sc->an_ifp when doing if_alloc(). This prevents an(4)delphij2005-06-141-1/+1
| | | | | | from being panic when attaching. Approved by: re (scottl)
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-102-18/+24
| | | | | | | | | | | | | | | | | | | | struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com. This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go. Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr. Reviewed by: sobomax, sam
* check copyin/copyout return valuessam2005-03-281-14/+24
| | | | Noticed by: Coverity Prevent analysis tool
* Use BUS_PROBE_DEFAULT for pci probe return valueimp2005-03-051-2/+2
|
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-065-5/+5
|
* Second part of ALTQ driver modifications, covering:mlaier2004-08-011-5/+7
| | | | | | | | | | an(4), ath(4), hme(4), ndis(4), vr(4) and wi(4) Please help testing: http://people.freebsd.org/~mlaier/ALTQ_driver/ Tested by: Vaidas Damosevicius (an, ath, wi) Roman Divacky (vr) Submitted by: yongari (hme)
* While setting up a transmit packet disable interupts on the card thenambrisko2004-06-171-0/+6
| | | | | re-enable them after we are done setting up the packet. This seems to fix the MPI350 newer firmware hangs.
* Fix disordering of pccarddevs.h noticed by bde. Also remove a fewimp2004-05-271-3/+4
| | | | | | redundant includes and fix some of the include disordering. Submitted by: bde
* Move to generating pccarddevs.h on the fly, both for the kernel andimp2004-05-261-1/+1
| | | | | | | the modules. Also generate usbdevs.h automatically now, but a non-kernel file is stopping that at the moment.
* We don't need to initialize if_output, ether_ifattach() does itmux2004-05-231-1/+0
| | | | for us.
* It turns out that the module dependency on pccard is in error. Sinceimp2004-05-081-1/+0
| | | | | | | | | | | | there's not dependencies on pccard symboles, such a dependency is not necessary. This means that drivers that have multiple attachments can not drag bogus devices into the kernel at load time. We can't (yet) do this with pci and isa. Drivers written for them actually do seem to have symbols that depend on these busses' implementation code. ndis not touched until other things can be tested.
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-2/+2
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Announce ethernet MAC addresss in ether_ifattach().mdodd2004-03-141-3/+0
|
* Remove the HACK section it breaks the older firmware and doesn't totallyambrisko2004-01-101-21/+0
| | | | fix the new firmware so remove it.
* - Bump up the general and status RID sizesambrisko2003-12-306-67/+46
| | | | | | | | | | | - 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.
* Drop the driver lock around calls to if_input to avoid a LOR whensam2003-11-142-0/+5
| | | | | | | | 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
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-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)
* Xircom Wireless Ethernet card is a rebadged Cisco 340, but with aimp2003-10-081-0/+1
| | | | | | different vendor id/product id. Submitted by: Keith Davis
* Use PCIR_BAR(x) instead of PCIR_MAPS.jhb2003-09-021-3/+3
| | | | | Glanced over by: imp, gibbs Tested by: i386 LINT
* Use __FBSDID().obrien2003-08-244-10/+7
| | | | Also some minor style cleanups.
* Prefer new location of pci include files (which have only been in theimp2003-08-221-2/+2
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Fix panic from having multiple locks held when updating firmware. AN_LOCKambrisko2003-08-201-9/+11
| | | | was asserted during a tsleep resulting in a panic in tsleep.
* - Add support for Cisco latest firmware RID sizes that supports 25 SSIDs!ambrisko2003-08-204-87/+172
| | | | | | | | | | | | - 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.
* Mega busdma API commit.scottl2003-07-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour. sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen. If anyone gets panics or warnings from dflt_lock() being called, please let me know right away. Reviewed by: tmm, gibbs
* update for new 802.11 supportsam2003-06-281-8/+8
|
* Remove break after return.phk2003-06-011-1/+1
| | | | | | Add XXX comment where intent is unclear. Found by: FlexeLint
* - Express hard dependencies on bus (pci, isa, pccard) andmdodd2003-04-153-6/+9
| | | | | | | | network layer (ether). - Don't abuse module names to facilitate ifconfig module loading; such abuse isn't really needed. (And if we do need type information associated with a module then we should make it explicit and not use hacks.)
* Don't lock in the attach routine. It isn't required. Register theimp2003-04-104-37/+44
| | | | | | | interrupt handler last. This gets rid of the sleep while locked messages. Reviewed by: ambrisko
* Make sure that pp_name is non-null before setting the deviceimp2003-04-101-1/+2
| | | | | description. This allows us to rely entirely on the CIS entries if necessary...
* Use __FBSDID rather than rcsid[].obrien2003-04-034-28/+13
|
* Back out M_* changes, per decision of the TRB.imp2003-02-191-5/+5
| | | | Approved by: trb
* an driver now needs wlan, so put the required explicit dependsimp2003-02-173-0/+3
| | | | | | into the source. Reviewed by: ambrisko
* - Fixes for suspend/resume code (MPI-350)ambrisko2003-02-082-51/+54
| | | | | | | | | | | | | - 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
* Support for suspend/resume in laptops. Loosely based on the wi(4) patchesambrisko2003-02-053-0/+41
| | | | | | | but not quite. The memory descriptors and most of the card parameters need to be writen to the card. MFC in: 3 days
* Some small enhancmentsambrisko2003-02-022-64/+70
| | | | | | | | | | - 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.
* Fix some style and incorrect indentation level bugs.ambrisko2003-01-301-24/+24
| | | | Questioned by: phk (for the indentation problem)
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-5/+5
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Add support for MPI-350 the mini-pci Cisco Aironet card. This needs moreambrisko2002-12-295-330/+1301
| | | | | | | | | | | | | | | | | | | | | | 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
* Require privilege to flush the signal cache on if_an and if_wi 802.11rwatson2002-12-241-0/+3
| | | | | | cards. Reviewed by: imp (if_wi)
* network interface driver changes:sam2002-11-144-17/+12
| | | | | | | | | | | | | | 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
* Fix warning where sizeof(size_t) != sizeof(int).jhb2002-11-061-1/+1
|
* Be consistent about "static" functions: if the function is markedphk2002-09-281-1/+1
| | | | | | static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512
* use __packed.alfred2002-09-232-2/+2
|
* Fix location and name of if_an_pci.c in comment.fenner2002-07-271-1/+1
|
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-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
OpenPOWER on IntegriCloud