summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/wlan/if_rumvar.h
Commit message (Collapse)AuthorAgeFilesLines
* rum: add legacy power saving support (STA mode).avos2016-03-211-0/+10
| | | | | | | Tested with WUSB54GC, STA mode + WRT54GC / RTL8188EU in HOSTAP mode. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D5546
* net80211: WME callback cleanup in various driversavos2015-11-051-1/+0
| | | | | | | | Since r288350, ic_wme_task() is called via ieee80211_runtask(), so, any additional deferring from the driver side is not needed. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D4072
* rum(4): add WME support.adrian2015-10-031-0/+2
| | | | | | | | | | Tested: * WUSB54GC, HOSTAP and STA modes. * Me: rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528 Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3700
* rum(4): set short/long retry limitsadrian2015-10-031-0/+1
| | | | | | | | | | | | Now device will use retry limit, which is set via 'ifconfig <interface> maxretry <number>'. Tested: * Tested on WUSB54GC, STA mode. Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3689
* rum(4): drop unused 'node id' parameter.adrian2015-10-031-4/+1
| | | | | Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3655
* rum(4): add support for hardware encryption (WEP, TKIP and CCMP).adrian2015-10-031-1/+5
| | | | | | | | | | | | | | | | | This diff includes: * Transmitter Addresses, Keys and TKIP MIC addition to the Security Key Table. * Proper SEC Control Registers initialization and maintenance. * Additional flags and values in TX descriptor, which are required for encryption support. * Error checking in RX path. Tested: * Tested on WUSB54GC, STA (WEP, TKIP, CCMP), HOSTAP (CCMP) and IBSS (CCMP, WPA-None) modes. * rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528, STA mode (CCMP+TKIP) Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3640
* rum(4): split rum_prepare_beacon() into 'alloc' and 'set' stagesadrian2015-10-031-0/+1
| | | | | | | | Note: I manually had to merge this; I merged in the "put beacon_offsets into vap" commit before this. Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3628
* rum(4): do not corrupt MAC addressadrian2015-10-031-0/+2
| | | | | | | | Don't override the NIC MAC address with an overridden MAC address for a VAP. Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3625
* rum(4): add TSF field into radiotap headersadrian2015-10-031-2/+6
| | | | | Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3607
* Remove beacon offsets usage from if_rum.adrian2015-10-031-1/+0
| | | | Differential Revision: https://reviews.freebsd.org/D3658
* rum(4): add command queue for running sleepable tasks in non-sleepable contextsadrian2015-10-031-3/+38
| | | | | | | | | | Tested: * Tested on WUSB54GC, STA mode. * rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528 Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3629
* rum(4): some non-functional changes / cleanupadrian2015-10-031-5/+2
| | | | | | | | | | | | * Remove unused sc_txtap_len/sc_rxtap_len fields. * Remove unused ackrate variable. * Remove unneded warning in rum_update_mcast(). * Use nitems(). * Replace some hardcoded values for RT2573_MAC_CSR1 register. * Remove second argument for RUM_LOCK_ASSERT() - it is always the same. Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3605
* Replay r286410. Change KPI of how device drivers that provide wirelessglebius2015-08-271-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Revert the wifi ifnet changes until things are more baked and tested.adrian2015-08-081-4/+3
| | | | | | | | | * 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.
* Change KPI of how device drivers that provide wireless connectivity interactglebius2015-08-071-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix alignment of USB WLAN radiotap headers. This makes USB WLAN adaptershselasky2013-07-291-2/+2
| | | | | | | work on ARM, MIPS and similar platforms, where alignment matters. MFC after: 1 week Reported by: XiaoQI Ge <ghw@7axu.com>
* - Streamline detach logic in wlan drivers, so thathselasky2013-02-101-0/+1
| | | | | | | | | | | freed memory cannot be used during detach. - Remove all panic() calls from the urtw driver because panic() is not appropriate here. - Remove redundant checks for device detached in device detach callbacks. - Use DEVMETHOD_END to mark end of device methods. MFC after: 2 weeks
* net80211 rate control framework (net80211 ratectl).rpaulo2010-04-071-9/+2
| | | | | | | | | | | | | | | | | 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
* s/usb2_/usb_/ on all C structs for the USB stack.thompsa2009-05-281-3/+3
|
* Overhaul monitor mode handling:sam2009-05-201-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Create a taskqueue for each wireless interface which provides a serialisedthompsa2009-05-021-22/+1
| | | | | | | | | | | | | | | | | | | | | | | 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
* o add ic_rt to track the rate table for the current channel; this enablessam2009-03-291-1/+0
| | | | | calculation of packet transmit times to do things like check txop limits o remove equivalent driver code and convert to use net80211 state
* Partial sync to //depot/projects/usbthompsa2009-02-271-0/+3
| | | | | | | | - Reissue the ctrl request on failure - Ensure Tx and ctrl requests are not interleaved - Add promisc callbacks Obtained from: Hans Petter Selasky
* Make sure at least two tx slots are free before sending the mbuf since anthompsa2009-02-231-0/+1
| | | | additional frame may be sent for 80211 protection.
* Move the new USB stack into its new home.thompsa2009-02-231-0/+156
OpenPOWER on IntegriCloud