summaryrefslogtreecommitdiff
path: root/sys/dev/wl/if_wl.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove the wl(4) driver and wlconfig(8) utility.John Baldwin2016-08-191-2620/+0
| | | | | | | | | | | | The wl(4) driver supports pre-802.11 PCCard wireless adapters that are slower than 802.11b. They do not work with any of the 802.11 framework and the driver hasn't been reported to actually work in a long time. Relnotes: yes Notes: svn path=/head/; revision=304506
* sys/dev: minor spelling fixes.Pedro F. Giffuni2016-05-031-4/+4
| | | | | | | Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
* Use uintmax_t (typedef'd to rman_res_t type) for rman ranges.Justin Hibbits2016-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some architectures, u_long isn't large enough for resource definitions. Particularly, powerpc and arm allow 36-bit (or larger) physical addresses, but type `long' is only 32-bit. This extends rman's resources to uintmax_t. With this change, any resource can feasibly be placed anywhere in physical memory (within the constraints of the driver). Why uintmax_t and not something machine dependent, or uint64_t? Though it's possible for uintmax_t to grow, it's highly unlikely it will become 128-bit on 32-bit architectures. 64-bit architectures should have plenty of RAM to absorb the increase on resource sizes if and when this occurs, and the number of resources on memory-constrained systems should be sufficiently small as to not pose a drastic overhead. That being said, uintmax_t was chosen for source clarity. If it's specified as uint64_t, all printf()-like calls would either need casts to uintmax_t, or be littered with PRI*64 macros. Casts to uintmax_t aren't horrible, but it would also bake into the API for resource_list_print_type() either a hidden assumption that entries get cast to uintmax_t for printing, or these calls would need the PRI*64 macros. Since source code is meant to be read more often than written, I chose the clearest path of simply using uintmax_t. Tested on a PowerPC p5020-based board, which places all device resources in 0xfxxxxxxxx, and has 8GB RAM. Regression tested on qemu-system-i386 Regression tested on qemu-system-mips (malta profile) Tested PAE and devinfo on virtualbox (live CD) Special thanks to bz for his testing on ARM. Reviewed By: bz, jhb (previous) Relnotes: Yes Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D4544 Notes: svn path=/head/; revision=297000
* Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().Justin Hibbits2016-02-271-2/+2
| | | | | | | | | | | Most calls to bus_alloc_resource() use "anywhere" as the range, with a given count. Migrate these to use the new bus_alloc_resource_anywhere() API. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D5370 Notes: svn path=/head/; revision=296137
* Convert rman to use rman_res_t instead of u_longJustin Hibbits2016-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: Migrate to using the semi-opaque type rman_res_t to specify rman resources. For now, this is still compatible with u_long. This is step one in migrating rman to use uintmax_t for resources instead of u_long. Going forward, this could feasibly be used to specify architecture-specific definitions of resource ranges, rather than baking a specific integer type into the API. This change has been broken out to facilitate MFC'ing drivers back to 10 without breaking ABI. Reviewed By: jhb Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5075 Notes: svn path=/head/; revision=294883
* Various fixes for wl(4):John Baldwin2014-11-201-418/+394
| | | | | | | | | | | | | | | | | | - Don't recurse driver mutex. - Don't hold driver mutex across fubyte/subyte. - Replace fubyte/subyte loops with copyin/copyout calls. - Use relatively sane locking in wl_ioctl(). - Use bus space accessors instead of in*()/out*(). - Use callout(9) instead of timeout(9). - Stop watchdog timer in detach and don't hold mutex across bus_teardown_intr(). - Use device_printf() and if_printf(). - De-spl(). Tested by: no one Notes: svn path=/head/; revision=274758
* Mechanically convert to if_inc_counter().Gleb Smirnoff2014-09-191-10/+10
| | | | Notes: svn path=/head/; revision=271849
* The r48589 promised to remove implicit inclusion of if_var.h soon. PrepareGleb Smirnoff2013-10-261-0/+1
| | | | | | | | | | | to this event, adding if_var.h to files that do need it. Also, include all includes that now are included due to implicit pollution via if_var.h Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=257176
* Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff2012-12-041-1/+1
| | | | | | | malloc(9) flags in sys/dev. Notes: svn path=/head/; revision=243857
* Add new tunable 'net.link.ifqmaxlen' to set default send interfaceMaxim Sobolev2010-05-031-1/+1
| | | | | | | | | | | | | queue length. The default value for this parameter is 50, which is quite low for many of today's uses and the only way to modify this parameter right now is to edit if_var.h file. Also add read-only sysctl with the same name, so that it's possible to retrieve the current value. MFC after: 1 month Notes: svn path=/head/; revision=207554
* These drivers only set if_timer but never set if_watchdog. Just removeJohn Baldwin2009-11-191-2/+0
| | | | | | | the assignments to if_timer. Notes: svn path=/head/; revision=199537
* Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/Robert Watson2009-06-261-2/+2
| | | | | | | | | | | | | | | | IF_ADDR_UNLOCK() across network device drivers when accessing the per-interface multicast address list, if_multiaddrs. This will allow us to change the locking strategy without affecting our driver programming interface or binary interface. For two wireless drivers, remove unnecessary locking, since they don't actually access the multicast address list. Approved by: re (kib) MFC after: 6 weeks Notes: svn path=/head/; revision=195049
* Don't call bus_deactivate_resource() explicitly before callingYoshihiro Takahashi2007-03-211-4/+0
| | | | | | | | bus_release_resource(). This is needed for pc98 by upcoming nexus related change. Notes: svn path=/head/; revision=167753
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-02-231-1/+1
| | | | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Approved by: re (implicit?) Notes: svn path=/head/; revision=166923
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningRobert Watson2006-11-061-5/+6
| | | | | | | | | | | | | | | | specific privilege names to a broad range of privileges. These may require some future tweaking. Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net> Notes: svn path=/head/; revision=164033
* Trival whitespace change.David E. O'Brien2006-06-191-1/+0
| | | | Notes: svn path=/head/; revision=159770
* - Store pointer to the link-level address right in "struct ifnet"Ruslan Ermilov2005-11-111-2/+2
| | | | | | | | | | | | | rather than in ifindex_table[]; all (except one) accesses are through ifp anyway. IF_LLADDR() works faster, and all (except one) ifaddr_byindex() users were converted to use ifp->if_addr. - Stop storing a (pointer to) Ethernet address in "struct arpcom", and drop the IFP2ENADDR() macro; all users have been converted to use IF_LLADDR() instead. Notes: svn path=/head/; revision=152315
* Catch up with IFP2ENADDR() type change (array -> pointer).Ruslan Ermilov2005-11-111-1/+1
| | | | Notes: svn path=/head/; revision=152311
* Make sure that we call if_free(ifp) after bus_teardown_intr. Since weWarner Losh2005-09-191-1/+1
| | | | | | | | | | could get an interrupt after we free the ifp, and the interrupt handler depended on the ifp being still alive, this could, in theory, cause a crash. Eliminate this possibility by moving the if_free to after the bus_teardown_intr() call. Notes: svn path=/head/; revision=150306
* Fix FBSDid style nit.David E. O'Brien2005-08-101-1/+0
| | | | Notes: svn path=/head/; revision=148912
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andRobert Watson2005-08-091-7/+7
| | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=148887
* Modify device drivers supporting multicast addresses to lock if_addr_mtxRobert Watson2005-08-031-0/+2
| | | | | | | | | | | over iteration of their multicast address lists when synchronizing the hardware address filter with the network stack-maintained list. Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca> MFC after: 1 week Notes: svn path=/head/; revision=148654
* Stop embedding struct ifnet at the top of driver softcs. Instead theBrooks Davis2005-06-101-55/+58
| | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=147256
* Move if_wl_i82586.h into sys/dev/wl.Yoshihiro Takahashi2005-05-091-1/+1
| | | | Notes: svn path=/head/; revision=146019
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-061-1/+1
| | | | Notes: svn path=/head/; revision=139749
* Add missing <sys/module.h> includesPoul-Henning Kamp2004-05-301-0/+1
| | | | Notes: svn path=/head/; revision=129879
* 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
* Remove unused WL_IRQS macro.John Baldwin2004-05-111-2/+0
| | | | Notes: svn path=/head/; revision=129127
* Remove improper use of if_addrhead in device drivers to checkLuigi Rizzo2004-04-151-2/+0
| | | | | | | | | | | | | | | if the link-level address has been initialized already. The majority of modern drivers never does this and works fine, which makes me think that the check is totally unnecessary and a residue of cut&paste from other drivers. This change is done to simplify locking because now almost none of the drivers uses this field. The exceptions are "ct" "ctau" and "cx" where i am not sure if i can remove that part. Notes: svn path=/head/; revision=128293
* 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-2/+1
| | | | Notes: svn path=/head/; revision=126966
* 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
* Try to create some sort of consistency in how the routings to find theDavid E. O'Brien2003-11-131-5/+4
| | | | | | | | | | multicast hash are written. There are still two distinct algorithms used, and there actually isn't any reason each driver should have its own copy of this function as they could all share one copy of it (if it grew an additional argument). Notes: svn path=/head/; revision=122625
* Replace the if_name and if_unit members of struct ifnet with new membersBrooks Davis2003-10-311-17/+14
| | | | | | | | | | | | | | | | 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-1/+3
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* Get wlread() closer to working. Use m->m_len as the initial value forJohn Hay2003-04-171-1/+9
| | | | | | | | | bytes_in_mbuf rather than MCLBYTES. Add the ethertnet header to the front of the mbuf. Adjust bytes_in_mbuf inside the loop that reads the packet out of the card. Notes: svn path=/head/; revision=113606
* Add locking to wlinit().John Hay2003-04-171-0/+2
| | | | Notes: svn path=/head/; revision=113605
* Put the spl calls back until we are sure that everything that they coverJohn Hay2003-04-171-3/+14
| | | | | | | are locked. Notes: svn path=/head/; revision=113601
* Add locking and remove all the spl() calls.John Hay2003-04-161-22/+43
| | | | Notes: svn path=/head/; revision=113572
* Get rid of COMPAT_OLDISA and move in the direction of newbus.John Hay2003-04-161-228/+334
| | | | Notes: svn path=/head/; revision=113571
* Remove the register keyword.John Hay2003-04-161-62/+62
| | | | Notes: svn path=/head/; revision=113566
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-1/+1
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-1/+1
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,Jens Schweikhardt2003-01-011-1/+1
| | | | | | | especially in troff files. Notes: svn path=/head/; revision=108533
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/Jens Schweikhardt2002-12-301-1/+1
| | | | | | | Add FreeBSD Id tag where missing. Notes: svn path=/head/; revision=108470
* network interface driver changes:Sam Leffler2002-11-141-100/+54
| | | | | | | | | | | | | | | | | 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 typo in the BSD copyright: s/withough/without/Jens Schweikhardt2002-06-021-1/+1
| | | | | | | | Spotted and suggested by: des MFC after: 3 weeks Notes: svn path=/head/; revision=97748
* 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 support for FreeBSD 2.x from this driver.Warner Losh2002-02-271-120/+1
| | | | Notes: svn path=/head/; revision=91442
* KSE Milestone 2Julian Elischer2001-09-121-6/+6
| | | | | | | | | | | | | | | | | 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