summaryrefslogtreecommitdiffstats
path: root/sys/dev/ipw
Commit message (Collapse)AuthorAgeFilesLines
* Minor cleanup of vap create work:sam2008-05-121-1/+3
| | | | | | | | | | | | | o add IEEE80211_C_STA capability to indicate sta mode is supported (was previously assumed) and mark drivers as capable o add ieee80211_opcap array to map an opmode to the equivalent capability bit o move IEEE80211_C_OPMODE definition to where capabilities are defined so it's clear it should be kept in sync (on future additions) o check device capabilities in clone create before trying to create a vap; this makes driver checks unneeded o make error codes return on failed clone request unique o temporarily add console printfs on clone request failures to aid in debugging; these will move under DIAGNOSTIC or similar before release
* Only start the vaps if the init routine completed.thompsa2008-05-101-1/+2
|
* Unify all the wifi *_ioctl routinesthompsa2008-05-011-7/+9
| | | | | | | | | | | | | | - Limit grabbing the lock to SIOCSIFFLAGS. - Move ieee80211_start_all() to SIOCSIFFLAGS. - Remove SIOCSIFMEDIA as it is not useful. - Limit ether_ioctl to only SIOCGIFADDR. SIOCSIFADDR and SIOCSIFMTU have no affect as there is no input/output path in the vap parent. The vap code will handle the reinit of the mac address changes. - Split off ndis_ioctl_80211 as it was getting too different to wired devices. This fixes a copyout while locked and a lock recursion. Reviewed by: sam
* Multi-bss (aka vap) support for 802.11 devices.sam2008-04-202-574/+507
| | | | | | | | | | | Note this includes changes to all drivers and moves some device firmware loading to use firmware(9) and a separate module (e.g. ral). Also there no longer are separate wlan_scan* modules; this functionality is now bundled into the wlan module. Supported by: Hobnob and Marvell Reviewed by: many Obtained from: Atheros (some bits)
* Plug two potential (root-only, local) information leaks. buf is notphilip2007-12-051-4/+4
| | | | | | | | initialized before use and returned integrally instead of up to size. Submitted by: Ilja van Sprundel <ilja -at- netric.org> Reviewed by: secteam MFC after: 1 day
* Cast 'data' to 'u_char', as printf() requires this type to be unsigned. Thiswkoszek2007-12-041-1/+1
| | | | | | | | | is what gcc3 complains about. Without this change, it's impossible to build the kernel with gcc3. Tested by: cognet@ (mentor) Approved by: cognet@ (mentor)
* Remove unneeded debug printf that is broken on 64bit arches.thompsa2007-10-121-1/+1
|
* Update ipw to work with the new net80211 stack, plus other driver improvements.thompsa2007-10-123-219/+868
| | | | | | | | | | | | | - Add proper scanning support rather than letting the firmware grab the first access point - Overhaul state changes - Use macros for locking and provide _locked() versions of some functions - Increase debugging output - Use a callout rather than the old watchdog interface - Improve style, function names and defines - Add WPA (TKIP) support Based heavily on a patchset provided by Sam Leffler.
* o add 802.11 state machine states for DFS and client-side power savesam2007-09-051-0/+1
| | | | | | | o fixup drivers to ignore new states Reviewed by: avatar (?) Approved by: re (blanket wireless)
* MFp4: Fixing IPW_DEBUG enabled builds by converting the last piece ofavatar2007-07-051-1/+2
| | | | | | | ic->ic_des_essid to ic->ic_des_ssid[0]. Reviewed by: sam Approved by: re (kensmith)
* Don't use 64-byte header on each packet in radiotap.kevlo2007-06-291-3/+4
| | | | | Reviewed by: sam Approved by: re(bmah)
* Update 802.11 wireless support:sam2007-06-111-13/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o major overhaul of the way channels are handled: channels are now fully enumerated and uniquely identify the operating characteristics; these changes are visible to user applications which require changes o make scanning support independent of the state machine to enable background scanning and roaming o move scanning support into loadable modules based on the operating mode to enable different policies and reduce the memory footprint on systems w/ constrained resources o add background scanning in station mode (no support for adhoc/ibss mode yet) o significantly speedup sta mode scanning with a variety of techniques o add roaming support when background scanning is supported; for now we use a simple algorithm to trigger a roam: we threshold the rssi and tx rate, if either drops too low we try to roam to a new ap o add tx fragmentation support o add first cut at 802.11n support: this code works with forthcoming drivers but is incomplete; it's included now to establish a baseline for other drivers to be developed and for user applications o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates prepending mbufs for traffic generated locally o add support for Atheros protocol extensions; mainly the fast frames encapsulation (note this can be used with any card that can tx+rx large frames correctly) o add sta support for ap's that beacon both WPA1+2 support o change all data types from bsd-style to posix-style o propagate noise floor data from drivers to net80211 and on to user apps o correct various issues in the sta mode state machine related to handling authentication and association failures o enable the addition of sta mode power save support for drivers that need net80211 support (not in this commit) o remove old WI compatibility ioctls (wicontrol is officially dead) o change the data structures returned for get sta info and get scan results so future additions will not break user apps o fixed tx rate is now maintained internally as an ieee rate and not an index into the rate set; this needs to be extended to deal with multi-mode operation o add extended channel specifications to radiotap to enable 11n sniffing Drivers: o ath: add support for bg scanning, tx fragmentation, fast frames, dynamic turbo (lightly tested), 11n (sniffing only and needs new hal) o awi: compile tested only o ndis: lightly tested o ipw: lightly tested o iwi: add support for bg scanning (well tested but may have some rough edges) o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data o wi: lightly tested This work is based on contributions by Atheros, kmacy, sephe, thompsa, mlaier, kevlo, and others. Much of the scanning work was supported by Atheros. The 11n work was supported by Marvell.
* Drop the ipw softc lock before calling back into net80211, fixing ale2007-03-241-0/+2
| | | | | | | | LOR/deadlock. Tested by: Denis Shaposhnikov <dsh_AT_vlink.ru>, le@ LOR id: 205 MFC in: 3 days
* allow net80211 to fillin rate setssam2007-03-111-9/+0
| | | | MFC after: 2 weeks
* o break newbus api: add a new argument of type driver_filter_t topiso2007-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 Reviewed by: many Approved by: re@
* Cleanup and document the implementation of firmware(9) based onluigi2007-02-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a version that i posted earlier on the -current mailing list, and subsequent feedback received. The core of the change is just in sys/firmware.h and kern/subr_firmware.c, while other files are just adaptation of the clients to the ABI change (const-ification of some parameters and hiding of internal info, so this is fully compatible at the binary level). In detail: - reduce the amount of information exported to clients in struct firmware, and constify the pointer; - internally, document and simplify the implementation of the various functions, and make sure error conditions are dealt with properly. The diffs are large, but the code is really straightforward now (i hope). Note also that there is a subtle issue with the implementation of firmware_register(): currently, as in the previous version, we just store a reference to the 'imagename' argument, but we should rather copy it because there is no guarantee that this is a static string. I realised this while testing this code, but i prefer to fix it in a later commit -- there is no regression with respect to the past. Note, too, that the version in RELENG_6 has various bugs including missing locks around the module release calls, mishandling of modules loaded by /boot/loader, and so on, so an MFC is absolutely necessary there. I was just postponing it until this cleanup to avoid doing things twice. MFC after: 1 week
* Hold on to firmware images until the interface detaches sinceiedowse2006-06-102-5/+17
| | | | | | | | | firmware_get() will not work while resuming. Note that we can't simply drop the FIRMWARE_UNLOAD flag, because that will result in a firmware image that can never be unloaded by the user since the firmware subsystem will hold a linker reference to it (it's not clear that firmware_put() without FIRMWARE_UNLOAD ever does quite what you'd want).
* add missed calls to bpf_peers_presentsam2006-06-021-1/+1
|
* Fix the following bpf(4) race condition which can result in a panic:csjp2006-06-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (1) bpf peer attaches to interface netif0 (2) Packet is received by netif0 (3) ifp->if_bpf pointer is checked and handed off to bpf (4) bpf peer detaches from netif0 resulting in ifp->if_bpf being initialized to NULL. (5) ifp->if_bpf is dereferenced by bpf machinery (6) Kaboom This race condition likely explains the various different kernel panics reported around sending SIGINT to tcpdump or dhclient processes. But really this race can result in kernel panics anywhere you have frequent bpf attach and detach operations with high packet per second load. Summary of changes: - Remove the bpf interface's "driverp" member - When we attach bpf interfaces, we now set the ifp->if_bpf member to the bpf interface structure. Once this is done, ifp->if_bpf should never be NULL. [1] - Introduce bpf_peers_present function, an inline operation which will do a lockless read bpf peer list associated with the interface. It should be noted that the bpf code will pickup the bpf_interface lock before adding or removing bpf peers. This should serialize the access to the bpf descriptor list, removing the race. - Expose the bpf_if structure in bpf.h so that the bpf_peers_present function can use it. This also removes the struct bpf_if; hack that was there. - Adjust all consumers of the raw if_bpf structure to use bpf_peers_present Now what happens is: (1) Packet is received by netif0 (2) Check to see if bpf descriptor list is empty (3) Pickup the bpf interface lock (4) Hand packet off to process From the attach/detach side: (1) Pickup the bpf interface lock (2) Add/remove from bpf descriptor list Now that we are storing the bpf interface structure with the ifnet, there is is no need to walk the bpf interface list to locate the correct bpf interface. We now simply look up the interface, and initialize the pointer. This has a nice side effect of changing a bpf interface attach operation from O(N) (where N is the number of bpf interfaces), to O(1). [1] From now on, we can no longer check ifp->if_bpf to tell us whether or not we have any bpf peers that might be interested in receiving packets. In collaboration with: sam@ MFC after: 1 month
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-161-1/+0
| | | | unnecessary.
* Don't read channel list from EEPROM since we were already scanning alldamien2006-03-131-10/+5
| | | | 802.11b channels (1-14) regardless of what EEPROM says.
* sync w/ iwi:damien2006-03-123-267/+252
| | | | | | o fix locking o use firmware(9) o cosmetic
* Use memcpy/memset consistently accross ipw and iwi instead of bcopy/bzero.damien2005-11-201-6/+6
|
* Be more robust when handling Rx interrupts. If we can't allocate and DMA mapdamien2005-11-131-24/+42
| | | | | | | a new mbuf, just discard the received frame and reuse the old mbuf. This should fix kernel panics on high network traffic. MFC after: 2 weeks
* Make sure that we call if_free(ifp) after bus_teardown_intr. Since weimp2005-09-191-1/+2
| | | | | | | 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.
* Remove IEEE80211_C_WPA from capabilities flags. WPA support is not fullydamien2005-08-201-2/+1
| | | | | | implemented in ipw. MFC after: 1 week
* Export adapter's internal statistics sysctl even if IPW_DEBUG is not defined.damien2005-08-201-6/+0
| | | | MFC after: 1 week
* Clarify/fix handling of the current channel:sam2005-08-101-1/+1
| | | | | | | | | | | | | | | | | | | o add ic_curchan and use it uniformly for specifying the current channel instead of overloading ic->ic_bss->ni_chan (or in some drivers ic_ibss_chan) o add ieee80211_scanparams structure to encapsulate scanning-related state captured for rx frames o move rx beacon+probe response frame handling into separate routines o change beacon+probe response handling to treat the scan table more like a scan cache--look for an existing entry before adding a new one; this combined with ic_curchan use corrects handling of stations that were previously found at a different channel o move adhoc neighbor discovery by beacon+probe response frames to a new ieee80211_add_neighbor routine Reviewed by: avatar Tested by: avatar, Michal Mertl MFC after: 2 weeks
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-091-11/+11
| | | | | | | | | | | | | | 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
* Cleanup beacon/listen interval handling:sam2005-08-081-1/+1
| | | | | | | | | | | | | | | | | o separate configured beacon interval from listen interval; this avoids potential use of one value for the other (e.g. setting powersavesleep to 0 clobbers the beacon interval used in hostap or ibss mode) o bounds check the beacon interval received in probe response and beacon frames and drop frames with bogus settings; not clear if we should instead clamp the value as any alteration would result in mismatched sta+ap configuration and probably be more confusing (don't want to log to the console but perhaps ok with rate limiting) o while here up max beacon interval to reflect WiFi standard Noticed by: Martin <nakal@nurfuerspam.de> MFC after: 1 week
* simplify ieee80211_node_authorize and ieee80211_node_unauthorize api'ssam2005-07-221-1/+1
| | | | MFC after: 3 days
* fix allocation of rx dma buffers. buffers must be contiguous.damien2005-07-081-2/+2
| | | | Approved by: re (scottl)
* reclaim mbuf when ieee80211_crypto_encap failssam2005-07-071-1/+3
| | | | | Approved by: re (scottl) Obtained from: netbsd
* o Make ipw(4) more robust against frames received with a bad length.damien2005-07-031-3/+9
| | | | | | | o Minor consistency tweaks. Reviewed by: silby (mentor) Approved by: re (scottl)
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-102-4/+11
| | | | | | | | | | | | | | | | | | | | 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
* Printing a warning once when trying to bring up interface before firmware load.avatar2005-06-012-0/+4
| | | | | Obtained from: imp (if_iwi) Reviewed by: damien
* Clear device-specific PCI register 0x41 during attach and on resume.damien2005-05-221-0/+4
| | | | Appoved by: silby (mentor)
* Initial import of ipw, iwi, ral and ural drivers:damien2005-04-183-0/+2729
ipw - Intel PRO/Wireless 2100 iwi - Intel PRO/Wireless 2200BG/2225BG/2915ABG ral - Ralink Technology RT2500 ural - Ralink Technology RT2500USB Approved by: silby (mentor)
OpenPOWER on IntegriCloud