summaryrefslogtreecommitdiffstats
path: root/sys/dev/wpi
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos - remove duplicate "the".brucec2011-02-211-1/+1
| | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
* Pull ieee80211_ratectl_node_init() calls from drivers into net80211.bschmidt2011-01-171-10/+0
| | | | | | | | This fixes hostap mode for at least ral(4) and run(4), because there is no sufficient call into drivers which could be used initialize the node related ratectl variables. MFC after: 3 days
* The RX path is missing a few bus_dmamap_*() calls, this results inbschmidt2010-12-301-3/+15
| | | | | | | | | | modification of memory which was already free'd and eventually in: wpi0: could not map mbuf (error 12) wpi0: wpi_rx_intr: bus_dmamap_load failed, error 12 and an usuable device. PR: kern/144898 MFC after: 3 days
* Fix panic trying to use monitor mode. The iwn_cmd() calls issued bybschmidt2010-12-191-0/+2
| | | | | | | | iwn_config() want to msleep() on the mutex. PR: kern/138427 Submitted by: Henry Hu <henry.hu.sh at gmail.com> MFC after: 3 days
* Add 2 missing bus_dmamap_sync() calls. Those fix random 'scan timeout',bschmidt2010-12-181-0/+6
| | | | | | | | 'could not set power mode', 'device config failed' and other errors due reading invalid memory. Obtained from: OpenBSD MFC after: 3 days
* Fix association on 5GHz channels. The device is initially configured usingbschmidt2010-12-181-0/+3
| | | | | | | | a 2GHz channel with appropriate flags set to sc->config. Due to not zeroing sc->config for auth/assoc those flags are still set while trying to connect on a 5GHz channel. MFC after: 3 days
* Fix a panic while disabling the RF kill button, caller of thebschmidt2010-12-181-2/+0
| | | | | | | wpi_rfkill_resume() function will take care of the lock. PR: kern/144898 MFC after: 3 days
* Fix scanning after loosing a connection. The firmware assumes that as longbschmidt2010-12-061-2/+19
| | | | | | | | | | | | | | as an association ID is set any scan is supposed to be a background scan. This implies that the firmware will switch back to the associated channel after a certain threshold, though, we are not notified about that. We currently catch this case by a timer which will reset the firmware after a 'scan timeout', though, upper layers are not notified about that and will simply hang until manual intervention. Fix this by resetting the firmware's knowledge about any association on RUN -> ASSOC and !INIT -> SCAN transitions. Tested by: Zhihao Yuan <lichray at gmail.com> MFC after: 1 week
* Instead of using the AMRR ratectl algo as default for drivers which havebschmidt2010-11-061-1/+0
| | | | | | | | | | | | | | | the IEEE80211_C_RATECTL flag set, default to NONE for all drivers. Only if a driver calls ieee80211_ratectl_init() check if the NONE algo is still selected and try to use AMRR in that case. Drivers are still free to use any other algo by calling ieee80211_ratectl_set() prior to the ieee80211_ratectl_init() call. After this change it is now safe to assume that a ratectl algo is always available and selected, which renders the IEEE80211_C_RATECTL flag pretty much useless. Therefore revert r211314 and 211546. Reviewed by: rpaulo MFC after: 2 weeks
* Introduce IEEE80211_C_RATECTL, drivers which use the ratectl frameworkbschmidt2010-08-141-0/+1
| | | | | | should set this capability. MFC after: 2 weeks
* Add new tunable 'net.link.ifqmaxlen' to set default send interfacesobomax2010-05-031-2/+2
| | | | | | | | | | 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
* Fix recent breakage: wpi_newassoc() wasn't supposed to be removed andrpaulo2010-04-091-0/+10
| | | | | | | it needs to call ieee80211_ratectl_node_init(). Submitted by: bschmidt MFC after: 1 month
* net80211 rate control framework (net80211 ratectl).rpaulo2010-04-072-44/+10
| | | | | | | | | | | | | | | | | This framework allows drivers to abstract the rate control algorithm and just feed the framework with the usable parameters. The rate control framework will now deal with passing the parameters to the selected algorithm. Right now we have AMRR (the default) and RSSADAPT but there's no way to select one with ifconfig, yet. The objective is to have more rate control algorithms in the net80211 stack so all drivers[0] can use it. Ideally, we'll have the well-known sample rate control algorithm in the net80211 at some point so all drivers can use it (not just ath). [0] all drivers that do rate control in software, that is. Reviewed by: bschmidt, thompsa, weyongo MFC after: 1 months
* Don't panic on failure to attach if we fail before or during thegavin2009-12-141-4/+5
| | | | | | | | | | | if_alloc() of ifp. This fixes the panic reported in the PR, but not the attach failure. PR: kern/139079 Tested by: Steven Noonan <steven uplinklabs.net> Reviewed by: thompsa Approved by: ed (mentor) MFC after: 2 weeks`
* Properly turn off debuggingdougb2009-11-081-1/+3
| | | | LART applied (gently) by: sam
* Turn off WPI_DEBUG by default as the driver seems sufficiently stabledougb2009-11-071-2/+0
| | | | | | at this point. Reviewed by: benjsc, thompsa
* For ic_opmode switch cases, provide a default label with a printf sayingrpaulo2009-07-101-0/+3
| | | | | | this opmode is not supported. Approved by: re (kib)
* Overhaul monitor mode handling:sam2009-05-202-22/+10
| | | | | | | | | | | | | | | | | | | | | | | | o replace DLT_IEEE802_11 support in net80211 with DLT_IEEE802_11_RADIO and remove explicit bpf support from wireless drivers; drivers now use ieee80211_radiotap_attach to setup shared data structures that hold the radiotap header for each packet tx/rx o remove rx timestamp from the rx path; it was used only by the tdma support for debugging and was mostly useless due to it being 32-bits and mostly unavailable o track DLT_IEEE80211_RADIO bpf attachments and maintain per-vap and per-com state when there are active taps o track the number of monitor mode vaps o use bpf tap and monitor mode vap state to decide when to collect radiotap state and dispatch frames; drivers no longer explicitly directly check bpf state or use bpf calls to tap frames o handle radiotap state updates on channel change in net80211; drivers should not do this (unless they bypass net80211 which is almost always a mistake) o update various drivers to be more consistent/correct in handling radiotap o update ral to include TSF in radiotap'd frames o add promisc mode callback to wi Reviewed by: cbzimmer, rpaulo, thompsa
* Abort any scan on a fatal firmware. ic_scan_curchan is overridden to performthompsa2009-05-101-0/+3
| | | | | the scan in firmware and this relies on the firmware to wake up the scan task on completion.
* Create a taskqueue for each wireless interface which provides a serialisedthompsa2009-05-022-232/+61
| | | | | | | | | | | | | | | | | | | | | | | sleepable context for net80211 driver callbacks. This removes the need for USB and firmware based drivers to roll their own code to defer the chip programming for state changes, scan requests, channel changes and mcast/promisc updates. When a driver callback completes the hardware state is now guaranteed to have been updated and is in sync with net80211 layer. This nukes around 1300 lines of code from the wireless device drivers making them more readable and less race prone. The net80211 layer has been updated as follows - all state/channel changes are serialised on the taskqueue. - ieee80211_new_state() always queues and can now be called from any context - scanning runs from a single taskq function and executes to completion. driver callbacks are synchronous so the channel, phy mode and rx filters are guaranteed to be set in hardware before probe request frames are transmitted. Help and contributions from Sam Leffler. Reviewed by: sam
* Hoist 802.11 encapsulation up into net80211:sam2009-03-301-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | o call ieee80211_encap in ieee80211_start so frames passed down to drivers are already encapsulated o remove ieee80211_encap calls in drivers o fixup wi so it recreates the 802.3 head it requires from the 802.11 header contents o move fast-frame aggregation from ath to net80211 (conditional on IEEE80211_SUPPORT_SUPERG): - aggregation is now done in ieee80211_start; it is enabled when the packets/sec exceeds ieee80211_ffppsmin (net.wlan.ffppsmin) and frames are held on a staging queue according to ieee80211_ffagemax (net.wlan.ffagemax) to wait for a frame to combine with - drivers must call back to age/flush the staging queue (ath does this on tx done, at swba, and on rx according to the state of the tx queues and/or the contents of the staging queue) - remove fast-frame-related data structures from ath - add ieee80211_ff_node_init and ieee80211_ff_node_cleanup to handle per-node fast-frames state (we reuse 11n tx ampdu state) o change ieee80211_encap calling convention to include an explicit vap so frames coming through a WDS vap are recognized w/o setting M_WDS With these changes any device able to tx/rx 3Kbyte+ frames can use fast-frames. Reviewed by: thompsa, rpaulo, avatar, imp, sephe
* Eliminate ic_myaddr so changing the mac address of a device works correctly:sam2009-03-291-9/+9
| | | | | | | | | | | o remove ic_myaddr from ieee80211com o change ieee80211_ifattach to take the mac address of the physical device and use that to setup the lladdr. o replace all references to ic_myaddr in drivers by IF_LLADDR o related cleanups (e.g. kill dead code) PR: kern/133178 Reviewed by: thompsa, rpaulo
* Put the "%d retries" debug message in the transmit path behind WPI_DEBUG_TXjmallett2009-03-271-1/+1
| | | | | | | rather than behind a seemingly accidental constant likely left over from one of the related drivers which uses log levels rather than per-facility debugging flags. This should get rid of contextless messages on the console for people who have not set (or cleared the default) debugging flags.
* o) Check that no overrun or CRC errors were encountered in receiving ajmallett2009-03-272-4/+15
| | | | | | | | | | | | | packet. Linux, OpenBSD and our iwn(4) all do this. It also results in a huge performance improvement (and the rejection of a fair number of apparently-bad packets on receive) on my hardware. o) Like the wpi(4) driver in OpenBSD, and like our iwn(4), also drop runt packets. o) Don't bother doing IFQ_POLL and then IFQ_DRV_DEQUEUE, just do IFQ_DRV_DEQUEUE outright. This is more similar to how OpenBSD and our iwn(4) work. Reviewed by: sam
* remove references to ic_statssam2009-02-131-2/+0
| | | | Spotted by: Lucius Windschuh <lwindschuh@googlemail.com>
* o use the new association callback to notify the driver when joining a bsssam2008-10-271-5/+0
| | | | | | | in sta and adhoc modes; this should've been done forever ago as most all drivers use this hook to set per-station transmit parameters such as for tx rate control o adjust drivers to remove explicit calls to the driver newassoc method
* Correct detection of particular wpi cards which only support b/gbenjsc2008-08-241-4/+4
| | | | | | | | | and fix the output to indicate b/g not a/g Submitted by: ischram at telenet.be Reviewed by: thompsa Approved by: sam (co-mentor) MFC after: 1 month
* - Fix compile if WPI_DEBUG is not definedthompsa2008-06-231-27/+39
| | | | | | - Allow debug.wpi to be set from a tunable - Put ring reset messages back under debug - Add more debug output around channel init
* Change the calling convention for ic_node_alloc to deal withsam2008-06-071-2/+4
| | | | | | | | | | | | some longstanding issues: o pass the vap since it's now the "coin of the realm" and required to do things like set initial tx parameters in private node state for use prior to association o pass the mac address as cards that maintain outboard station tables require this to create an entry (e.g. in ibss mode) o remove the node table reference, we only have one node table and it's unlikely this will change so this is not needed to find the com structure
* The beacon miss notification must run without locks held has it calls back intothompsa2008-05-162-2/+16
| | | | wpi_raw_xmit();
* Minor cleanup of vap create work:sam2008-05-121-1/+2
| | | | | | | | | | | | | 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
* Unify all the wifi *_ioctl routinesthompsa2008-05-011-7/+8
| | | | | | | | | | | | | | - 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-408/+385
| | | | | | | | | | | 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)
* fix inverted test that disabled ACK's on xmitsam2008-03-121-1/+1
|
* Update wpi(4) with stability fixesthompsa2008-03-103-607/+514
| | | | | | | | | | | | | | - remove second taskqueue - busdma 16k alignment workaround - use busdma instead of external mbuf storage on Rx - locking fixes - net80211 state change fixes - improve scanning reliability - improve radio hw switch interaction - consolidate callouts Parts obtained from: benjsc, sam Tested by: many
* Give MEXTADD() another argument to make both void pointers to thephk2008-02-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | free function controlable, instead of passing the KVA of the buffer storage as the first argument. Fix all conventional users of the API to pass the KVA of the buffer as the first argument, to make this a no-op commit. Likely break the only non-convetional user of the API, after informing the relevant committer. Update the mbuf(9) manual page, which was already out of sync on this point. Bump __FreeBSD_version to 800016 as there is no way to tell how many arguments a CPP macro needs any other way. This paves the way for giving sendfile(9) a way to wait for the passed storage to have been accessed before returning. This does not affect the memory layout or size of mbufs. Parental oversight by: sam and rwatson. No MFC is anticipated.
* rx mbufs must have a pkthdr; use m_gethdr to populate the rx ringsam2008-01-261-1/+1
| | | | | | | (and while here correct the mbuf type) Submitted by: Sam Banks <w0lfie@clear.net.nz> MFC after: 1 week
* - Retire npe_defrag(), gem_defrag(), msk_defrag(), nfe_defrag(), andjhb2008-01-171-1/+1
| | | | | | re_defrag() and use m_collapse() instead. - Replace a reference to ath_defrag() in a comment in if_wpi.c with m_collapse().
* Fix up a race condition with the callout_stop method in newstate.benjsc2007-11-271-1/+4
| | | | | | | | | The call should happen with the driver lock held. We don't hold the driver lock in newstate as it's a separate thread where we can't sleep (and we only call wpi_cmd in async mode). Discovered By: Attillo's callout rework Approved By: mlaier (comentor)
* Handle missed beacons correctlybenjsc2007-11-272-1/+22
| | | | Approved by: mlaier (comentor)
* Remove the IEEE80211_C_WEP capability flag - setting it makes net80211 expectrink2007-11-131-2/+1
| | | | | | | | | | | | that the driver will handle WEP encryption. However, this does not seem to be implemented by this driver (or maybe the chipset doesn't support it?) Removing the flag makes my wpi card work using wpa_supplicant(8) on a network with 802.1x security (without this change it authenticated fine, but tcpdump only saw garbage packets) Reviewed by: benjsc, imp (mentor) Approved by: imp (mentor), sam
* Turn off debug output, its been confusing users.benjsc2007-11-081-1/+1
| | | | Approved by: mlaier (comentor)
* Initial Import of wpi driver based on p4 changeset 128641.benjsc2007-11-053-0/+4899
This import includes: o wpi Wireless driver for the Intel 3945 Wireless Lan Controller (802.11abg) (sys/dev/wpi) o Intel firmware revision 2.14.4 & associated LICENSE (sys/dev/contrib/wpi, sys/contrib/dev/wpi/LICENSE) o wpifw Firmware driver (sys/modules/wpifw) Approved by: mlaier, sam (co-mentors)
OpenPOWER on IntegriCloud