aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/wtap
Commit message (Collapse)AuthorAgeFilesLines
* etc: minor spelling fixes.Pedro F. Giffuni2016-05-023-4/+4
| | | | | | | | | Mostly comments but also some user-visible strings. MFC after: 2 weeks Notes: svn path=/head/; revision=298931
* wtap: do not include <sys/types.h> when <sys/param.h> is already includedAndriy Voskoboinyk2015-12-133-4/+0
| | | | | | | | Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D4536 Notes: svn path=/head/; revision=292166
* wtap: remove some obsolete radiotap(9) codeAndriy Voskoboinyk2015-10-221-6/+0
| | | | | | | | | | This code is not needed since r192468. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D3975 Notes: svn path=/head/; revision=289757
* net80211: drop ieee80211_beacon_offsets parameter from ↵Adrian Chadd2015-10-031-2/+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-222-4/+3
| | | | | | | | Submitted by: Andriy Voskoboinyk <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3658 Notes: svn path=/head/; revision=288095
* Replay r286410. Change KPI of how device drivers that provide wirelessGleb Smirnoff2015-08-272-208/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-082-29/+208
| | | | | | | | | | | | * 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-072-208/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Make it compilable. No idea if it works.Gleb Smirnoff2015-08-062-3/+3
| | | | Notes: svn path=/head/; revision=286363
* Change three methods in struct ieee80211com, namely ic_updateslot,Gleb Smirnoff2015-05-251-5/+2
| | | | | | | | | | | 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-253-0/+4
| | | | | | | | | | 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-5/+5
| | | | Notes: svn path=/head/; revision=271849
* wtap should not set the IEEE80211_F_DATAPAD flag;Monthadar Al Jaberi2012-12-181-5/+1
| | | | | | | Approved by: adrian (mentor) Notes: svn path=/head/; revision=244400
* wtap fix malloc/free.Monthadar Al Jaberi2012-12-181-4/+5
| | | | | | | | | | | * Remove malloc/free pointer cast; * Check return value from malloc; Submitted by: glebius Approved by: adrian (mentor) Notes: svn path=/head/; revision=244399
* wtap should check if ieee80211_vap_setup fails.Monthadar Al Jaberi2012-12-181-0/+4
| | | | | | | | | | * If ieee80211_vap_setup fails, we free allocated M_80211_VAP memory and return NULL; Approved by: adrian (mentor) Notes: svn path=/head/; revision=244389
* wtap: fix clang warning.Monthadar Al Jaberi2012-12-181-1/+1
| | | | | | | | | | | | * The warning message was: 'warning error: format string is not a string literal'; * Changed how make_dev is called, now a string literal for formatting is used; Approved by: adrian (mentor) Notes: svn path=/head/; revision=244388
* Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff2012-12-042-3/+3
| | | | | | | malloc(9) flags in sys/dev. Notes: svn path=/head/; revision=243857
* Don't grab an unreferenced pointer to the VAP bss node.Adrian Chadd2012-08-271-3/+9
| | | | Notes: svn path=/head/; revision=239760
* Fix wtap to not panic in wtap_beacon_intrp.Monthadar Al Jaberi2012-07-311-2/+6
| | | | | | | | | | * Changed KASSERT to be debug printf (DWTAP_PRINTF). If state is not IEEE80211_S_RUN we return without scheduling a new callout; * When net80211 stack changes state to IEEE802_11_INIT we stop the beacon callout task; Notes: svn path=/head/; revision=238938
* Remove this - it's not needed as it's defined in ieee80211_freebsd.h.Adrian Chadd2012-03-191-4/+0
| | | | Notes: svn path=/head/; revision=233184
* Correctly calculate the callout interval for beacon generation.Adrian Chadd2012-03-141-1/+5
| | | | | | | Submitted by: monthadar@gmail.com Notes: svn path=/head/; revision=232978
* Enforce that wtap requires VIMAGE to be useful.Adrian Chadd2012-03-101-0/+7
| | | | Notes: svn path=/head/; revision=232763
* Add a module dependency on wlan.Adrian Chadd2012-02-161-0/+1
| | | | | | | Submitted by: monthadar@gmail.com Notes: svn path=/head/; revision=231828
* Remove direct access to si_name.Ed Schouten2012-02-101-2/+2
| | | | | | | | | | | Code should just use the devtoname() function to obtain the name of a character device. Also add const keywords to pieces of code that need it to build properly. MFC after: 2 weeks Notes: svn path=/head/; revision=231378
* Introduce wtap, the beginnings of a net80211 wlan simulator.Adrian Chadd2012-01-1113-0/+2339
This introduces: * a basic wtap interface * a HAL, which implements an abstraction layer for implementing different device behavious; * A visibility plugin, which allows for control over which nodes see other nodes (useful for mesh work.) It doesn't yet implement sta/adhoc/hostap modes but these are quite feasible to implement. Monthadar uses it to do 802.11s mesh verification. The userland tools will be committed in a follow-up commit. Submitted by: Monthadar Al Jaberi <monthadar@gmail.com> Notes: svn path=/head/; revision=229970