Commit graph

20 commits

Author SHA1 Message Date
Warner Losh fdafd315ad sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:		Netflix
2023-11-26 22:24:00 -07:00
Warner Losh 685dc743dc sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:36 -06:00
Warner Losh 4d846d260e spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:03 -06:00
Bjoern A. Zeeb af7d9f8e31 net80211: prefix get_random_bytes() with net80211_
Both linux/random.h and net80211 have a function named
get_random_bytes().  With overlapping files included these collide.
Arguably the function could be renamed in linuxkpi but the generic
name should also not be used in net80211 so rename it there.

Sponsored-by:	The FreeBSD Foundation
MFC-after:	2 weeks
Reviewed-by:	philip, adrian
Differential Revision:	https://reviews.freebsd.org/D29335
2021-03-24 22:16:09 +00:00
Andriy Voskoboinyk 4ab4d681f3 Do not acquire IEEE80211_LOCK twice in cac_timeout(); reuse
locked function instead.

It is externally visible since r257065.

MFC after:	5 days
2019-02-02 16:21:23 +00:00
Pedro F. Giffuni fe267a5590 sys: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.
2017-11-27 15:23:17 +00:00
Adrian Chadd b8e29e065d [net80211] migrate the time_* macros to ieee80211_* namespace.
It turns out that these will clash very annoyingly with the linux
macros in the linuxkpi layer, so let the wookie^Wlinux win.

The only user that I can find is ath(4), so fix it there too.
2016-03-30 00:44:10 +00:00
Gleb Smirnoff c8f5794e0a Use name from ieee80211com instead of parent ifnet, in debugging printfs.
Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2015-05-25 14:30:44 +00:00
Gleb Smirnoff c3322cb91c Include necessary headers that now are available due to pollution
via if_var.h.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2013-10-28 07:29:16 +00:00
Gleb Smirnoff 76039bc84f The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare
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.
2013-10-26 17:58:36 +00:00
Adrian Chadd 62f8a13a75 Add a DFS debugging mode which is useful when doing automated DFS
compliance testing.

In order to allow for radar pattern matching to occur, the DFS CAC/NOL
handling needs to be made configurable.  This commit introduces a new
sysctl, "net.wlan.dfs_debug", which controls which DFS debug mode
net80211 is in.

* 0 = default, CSA/NOL handling as per normal.
* 1 = announce a CSA, but don't add the channel to the non-occupy list
  (NOL.)
* 2 = disable both CSA and NOL - only print that a radar event occured.

This code is not compiled/enabled by default as it breaks regulatory
handling.  A user must enable IEEE80211_DFS_DEBUG in their kernel
configuration file for this option to become available.

Obtained from:	Atheros
2012-01-31 00:03:49 +00:00
Adrian Chadd 32b0e64b56 Add 802.11h quiet time element support into net80211.
This supports both station and hostap modes:

* Station mode quiet time element support listens to quiet time
  IE's and modifies the local quiet time configuration as appropriate;
* Hostap mode both obeys the locally configured quiet time period
  and includes it in beacon frames so stations also can obey as needed.

Submitted by:	Himali Patel <himali.patel@sibridgetech.com>
Sponsored by:	Sibridge Technologies
2011-11-08 04:00:24 +00:00
Ed Schouten d745c852be Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.
This means that their use is restricted to a single C file.
2011-11-07 06:44:47 +00:00
Adrian Chadd e1ab183c5e Print out a big warning if DFS can't find a channel to use.
This way people debugging DFS won't be surprised when their
AP stops talking.
2011-06-27 05:57:14 +00:00
Sam Leffler 8460188c5b correct timeout for doing NOL processing; need a ticks-relative value
Obtained from:	Marvell
MFC after:	3 days
2009-09-03 16:29:02 +00:00
Sam Leffler 92c4a81cc1 protect callouts with the com lock
Prodded by:	jhb
2009-06-09 17:12:19 +00:00
Sam Leffler 7dbf0cb77d prefer callout_schedule 2009-06-07 23:16:59 +00:00
Sam Leffler a77b10b321 distribute sysctl decls so global variables can be made static 2009-05-30 20:11:23 +00:00
Sam Leffler 5c9b0f1d07 schedule the correct timer when receiving a radar event during CAC 2008-08-02 17:58:39 +00:00
Sam Leffler b032f27c36 Multi-bss (aka vap) support for 802.11 devices.
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)
2008-04-20 20:35:46 +00:00