#
71625ec9 |
|
16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c comment pattern Remove /^/[*/]\s*\$FreeBSD\$.*\n/
|
#
9dd3156e |
|
01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
usb: clean up empty lines in .c and .h files
|
#
786ac703 |
|
10-Mar-2019 |
Andriy Voskoboinyk <avos@FreeBSD.org> |
Fix ieee80211_radiotap(9) usage in wireless drivers: - Alignment issues: * Add missing __packed attributes + padding across all drivers; in most places there was an assumption that padding will be always minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) - padding was just missing. * Add __aligned(8) attribute for all Rx radiotap headers since they can contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, so just drop the attribute here. Refresh ieee80211_radiotap(9) man page accordingly. - Since net80211 automatically updates channel frequency / flags in ieee80211_radiotap_chan_change() drop duplicate setup for these fields in drivers. Tested with Netgear WG111 v3 (urtw(4)), STA mode. MFC after: 2 weeks
|
#
f6930bec |
|
02-Oct-2016 |
Andriy Voskoboinyk <avos@FreeBSD.org> |
net80211: ieee80211_ratectl*: switch to reusable KPI Replace various void * / int argument combinations with common structures: - ieee80211_ratectl_tx_status for *_tx_complete(); - ieee80211_ratectl_tx_stats for *_tx_update(); While here, improve amrr_tx_update() for a bit: 1. In case, if receiver is not known (typical for Ralink USB drivers), refresh Tx rate for all nodes on the interface. 2. There was a misuse: - otus(4) sends non-decreasing counters (as originally intended); - but ural(4), rum(4) and run(4) are using 'read & clear' registers to obtain statistics for some period of time (and those 'last period' values are used as arguments for tx_update()). If arguments are not big enough, they are just discarded after the next call. Fix: move counting into *_tx_update() (now otus(4) will zero out all node counters after every tx_update() call) Tested with: - Intel 3945BG (wpi(4)), STA mode. - WUSB54GC (rum(4)), STA / HOSTAP mode. - RTL8188EU (urtwn(4)), STA mode. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D8037
|
#
ae132f11 |
|
03-Mar-2016 |
Andriy Voskoboinyk <avos@FreeBSD.org> |
zyd, run, ural: do not corrupt MAC address Do not use ic_macaddr as a storage for current BSSID; it may be reused in vap creation procedure; similar to r288619. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D5513
|
#
4f4a7a03 |
|
11-Oct-2015 |
Adrian Chadd <adrian@FreeBSD.org> |
net80211 drivers: eliminate any references to sc_rxtap_len/sc_txtap_len (never used here) Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3776
|
#
0cf00015 |
|
22-Sep-2015 |
Adrian Chadd <adrian@FreeBSD.org> |
net80211: include one copy of struct ieee80211_beacon_offsets into ieee80211vap Submitted by: Andriy Voskoboinyk <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3658
|
#
7a79cebf |
|
27-Aug-2015 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Replay r286410. Change KPI of how device drivers that provide wireless 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.
|
#
ba2c1fbc |
|
07-Aug-2015 |
Adrian Chadd <adrian@FreeBSD.org> |
Revert the wifi ifnet changes until things are more baked and tested. * 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.
|
#
79d2c5e8 |
|
07-Aug-2015 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Change KPI of how device drivers that provide wireless 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 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
|
#
e8353a7a |
|
28-Jul-2013 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Fix alignment of USB WLAN radiotap headers. This makes USB WLAN adapters work on ARM, MIPS and similar platforms, where alignment matters. MFC after: 1 week Reported by: XiaoQI Ge <ghw@7axu.com>
|
#
645e4d17 |
|
10-Feb-2013 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
- Streamline detach logic in wlan drivers, so that 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
|
#
a7d5f7eb |
|
19-Oct-2010 |
Jamie Gritton <jamie@FreeBSD.org> |
A new jail(8) with a configuration file, to replace the work currently done by /etc/rc.d/jail.
|
#
82878b11 |
|
11-May-2010 |
Rui Paulo <rpaulo@FreeBSD.org> |
MFC r206367, r206358, r206370, r206371, r206372, r206398, r206415, r206416, r206417, r206418, r206418: net80211 ratectl framework.
|
#
b6108616 |
|
07-Apr-2010 |
Rui Paulo <rpaulo@FreeBSD.org> |
net80211 rate control framework (net80211 ratectl). 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
|
#
760bc48e |
|
28-May-2009 |
Andrew Thompson <thompsa@FreeBSD.org> |
s/usb2_/usb_/ on all C structs for the USB stack.
|
#
5463c4a4 |
|
20-May-2009 |
Sam Leffler <sam@FreeBSD.org> |
Overhaul monitor mode handling: 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
|
#
5efea30f |
|
02-May-2009 |
Andrew Thompson <thompsa@FreeBSD.org> |
Create a taskqueue for each wireless interface which provides a serialised 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
|
#
26d39e2c |
|
29-Mar-2009 |
Sam Leffler <sam@FreeBSD.org> |
o add ic_rt to track the rate table for the current channel; this enables calculation of packet transmit times to do things like check txop limits o remove equivalent driver code and convert to use net80211 state
|
#
77ddf3d3 |
|
27-Feb-2009 |
Andrew Thompson <thompsa@FreeBSD.org> |
Partial sync to //depot/projects/usb - Reissue the ctrl request on failure - Ensure Tx and ctrl requests are not interleaved - Add promisc callbacks Obtained from: Hans Petter Selasky
|
#
96ca458f |
|
23-Feb-2009 |
Andrew Thompson <thompsa@FreeBSD.org> |
Make sure at least two tx slots are free before sending the mbuf since an additional frame may be sent for 80211 protection.
|
#
02ac6454 |
|
23-Feb-2009 |
Andrew Thompson <thompsa@FreeBSD.org> |
Move the new USB stack into its new home.
|