aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ral/rt2560.c
Commit message (Collapse)AuthorAgeFilesLines
* net80211: move ieee80211_free_node() call on error from ic_raw_xmit() to ↵Adrian Chadd2015-10-121-3/+0
| | | | | | | | | | | | | ieee80211_raw_output(). This doesn't free the mbuf upon error; the driver ic_raw_xmit method is still doing that. Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3774 Notes: svn path=/head/; revision=289165
* net80211: drop ieee80211_beacon_offsets parameter from ↵Adrian Chadd2015-10-031-3/+2
| | | | | | | | | | ieee80211_beacon_alloc() and ieee80211_beacon_update() Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3659 Notes: svn path=/head/; revision=288636
* net80211: include one copy of struct ieee80211_beacon_offsets into ieee80211vapAdrian Chadd2015-09-221-5/+3
| | | | | | | | Submitted by: Andriy Voskoboinyk <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3658 Notes: svn path=/head/; revision=288095
* net80211 & wireless drivers: remove duplicate defines (noop)Adrian Chadd2015-09-221-9/+4
| | | | | | | | | | | | | | * IEEE80211_DIR_DSTODS(wh) -> IEEE80211_IS_DSTODS(wh). * N(a) -> nitems(a). * Remove LE_READ_2(p)/LE_READ_4(p) definitions (and include ieee80211_input.h instead). * <drvname>_TXOP_TO_US(txop) -> IEEE80211_TXOP_TO_US(txop). * Put IEEE80211_RV(v) into ieee80211_proto.h and remove local RV(v) definitions. Submitted by: Andriy Voskoboinyk <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3705 Notes: svn path=/head/; revision=288087
* Replay r286410. Change KPI of how device drivers that provide wirelessGleb Smirnoff2015-08-271-189/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | connectivity interact with the net80211 stack. Historical background: originally wireless devices created an interface, just like Ethernet devices do. Name of an interface matched the name of the driver that created. Later, wlan(4) layer was introduced, and the wlanX interfaces become the actual interface, leaving original ones as "a parent interface" of wlanX. Kernelwise, the KPI between net80211 layer and a driver became a mix of methods that pass a pointer to struct ifnet as identifier and methods that pass pointer to struct ieee80211com. From user point of view, the parent interface just hangs on in the ifconfig list, and user can't do anything useful with it. Now, the struct ifnet goes away. The struct ieee80211com is the only KPI between a device driver and net80211. Details: - The struct ieee80211com is embedded into drivers softc. - Packets are sent via new ic_transmit method, which is very much like the previous if_transmit. - Bringing parent up/down is done via new ic_parent method, which notifies driver about any changes: number of wlan(4) interfaces, number of them in promisc or allmulti state. - Device specific ioctls (if any) are received on new ic_ioctl method. - Packets/errors accounting are done by the stack. In certain cases, when driver experiences errors and can not attribute them to any specific interface, driver updates ic_oerrors or ic_ierrors counters. Details on interface configuration with new world order: - A sequence of commands needed to bring up wireless DOESN"T change. - /etc/rc.conf parameters DON'T change. - List of devices that can be used to create wlan(4) interfaces is now provided by net.wlan.devices sysctl. Most drivers in this change were converted by me, except of wpi(4), that was done by Andriy Voskoboinyk. Big thanks to Kevin Lo for testing changes to at least 8 drivers. Thanks to pluknet@, Oliver Hartmann, Olivier Cochard, gjb@, mmoll@, op@ and lev@, who also participated in testing. Reviewed by: adrian Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=287197
* Revert the wifi ifnet changes until things are more baked and tested.Adrian Chadd2015-08-081-118/+189
| | | | | | | | | | | | * 286410 * 286413 * 286416 The initial commit broke a variety of debug and features that aren't in the GENERIC kernels but are enabled in other platforms. Notes: svn path=/head/; revision=286437
* Change KPI of how device drivers that provide wireless connectivity interactGleb Smirnoff2015-08-071-189/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with the net80211 stack. Historical background: originally wireless devices created an interface, just like Ethernet devices do. Name of an interface matched the name of the driver that created. Later, wlan(4) layer was introduced, and the wlanX interfaces become the actual interface, leaving original ones as "a parent interface" of wlanX. Kernelwise, the KPI between net80211 layer and a driver became a mix of methods that pass a pointer to struct ifnet as identifier and methods that pass pointer to struct ieee80211com. From user point of view, the parent interface just hangs on in the ifconfig list, and user can't do anything useful with it. Now, the struct ifnet goes away. The struct ieee80211com is the only KPI between a device driver and net80211. Details: - The struct ieee80211com is embedded into drivers softc. - Packets are sent via new ic_transmit method, which is very much like the previous if_transmit. - Bringing parent up/down is done via new ic_parent method, which notifies driver about any changes: number of wlan(4) interfaces, number of them in promisc or allmulti state. - Device specific ioctls (if any) are received on new ic_ioctl method. - Packets/errors accounting are done by the stack. In certain cases, when driver experiences errors and can not attribute them to any specific interface, driver updates ic_oerrors or ic_ierrors counters. Details on interface configuration with new world order: - A sequence of commands needed to bring up wireless DOESN"T change. - /etc/rc.conf parameters DON'T change. - List of devices that can be used to create wlan(4) interfaces is now provided by net.wlan.devices sysctl. Most drivers in this change were converted by me, except of wpi(4), that was done by Andriy Voskoboinyk. Big thanks to Kevin Lo for testing changes to at least 8 drivers. Thanks to Olivier Cochard, gjb@, mmoll@, op@ and lev@, who also participated in testing. Details here: https://wiki.freebsd.org/projects/ifnet/net80211 Still, drivers: ndis, wtap, mwl, ipw, bwn, wi, upgt, uath were not tested. Changes to mwl, ipw, bwn, wi, upgt are trivial and chances of problems are low. The wtap wasn't compilable even before this change. But the ndis driver is complex, and it is likely to be broken with this commit. Help with testing and debugging it is appreciated. Differential Revision: D2655, D2740 Sponsored by: Nginx, Inc. Sponsored by: Netflix Notes: svn path=/head/; revision=286410
* Change three methods in struct ieee80211com, namely ic_updateslot,Gleb Smirnoff2015-05-251-12/+11
| | | | | | | | | | | ic_update_mcast and ic_update_promisc, to pass pointer to the ieee80211com, not to the ifnet. Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=283540
* Set ic_softc in all 802.11 drivers. Not required right now, but will beGleb Smirnoff2015-05-251-0/+1
| | | | | | | | | | used quite soon. Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=283537
* Make net80211 drivers supply their device name to the net80211 layer, soGleb Smirnoff2015-05-251-0/+1
| | | | | | | | | | that the latter doesn't need to go through struct ifnet to get their name. Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=283527
* Mechanically convert to if_inc_counter().Gleb Smirnoff2014-09-191-12/+12
| | | | Notes: svn path=/head/; revision=271849
* Rename definition of IEEE80211_FC1_WEP to IEEE80211_FC1_PROTECTED.Kevin Lo2014-01-081-2/+2
| | | | | | | | | | | | | | The origin of WEP comes from IEEE Std 802.11-1997 where it defines whether the frame body of MAC frame has been encrypted using WEP algorithm or not. IEEE Std. 802.11-2007 changes WEP to Protected Frame, indicates whether the frame is protected by a cryptographic encapsulation algorithm. Reviewed by: adrian, rpaulo Notes: svn path=/head/; revision=260444
* 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
* Implement basic 802.11n awareness in the PHY and AMRR rate control code.Adrian Chadd2013-07-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add 802.11n 2ghz and 5ghz tables, including legacy rates and up to MCS23 rates (3x3.) * Populate the rate code -> rate index lookup table with MCS _and_ normal rates, but _not_ the basic rate flag. Since the basic rate flag is the same as the MCS flag, we can only use one. * Introduce some accessor inlines that do PLCP and rate table lookup/access and enforce that it doesn't set the basic rate bit. They're not designed for MCS rates, so it will panic. * Start converting drivers that use the rate table stuff to use the accessor inlines and strip the basic flag. * Teach AMRR about basic 11n - it's still as crap for MCS as it is being used by iwn, so it's not a step _backwardS_. * Convert iwn over to accept 11n MCS rates rather than 'translate' legacy to MCS rates. It doesn't use a lookup table any longer; instead it's a function which takes the current node (for HT parameters) and the rate code, and returns the hardware PLCP code to use. Tested: * ath - it's a no-op, and it works that way * iwn - both 11n and non-11n Notes: svn path=/head/; revision=252727
* Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff2012-12-041-3/+3
| | | | | | | malloc(9) flags in sys/dev. Notes: svn path=/head/; revision=243857
* Fix some net80211 enum nits:Bernhard Schmidt2011-12-171-7/+7
| | | | | | | | | | | | | - ic_vap_create() uses an ieee80211_opmode argument - ieee80211_rate2media() takes an ieee80211_phymode argument - ieee80211_plcp2rate() takes an ieee80211_phytype argument - cast to enum ieee80211_protmode and ieee80211_roamingmode to silence compiler warnings Submitted by: arundel@ Notes: svn path=/head/; revision=228621
* Don't hardcode assumptions about basic rates, similar to what the rt2661Bernhard Schmidt2011-04-091-13/+21
| | | | | | | support code does. While here remove an unnecessary loop. Notes: svn path=/head/; revision=220502
* Pull ieee80211_ratectl_node_init() calls from drivers into net80211.Bernhard Schmidt2011-01-171-9/+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 Notes: svn path=/head/; revision=217511
* Instead of using the AMRR ratectl algo as default for drivers which haveBernhard Schmidt2010-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 Notes: svn path=/head/; revision=214894
* If rt2560_bbp_init() fails, don't drop the lock as the callers ofJohn Baldwin2010-09-291-2/+1
| | | | | | | | | | rt2560_init_locked() expect the lock to be held on return. Reported by: Anton Shterenlikht mexas of bristol ac uk MFC after: 1 week Notes: svn path=/head/; revision=213268
* Introduce IEEE80211_C_RATECTL, drivers which use the ratectl frameworkBernhard Schmidt2010-08-141-0/+1
| | | | | | | | | should set this capability. MFC after: 2 weeks Notes: svn path=/head/; revision=211314
* Add new tunable 'net.link.ifqmaxlen' to set default send interfaceMaxim Sobolev2010-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 Notes: svn path=/head/; revision=207554
* Remove unnecessary assignment.Rui Paulo2010-04-071-1/+0
| | | | | | | | Submitted by: gavin MFC after: 1 month Notes: svn path=/head/; revision=206372
* net80211 rate control framework (net80211 ratectl).Rui Paulo2010-04-071-35/+22
| | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=206358
* Implementation of the upcoming Wireless Mesh standard, 802.11s, on theRui Paulo2009-07-111-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | net80211 wireless stack. This work is based on the March 2009 D3.0 draft standard. This standard is expected to become final next year. This includes two main net80211 modules, ieee80211_mesh.c which deals with peer link management, link metric calculation, routing table control and mesh configuration and ieee80211_hwmp.c which deals with the actually routing process on the mesh network. HWMP is the mandatory routing protocol on by the mesh standard, but others, such as RA-OLSR, can be implemented. Authentication and encryption are not implemented. There are several scripts under tools/tools/net80211/scripts that can be used to test different mesh network topologies and they also teach you how to setup a mesh vap (for the impatient: ifconfig wlan0 create wlandev ... wlanmode mesh). A new build option is available: IEEE80211_SUPPORT_MESH and it's enabled by default on GENERIC kernels for i386, amd64, sparc64 and pc98. Drivers that support mesh networks right now are: ath, ral and mwl. More information at: http://wiki.freebsd.org/WifiMesh Please note that this work is experimental. Also, please note that bridging a mesh vap with another network interface is not yet supported. Many thanks to the FreeBSD Foundation for sponsoring this project and to Sam Leffler for his support. Also, I would like to thank Gateworks Corporation for sending me a Cambria board which was used during the development of this project. Reviewed by: sam Approved by: re (kensmith) Obtained from: projects/mesh11s Notes: svn path=/head/; revision=195618
* validate tx rate(s) in the raw xmit pathSam Leffler2009-05-291-3/+3
| | | | | | | Tested by: "Paul B. Mahol" <onemda@gmail.com> (rum, bwi) Notes: svn path=/head/; revision=193073
* Overhaul monitor mode handling:Sam Leffler2009-05-201-44/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=192468
* Hoist 802.11 encapsulation up into net80211:Sam Leffler2009-03-301-8/+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 Notes: svn path=/head/; revision=190579
* o add ic_rt to track the rate table for the current channel; this enablesSam Leffler2009-03-291-12/+9
| | | | | | | | calculation of packet transmit times to do things like check txop limits o remove equivalent driver code and convert to use net80211 state Notes: svn path=/head/; revision=190532
* Eliminate ic_myaddr so changing the mac address of a device works correctly:Sam Leffler2009-03-291-4/+4
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=190526
* o use the new association callback to notify the driver when joining a bssSam Leffler2008-10-271-6/+1
| | | | | | | | | | 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 Notes: svn path=/head/; revision=184345
* Change the calling convention for ic_node_alloc to deal withSam Leffler2008-06-071-3/+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 Notes: svn path=/head/; revision=179643
* Update PLCP<->rate mapping support:Sam Leffler2008-05-121-2/+26
| | | | | | | | | | | | | o correct mapping of CCK rates to PLCP; was using nonstandard Ralink values which just happened to also be used by Zydas (so went unnoticed) o change ieee80211_plcp2rate api to take a phy type instead of a flag that indicates ofdm/!ofdm o update drivers to match (restore per-driver code to map rate->PLCP) Reviewed by: sephe, weongyo, thompsa Notes: svn path=/head/; revision=178958
* Minor cleanup of vap create work:Sam Leffler2008-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 Notes: svn path=/head/; revision=178957
* fix typo's that broke duration calculation on protection framesSam Leffler2008-05-111-1/+1
| | | | Notes: svn path=/head/; revision=178948
* Only start the vaps if the init routine completed.Andrew Thompson2008-05-101-1/+2
| | | | Notes: svn path=/head/; revision=178931
* Unify all the wifi *_ioctl routinesAndrew Thompson2008-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 Notes: svn path=/head/; revision=178704
* Multi-bss (aka vap) support for 802.11 devices.Sam Leffler2008-04-201-684/+537
| | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=178354
* Various bug fixes for 2560 parts of ral(4):Sepherosa Ziehau2008-02-031-33/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rename rt2560_read_eeprom to rt2560_read_config, we already have rt2560_eeprom_read - If hardware gives us wrong encryption done index, shout out loudly and terminate the processing loop - Process encryption done if RX done bit is set in interrupt status register (according to Ralink Linux driver) - Turn VALID/BUSY bits in TX descriptor only after TX descriptor is fully setup - Fix BBP read: RT2560_BBPCSR can't be written until its RT2560_BBP_BUSY bit is off (according to Ralink Linux driver) - Skip invalid (0 of 0xffff) BBP register/value entries stored in EEPROM - Fix channel TX power location in EEPROM, if channel TX power is above 31 set it to 24 (TX power only has 5bits in RF register, "24" is according to Ralink Linux driver) - Configure BBP according to the BBP register/value stored in EEPROM, restore BBP17 (RX sensitivity tuning) to default value after this. - Set TX/RX antenna after BBP is initialized; these two operation will try to set BBP registers - Reconfigure ACK TX time registers according to 802.11g standard (TX @36Mb, other side's ACK should be sent @24Mb). - 2560 parts have two TX ring: one for management/control packets, one for data packets. Add private OACTIVE flag for each of them. Turn on IFF_DRV_OACTIVE if one of private OACTIVE is on; turn off IFF_DRV_OACTIVE iff all of them are off. - Rework watchdog to mimic old if_watchdog action. Process TX done/encryption done in watchdog function (according to Ralink Linux driver) Obtained from: DragonFly Approved by: sam (mentor) Tested by: sam Related to PR: kern/117655 # Forcing long slot time setting is not included in this commit, comment and # related code is in place, so if problem pops up, quick tests could be done. Notes: svn path=/head/; revision=175938
* Check wep flag in *_tx_mgt since we need to encrypt some management frameKevin Lo2007-11-061-0/+11
| | | | | | | | | in case of shared authentification. Obtained from: NetBSD Notes: svn path=/head/; revision=173386
* Update beacon handling to sync w/ vap code base:Sam Leffler2007-09-171-2/+13
| | | | | | | | | | | | | | | | | | | | | | o add driver callback to handle notification of beacon changes; this is required for devices that manage beacon frames themselves (devices must override the default handler which does nothing) o move beacon update-related flags from ieee80211com to the beacon offsets storage (or handle however a driver wants) o expand beacon offsets structure with members needed for 11h/dfs and appie's o change calling convention for ieee80211_beacon_alloc and ieee80211_beacon_update o add overlapping bss support for 11g; requires driver to pass beacon frames from overlapping bss up to net80211 which is not presently done by any driver o move HT beacon contents update to a routine in the HT code area Reviewed by: avatar, thompsa, sephe Approved by: re (blanket wireless) Notes: svn path=/head/; revision=172211
* Add missing bits that made bg scanning lame:Sam Leffler2007-09-051-0/+6
| | | | | | | | | | | | | o update ic_lastdata to reflect time of last outbound frame o outbound traffic must preempt/cancel bg scanning to avoid delays This stuff was somehow missed in the initial import. Reviewed by: thompsa, avatar, sephe (earlier version) Approved by: re (blanket wireless) Notes: svn path=/head/; revision=172060
* o add 802.11 state machine states for DFS and client-side power saveSam Leffler2007-09-051-0/+1
| | | | | | | | | | o fixup drivers to ignore new states Reviewed by: avatar (?) Approved by: re (blanket wireless) Notes: svn path=/head/; revision=172058
* Use bus_get_dma_tag() to obtain the parent DMA tag.Kevin Lo2007-07-221-12/+15
| | | | | | | | Reviewed by: sam, sephe, thompsa Approved by: re (kensmith) Notes: svn path=/head/; revision=171535
* Don't use 64-byte header on each packet in radiotap.Kevin Lo2007-06-291-3/+4
| | | | | | | | Reviewed by: sam Approved by: re(bmah) Notes: svn path=/head/; revision=171086
* Update 802.11 wireless support:Sam Leffler2007-06-111-138/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=170530
* - Fix mbuf/node leakage in drivers' raw_xmit().Sepherosa Ziehau2007-04-191-1/+7
| | | | | | | | | | | | | - For ural(4): o Fix node leakage in ural_start(), if ural_tx_mgt() fails. o Fix mbuf leakage in ural_tx_{mgt,data}(), if usbd_transfer() fails. o In ural_tx_{mgt,data}(), set ural_tx_data.{m,ni} to NULL, if usbd_transfer() fails, so they will not be freed again in ural_stop(). Approved by: sam (mentor) Notes: svn path=/head/; revision=168860
* allow net80211 to fillin rate setsSam Leffler2007-03-111-20/+1
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=167470
* Remove dependency on deprecated if_watchdog ABI.Bruce M Simpson2006-12-191-16/+9
| | | | | | | Tested with a Sitecom RT2661 based card. Notes: svn path=/head/; revision=165352
* Add header files <sys/lock.h> and <sys/mutex.h> for mtx_init() and friends.Kevin Lo2006-12-071-0/+2
| | | | | | | Approved by: cognet Notes: svn path=/head/; revision=164982