hrev52721 adds 11 changesets to branch 'master'
old head: 808cc3cd50a8d22bfe12c422e9541ca30454db32
new head: ac19c8509b35b15ad6bce3196f5ee48ea4a314cf
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=ac19c8509b35+%5E808cc3cd50a8
----------------------------------------------------------------------------
753c7e0805fa: freebsd11_wlan -> freebsd_wlan.
FreeBSD 12's net80211 layer contains only 2 small KPI breaks from FreeBSD 11,
so we can upgrade it, apply those 2 changes to the drivers which are affected
(as the changes are in some lesser-used functions), and then upgrade all
drivers
one at a time.
67c3dfef8efe: freebsd_network: Fix license header in linker_set.h.
This file is a near-direct copy from FreeBSD; dunno how it wound up with
a Haiku license header.
1f7634a08c60: freebsd_network: Cleanup and some fixes to SYSINIT implementation.
Fixes a kernel panic on uninit_sysinit. Whoops.
3d4f7f0f60aa: freebsd_network: Fix MTX_SYSINIT.
net80211 from FreeBSD 12 will use it.
f733714a6a9f: freebsd_network: Changes for FreeBSD 12 net80211.
8e67fd0be0af: freebsd_network: Unreserve the PCI device on error or driver
removal.
8244a9baad63: freebsd_wlan: Merge the new net80211 code from FreeBSD 12.
Changes to the Haiku module will come in the next commit.
There are a few Haiku-specific changes in here; most notably some
hacks to prevent struct size changes from breaking wpa_supplicant,
and a removal of the full ieee80211_channel structure from some ioctls
where we previously returned it.
6d0f2b487abf: freebsd_wlan: Update Haiku-specific code.
Now that we use SYSINIT for the "module" code instead of manually
maintaining lists, we have to make the static library slightly differently.
See inline comment.
bf3654699e97: drivers/wlan: Merge the ratectl change commit from FreeBSD.
This is a relatively minor change that mostly just shuffles structs
around, so presumably it will not break any of these drivers.
86734cc40e1a: idualwifi7260: Upgrade to FreeBSD 12.
Tested on a 7265D.
ac19c8509b35: freebsd_network: Fix redefinition warning.
[ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]
----------------------------------------------------------------------------
166 files changed, 6661 insertions(+), 1891 deletions(-)
build/jam/packages/HaikuDevel | 2 +-
src/add-ons/kernel/drivers/network/wlan/Jamfile | 4 +-
.../drivers/network/wlan/aironetwifi/Jamfile | 4 +-
.../drivers/network/wlan/atheroswifi/Jamfile | 4 +-
.../drivers/network/wlan/broadcom43xx/Jamfile | 4 +-
.../network/wlan/broadcom43xx/dev/bwi/if_bwi.c | 15 +-
.../drivers/network/wlan/idualwifi7260/Jamfile | 5 +-
.../network/wlan/idualwifi7260/dev/iwm/if_iwm.c | 451 ++++------
.../wlan/idualwifi7260/dev/iwm/if_iwm_7000.c | 10 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_8000.c | 2 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_binding.c | 11 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_binding.h | 2 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_config.h | 3 +-
.../idualwifi7260/dev/iwm/if_iwm_constants.h | 2 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_debug.h | 4 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_fw.c | 2 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_fw.h | 2 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_led.c | 2 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_led.h | 2 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_mac_ctxt.c | 2 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_mac_ctxt.h | 2 +-
.../idualwifi7260/dev/iwm/if_iwm_notif_wait.c | 2 +-
.../idualwifi7260/dev/iwm/if_iwm_notif_wait.h | 2 +-
.../idualwifi7260/dev/iwm/if_iwm_pcie_trans.c | 2 +-
.../idualwifi7260/dev/iwm/if_iwm_pcie_trans.h | 2 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_phy_ctxt.c | 2 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_phy_ctxt.h | 2 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_phy_db.c | 2 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_phy_db.h | 2 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_power.c | 63 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_power.h | 4 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_scan.c | 156 +++-
.../wlan/idualwifi7260/dev/iwm/if_iwm_scan.h | 10 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_sf.c | 330 +++++++
.../wlan/idualwifi7260/dev/iwm/if_iwm_sf.h | 82 ++
.../wlan/idualwifi7260/dev/iwm/if_iwm_sta.c | 2 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_sta.h | 2 +-
.../idualwifi7260/dev/iwm/if_iwm_time_event.c | 2 +-
.../idualwifi7260/dev/iwm/if_iwm_time_event.h | 2 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_util.c | 5 +-
.../wlan/idualwifi7260/dev/iwm/if_iwm_util.h | 2 +-
.../wlan/idualwifi7260/dev/iwm/if_iwmreg.h | 27 +-
.../wlan/idualwifi7260/dev/iwm/if_iwmvar.h | 15 +-
.../drivers/network/wlan/idualwifi7260/glue.c | 1 +
.../drivers/network/wlan/iprowifi2100/Jamfile | 4 +-
.../drivers/network/wlan/iprowifi2200/Jamfile | 4 +-
.../drivers/network/wlan/iprowifi3945/Jamfile | 4 +-
.../network/wlan/iprowifi3945/dev/wpi/if_wpi.c | 35 +-
.../wlan/iprowifi3945/dev/wpi/if_wpivar.h | 1 +
.../drivers/network/wlan/iprowifi3945/glue.c | 1 +
.../drivers/network/wlan/iprowifi4965/Jamfile | 4 +-
.../network/wlan/iprowifi4965/dev/iwn/if_iwn.c | 81 +-
.../wlan/iprowifi4965/dev/iwn/if_iwnvar.h | 1 +
.../drivers/network/wlan/iprowifi4965/glue.c | 1 +
.../drivers/network/wlan/marvell88w8335/Jamfile | 4 +-
.../drivers/network/wlan/marvell88w8363/Jamfile | 4 +-
.../network/wlan/marvell88w8363/dev/mwl/if_mwl.c | 12 +-
.../drivers/network/wlan/ralinkwifi/Jamfile | 4 +-
.../network/wlan/ralinkwifi/dev/ral/if_ral_pci.c | 1 +
.../network/wlan/ralinkwifi/dev/ral/rt2560.c | 31 +-
.../network/wlan/ralinkwifi/dev/ral/rt2560var.h | 1 +
.../network/wlan/ralinkwifi/dev/ral/rt2661.c | 23 +-
.../network/wlan/ralinkwifi/dev/ral/rt2661var.h | 1 +
.../network/wlan/ralinkwifi/dev/ral/rt2860.c | 16 +-
.../network/wlan/ralinkwifi/dev/ral/rt2860var.h | 1 +
.../drivers/network/wlan/ralinkwifi/glue.c | 1 +
.../drivers/network/wlan/realtekwifi/Jamfile | 4 +-
.../drivers/network/wlan/wavelanwifi/Jamfile | 4 +-
src/bin/network/ifconfig/Jamfile | 2 +-
src/kits/network/libnetapi/Jamfile | 2 +-
src/libs/compat/Jamfile | 2 +-
src/libs/compat/freebsd11_wlan/Jamfile | 3 -
src/libs/compat/freebsd_network/compat/net/if.h | 3 +-
.../compat/freebsd_network/compat/net/if_media.h | 550 +++++++++---
.../compat/freebsd_network/compat/net/if_var.h | 8 +
.../compat/freebsd_network/compat/sys/cdefs.h | 48 +-
.../freebsd_network/compat/sys/linker_set.h | 30 +-
.../compat/freebsd_network/compat/sys/mbuf.h | 1 +
.../compat/freebsd_network/compat/sys/mutex.h | 20 +-
src/libs/compat/freebsd_network/driver.c | 14 +-
src/libs/compat/freebsd_network/fbsd_if_media.c | 22 -
src/libs/compat/freebsd_network/sysinit.c | 20 +-
src/libs/compat/freebsd_wlan/Jamfile | 3 +
.../crypto/rijndael/rijndael-alg-fst.c | 0
.../crypto/rijndael/rijndael-api.c | 0
.../crypto/rijndael/rijndael.h | 0
.../crypto/rijndael/rijndael_local.h | 0
.../net80211/Jamfile | 18 +-
.../net80211/_ieee80211.h | 250 +++++-
.../net80211/ieee80211.c | 469 +++++++++-
.../net80211/ieee80211.h | 90 +-
.../net80211/ieee80211_acl.c | 4 +-
.../net80211/ieee80211_action.c | 30 +-
.../net80211/ieee80211_action.h | 4 +-
.../net80211/ieee80211_adhoc.c | 105 ++-
.../net80211/ieee80211_adhoc.h | 4 +-
.../net80211/ieee80211_ageq.c | 4 +-
.../net80211/ieee80211_ageq.h | 4 +-
.../net80211/ieee80211_alq.c | 57 +-
[ *** stats truncated: 67 lines dropped *** ]
############################################################################
Commit: 753c7e0805fa38e422339966ddc4d6d71944a040
URL: https://git.haiku-os.org/haiku/commit/?id=753c7e0805fa
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Sat Jan 5 20:07:11 2019 UTC
freebsd11_wlan -> freebsd_wlan.
FreeBSD 12's net80211 layer contains only 2 small KPI breaks from FreeBSD 11,
so we can upgrade it, apply those 2 changes to the drivers which are affected
(as the changes are in some lesser-used functions), and then upgrade all drivers
one at a time.
----------------------------------------------------------------------------
diff --git a/build/jam/packages/HaikuDevel b/build/jam/packages/HaikuDevel
index 2bd84d9751..0bae52501b 100644
--- a/build/jam/packages/HaikuDevel
+++ b/build/jam/packages/HaikuDevel
@@ -68,7 +68,7 @@ CopyDirectoryToPackage develop headers private libs compat
: [ FDirName $(HAIKU_TOP) src libs compat freebsd_network ]
: : -x *.c -x *.cpp -x *.awk -x Jamfile -x miidevs -x usbdevs ;
CopyDirectoryToPackage develop headers private libs compat
- : [ FDirName $(HAIKU_TOP) src libs compat freebsd11_wlan ]
+ : [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ]
: : -x *.c -x Jamfile ;
# create be -> os symlink for now
diff --git a/src/add-ons/kernel/drivers/network/wlan/aironetwifi/Jamfile
b/src/add-ons/kernel/drivers/network/wlan/aironetwifi/Jamfile
index b3c38a62ab..90bdd18d91 100644
--- a/src/add-ons/kernel/drivers/network/wlan/aironetwifi/Jamfile
+++ b/src/add-ons/kernel/drivers/network/wlan/aironetwifi/Jamfile
@@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers network wlan
aironetwifi ;
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network compat ]
: true ;
-UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd11_wlan ] : true ;
+UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
UsePrivateHeaders net system ;
UsePrivateKernelHeaders ;
@@ -20,6 +20,6 @@ KernelAddon aironetwifi :
if_an_pci.c
glue.c
:
- libfreebsd11_wlan.a
+ freebsd_wlan.a
libfreebsd_network.a
;
diff --git a/src/add-ons/kernel/drivers/network/wlan/atheroswifi/Jamfile
b/src/add-ons/kernel/drivers/network/wlan/atheroswifi/Jamfile
index f8fdedf022..254795016a 100644
--- a/src/add-ons/kernel/drivers/network/wlan/atheroswifi/Jamfile
+++ b/src/add-ons/kernel/drivers/network/wlan/atheroswifi/Jamfile
@@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers network wlan
atheroswifi ;
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network compat ]
: true ;
-UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd11_wlan ] : true ;
+UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
UsePrivateHeaders net system ;
UsePrivateKernelHeaders ;
@@ -45,7 +45,7 @@ KernelAddon atheroswifi :
atheroswifi_hal.o
atheroswifi_rate.o
:
- libfreebsd11_wlan.a
+ freebsd_wlan.a
libfreebsd_network.a
;
diff --git a/src/add-ons/kernel/drivers/network/wlan/broadcom43xx/Jamfile
b/src/add-ons/kernel/drivers/network/wlan/broadcom43xx/Jamfile
index b583313f5f..6af3cca81d 100644
--- a/src/add-ons/kernel/drivers/network/wlan/broadcom43xx/Jamfile
+++ b/src/add-ons/kernel/drivers/network/wlan/broadcom43xx/Jamfile
@@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers network wlan
broadcom43xx ;
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network compat ]
: true ;
-UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd11_wlan ] : true ;
+UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
UsePrivateHeaders net system ;
UsePrivateKernelHeaders ;
@@ -28,6 +28,6 @@ KernelAddon broadcom43xx :
bwirf.c
glue.c
:
- libfreebsd11_wlan.a
+ freebsd_wlan.a
libfreebsd_network.a
;
diff --git a/src/add-ons/kernel/drivers/network/wlan/idualwifi7260/Jamfile
b/src/add-ons/kernel/drivers/network/wlan/idualwifi7260/Jamfile
index 82f05f8f02..d9b7882382 100644
--- a/src/add-ons/kernel/drivers/network/wlan/idualwifi7260/Jamfile
+++ b/src/add-ons/kernel/drivers/network/wlan/idualwifi7260/Jamfile
@@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers network wlan
idualwifi7260 ;
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network compat ]
: true ;
-UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd11_wlan ] : true ;
+UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
UsePrivateHeaders net system ;
UsePrivateKernelHeaders ;
@@ -34,7 +34,7 @@ KernelAddon idualwifi7260 :
if_iwm.c
glue.c
:
- libfreebsd11_wlan.a
+ freebsd_wlan.a
libfreebsd_network.a
;
diff --git a/src/add-ons/kernel/drivers/network/wlan/iprowifi2100/Jamfile
b/src/add-ons/kernel/drivers/network/wlan/iprowifi2100/Jamfile
index e9abb40037..b2bbd642ed 100644
--- a/src/add-ons/kernel/drivers/network/wlan/iprowifi2100/Jamfile
+++ b/src/add-ons/kernel/drivers/network/wlan/iprowifi2100/Jamfile
@@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers network wlan
iprowifi2100 ;
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network compat ]
: true ;
-UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd11_wlan ] : true ;
+UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
UsePrivateHeaders net system ;
UsePrivateKernelHeaders ;
@@ -19,7 +19,7 @@ KernelAddon iprowifi2100 :
if_ipw.c
glue.c
:
- libfreebsd11_wlan.a
+ freebsd_wlan.a
libfreebsd_network.a
;
diff --git a/src/add-ons/kernel/drivers/network/wlan/iprowifi2200/Jamfile
b/src/add-ons/kernel/drivers/network/wlan/iprowifi2200/Jamfile
index f605ea2ce3..ea3f50a926 100644
--- a/src/add-ons/kernel/drivers/network/wlan/iprowifi2200/Jamfile
+++ b/src/add-ons/kernel/drivers/network/wlan/iprowifi2200/Jamfile
@@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers network wlan
iprowifi2200 ;
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network compat ]
: true ;
-UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd11_wlan ] : true ;
+UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
UsePrivateHeaders net system ;
UsePrivateKernelHeaders ;
@@ -23,7 +23,7 @@ KernelAddon iprowifi2200 :
if_iwi.c
glue.c
:
- libfreebsd11_wlan.a
+ freebsd_wlan.a
libfreebsd_network.a
;
diff --git a/src/add-ons/kernel/drivers/network/wlan/iprowifi3945/Jamfile
b/src/add-ons/kernel/drivers/network/wlan/iprowifi3945/Jamfile
index dd341814c2..8a999f0262 100644
--- a/src/add-ons/kernel/drivers/network/wlan/iprowifi3945/Jamfile
+++ b/src/add-ons/kernel/drivers/network/wlan/iprowifi3945/Jamfile
@@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers network wlan
iprowifi3945 ;
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network compat ]
: true ;
-UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd11_wlan ] : true ;
+UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
UsePrivateHeaders net system ;
UsePrivateKernelHeaders ;
@@ -19,7 +19,7 @@ KernelAddon iprowifi3945 :
if_wpi.c
glue.c
:
- libfreebsd11_wlan.a
+ freebsd_wlan.a
libfreebsd_network.a
;
diff --git a/src/add-ons/kernel/drivers/network/wlan/iprowifi4965/Jamfile
b/src/add-ons/kernel/drivers/network/wlan/iprowifi4965/Jamfile
index 5edf89b689..0933229c66 100644
--- a/src/add-ons/kernel/drivers/network/wlan/iprowifi4965/Jamfile
+++ b/src/add-ons/kernel/drivers/network/wlan/iprowifi4965/Jamfile
@@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers network wlan
iprowifi4965 ;
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network compat ]
: true ;
-UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd11_wlan ] : true ;
+UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
UsePrivateHeaders net system ;
UsePrivateKernelHeaders ;
@@ -19,7 +19,7 @@ KernelAddon iprowifi4965 :
if_iwn.c
glue.c
:
- libfreebsd11_wlan.a
+ freebsd_wlan.a
libfreebsd_network.a
;
diff --git a/src/add-ons/kernel/drivers/network/wlan/marvell88w8335/Jamfile
b/src/add-ons/kernel/drivers/network/wlan/marvell88w8335/Jamfile
index fd62a14472..5dd88a45cd 100644
--- a/src/add-ons/kernel/drivers/network/wlan/marvell88w8335/Jamfile
+++ b/src/add-ons/kernel/drivers/network/wlan/marvell88w8335/Jamfile
@@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers network wlan
marvell88w8335 ;
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network compat ]
: true ;
-UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd11_wlan ] : true ;
+UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
UsePrivateHeaders net system ;
UsePrivateKernelHeaders ;
@@ -21,6 +21,6 @@ KernelAddon marvell88w8335 :
if_malohal.c
glue.c
:
- libfreebsd11_wlan.a
+ freebsd_wlan.a
libfreebsd_network.a
;
diff --git a/src/add-ons/kernel/drivers/network/wlan/marvell88w8363/Jamfile
b/src/add-ons/kernel/drivers/network/wlan/marvell88w8363/Jamfile
index a23b87bb76..c88aff3f22 100644
--- a/src/add-ons/kernel/drivers/network/wlan/marvell88w8363/Jamfile
+++ b/src/add-ons/kernel/drivers/network/wlan/marvell88w8363/Jamfile
@@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers network wlan
marvell88w8363 ;
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network compat ]
: true ;
-UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd11_wlan ] : true ;
+UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
UsePrivateHeaders net system ;
UsePrivateKernelHeaders ;
@@ -22,7 +22,7 @@ KernelAddon marvell88w8363 :
mwlhal.c
glue.c
:
- libfreebsd11_wlan.a
+ freebsd_wlan.a
libfreebsd_network.a
;
diff --git a/src/add-ons/kernel/drivers/network/wlan/ralinkwifi/Jamfile
b/src/add-ons/kernel/drivers/network/wlan/ralinkwifi/Jamfile
index 07ef5827e0..5437cb0a74 100644
--- a/src/add-ons/kernel/drivers/network/wlan/ralinkwifi/Jamfile
+++ b/src/add-ons/kernel/drivers/network/wlan/ralinkwifi/Jamfile
@@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers network wlan
ralinkwifi ;
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network compat ]
: true ;
-UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd11_wlan ] : true ;
+UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
UsePrivateHeaders net system ;
UsePrivateKernelHeaders ;
@@ -22,7 +22,7 @@ KernelAddon ralinkwifi :
rt2860.c
glue.c
:
- libfreebsd11_wlan.a
+ freebsd_wlan.a
libfreebsd_network.a
;
diff --git a/src/add-ons/kernel/drivers/network/wlan/realtekwifi/Jamfile
b/src/add-ons/kernel/drivers/network/wlan/realtekwifi/Jamfile
index b30a4265cc..93ed1f6c3b 100644
--- a/src/add-ons/kernel/drivers/network/wlan/realtekwifi/Jamfile
+++ b/src/add-ons/kernel/drivers/network/wlan/realtekwifi/Jamfile
@@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers network wlan
realtekwifi ;
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network compat ]
: true ;
-UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd11_wlan ] : true ;
+UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
UsePrivateHeaders net system ;
UsePrivateKernelHeaders ;
@@ -19,7 +19,7 @@ KernelAddon realtekwifi :
if_rtwn.c
glue.c
:
- libfreebsd11_wlan.a
+ freebsd_wlan.a
libfreebsd_network.a
;
diff --git a/src/add-ons/kernel/drivers/network/wlan/wavelanwifi/Jamfile
b/src/add-ons/kernel/drivers/network/wlan/wavelanwifi/Jamfile
index 48bf781328..873cbc5c61 100644
--- a/src/add-ons/kernel/drivers/network/wlan/wavelanwifi/Jamfile
+++ b/src/add-ons/kernel/drivers/network/wlan/wavelanwifi/Jamfile
@@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers network wlan
wavelanwifi ;
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network compat ]
: true ;
-UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd11_wlan ] : true ;
+UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
UsePrivateHeaders net system ;
UsePrivateKernelHeaders ;
@@ -24,6 +24,6 @@ KernelAddon wavelanwifi :
if_wi_pci.c
glue.c
:
- libfreebsd11_wlan.a
+ freebsd_wlan.a
libfreebsd_network.a
;
diff --git a/src/bin/network/ifconfig/Jamfile b/src/bin/network/ifconfig/Jamfile
index cec413ba4e..679d2906a6 100644
--- a/src/bin/network/ifconfig/Jamfile
+++ b/src/bin/network/ifconfig/Jamfile
@@ -3,7 +3,7 @@ SubDir HAIKU_TOP src bin network ifconfig ;
UsePrivateHeaders net ;
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat ] : true ;
-UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd11_wlan ] : true ;
+UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
SubDirC++Flags [ FDefines _BSD_SOURCE=1 ] ;
diff --git a/src/kits/network/libnetapi/Jamfile
b/src/kits/network/libnetapi/Jamfile
index 802499d3a7..b123b8e69a 100644
--- a/src/kits/network/libnetapi/Jamfile
+++ b/src/kits/network/libnetapi/Jamfile
@@ -4,7 +4,7 @@ UsePrivateHeaders app net shared storage support ;
UsePrivateHeaders locale shared ;
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network ] : true ;
-UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd11_wlan ] : true ;
+UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
UseHeaders [ FDirName $(HAIKU_TOP) headers os add-ons network_settings ]
: true ;
diff --git a/src/libs/compat/Jamfile b/src/libs/compat/Jamfile
index 67250dd426..006118f092 100644
--- a/src/libs/compat/Jamfile
+++ b/src/libs/compat/Jamfile
@@ -2,4 +2,4 @@ SubDir HAIKU_TOP src libs compat ;
SubInclude HAIKU_TOP src libs compat freebsd_network ;
SubInclude HAIKU_TOP src libs compat freebsd_iflib ;
-SubInclude HAIKU_TOP src libs compat freebsd11_wlan ;
+SubInclude HAIKU_TOP src libs compat freebsd_wlan ;
diff --git a/src/libs/compat/freebsd11_wlan/Jamfile
b/src/libs/compat/freebsd11_wlan/Jamfile
deleted file mode 100644
index 12a79ae32e..0000000000
--- a/src/libs/compat/freebsd11_wlan/Jamfile
+++ /dev/null
@@ -1,3 +0,0 @@
-SubDir HAIKU_TOP src libs compat freebsd11_wlan ;
-
-SubInclude HAIKU_TOP src libs compat freebsd11_wlan net80211 ;
diff --git a/src/libs/compat/freebsd_wlan/Jamfile
b/src/libs/compat/freebsd_wlan/Jamfile
new file mode 100644
index 0000000000..b859f2cc44
--- /dev/null
+++ b/src/libs/compat/freebsd_wlan/Jamfile
@@ -0,0 +1,3 @@
+SubDir HAIKU_TOP src libs compat freebsd_wlan ;
+
+SubInclude HAIKU_TOP src libs compat freebsd_wlan net80211 ;
diff --git a/src/libs/compat/freebsd11_wlan/crypto/rijndael/rijndael-alg-fst.c
b/src/libs/compat/freebsd_wlan/crypto/rijndael/rijndael-alg-fst.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/crypto/rijndael/rijndael-alg-fst.c
rename to src/libs/compat/freebsd_wlan/crypto/rijndael/rijndael-alg-fst.c
diff --git a/src/libs/compat/freebsd11_wlan/crypto/rijndael/rijndael-api.c
b/src/libs/compat/freebsd_wlan/crypto/rijndael/rijndael-api.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/crypto/rijndael/rijndael-api.c
rename to src/libs/compat/freebsd_wlan/crypto/rijndael/rijndael-api.c
diff --git a/src/libs/compat/freebsd11_wlan/crypto/rijndael/rijndael.h
b/src/libs/compat/freebsd_wlan/crypto/rijndael/rijndael.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/crypto/rijndael/rijndael.h
rename to src/libs/compat/freebsd_wlan/crypto/rijndael/rijndael.h
diff --git a/src/libs/compat/freebsd11_wlan/crypto/rijndael/rijndael_local.h
b/src/libs/compat/freebsd_wlan/crypto/rijndael/rijndael_local.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/crypto/rijndael/rijndael_local.h
rename to src/libs/compat/freebsd_wlan/crypto/rijndael/rijndael_local.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/Jamfile
b/src/libs/compat/freebsd_wlan/net80211/Jamfile
similarity index 94%
rename from src/libs/compat/freebsd11_wlan/net80211/Jamfile
rename to src/libs/compat/freebsd_wlan/net80211/Jamfile
index 41d5af61eb..c28aff6b69 100644
--- a/src/libs/compat/freebsd11_wlan/net80211/Jamfile
+++ b/src/libs/compat/freebsd_wlan/net80211/Jamfile
@@ -1,4 +1,4 @@
-SubDir HAIKU_TOP src libs compat freebsd11_wlan net80211 ;
+SubDir HAIKU_TOP src libs compat freebsd_wlan net80211 ;
UseHeaders [ FDirName $(SUBDIR) .. .. freebsd_network ] : true ;
UseHeaders [ FDirName $(SUBDIR) .. .. freebsd_network compat ] : true ;
@@ -18,7 +18,7 @@ SubDirC++Flags [ FDefines _KERNEL=1 FBSD_DRIVER=1 ]
SEARCH_SOURCE += [ FDirName $(SUBDIR) .. crypto rijndael ] ;
-KernelStaticLibrary libfreebsd11_wlan.a :
+KernelStaticLibrary freebsd_wlan.a :
ieee80211.c
ieee80211_action.c
ieee80211_adhoc.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/_ieee80211.h
b/src/libs/compat/freebsd_wlan/net80211/_ieee80211.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/_ieee80211.h
rename to src/libs/compat/freebsd_wlan/net80211/_ieee80211.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_acl.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_acl.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_acl.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_acl.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_action.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_action.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_action.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_action.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_action.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_action.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_action.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_action.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_adhoc.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_adhoc.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_adhoc.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_adhoc.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_adhoc.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_adhoc.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_adhoc.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_adhoc.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_ageq.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_ageq.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_ageq.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_ageq.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_ageq.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_ageq.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_ageq.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_ageq.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_alq.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_alq.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_alq.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_alq.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_alq.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_alq.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_alq.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_alq.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_amrr.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_amrr.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_amrr.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_amrr.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_amrr.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_amrr.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_amrr.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_amrr.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_crypto.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_crypto.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_crypto.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_crypto.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_crypto_ccmp.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto_ccmp.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_crypto_ccmp.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto_ccmp.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_crypto_none.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto_none.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_crypto_none.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto_none.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_crypto_tkip.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto_tkip.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_crypto_tkip.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto_tkip.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_crypto_wep.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto_wep.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_crypto_wep.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_crypto_wep.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_ddb.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_ddb.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_ddb.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_ddb.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_dfs.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_dfs.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_dfs.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_dfs.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_dfs.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_dfs.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_dfs.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_dfs.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_haiku.cpp
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_haiku.cpp
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_haiku.cpp
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_haiku.cpp
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_haiku.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_haiku.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_haiku.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_haiku.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_hostap.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_hostap.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_hostap.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_hostap.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_hostap.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_hostap.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_hostap.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_hostap.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_ht.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_ht.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_ht.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_ht.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_ht.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_ht.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_ht.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_ht.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_hwmp.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_hwmp.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_hwmp.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_hwmp.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_input.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_input.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_input.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_input.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_input.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_input.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_input.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_input.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_ioctl.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_ioctl.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_ioctl.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_ioctl.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_ioctl.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_ioctl.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_ioctl.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_ioctl.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_mesh.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_mesh.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_mesh.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_mesh.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_mesh.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_mesh.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_mesh.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_mesh.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_monitor.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_monitor.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_monitor.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_monitor.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_monitor.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_monitor.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_monitor.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_monitor.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_node.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_node.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_node.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_node.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_node.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_node.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_node.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_node.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_output.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_output.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_output.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_output.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_phy.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_phy.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_phy.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_phy.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_phy.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_phy.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_phy.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_phy.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_power.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_power.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_power.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_power.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_power.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_power.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_power.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_power.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_proto.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_proto.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_proto.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_proto.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_proto.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_proto.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_proto.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_proto.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_radiotap.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_radiotap.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_radiotap.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_radiotap.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_radiotap.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_radiotap.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_radiotap.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_radiotap.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_ratectl.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_ratectl.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_ratectl.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_ratectl.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_ratectl.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_ratectl.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_ratectl.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_ratectl.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_ratectl_none.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_ratectl_none.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_ratectl_none.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_ratectl_none.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_regdomain.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_regdomain.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_regdomain.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_regdomain.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_regdomain.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_regdomain.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_regdomain.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_regdomain.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_rssadapt.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_rssadapt.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_rssadapt.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_rssadapt.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_rssadapt.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_rssadapt.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_rssadapt.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_rssadapt.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_scan.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_scan.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_scan.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_scan.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_scan.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_scan.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_scan.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_scan.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_scan_sta.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_scan_sta.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_scan_sta.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_scan_sta.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_scan_sw.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_scan_sw.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_scan_sw.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_scan_sw.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_scan_sw.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_scan_sw.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_scan_sw.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_scan_sw.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_sta.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_sta.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_sta.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_sta.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_sta.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_sta.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_sta.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_sta.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_superg.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_superg.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_superg.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_superg.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_superg.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_superg.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_superg.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_superg.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_tdma.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_tdma.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_tdma.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_tdma.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_tdma.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_tdma.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_tdma.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_tdma.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_var.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_var.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_var.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_var.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_wds.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_wds.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_wds.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_wds.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_wds.h
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_wds.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_wds.h
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_wds.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_xauth.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_xauth.c
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/ieee80211_xauth.c
rename to src/libs/compat/freebsd_wlan/net80211/ieee80211_xauth.c
diff --git a/src/libs/compat/freebsd11_wlan/net80211/opt_inet.h
b/src/libs/compat/freebsd_wlan/net80211/opt_inet.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/opt_inet.h
rename to src/libs/compat/freebsd_wlan/net80211/opt_inet.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/opt_inet6.h
b/src/libs/compat/freebsd_wlan/net80211/opt_inet6.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/opt_inet6.h
rename to src/libs/compat/freebsd_wlan/net80211/opt_inet6.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/opt_ipx.h
b/src/libs/compat/freebsd_wlan/net80211/opt_ipx.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/opt_ipx.h
rename to src/libs/compat/freebsd_wlan/net80211/opt_ipx.h
diff --git a/src/libs/compat/freebsd11_wlan/net80211/opt_wlan.h
b/src/libs/compat/freebsd_wlan/net80211/opt_wlan.h
similarity index 100%
rename from src/libs/compat/freebsd11_wlan/net80211/opt_wlan.h
rename to src/libs/compat/freebsd_wlan/net80211/opt_wlan.h
diff --git a/src/servers/net/Jamfile b/src/servers/net/Jamfile
index 3e9fbf1384..2724d3002f 100644
--- a/src/servers/net/Jamfile
+++ b/src/servers/net/Jamfile
@@ -3,7 +3,7 @@ SubDir HAIKU_TOP src servers net ;
UsePrivateHeaders app net shared storage ;
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat ] : true ;
-UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd11_wlan ] : true ;
+UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
UseHeaders [ FDirName $(HAIKU_TOP) headers os add-ons network_settings ]
: true ;
############################################################################
Commit: 67c3dfef8efe706a400171be2c96c87d00f5dd4a
URL: https://git.haiku-os.org/haiku/commit/?id=67c3dfef8efe
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Mon Jan 7 22:23:59 2019 UTC
freebsd_network: Fix license header in linker_set.h.
This file is a near-direct copy from FreeBSD; dunno how it wound up with
a Haiku license header.
----------------------------------------------------------------------------
diff --git a/src/libs/compat/freebsd_network/compat/sys/linker_set.h
b/src/libs/compat/freebsd_network/compat/sys/linker_set.h
index 41c964df38..135d4c3e99 100644
--- a/src/libs/compat/freebsd_network/compat/sys/linker_set.h
+++ b/src/libs/compat/freebsd_network/compat/sys/linker_set.h
@@ -1,6 +1,30 @@
-/*
- * Copyright 2009 Haiku Inc. All rights reserved.
- * Distributed under the terms of the MIT License.
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
+ * Copyright (c) 1999 John D. Polstra
+ * Copyright (c) 1999,2001 Peter Wemm <peter@xxxxxxxxxxx>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
*/
#ifndef _FBSD_COMPAT_SYS_LINKER_SET_H_
#define _FBSD_COMPAT_SYS_LINKER_SET_H_
############################################################################
Commit: 1f7634a08c602d7277f2add53d82b560918db8c7
URL: https://git.haiku-os.org/haiku/commit/?id=1f7634a08c60
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Mon Jan 7 22:24:53 2019 UTC
freebsd_network: Cleanup and some fixes to SYSINIT implementation.
Fixes a kernel panic on uninit_sysinit. Whoops.
----------------------------------------------------------------------------
diff --git a/src/libs/compat/freebsd_network/sysinit.c
b/src/libs/compat/freebsd_network/sysinit.c
index 107beb3f3b..c19e4faa88 100644
--- a/src/libs/compat/freebsd_network/sysinit.c
+++ b/src/libs/compat/freebsd_network/sysinit.c
@@ -24,16 +24,18 @@ SET_DECLARE(__freebsd_sysuninit, struct sysinit);
SYSINIT(__dummy, 0, 0, NULL, NULL);
SYSUNINIT(__dummy, 0, 0, NULL, NULL);
+/* orders */
+static const enum sysinit_elem_order orders[6] = {
+ SI_ORDER_FIRST, SI_ORDER_SECOND, SI_ORDER_THIRD, SI_ORDER_FOURTH,
+ SI_ORDER_MIDDLE, SI_ORDER_ANY,
+};
+
void
init_sysinit()
{
struct sysinit* const* initee;
- const enum sysinit_elem_order orders[6] = {
- SI_ORDER_FIRST, SI_ORDER_SECOND, SI_ORDER_THIRD,
SI_ORDER_FOURTH,
- SI_ORDER_MIDDLE, SI_ORDER_ANY,
- };
- uint32 i;
+ int32 i;
for (i = 0; i < 6; i++) {
SET_FOREACH(initee, __freebsd_sysinit) {
@@ -51,17 +53,13 @@ void
uninit_sysinit()
{
struct sysinit* const* initee;
- const enum sysinit_elem_order orders[6] = {
- SI_ORDER_FIRST, SI_ORDER_SECOND, SI_ORDER_THIRD,
SI_ORDER_FOURTH,
- SI_ORDER_MIDDLE, SI_ORDER_ANY,
- };
- uint32 i;
+ int32 i;
for (i = 5; i >= 0; i--) {
SET_FOREACH(initee, __freebsd_sysuninit) {
if ((*initee)->order != orders[i] || (*initee)->func ==
NULL)
continue;
- TRACE("sysinit: de-initializing %s\n", (*initee)->name);
+ TRACE("sysinit: de-initializing %s %p\n",
(*initee)->name, (*initee)->func);
(*initee)->func((*initee)->arg);
}
}
############################################################################
Commit: 3d4f7f0f60aa7e06aa2cdd6d71285883bfd42063
URL: https://git.haiku-os.org/haiku/commit/?id=3d4f7f0f60aa
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Mon Jan 7 22:26:02 2019 UTC
freebsd_network: Fix MTX_SYSINIT.
net80211 from FreeBSD 12 will use it.
----------------------------------------------------------------------------
diff --git a/src/libs/compat/freebsd_network/compat/sys/mutex.h
b/src/libs/compat/freebsd_network/compat/sys/mutex.h
index 8445838eb6..9c2ae7cb7d 100644
--- a/src/libs/compat/freebsd_network/compat/sys/mutex.h
+++ b/src/libs/compat/freebsd_network/compat/sys/mutex.h
@@ -129,16 +129,16 @@ struct mtx_args {
int ma_opts;
};
-#define MTX_SYSINIT(name, mtx, desc, opts)
\
- static struct mtx_args name##_args = { \
- (mtx), \
- (desc), \
- (opts) \
- }; \
- SYSINIT(name##_mtx_sysinit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \
- mtx_sysinit, &name##_args); \
- SYSUNINIT(name##_mtx_sysuninit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \
- mtx_destroy, __DEVOLATILE(void *, &(mtx)->mtx_lock))
+#define MTX_SYSINIT(name, mtx, desc, opts) \
+ static struct mtx_args name##_args = { \
+ (mtx), \
+ (desc), \
+ (opts), \
+ }; \
+ SYSINIT(name##_mtx, SI_SUB_LOCK, SI_ORDER_MIDDLE, \
+ mtx_sysinit, &name##_args); \
+ SYSUNINIT(name##_mtx, SI_SUB_LOCK, SI_ORDER_MIDDLE, \
+ (system_init_func_t)mtx_destroy, (void*)mtx)
#endif /* _FBSD_COMPAT_SYS_MUTEX_H_ */
############################################################################
Commit: f733714a6a9fd322145edd2adcd706822bfd4bdc
URL: https://git.haiku-os.org/haiku/commit/?id=f733714a6a9f
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Mon Jan 7 22:27:08 2019 UTC
freebsd_network: Changes for FreeBSD 12 net80211.
----------------------------------------------------------------------------
diff --git a/src/libs/compat/freebsd_network/compat/net/if.h
b/src/libs/compat/freebsd_network/compat/net/if.h
index 99f45c909f..552073a9b6 100644
--- a/src/libs/compat/freebsd_network/compat/net/if.h
+++ b/src/libs/compat/freebsd_network/compat/net/if.h
@@ -60,7 +60,8 @@
#define IFF_LINK2 0x00100000 /* per
link layer defined bit */
#define IFF_DEBUG 0x00200000
#define IFF_MONITOR 0x00400000 /* (n)
user-requested monitor mode */
-#define IFF_NOGROUP 0x00800000 /* (n)
interface is not part of any groups */
+#define IFF_PPROMISC 0x00800000 /* (n)
user-requested promisc mode */
+#define IFF_NOGROUP 0x01000000 /* (n)
interface is not part of any groups */
#define LINK_STATE_UNKNOWN 0
#define LINK_STATE_DOWN 1
diff --git a/src/libs/compat/freebsd_network/compat/net/if_media.h
b/src/libs/compat/freebsd_network/compat/net/if_media.h
index a6ce67a709..6d6631f523 100644
--- a/src/libs/compat/freebsd_network/compat/net/if_media.h
+++ b/src/libs/compat/freebsd_network/compat/net/if_media.h
@@ -1,7 +1,9 @@
/* $NetBSD: if_media.h,v 1.3 1997/03/26 01:19:27 thorpej Exp $ */
-/* $FreeBSD: src/sys/net/if_media.h,v 1.43 2008/08/01 22:13:39 antoine Exp $ */
+/* $FreeBSD: head/sys/net/if_media.h 338208 2018-08-22 18:19:56Z erj $ */
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 1997
* Jonathan Stone and Jason R. Thorpe. All rights reserved.
*
@@ -36,7 +38,7 @@
*/
#ifndef _FBSD_COMPAT_NET_IF_MEDIA_H_
-#define _FBSD_COMPAT_NET_IF_MEDIA_H_
+#define _FBSD_COMPAT_NET_IF_MEDIA_H_
/*
* Prototypes and definitions for BSD/OS-compatible network interface
@@ -54,11 +56,13 @@
#include <sys/queue.h>
+struct ifnet;
+
/*
* Driver callbacks for media status and change requests.
*/
-typedef int (*ifm_change_cb_t)(struct ifnet *ifp);
-typedef void (*ifm_stat_cb_t)(struct ifnet *ifp, struct ifmediareq
*req);
+typedef int (*ifm_change_cb_t)(struct ifnet *);
+typedef void (*ifm_stat_cb_t)(struct ifnet *, struct ifmediareq *req);
/*
* In-kernel representation of a single supported media type.
@@ -104,6 +108,7 @@ void ifmedia_set(struct ifmedia *ifm, int mword);
int ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr,
struct ifmedia *ifm, u_long cmd);
+
/* Compute baudrate for a given media. */
uint64_t ifmedia_baudrate(int);
@@ -115,7 +120,7 @@ uint64_t ifmedia_baudrate(int);
* ---- -------
* 0-4 Media variant
* 5-7 Media type
- * 8-15 Type specific options
+ * 8-15 Type specific options (includes added variant bits on Ethernet)
* 16-18 Mode (for multi-mode devices)
* 19 RFU
* 20-27 Shared (global) options
@@ -124,8 +129,18 @@ uint64_t ifmedia_baudrate(int);
/*
* Ethernet
+ * In order to use more than 31 subtypes, Ethernet uses some of the option
+ * bits as part of the subtype field. See the options section below for
+ * relevant definitions
*/
#define IFM_ETHER 0x00000020
+#define IFM_ETHER_SUBTYPE(x) (((x) & IFM_TMASK) | \
+ (((x) & (IFM_ETH_XTYPE >> IFM_ETH_XSHIFT)) << IFM_ETH_XSHIFT))
+#define IFM_X(x) IFM_ETHER_SUBTYPE(x) /* internal shorthand */
+#define IFM_ETHER_SUBTYPE_SET(x) (IFM_ETHER_SUBTYPE(x) | IFM_ETHER)
+#define IFM_ETHER_SUBTYPE_GET(x) ((x) & (IFM_TMASK|IFM_ETH_XTYPE))
+#define IFM_ETHER_IS_EXTENDED(x) ((x) & IFM_ETH_XTYPE)
+
#define IFM_10_T 3 /* 10BaseT - RJ45 */
#define IFM_10_2 4 /* 10Base2 - Thinnet */
#define IFM_10_5 5 /* 10Base5 - AUI */
@@ -144,41 +159,118 @@ uint64_t ifmedia_baudrate(int);
#define IFM_10G_LR 18 /* 10GBase-LR 1310nm
Single-mode */
#define IFM_10G_SR 19 /* 10GBase-SR 850nm Multi-mode
*/
#define IFM_10G_CX4 20 /* 10GBase CX4 copper */
-#define IFM_2500_SX 21 /* 2500BaseSX - multi-mode fiber */
+#define IFM_2500_SX 21 /* 2500BaseSX - multi-mode
fiber */
+#define IFM_10G_TWINAX 22 /* 10GBase Twinax copper */
+#define IFM_10G_TWINAX_LONG 23 /* 10GBase Twinax Long copper */
+#define IFM_10G_LRM 24 /* 10GBase-LRM 850nm Multi-mode
*/
#define IFM_UNKNOWN 25 /* media types not defined yet
*/
-
-
-/* note 31 is the max! */
-
-#define IFM_ETH_MASTER 0x00000100 /* master mode (1000baseT) */
-#define IFM_ETH_RXPAUSE 0x00000200 /* receive PAUSE frames */
-#define IFM_ETH_TXPAUSE 0x00000400 /* transmit PAUSE frames */
+#define IFM_10G_T 26 /* 10GBase-T - RJ45 */
+#define IFM_40G_CR4 27 /* 40GBase-CR4 */
+#define IFM_40G_SR4 28 /* 40GBase-SR4 */
+#define IFM_40G_LR4 29 /* 40GBase-LR4 */
+#define IFM_1000_KX 30 /* 1000Base-KX backplane */
+#define IFM_OTHER 31 /* Other: one of the following
*/
+
+/* following types are not visible to old binaries using only IFM_TMASK */
+#define IFM_10G_KX4 IFM_X(32) /* 10GBase-KX4 backplane */
+#define IFM_10G_KR IFM_X(33) /* 10GBase-KR backplane */
+#define IFM_10G_CR1 IFM_X(34) /* 10GBase-CR1 Twinax splitter
*/
+#define IFM_20G_KR2 IFM_X(35) /* 20GBase-KR2 backplane */
+#define IFM_2500_KX IFM_X(36) /* 2500Base-KX backplane */
+#define IFM_2500_T IFM_X(37) /* 2500Base-T - RJ45 (NBaseT) */
+#define IFM_5000_T IFM_X(38) /* 5000Base-T - RJ45 (NBaseT) */
+#define IFM_50G_PCIE IFM_X(39) /* 50G Ethernet over PCIE */
+#define IFM_25G_PCIE IFM_X(40) /* 25G Ethernet over PCIE */
+#define IFM_1000_SGMII IFM_X(41) /* 1G media interface */
+#define IFM_10G_SFI IFM_X(42) /* 10G media interface */
+#define IFM_40G_XLPPI IFM_X(43) /* 40G media interface */
+#define IFM_1000_CX_SGMII IFM_X(44) /* 1000Base-CX-SGMII */
+#define IFM_40G_KR4 IFM_X(45) /* 40GBase-KR4 */
+#define IFM_10G_ER IFM_X(46) /* 10GBase-ER */
+#define IFM_100G_CR4 IFM_X(47) /* 100GBase-CR4 */
+#define IFM_100G_SR4 IFM_X(48) /* 100GBase-SR4 */
+#define IFM_100G_KR4 IFM_X(49) /* 100GBase-KR4 */
+#define IFM_100G_LR4 IFM_X(50) /* 100GBase-LR4 */
+#define IFM_56G_R4 IFM_X(51) /* 56GBase-R4 */
+#define IFM_100_T IFM_X(52) /* 100BaseT - RJ45 */
+#define IFM_25G_CR IFM_X(53) /* 25GBase-CR */
+#define IFM_25G_KR IFM_X(54) /* 25GBase-KR */
+#define IFM_25G_SR IFM_X(55) /* 25GBase-SR */
+#define IFM_50G_CR2 IFM_X(56) /* 50GBase-CR2 */
+#define IFM_50G_KR2 IFM_X(57) /* 50GBase-KR2 */
+#define IFM_25G_LR IFM_X(58) /* 25GBase-LR */
+#define IFM_10G_AOC IFM_X(59) /* 10G active optical cable */
+#define IFM_25G_ACC IFM_X(60) /* 25G active copper cable */
+#define IFM_25G_AOC IFM_X(61) /* 25G active optical cable */
+#define IFM_100_SGMII IFM_X(62) /* 100M media interface */
+#define IFM_2500_X IFM_X(63) /* 2500BaseX */
+#define IFM_5000_KR IFM_X(64) /* 5GBase-KR backplane */
+#define IFM_25G_T IFM_X(65) /* 25GBase-T - RJ45 */
+#define IFM_25G_CR_S IFM_X(66) /* 25GBase-CR (short) */
+#define IFM_25G_CR1 IFM_X(67) /* 25GBase-CR1 DA cable */
+#define IFM_25G_KR_S IFM_X(68) /* 25GBase-KR (short) */
+#define IFM_5000_KR_S IFM_X(69) /* 5GBase-KR backplane (short)
*/
+#define IFM_5000_KR1 IFM_X(70) /* 5GBase-KR backplane */
+#define IFM_25G_AUI IFM_X(71) /* 25G-AUI-C2C (chip to chip) */
+#define IFM_40G_XLAUI IFM_X(72) /* 40G-XLAUI */
+#define IFM_40G_XLAUI_AC IFM_X(73) /* 40G active copper/optical */
+#define IFM_40G_ER4 IFM_X(74) /* 40GBase-ER4 */
+#define IFM_50G_SR2 IFM_X(75) /* 50GBase-SR2 */
+#define IFM_50G_LR2 IFM_X(76) /* 50GBase-LR2 */
+#define IFM_50G_LAUI2_AC IFM_X(77) /* 50G active copper/optical */
+#define IFM_50G_LAUI2 IFM_X(78) /* 50G-LAUI2 */
+#define IFM_50G_AUI2_AC IFM_X(79) /* 50G active copper/optical */
+#define IFM_50G_AUI2 IFM_X(80) /* 50G-AUI2 */
+#define IFM_50G_CP IFM_X(81) /* 50GBase-CP */
+#define IFM_50G_SR IFM_X(82) /* 50GBase-SR */
+#define IFM_50G_LR IFM_X(83) /* 50GBase-LR */
+#define IFM_50G_FR IFM_X(84) /* 50GBase-FR */
+#define IFM_50G_KR_PAM4 IFM_X(85) /* 50GBase-KR PAM4 */
+#define IFM_25G_KR1 IFM_X(86) /* 25GBase-KR1 */
+#define IFM_50G_AUI1_AC IFM_X(87) /* 50G active copper/optical */
+#define IFM_50G_AUI1 IFM_X(88) /* 50G-AUI1 */
+#define IFM_100G_CAUI4_AC IFM_X(89) /* 100G-CAUI4 active
copper/optical */
+#define IFM_100G_CAUI4 IFM_X(90) /* 100G-CAUI4 */
+#define IFM_100G_AUI4_AC IFM_X(91) /* 100G-AUI4 active
copper/optical */
+#define IFM_100G_AUI4 IFM_X(92) /* 100G-AUI4 */
+#define IFM_100G_CR_PAM4 IFM_X(93) /* 100GBase-CR PAM4 */
+#define IFM_100G_KR_PAM4 IFM_X(94) /* 100GBase-CR PAM4 */
+#define IFM_100G_CP2 IFM_X(95) /* 100GBase-CP2 */
+#define IFM_100G_SR2 IFM_X(96) /* 100GBase-SR2 */
+#define IFM_100G_DR IFM_X(97) /* 100GBase-DR */
+#define IFM_100G_KR2_PAM4 IFM_X(98) /* 100GBase-KR2 PAM4 */
+#define IFM_100G_CAUI2_AC IFM_X(99) /* 100G-CAUI2 active
copper/optical */
+#define IFM_100G_CAUI2 IFM_X(100) /* 100G-CAUI2 */
+#define IFM_100G_AUI2_AC IFM_X(101) /* 100G-AUI2 active
copper/optical */
+#define IFM_100G_AUI2 IFM_X(102) /* 100G-AUI2 */
+#define IFM_200G_CR4_PAM4 IFM_X(103) /* 200GBase-CR4 PAM4 */
+#define IFM_200G_SR4 IFM_X(104) /* 200GBase-SR4 */
+#define IFM_200G_FR4 IFM_X(105) /* 200GBase-FR4 */
+#define IFM_200G_LR4 IFM_X(106) /* 200GBase-LR4 */
+#define IFM_200G_DR4 IFM_X(107) /* 200GBase-DR4 */
+#define IFM_200G_KR4_PAM4 IFM_X(108) /* 200GBase-KR4 PAM4 */
+#define IFM_200G_AUI4_AC IFM_X(109) /* 200G-AUI4 active
copper/optical */
+#define IFM_200G_AUI4 IFM_X(110) /* 200G-AUI4 */
+#define IFM_200G_AUI8_AC IFM_X(111) /* 200G-AUI8 active
copper/optical */
+#define IFM_200G_AUI8 IFM_X(112) /* 200G-AUI8 */
+#define IFM_400G_FR8 IFM_X(113) /* 400GBase-FR8 */
+#define IFM_400G_LR8 IFM_X(114) /* 400GBase-LR8 */
+#define IFM_400G_DR4 IFM_X(115) /* 400GBase-DR4 */
+#define IFM_400G_AUI8_AC IFM_X(116) /* 400G-AUI8 active
copper/optical */
+#define IFM_400G_AUI8 IFM_X(117) /* 400G-AUI8 */
/*
- * Token ring
+ * Please update ieee8023ad_lacp.c:lacp_compose_key()
+ * after adding new Ethernet media types.
*/
-#define IFM_TOKEN 0x00000040
-#define IFM_TOK_STP4 3 /* Shielded twisted pair 4m -
DB9 */
-#define IFM_TOK_STP16 4 /* Shielded twisted pair 16m -
DB9 */
-#define IFM_TOK_UTP4 5 /* Unshielded twisted pair 4m -
RJ45 */
-#define IFM_TOK_UTP16 6 /* Unshielded twisted pair 16m
- RJ45 */
-#define IFM_TOK_STP100 7 /* Shielded twisted pair 100m -
DB9 */
-#define IFM_TOK_UTP100 8 /* Unshielded twisted pair 100m
- RJ45 */
-#define IFM_TOK_ETR 0x00000200 /* Early token release */
-#define IFM_TOK_SRCRT 0x00000400 /* Enable source routing
features */
-#define IFM_TOK_ALLR 0x00000800 /* All routes / Single route
bcast */
-#define IFM_TOK_DTR 0x00002000 /* Dedicated token ring */
-#define IFM_TOK_CLASSIC 0x00004000 /* Classic token ring */
-#define IFM_TOK_AUTO 0x00008000 /* Automatic Dedicate/Classic
token ring */
+/* Note IFM_X(511) is the max! */
-/*
- * FDDI
- */
-#define IFM_FDDI 0x00000060
-#define IFM_FDDI_SMF 3 /* Single-mode fiber */
-#define IFM_FDDI_MMF 4 /* Multi-mode fiber */
-#define IFM_FDDI_UTP 5 /* CDDI / UTP */
-#define IFM_FDDI_DA 0x00000100 /* Dual attach / single attach
*/
+/* Ethernet option values; includes bits used for extended variant field */
+#define IFM_ETH_MASTER 0x00000100 /* master mode (1000baseT) */
+#define IFM_ETH_RXPAUSE 0x00000200 /* receive PAUSE frames */
+#define IFM_ETH_TXPAUSE 0x00000400 /* transmit PAUSE frames */
+#define IFM_ETH_XTYPE 0x00007800 /* extended media variants */
+#define IFM_ETH_XSHIFT 6 /* shift XTYPE next to TMASK */
/*
* IEEE 802.11 Wireless
@@ -208,6 +300,7 @@ uint64_t ifmedia_baudrate(int);
#define IFM_IEEE80211_OFDM27 23 /* OFDM 27Mbps */
/* NB: not enough bits to express MCS fully */
#define IFM_IEEE80211_MCS 24 /* HT MCS rate */
+#define IFM_IEEE80211_VHT 25 /* VHT MCS rate */
#define IFM_IEEE80211_ADHOC 0x00000100 /* Operate in Adhoc
mode */
#define IFM_IEEE80211_HOSTAP 0x00000200 /* Operate in Host AP
mode */
@@ -224,29 +317,26 @@ uint64_t ifmedia_baudrate(int);
#define IFM_IEEE80211_FH 0x00040000 /* 2Ghz, GFSK mode */
#define IFM_IEEE80211_11NA 0x00050000 /* 5Ghz, HT mode */
#define IFM_IEEE80211_11NG 0x00060000 /* 2Ghz, HT mode */
+#define IFM_IEEE80211_VHT5G 0x00070000 /* 5Ghz, VHT mode */
+#define IFM_IEEE80211_VHT2G 0x00080000 /* 2Ghz, VHT mode */
/*
* ATM
*/
-#define IFM_ATM 0x000000a0
-#define IFM_ATM_UNKNOWN 3
-#define IFM_ATM_UTP_25 4
-#define IFM_ATM_TAXI_100 5
-#define IFM_ATM_TAXI_140 6
-#define IFM_ATM_MM_155 7
-#define IFM_ATM_SM_155 8
-#define IFM_ATM_UTP_155 9
-#define IFM_ATM_MM_622 10
-#define IFM_ATM_SM_622 11
+#define IFM_ATM 0x000000a0
+#define IFM_ATM_UNKNOWN 3
+#define IFM_ATM_UTP_25 4
+#define IFM_ATM_TAXI_100 5
+#define IFM_ATM_TAXI_140 6
+#define IFM_ATM_MM_155 7
+#define IFM_ATM_SM_155 8
+#define IFM_ATM_UTP_155 9
+#define IFM_ATM_MM_622 10
+#define IFM_ATM_SM_622 11
#define IFM_ATM_VIRTUAL 12
-#define IFM_ATM_SDH 0x00000100 /* SDH instead of SONET */
-#define IFM_ATM_NOSCRAMB 0x00000200 /* no scrambling */
-#define IFM_ATM_UNASSIGNED 0x00000400 /* unassigned cells */
-
-/*
- * CARP Common Address Redundancy Protocol
- */
-#define IFM_CARP 0x000000c0
+#define IFM_ATM_SDH 0x00000100 /* SDH instead of SONET
*/
+#define IFM_ATM_NOSCRAMB 0x00000200 /* no scrambling */
+#define IFM_ATM_UNASSIGNED 0x00000400 /* unassigned cells */
/*
* Shared media sub-types
@@ -260,7 +350,7 @@ uint64_t ifmedia_baudrate(int);
*/
#define IFM_FDX 0x00100000 /* Force full duplex */
#define IFM_HDX 0x00200000 /* Force half duplex */
-#define IFM_FLOW 0x00400000 /* Enable hardware flow control
*/
+#define IFM_FLOW 0x00400000 /* enable hardware flow control
*/
#define IFM_FLAG0 0x01000000 /* Driver defined flag */
#define IFM_FLAG1 0x02000000 /* Driver defined flag */
#define IFM_FLAG2 0x04000000 /* Driver defined flag */
@@ -278,32 +368,43 @@ uint64_t ifmedia_baudrate(int);
#define IFM_MSHIFT 16 /* Mode shift */
#define IFM_GMASK 0x0ff00000 /* Global options */
+/* Ethernet flow control mask */
+#define IFM_ETH_FMASK (IFM_FLOW | IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE)
+
/*
* Status bits
*/
-#define IFM_AVALID 0x10000000 /* Active bit valid */
-#define IFM_ACTIVE 0x00800000 /* same as Haiku's */
+#ifndef __HAIKU__
+#define IFM_AVALID 0x00000001 /* Active bit valid */
+#define IFM_ACTIVE 0x00000002 /* Interface attached to
working net */
+#else
+#define IFM_AVALID 0x10000000 /* Active bit valid */
+#define IFM_ACTIVE 0x00800000 /* same as Haiku's */
+#endif
/* Mask of "status valid" bits, for ifconfig(8). */
#define IFM_STATUS_VALID IFM_AVALID
/* List of "status valid" bits, for ifconfig(8). */
-#define IFM_STATUS_VALID_LIST {
\
- IFM_AVALID, \
- 0 \
+#define IFM_STATUS_VALID_LIST {
\
+ IFM_AVALID, \
+ 0 \
}
/*
* Macros to extract various bits of information from the media word.
*/
-#define IFM_TYPE(x) ((x) & IFM_NMASK)
-#define IFM_SUBTYPE(x) ((x) & IFM_TMASK)
-#define IFM_TYPE_OPTIONS(x) ((x) & IFM_OMASK)
-#define IFM_INST(x) (((x) & IFM_IMASK) >> IFM_ISHIFT)
-#define IFM_OPTIONS(x) ((x) & (IFM_OMASK|IFM_GMASK))
-#define IFM_MODE(x) ((x) & IFM_MMASK)
-
-#define IFM_INST_MAX IFM_INST(IFM_IMASK)
+#define IFM_TYPE(x) ((x) & IFM_NMASK)
+#define IFM_SUBTYPE(x) \
+ (IFM_TYPE(x) == IFM_ETHER ? IFM_ETHER_SUBTYPE_GET(x) : ((x) & IFM_TMASK))
+#define IFM_TYPE_MATCH(x,y) \
+ (IFM_TYPE(x) == IFM_TYPE(y) && IFM_SUBTYPE(x) == IFM_SUBTYPE(y))
+#define IFM_TYPE_OPTIONS(x) ((x) & IFM_OMASK)
+#define IFM_INST(x) (((x) & IFM_IMASK) >> IFM_ISHIFT)
+#define IFM_OPTIONS(x) ((x) & (IFM_OMASK | IFM_GMASK))
+#define IFM_MODE(x) ((x) & IFM_MMASK)
+
+#define IFM_INST_MAX IFM_INST(IFM_IMASK)
/*
* Macro to create a media word.
@@ -327,11 +428,8 @@ struct ifmedia_description {
#define IFM_TYPE_DESCRIPTIONS {
\
{ IFM_ETHER, "Ethernet" }, \
- { IFM_TOKEN, "Token ring" }, \
- { IFM_FDDI, "FDDI" }, \
{ IFM_IEEE80211, "IEEE 802.11 Wireless Ethernet" }, \
{ IFM_ATM, "ATM" }, \
- { IFM_CARP, "Common Address Redundancy Protocol" }, \
{ 0, NULL }, \
}
@@ -354,12 +452,108 @@ struct ifmedia_description {
{ IFM_10G_LR, "10Gbase-LR" }, \
{ IFM_10G_SR, "10Gbase-SR" }, \
{ IFM_10G_CX4, "10Gbase-CX4" }, \
- { IFM_UNKNOWN, "Unknown" }, \
{ IFM_2500_SX, "2500BaseSX" }, \
+ { IFM_10G_LRM, "10Gbase-LRM" }, \
+ { IFM_10G_TWINAX, "10Gbase-Twinax" }, \
+ { IFM_10G_TWINAX_LONG, "10Gbase-Twinax-Long" }, \
+ { IFM_UNKNOWN, "Unknown" }, \
+ { IFM_10G_T, "10Gbase-T" }, \
+ { IFM_40G_CR4, "40Gbase-CR4" }, \
+ { IFM_40G_SR4, "40Gbase-SR4" }, \
+ { IFM_40G_LR4, "40Gbase-LR4" }, \
+ { IFM_1000_KX, "1000Base-KX" }, \
+ { IFM_OTHER, "Other" }, \
+ { IFM_10G_KX4, "10GBase-KX4" }, \
+ { IFM_10G_KR, "10GBase-KR" }, \
+ { IFM_10G_CR1, "10GBase-CR1" }, \
+ { IFM_20G_KR2, "20GBase-KR2" }, \
+ { IFM_2500_KX, "2500Base-KX" }, \
+ { IFM_2500_T, "2500Base-T" }, \
+ { IFM_5000_T, "5000Base-T" }, \
+ { IFM_50G_PCIE, "PCIExpress-50G" }, \
+ { IFM_25G_PCIE, "PCIExpress-25G" }, \
+ { IFM_1000_SGMII, "1000Base-SGMII" }, \
+ { IFM_10G_SFI, "10GBase-SFI" }, \
+ { IFM_40G_XLPPI, "40GBase-XLPPI" }, \
+ { IFM_1000_CX_SGMII, "1000Base-CX-SGMII" }, \
+ { IFM_40G_KR4, "40GBase-KR4" }, \
+ { IFM_10G_ER, "10GBase-ER" }, \
+ { IFM_100G_CR4, "100GBase-CR4" }, \
+ { IFM_100G_SR4, "100GBase-SR4" }, \
+ { IFM_100G_KR4, "100GBase-KR4" }, \
+ { IFM_100G_LR4, "100GBase-LR4" }, \
+ { IFM_56G_R4, "56GBase-R4" }, \
+ { IFM_100_T, "100BaseT" }, \
+ { IFM_25G_CR, "25GBase-CR" }, \
+ { IFM_25G_KR, "25GBase-KR" }, \
+ { IFM_25G_SR, "25GBase-SR" }, \
+ { IFM_50G_CR2, "50GBase-CR2" }, \
+ { IFM_50G_KR2, "50GBase-KR2" }, \
+ { IFM_25G_LR, "25GBase-LR" }, \
+ { IFM_10G_AOC, "10GBase-AOC" }, \
+ { IFM_25G_ACC, "25GBase-ACC" }, \
+ { IFM_25G_AOC, "25GBase-AOC" }, \
+ { IFM_100_SGMII, "100M-SGMII" }, \
+ { IFM_2500_X, "2500Base-X" }, \
+ { IFM_5000_KR, "5000Base-KR" }, \
+ { IFM_25G_T, "25GBase-T" }, \
+ { IFM_25G_CR_S, "25GBase-CR-S" }, \
+ { IFM_25G_CR1, "25GBase-CR1" }, \
+ { IFM_25G_KR_S, "25GBase-KR-S" }, \
+ { IFM_5000_KR_S, "5000Base-KR-S" }, \
+ { IFM_5000_KR1, "5000Base-KR1" }, \
+ { IFM_25G_AUI, "25G-AUI" }, \
+ { IFM_40G_XLAUI, "40G-XLAUI" }, \
+ { IFM_40G_XLAUI_AC, "40G-XLAUI-AC" }, \
+ { IFM_40G_ER4, "40GBase-ER4" }, \
+ { IFM_50G_SR2, "50GBase-SR2" }, \
+ { IFM_50G_LR2, "50GBase-LR2" }, \
+ { IFM_50G_LAUI2_AC, "50G-LAUI2-AC" }, \
+ { IFM_50G_LAUI2, "50G-LAUI2" }, \
+ { IFM_50G_AUI2_AC, "50G-AUI2-AC" }, \
+ { IFM_50G_AUI2, "50G-AUI2" }, \
+ { IFM_50G_CP, "50GBase-CP" }, \
+ { IFM_50G_SR, "50GBase-SR" }, \
+ { IFM_50G_LR, "50GBase-LR" }, \
+ { IFM_50G_FR, "50GBase-FR" }, \
+ { IFM_50G_KR_PAM4, "50GBase-KR-PAM4" }, \
+ { IFM_25G_KR1, "25GBase-KR1" }, \
+ { IFM_50G_AUI1_AC, "50G-AUI1-AC" }, \
+ { IFM_50G_AUI1, "50G-AUI1" }, \
+ { IFM_100G_CAUI4_AC, "100G-CAUI4-AC" }, \
+ { IFM_100G_CAUI4, "100G-CAUI4" }, \
+ { IFM_100G_AUI4_AC, "100G-AUI4-AC" }, \
+ { IFM_100G_AUI4, "100G-AUI4" }, \
+ { IFM_100G_CR_PAM4, "100GBase-CR-PAM4" }, \
+ { IFM_100G_KR_PAM4, "100GBase-KR-PAM4" }, \
+ { IFM_100G_CP2, "100GBase-CP2" }, \
+ { IFM_100G_SR2, "100GBase-SR2" }, \
+ { IFM_100G_DR, "100GBase-DR" }, \
+ { IFM_100G_KR2_PAM4, "100GBase-KR2-PAM4" }, \
+ { IFM_100G_CAUI2_AC, "100G-CAUI2-AC" }, \
+ { IFM_100G_CAUI2, "100G-CAUI2" }, \
+ { IFM_100G_AUI2_AC, "100G-AUI2-AC" }, \
+ { IFM_100G_AUI2, "100G-AUI2" }, \
+ { IFM_200G_CR4_PAM4, "200GBase-CR4-PAM4" }, \
+ { IFM_200G_SR4, "200GBase-SR4" }, \
+ { IFM_200G_FR4, "200GBase-FR4" }, \
+ { IFM_200G_LR4, "200GBase-LR4" }, \
+ { IFM_200G_DR4, "200GBase-DR4" }, \
+ { IFM_200G_KR4_PAM4, "200GBase-KR4-PAM4" }, \
+ { IFM_200G_AUI4_AC, "200G-AUI4-AC" }, \
+ { IFM_200G_AUI4, "200G-AUI4" }, \
+ { IFM_200G_AUI8_AC, "200G-AUI8-AC" }, \
+ { IFM_200G_AUI8, "200G-AUI8" }, \
+ { IFM_400G_FR8, "400GBase-FR8" }, \
+ { IFM_400G_LR8, "400GBase-LR8" }, \
+ { IFM_400G_DR4, "400GBase-DR4" }, \
+ { IFM_400G_AUI8_AC, "400G-AUI8-AC" }, \
+ { IFM_400G_AUI8, "400G-AUI8" }, \
{ 0, NULL }, \
}
#define IFM_SUBTYPE_ETHERNET_ALIASES {
\
+ { IFM_10_T, "10baseT" }, \
{ IFM_10_T, "UTP" }, \
{ IFM_10_T, "10UTP" }, \
{ IFM_10_2, "BNC" }, \
@@ -379,59 +573,30 @@ struct ifmedia_description {
{ IFM_1000_T, "1000TX" }, \
{ IFM_1000_T, "1000T" }, \
{ IFM_2500_SX, "2500SX" }, \
+ \
+ /* \
+ * Shorthands for common media+option combinations as announced \
+ * by miibus(4) \
+ */ \
+ { IFM_10_T | IFM_FDX, "10baseT-FDX" }, \
+ { IFM_10_T | IFM_FDX | IFM_FLOW, "10baseT-FDX-flow" }, \
+ { IFM_100_TX | IFM_FDX, "100baseTX-FDX" }, \
+ { IFM_100_TX | IFM_FDX | IFM_FLOW, "100baseTX-FDX-flow" }, \
+ { IFM_1000_T | IFM_FDX, "1000baseT-FDX" }, \
+ { IFM_1000_T | IFM_FDX | IFM_FLOW, "1000baseT-FDX-flow" }, \
+ { IFM_1000_T | IFM_FDX | IFM_FLOW | IFM_ETH_MASTER, \
+ "1000baseT-FDX-flow-master" }, \
+ { IFM_1000_T | IFM_FDX | IFM_ETH_MASTER, \
+ "1000baseT-FDX-master" }, \
+ { IFM_1000_T | IFM_ETH_MASTER, "1000baseT-master" }, \
+ \
{ 0, NULL }, \
}
#define IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS {
\
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_TOKENRING_DESCRIPTIONS {
\
- { IFM_TOK_STP4, "DB9/4Mbit" }, \
- { IFM_TOK_STP16, "DB9/16Mbit" }, \
- { IFM_TOK_UTP4, "UTP/4Mbit" }, \
- { IFM_TOK_UTP16, "UTP/16Mbit" }, \
- { IFM_TOK_STP100, "STP/100Mbit" }, \
- { IFM_TOK_UTP100, "UTP/100Mbit" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_TOKENRING_ALIASES {
\
- { IFM_TOK_STP4, "4STP" }, \
- { IFM_TOK_STP16, "16STP" }, \
- { IFM_TOK_UTP4, "4UTP" }, \
- { IFM_TOK_UTP16, "16UTP" }, \
- { IFM_TOK_STP100, "100STP" }, \
- { IFM_TOK_UTP100, "100UTP" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_TOKENRING_OPTION_DESCRIPTIONS {
\
- { IFM_TOK_ETR, "EarlyTokenRelease" }, \
- { IFM_TOK_SRCRT, "SourceRouting" }, \
- { IFM_TOK_ALLR, "AllRoutes" }, \
- { IFM_TOK_DTR, "Dedicated" }, \
- { IFM_TOK_CLASSIC,"Classic" }, \
- { IFM_TOK_AUTO, " " }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_FDDI_DESCRIPTIONS {
\
- { IFM_FDDI_SMF, "Single-mode" }, \
- { IFM_FDDI_MMF, "Multi-mode" }, \
- { IFM_FDDI_UTP, "UTP" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_FDDI_ALIASES {
\
- { IFM_FDDI_SMF, "SMF" }, \
- { IFM_FDDI_MMF, "MMF" }, \
- { IFM_FDDI_UTP, "CDDI" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_FDDI_OPTION_DESCRIPTIONS {
\
- { IFM_FDDI_DA, "Dual-attach" }, \
+ { IFM_ETH_MASTER, "master" }, \
+ { IFM_ETH_RXPAUSE, "rxpause" }, \
+ { IFM_ETH_TXPAUSE, "txpause" }, \
{ 0, NULL }, \
}
@@ -457,6 +622,8 @@ struct ifmedia_description {
{ IFM_IEEE80211_OFDM3, "OFDM/3Mbps" }, \
{ IFM_IEEE80211_OFDM4, "OFDM/4.5Mbps" }, \
{ IFM_IEEE80211_OFDM27, "OFDM/27Mbps" }, \
+ { IFM_IEEE80211_MCS, "MCS" }, \
+ { IFM_IEEE80211_VHT, "VHT" }, \
{ 0, NULL }, \
}
@@ -495,6 +662,8 @@ struct ifmedia_description {
{ IFM_IEEE80211_OFDM3, "OFDM3" }, \
{ IFM_IEEE80211_OFDM4, "OFDM4.5" }, \
{ IFM_IEEE80211_OFDM27, "OFDM27" }, \
+ { IFM_IEEE80211_MCS, "MCS" }, \
+ { IFM_IEEE80211_VHT, "VHT" }, \
{ 0, NULL }, \
}
@@ -505,6 +674,7 @@ struct ifmedia_description {
{ IFM_IEEE80211_WDS, "wds" }, \
{ IFM_IEEE80211_TURBO, "turbo" }, \
{ IFM_IEEE80211_MONITOR, "monitor" }, \
+ { IFM_IEEE80211_MBSS, "mesh" }, \
{ 0, NULL }, \
}
@@ -516,6 +686,8 @@ struct ifmedia_description {
{ IFM_IEEE80211_FH, "fh" }, \
{ IFM_IEEE80211_11NA, "11na" }, \
{ IFM_IEEE80211_11NG, "11ng" }, \
+ { IFM_IEEE80211_VHT5G, "11ac" }, \
+ { IFM_IEEE80211_VHT2G, "11ac2" }, \
{ 0, NULL }, \
}
@@ -524,7 +696,7 @@ struct ifmedia_description {
{ 0, NULL }, \
}
-# define IFM_SUBTYPE_ATM_DESCRIPTIONS {
\
+#define IFM_SUBTYPE_ATM_DESCRIPTIONS {
\
{ IFM_ATM_UNKNOWN, "Unknown" }, \
{ IFM_ATM_UTP_25, "UTP/25.6MBit" }, \
{ IFM_ATM_TAXI_100, "Taxi/100MBit" }, \
@@ -538,7 +710,7 @@ struct ifmedia_description {
{ 0, NULL }, \
}
-# define IFM_SUBTYPE_ATM_ALIASES { \
+#define IFM_SUBTYPE_ATM_ALIASES {
\
{ IFM_ATM_UNKNOWN, "UNKNOWN" }, \
{ IFM_ATM_UTP_25, "UTP-25" }, \
{ IFM_ATM_TAXI_100, "TAXI-100" }, \
@@ -559,7 +731,6 @@ struct ifmedia_description {
{ 0, NULL }, \
}
-
#define IFM_SUBTYPE_SHARED_DESCRIPTIONS {
\
{ IFM_AUTO, "autoselect" }, \
{ IFM_MANUAL, "manual" }, \
@@ -569,12 +740,20 @@ struct ifmedia_description {
#define IFM_SUBTYPE_SHARED_ALIASES {
\
{ IFM_AUTO, "auto" }, \
+ \
+ /* \
+ * Shorthands for common media+option combinations as announced \
+ * by miibus(4) \
+ */ \
+ { IFM_AUTO | IFM_FLOW, "auto-flow" }, \
+ \
{ 0, NULL }, \
}
#define IFM_SHARED_OPTION_DESCRIPTIONS {
\
{ IFM_FDX, "full-duplex" }, \
{ IFM_HDX, "half-duplex" }, \
+ { IFM_FLOW, "flowcontrol" }, \
{ IFM_FLAG0, "flag0" }, \
{ IFM_FLAG1, "flag1" }, \
{ IFM_FLAG2, "flag2" }, \
@@ -582,6 +761,15 @@ struct ifmedia_description {
{ 0, NULL }, \
}
+#define IFM_SHARED_OPTION_ALIASES {
\
+ { IFM_FDX, "fdx" }, \
+ { IFM_HDX, "hdx" }, \
+ { IFM_FLOW, "flow" }, \
+ { IFM_LOOP, "loop" }, \
+ { IFM_LOOP, "loopback" }, \
+ { 0, NULL }, \
+}
+
/*
* Baudrate descriptions for the various media types.
*/
@@ -590,7 +778,7 @@ struct ifmedia_baudrate {
uint64_t ifmb_baudrate; /* corresponding baudrate */
};
-#define IFM_BAUDRATE_DESCRIPTIONS { \
+#define IFM_BAUDRATE_DESCRIPTIONS {
\
{ IFM_ETHER | IFM_10_T, IF_Mbps(10) }, \
{ IFM_ETHER | IFM_10_2, IF_Mbps(10) }, \
{ IFM_ETHER | IFM_10_5, IF_Mbps(10) }, \
@@ -610,15 +798,100 @@ struct ifmedia_baudrate {
{ IFM_ETHER | IFM_10G_SR, IF_Gbps(10ULL) }, \
{ IFM_ETHER | IFM_10G_CX4, IF_Gbps(10ULL) }, \
{ IFM_ETHER | IFM_2500_SX, IF_Mbps(2500ULL) }, \
- \
- { IFM_TOKEN | IFM_TOK_STP4, IF_Mbps(4) }, \
- { IFM_TOKEN | IFM_TOK_STP16, IF_Mbps(16) }, \
- { IFM_TOKEN | IFM_TOK_UTP4, IF_Mbps(4) }, \
- { IFM_TOKEN | IFM_TOK_UTP16, IF_Mbps(16) }, \
- \
- { IFM_FDDI | IFM_FDDI_SMF, IF_Mbps(100) }, \
- { IFM_FDDI | IFM_FDDI_MMF, IF_Mbps(100) }, \
- { IFM_FDDI | IFM_FDDI_UTP, IF_Mbps(100) }, \
+ { IFM_ETHER | IFM_10G_TWINAX, IF_Gbps(10ULL) }, \
+ { IFM_ETHER | IFM_10G_TWINAX_LONG, IF_Gbps(10ULL) }, \
+ { IFM_ETHER | IFM_10G_LRM, IF_Gbps(10ULL) }, \
+ { IFM_ETHER | IFM_10G_T, IF_Gbps(10ULL) }, \
+ { IFM_ETHER | IFM_40G_CR4, IF_Gbps(40ULL) }, \
+ { IFM_ETHER | IFM_40G_SR4, IF_Gbps(40ULL) }, \
+ { IFM_ETHER | IFM_40G_LR4, IF_Gbps(40ULL) }, \
+ { IFM_ETHER | IFM_1000_KX, IF_Mbps(1000) }, \
+ { IFM_ETHER | IFM_10G_KX4, IF_Gbps(10ULL) }, \
+ { IFM_ETHER | IFM_10G_KR, IF_Gbps(10ULL) }, \
+ { IFM_ETHER | IFM_10G_CR1, IF_Gbps(10ULL) }, \
+ { IFM_ETHER | IFM_20G_KR2, IF_Gbps(20ULL) }, \
+ { IFM_ETHER | IFM_2500_KX, IF_Mbps(2500) }, \
+ { IFM_ETHER | IFM_2500_T, IF_Mbps(2500) }, \
+ { IFM_ETHER | IFM_5000_T, IF_Mbps(5000) }, \
+ { IFM_ETHER | IFM_50G_PCIE, IF_Gbps(50ULL) }, \
+ { IFM_ETHER | IFM_25G_PCIE, IF_Gbps(25ULL) }, \
+ { IFM_ETHER | IFM_1000_SGMII, IF_Mbps(1000) }, \
+ { IFM_ETHER | IFM_10G_SFI, IF_Gbps(10ULL) }, \
+ { IFM_ETHER | IFM_40G_XLPPI, IF_Gbps(40ULL) }, \
+ { IFM_ETHER | IFM_1000_CX_SGMII, IF_Mbps(1000) }, \
+ { IFM_ETHER | IFM_40G_KR4, IF_Gbps(40ULL) }, \
+ { IFM_ETHER | IFM_10G_ER, IF_Gbps(10ULL) }, \
+ { IFM_ETHER | IFM_100G_CR4, IF_Gbps(100ULL) }, \
+ { IFM_ETHER | IFM_100G_SR4, IF_Gbps(100ULL) }, \
+ { IFM_ETHER | IFM_100G_KR4, IF_Gbps(100ULL) }, \
+ { IFM_ETHER | IFM_100G_LR4, IF_Gbps(100ULL) }, \
+ { IFM_ETHER | IFM_56G_R4, IF_Gbps(56ULL) }, \
+ { IFM_ETHER | IFM_100_T, IF_Mbps(100ULL) }, \
+ { IFM_ETHER | IFM_25G_CR, IF_Gbps(25ULL) }, \
+ { IFM_ETHER | IFM_25G_KR, IF_Gbps(25ULL) }, \
+ { IFM_ETHER | IFM_25G_SR, IF_Gbps(25ULL) }, \
+ { IFM_ETHER | IFM_50G_CR2, IF_Gbps(50ULL) }, \
+ { IFM_ETHER | IFM_50G_KR2, IF_Gbps(50ULL) }, \
+ { IFM_ETHER | IFM_25G_LR, IF_Gbps(25ULL) }, \
+ { IFM_ETHER | IFM_10G_AOC, IF_Gbps(10ULL) }, \
+ { IFM_ETHER | IFM_25G_ACC, IF_Gbps(25ULL) }, \
+ { IFM_ETHER | IFM_25G_AOC, IF_Gbps(25ULL) }, \
+ { IFM_ETHER | IFM_100_SGMII, IF_Mbps(100) }, \
+ { IFM_ETHER | IFM_2500_X, IF_Mbps(2500ULL) }, \
+ { IFM_ETHER | IFM_5000_KR, IF_Mbps(5000ULL) }, \
+ { IFM_ETHER | IFM_25G_T, IF_Gbps(25ULL) }, \
+ { IFM_ETHER | IFM_25G_CR_S, IF_Gbps(25ULL) }, \
+ { IFM_ETHER | IFM_25G_CR1, IF_Gbps(25ULL) }, \
+ { IFM_ETHER | IFM_25G_KR_S, IF_Gbps(25ULL) }, \
+ { IFM_ETHER | IFM_5000_KR_S, IF_Mbps(5000ULL) }, \
+ { IFM_ETHER | IFM_5000_KR1, IF_Mbps(5000ULL) }, \
+ { IFM_ETHER | IFM_25G_AUI, IF_Gbps(25ULL) }, \
+ { IFM_ETHER | IFM_40G_XLAUI, IF_Gbps(40ULL) }, \
+ { IFM_ETHER | IFM_40G_XLAUI_AC, IF_Gbps(40ULL) }, \
+ { IFM_ETHER | IFM_40G_ER4, IF_Gbps(40ULL) }, \
+ { IFM_ETHER | IFM_50G_SR2, IF_Gbps(50ULL) }, \
+ { IFM_ETHER | IFM_50G_LR2, IF_Gbps(50ULL) }, \
+ { IFM_ETHER | IFM_50G_LAUI2_AC, IF_Gbps(50ULL) }, \
+ { IFM_ETHER | IFM_50G_LAUI2, IF_Gbps(50ULL) }, \
+ { IFM_ETHER | IFM_50G_AUI2_AC, IF_Gbps(50ULL) }, \
+ { IFM_ETHER | IFM_50G_AUI2, IF_Gbps(50ULL) }, \
+ { IFM_ETHER | IFM_50G_CP, IF_Gbps(50ULL) }, \
+ { IFM_ETHER | IFM_50G_SR, IF_Gbps(50ULL) }, \
+ { IFM_ETHER | IFM_50G_LR, IF_Gbps(50ULL) }, \
+ { IFM_ETHER | IFM_50G_FR, IF_Gbps(50ULL) }, \
+ { IFM_ETHER | IFM_50G_KR_PAM4, IF_Gbps(50ULL) }, \
+ { IFM_ETHER | IFM_25G_KR1, IF_Gbps(25ULL) }, \
+ { IFM_ETHER | IFM_50G_AUI1_AC, IF_Gbps(50ULL) }, \
+ { IFM_ETHER | IFM_50G_AUI1, IF_Gbps(50ULL) }, \
+ { IFM_ETHER | IFM_100G_CAUI4_AC, IF_Gbps(100ULL) }, \
+ { IFM_ETHER | IFM_100G_CAUI4, IF_Gbps(100ULL) }, \
+ { IFM_ETHER | IFM_100G_AUI4_AC, IF_Gbps(100ULL) }, \
+ { IFM_ETHER | IFM_100G_AUI4, IF_Gbps(100ULL) }, \
+ { IFM_ETHER | IFM_100G_CR_PAM4, IF_Gbps(100ULL) }, \
+ { IFM_ETHER | IFM_100G_KR_PAM4, IF_Gbps(100ULL) }, \
+ { IFM_ETHER | IFM_100G_CP2, IF_Gbps(100ULL) }, \
+ { IFM_ETHER | IFM_100G_SR2, IF_Gbps(100ULL) }, \
+ { IFM_ETHER | IFM_100G_DR, IF_Gbps(100ULL) }, \
+ { IFM_ETHER | IFM_100G_KR2_PAM4, IF_Gbps(100ULL) }, \
+ { IFM_ETHER | IFM_100G_CAUI2_AC, IF_Gbps(100ULL) }, \
+ { IFM_ETHER | IFM_100G_CAUI2, IF_Gbps(100ULL) }, \
+ { IFM_ETHER | IFM_100G_AUI2_AC, IF_Gbps(100ULL) }, \
+ { IFM_ETHER | IFM_100G_AUI2, IF_Gbps(100ULL) }, \
+ { IFM_ETHER | IFM_200G_CR4_PAM4, IF_Gbps(200ULL) }, \
+ { IFM_ETHER | IFM_200G_SR4, IF_Gbps(200ULL) }, \
+ { IFM_ETHER | IFM_200G_FR4, IF_Gbps(200ULL) }, \
+ { IFM_ETHER | IFM_200G_LR4, IF_Gbps(200ULL) }, \
+ { IFM_ETHER | IFM_200G_DR4, IF_Gbps(200ULL) }, \
+ { IFM_ETHER | IFM_200G_KR4_PAM4, IF_Gbps(200ULL) }, \
+ { IFM_ETHER | IFM_200G_AUI4_AC, IF_Gbps(200ULL) }, \
+ { IFM_ETHER | IFM_200G_AUI4, IF_Gbps(200ULL) }, \
+ { IFM_ETHER | IFM_200G_AUI8_AC, IF_Gbps(200ULL) }, \
+ { IFM_ETHER | IFM_200G_AUI8, IF_Gbps(200ULL) }, \
+ { IFM_ETHER | IFM_400G_FR8, IF_Gbps(400ULL) }, \
+ { IFM_ETHER | IFM_400G_LR8, IF_Gbps(400ULL) }, \
+ { IFM_ETHER | IFM_400G_DR4, IF_Gbps(400ULL) }, \
+ { IFM_ETHER | IFM_400G_AUI8_AC, IF_Gbps(400ULL) }, \
+ { IFM_ETHER | IFM_400G_AUI8, IF_Gbps(400ULL) }, \
\
{ IFM_IEEE80211 | IFM_IEEE80211_FH1, IF_Mbps(1) }, \
{ IFM_IEEE80211 | IFM_IEEE80211_FH2, IF_Mbps(2) }, \
@@ -650,23 +923,18 @@ struct ifmedia_status_description {
const char *ifms_string[2];
};
-#define IFM_STATUS_DESC(ifms, bit) \
+#define IFM_STATUS_DESC(ifms, bit)
\
(ifms)->ifms_string[((ifms)->ifms_bit & (bit)) ? 1 : 0]
-#define IFM_STATUS_DESCRIPTIONS { \
+#define IFM_STATUS_DESCRIPTIONS {
\
{ IFM_ETHER, IFM_AVALID, IFM_ACTIVE, \
{ "no carrier", "active" } }, \
- { IFM_FDDI, IFM_AVALID, IFM_ACTIVE, \
- { "no ring", "inserted" } }, \
- { IFM_TOKEN, IFM_AVALID, IFM_ACTIVE, \
- { "no ring", "inserted" } }, \
{ IFM_IEEE80211, IFM_AVALID, IFM_ACTIVE, \
{ "no network", "active" } }, \
{ IFM_ATM, IFM_AVALID, IFM_ACTIVE, \
{ "no network", "active" } }, \
- { IFM_CARP, IFM_AVALID, IFM_ACTIVE, \
- { "backup", "master" } }, \
{ 0, 0, 0, \
{ NULL, NULL } } \
}
+
#endif /* _FBSD_COMPAT_NET_IF_MEDIA_H_ */
diff --git a/src/libs/compat/freebsd_network/compat/net/if_var.h
b/src/libs/compat/freebsd_network/compat/net/if_var.h
index 0142601aca..ac1d90ff67 100644
--- a/src/libs/compat/freebsd_network/compat/net/if_var.h
+++ b/src/libs/compat/freebsd_network/compat/net/if_var.h
@@ -990,6 +990,14 @@ void if_settransmitfn(if_t ifp, if_transmit_fn_t);
void if_setqflushfn(if_t ifp, if_qflush_fn_t);
void if_setgetcounterfn(if_t ifp, if_get_counter_t);
+/* accessors for struct ifreq */
+static inline void*
+ifr_data_get_ptr(void* ifrp)
+{
+ struct ifreq* ifr = (struct ifreq *)ifrp;
+ return ifr->ifr_data;
+}
+
#ifdef DEVICE_POLLING
enum poll_cmd { POLL_ONLY, POLL_AND_CHECK_STATUS };
diff --git a/src/libs/compat/freebsd_network/compat/sys/cdefs.h
b/src/libs/compat/freebsd_network/compat/sys/cdefs.h
index f208d0ebf2..2996834ff1 100644
--- a/src/libs/compat/freebsd_network/compat/sys/cdefs.h
+++ b/src/libs/compat/freebsd_network/compat/sys/cdefs.h
@@ -204,46 +204,47 @@
* for a given compiler, let the compile fail if it is told to use
* a feature that we cannot live without.
*/
-#ifdef lint
-#define __pure2
-#define __unused
-#define __packed
-#define __aligned(x)
-#define __section(x)
-#else
+/*
+ * Compiler-dependent macros to help declare dead (non-returning) and
+ * pure (no side effects) functions, and unused variables. They are
+ * null except for versions of gcc that are known to support the features
+ * properly (old versions of gcc-2 supported the dead and pure features
+ * in a different (wrong) way). If we do not provide an implementation
+ * for a given compiler, let the compile fail if it is told to use
+ * a feature that we cannot live without.
+ */
+#define __weak_symbol __attribute__((__weak__))
#if !__GNUC_PREREQ__(2, 5) && !defined(__INTEL_COMPILER)
+#define __dead2
#define __pure2
#define __unused
#endif
#if __GNUC__ == 2 && __GNUC_MINOR__ >= 5 && __GNUC_MINOR__ < 7 &&
!defined(__INTEL_COMPILER)
+#define __dead2 __attribute__((__noreturn__))
#define __pure2 __attribute__((__const__))
#define __unused
/* XXX Find out what to do for __packed, __aligned and __section */
#endif
-#if __GNUC_PREREQ__(2, 7)
+#if __GNUC_PREREQ__(2, 7) || defined(__INTEL_COMPILER)
+#define __dead2 __attribute__((__noreturn__))
#define __pure2 __attribute__((__const__))
#define __unused __attribute__((__unused__))
+#define __used __attribute__((__used__))
#define __packed __attribute__((__packed__))
#define __aligned(x) __attribute__((__aligned__(x)))
#define __section(x) __attribute__((__section__(x)))
#endif
-
-#if __GNUC_PREREQ__(3, 1)
-#define __used __attribute__((__used__))
+#if __GNUC_PREREQ__(4, 3) || __has_attribute(__alloc_size__)
+#define __alloc_size(x) __attribute__((__alloc_size__(x)))
+#define __alloc_size2(n, x) __attribute__((__alloc_size__(n, x)))
#else
-#if __GNUC_PREREQ__(2, 7)
-#define __used
-#endif
-#endif
-
-#if defined(__INTEL_COMPILER)
-#define __pure2 __attribute__((__const__))
-#define __unused __attribute__((__unused__))
-#define __used __attribute__((__used__))
-#define __packed __attribute__((__packed__))
-#define __aligned(x) __attribute__((__aligned__(x)))
-#define __section(x) __attribute__((__section__(x)))
+#define __alloc_size(x)
+#define __alloc_size2(n, x)
#endif
+#if __GNUC_PREREQ__(4, 9) || __has_attribute(__alloc_align__)
+#define __alloc_align(x) __attribute__((__alloc_align__(x)))
+#else
+#define __alloc_align(x)
#endif
/*
diff --git a/src/libs/compat/freebsd_network/compat/sys/mbuf.h
b/src/libs/compat/freebsd_network/compat/sys/mbuf.h
index fe3cd396ee..3397297228 100644
--- a/src/libs/compat/freebsd_network/compat/sys/mbuf.h
+++ b/src/libs/compat/freebsd_network/compat/sys/mbuf.h
@@ -76,6 +76,7 @@
m_getm2((m), (len), (how), (type), M_PKTHDR)
#define mtod(m, type) ((type)((m)->m_data))
+#define mtodo(m, o) ((void *)(((m)->m_data) + (o)))
// Check if the supplied mbuf has a packet header, or else panic.
#define M_ASSERTPKTHDR(m) KASSERT(m != NULL && m->m_flags & M_PKTHDR, \
diff --git a/src/libs/compat/freebsd_network/fbsd_if_media.c
b/src/libs/compat/freebsd_network/fbsd_if_media.c
index a115c01102..24be63b013 100644
--- a/src/libs/compat/freebsd_network/fbsd_if_media.c
+++ b/src/libs/compat/freebsd_network/fbsd_if_media.c
@@ -412,18 +412,6 @@ struct ifmedia_description
ifm_subtype_ethernet_descriptions[] =
struct ifmedia_description ifm_subtype_ethernet_option_descriptions[] =
IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS;
-struct ifmedia_description ifm_subtype_tokenring_descriptions[] =
- IFM_SUBTYPE_TOKENRING_DESCRIPTIONS;
-
-struct ifmedia_description ifm_subtype_tokenring_option_descriptions[] =
- IFM_SUBTYPE_TOKENRING_OPTION_DESCRIPTIONS;
-
-struct ifmedia_description ifm_subtype_fddi_descriptions[] =
- IFM_SUBTYPE_FDDI_DESCRIPTIONS;
-
-struct ifmedia_description ifm_subtype_fddi_option_descriptions[] =
- IFM_SUBTYPE_FDDI_OPTION_DESCRIPTIONS;
-
struct ifmedia_description ifm_subtype_ieee80211_descriptions[] =
IFM_SUBTYPE_IEEE80211_DESCRIPTIONS;
@@ -458,16 +446,6 @@ struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[]
= {
&ifm_subtype_ethernet_option_descriptions[0],
NULL,
},
- {
- &ifm_subtype_tokenring_descriptions[0],
- &ifm_subtype_tokenring_option_descriptions[0],
- NULL,
- },
- {
- &ifm_subtype_fddi_descriptions[0],
- &ifm_subtype_fddi_option_descriptions[0],
- NULL,
- },
{
&ifm_subtype_ieee80211_descriptions[0],
&ifm_subtype_ieee80211_option_descriptions[0],
############################################################################
Commit: 8e67fd0be0afd424e31841cd3f8f136091262768
URL: https://git.haiku-os.org/haiku/commit/?id=8e67fd0be0af
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Tue Jan 8 00:20:42 2019 UTC
freebsd_network: Unreserve the PCI device on error or driver removal.
----------------------------------------------------------------------------
diff --git a/src/libs/compat/freebsd_network/driver.c
b/src/libs/compat/freebsd_network/driver.c
index 6c625d28a3..938334c113 100644
--- a/src/libs/compat/freebsd_network/driver.c
+++ b/src/libs/compat/freebsd_network/driver.c
@@ -259,6 +259,12 @@ err4:
err3:
uninit_mutexes();
err2:
+ for (p = 0; sProbedDevices[p].driver != NULL; p++) {
+ gPci->unreserve_device(sProbedDevices[p].info.bus,
+ sProbedDevices[p].info.device,
sProbedDevices[p].info.function,
+ gDriverName, NULL);
+ }
+
put_module(B_PCI_MODULE_NAME);
if (gPCIx86 != NULL)
put_module(B_PCI_X86_MODULE_NAME);
@@ -270,7 +276,7 @@ err2:
status_t
_fbsd_uninit_drivers(driver_t *drivers[])
{
- int i;
+ int i, p;
for (i = 0; drivers[i]; i++)
TRACE(("%s: uninit_driver(%p)\n", gDriverName, drivers[i]));
@@ -288,6 +294,12 @@ _fbsd_uninit_drivers(driver_t *drivers[])
uninit_mbufs();
uninit_mutexes();
+ for (p = 0; sProbedDevices[p].driver != NULL; p++) {
+ gPci->unreserve_device(sProbedDevices[p].info.bus,
+ sProbedDevices[p].info.device,
sProbedDevices[p].info.function,
+ gDriverName, NULL);
+ }
+
put_module(B_PCI_MODULE_NAME);
if (gPCIx86 != NULL)
put_module(B_PCI_X86_MODULE_NAME);
############################################################################
Commit: 8244a9baad63102214028afbb3b1e2326f4c4cca
URL: https://git.haiku-os.org/haiku/commit/?id=8244a9baad63
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Tue Jan 8 00:24:07 2019 UTC
freebsd_wlan: Merge the new net80211 code from FreeBSD 12.
Changes to the Haiku module will come in the next commit.
There are a few Haiku-specific changes in here; most notably some
hacks to prevent struct size changes from breaking wpa_supplicant,
and a removal of the full ieee80211_channel structure from some ioctls
where we previously returned it.
----------------------------------------------------------------------------
diff --git a/src/libs/compat/freebsd_wlan/net80211/_ieee80211.h
b/src/libs/compat/freebsd_wlan/net80211/_ieee80211.h
index 37f680b56d..7410bb99e5 100644
--- a/src/libs/compat/freebsd_wlan/net80211/_ieee80211.h
+++ b/src/libs/compat/freebsd_wlan/net80211/_ieee80211.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2001 Atsushi Onoe
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* All rights reserved.
@@ -23,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: releng/11.1/sys/net80211/_ieee80211.h 298899 2016-05-01 20:57:10Z
avos $
+ * $FreeBSD: releng/12.0/sys/net80211/_ieee80211.h 326272 2017-11-27 15:23:17Z
pfg $
*/
#ifndef _NET80211__IEEE80211_H_
#define _NET80211__IEEE80211_H_
@@ -45,6 +47,7 @@ enum ieee80211_phytype {
IEEE80211_T_HT, /* high throughput */
IEEE80211_T_OFDM_HALF, /* 1/2 rate OFDM */
IEEE80211_T_OFDM_QUARTER, /* 1/4 rate OFDM */
+ IEEE80211_T_VHT, /* VHT PHY */
};
#define IEEE80211_T_CCK IEEE80211_T_DS /* more common nomenclature */
@@ -68,8 +71,10 @@ enum ieee80211_phymode {
IEEE80211_MODE_11NG = 9, /* 2GHz, w/ HT */
IEEE80211_MODE_HALF = 10, /* OFDM, 1/2x clock */
IEEE80211_MODE_QUARTER = 11, /* OFDM, 1/4x clock */
+ IEEE80211_MODE_VHT_2GHZ = 12, /* 2GHz, VHT */
+ IEEE80211_MODE_VHT_5GHZ = 13, /* 5GHz, VHT */
};
-#define IEEE80211_MODE_MAX (IEEE80211_MODE_QUARTER+1)
+#define IEEE80211_MODE_MAX (IEEE80211_MODE_VHT_5GHZ+1)
#define IEEE80211_MODE_BYTES howmany(IEEE80211_MODE_MAX, NBBY)
/*
@@ -134,7 +139,7 @@ enum ieee80211_roamingmode {
*/
struct ieee80211_channel {
uint32_t ic_flags; /* see below */
- uint16_t ic_freq; /* setting in MHz */
+ uint16_t ic_freq; /* primary centre frequency in MHz */
uint8_t ic_ieee; /* IEEE channel number */
int8_t ic_maxregpower; /* maximum regulatory tx power in dBm */
int8_t ic_maxpower; /* maximum tx power in .5 dBm */
@@ -144,9 +149,17 @@ struct ieee80211_channel {
int8_t ic_maxantgain; /* maximum antenna gain in .5 dBm */
uint8_t ic_pad;
uint16_t ic_devdata; /* opaque device/driver data */
+ uint8_t ic_vht_ch_freq1; /* VHT primary freq1 IEEE value */
+ uint8_t ic_vht_ch_freq2; /* VHT secondary 80MHz freq2 IEEE
value */
+ uint16_t ic_freq2; /* VHT secondary 80MHz freq2 MHz */
};
-#define IEEE80211_CHAN_MAX 256
+/*
+ * Note: for VHT operation we will need significantly more than
+ * IEEE80211_CHAN_MAX channels because of the combinations of
+ * VHT20, VHT40, VHT80, VHT80+80 and VHT160.
+ */
+#define IEEE80211_CHAN_MAX 1024
#define IEEE80211_CHAN_BYTES howmany(IEEE80211_CHAN_MAX, NBBY)
#define IEEE80211_CHAN_ANY 0xffff /* token for ``any channel'' */
#define IEEE80211_CHAN_ANYC \
@@ -177,14 +190,27 @@ struct ieee80211_channel {
#define IEEE80211_CHAN_NOADHOC 0x00200000 /* adhoc mode not allowed */
#define IEEE80211_CHAN_NOHOSTAP 0x00400000 /* hostap mode not allowed */
#define IEEE80211_CHAN_11D 0x00800000 /* 802.11d required */
+#define IEEE80211_CHAN_VHT20 0x01000000 /* VHT20 channel */
+#define IEEE80211_CHAN_VHT40U 0x02000000 /* VHT40 channel, ext above
*/
+#define IEEE80211_CHAN_VHT40D 0x04000000 /* VHT40 channel, ext below
*/
+#define IEEE80211_CHAN_VHT80 0x08000000 /* VHT80 channel */
+#define IEEE80211_CHAN_VHT80_80 0x10000000 /* VHT80+80 channel */
+#define IEEE80211_CHAN_VHT160 0x20000000 /* VHT160 channel */
+/* XXX note: 0x80000000 is used in src/sbin/ifconfig/ifieee80211.c :( */
#define IEEE80211_CHAN_HT40 (IEEE80211_CHAN_HT40U |
IEEE80211_CHAN_HT40D)
#define IEEE80211_CHAN_HT (IEEE80211_CHAN_HT20 |
IEEE80211_CHAN_HT40)
+#define IEEE80211_CHAN_VHT40 (IEEE80211_CHAN_VHT40U |
IEEE80211_CHAN_VHT40D)
+#define IEEE80211_CHAN_VHT (IEEE80211_CHAN_VHT20 |
IEEE80211_CHAN_VHT40 \
+ | IEEE80211_CHAN_VHT80 |
IEEE80211_CHAN_VHT80_80 \
+ | IEEE80211_CHAN_VHT160)
+
#define IEEE80211_CHAN_BITS \
"\20\1PRIV0\2PRIV2\3PRIV3\4PRIV4\5TURBO\6CCK\7OFDM\0102GHZ\0115GHZ" \
"\12PASSIVE\13DYN\14GFSK\15GSM\16STURBO\17HALF\20QUARTER\21HT20" \
- "\22HT40U\23HT40D\24DFS\0254MSXMIT\26NOADHOC\27NOHOSTAP\03011D"
+ "\22HT40U\23HT40D\24DFS\0254MSXMIT\26NOADHOC\27NOHOSTAP\03011D" \
+ "\031VHT20\032VHT40U\033VHT40D\034VHT80\035VHT80_80\036VHT160"
/*
* Useful combinations of channel characteristics.
@@ -210,7 +236,7 @@ struct ieee80211_channel {
(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_GFSK | \
IEEE80211_CHAN_CCK | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_DYN | \
IEEE80211_CHAN_HALF | IEEE80211_CHAN_QUARTER | \
- IEEE80211_CHAN_HT)
+ IEEE80211_CHAN_HT | IEEE80211_CHAN_VHT)
#define IEEE80211_CHAN_ALLTURBO \
(IEEE80211_CHAN_ALL | IEEE80211_CHAN_TURBO | IEEE80211_CHAN_STURBO)
@@ -287,6 +313,35 @@ struct ieee80211_channel {
#define IEEE80211_IS_CHAN_11D(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_11D) != 0)
+#define IEEE80211_IS_CHAN_VHT(_c) \
+ (((_c)->ic_flags & IEEE80211_CHAN_VHT) != 0)
+#define IEEE80211_IS_CHAN_VHT_2GHZ(_c) \
+ (IEEE80211_IS_CHAN_2GHZ(_c) && \
+ ((_c)->ic_flags & IEEE80211_CHAN_VHT) != 0)
+#define IEEE80211_IS_CHAN_VHT_5GHZ(_c) \
+ (IEEE80211_IS_CHAN_5GHZ(_c) && \
+ ((_c)->ic_flags & IEEE80211_CHAN_VHT) != 0)
+#define IEEE80211_IS_CHAN_VHT20(_c) \
+ (((_c)->ic_flags & IEEE80211_CHAN_VHT20) != 0)
+#define IEEE80211_IS_CHAN_VHT40(_c) \
+ (((_c)->ic_flags & IEEE80211_CHAN_VHT40) != 0)
+#define IEEE80211_IS_CHAN_VHT40U(_c) \
+ (((_c)->ic_flags & IEEE80211_CHAN_VHT40U) != 0)
+#define IEEE80211_IS_CHAN_VHT40D(_c) \
+ (((_c)->ic_flags & IEEE80211_CHAN_VHT40D) != 0)
+#define IEEE80211_IS_CHAN_VHTA(_c) \
+ (IEEE80211_IS_CHAN_5GHZ(_c) && \
+ ((_c)->ic_flags & IEEE80211_CHAN_VHT) != 0)
+#define IEEE80211_IS_CHAN_VHTG(_c) \
+ (IEEE80211_IS_CHAN_2GHZ(_c) && \
+ ((_c)->ic_flags & IEEE80211_CHAN_VHT) != 0)
+#define IEEE80211_IS_CHAN_VHT80(_c) \
+ (((_c)->ic_flags & IEEE80211_CHAN_VHT80) != 0)
+#define IEEE80211_IS_CHAN_VHT80_80(_c) \
+ (((_c)->ic_flags & IEEE80211_CHAN_VHT80_80) != 0)
+#define IEEE80211_IS_CHAN_VHT160(_c) \
+ (((_c)->ic_flags & IEEE80211_CHAN_VHT160) != 0)
+
#define IEEE80211_CHAN2IEEE(_c) (_c)->ic_ieee
/* dynamic state */
@@ -390,16 +445,183 @@ struct ieee80211_regdomain {
/*
* MIMO antenna/radio state.
*/
-
+#define IEEE80211_MAX_CHAINS 4
/*
- * XXX This doesn't yet export both ctl/ext chain details
- * XXX TODO: IEEE80211_MAX_CHAINS is defined in _freebsd.h, not here;
- * figure out how to pull it in!
+ * This is the number of sub-channels for a channel.
+ * 0 - pri20
+ * 1 - sec20 (HT40, VHT40)
+ * 2 - sec40 (VHT80)
+ * 3 - sec80 (VHT80+80, VHT160)
*/
+#define IEEE80211_MAX_CHAIN_PRISEC 4
+#define IEEE80211_MAX_EVM_DWORDS 16 /* 16 pilots, 4 chains
*/
+#define IEEE80211_MAX_EVM_PILOTS 16 /* 468 subcarriers, 16
pilots */
+
+struct ieee80211_mimo_chan_info {
+ int8_t rssi[IEEE80211_MAX_CHAIN_PRISEC];
+ int8_t noise[IEEE80211_MAX_CHAIN_PRISEC];
+};
+
struct ieee80211_mimo_info {
- int8_t rssi[3]; /* per-antenna rssi */
- int8_t noise[3]; /* per-antenna noise floor */
- uint8_t pad[2];
- uint32_t evm[3]; /* EVM data */
+ struct ieee80211_mimo_chan_info ch[IEEE80211_MAX_CHAINS];
+ uint32_t evm[IEEE80211_MAX_EVM_DWORDS];
+};
+
+/*
+ * ic_caps/iv_caps: device driver capabilities
+ */
+/* 0x2e available */
+#define IEEE80211_C_STA 0x00000001 /* CAPABILITY: STA
available */
+#define IEEE80211_C_8023ENCAP 0x00000002 /* CAPABILITY: 802.3
encap */
+#define IEEE80211_C_FF 0x00000040 /* CAPABILITY: ATH FF
avail */
+#define IEEE80211_C_TURBOP 0x00000080 /* CAPABILITY: ATH
Turbo avail*/
+#define IEEE80211_C_IBSS 0x00000100 /* CAPABILITY: IBSS
available */
+#define IEEE80211_C_PMGT 0x00000200 /* CAPABILITY: Power
mgmt */
+#define IEEE80211_C_HOSTAP 0x00000400 /* CAPABILITY: HOSTAP
avail */
+#define IEEE80211_C_AHDEMO 0x00000800 /* CAPABILITY: Old
Adhoc Demo */
+#define IEEE80211_C_SWRETRY 0x00001000 /* CAPABILITY: sw tx
retry */
+#define IEEE80211_C_TXPMGT 0x00002000 /* CAPABILITY: tx power
mgmt */
+#define IEEE80211_C_SHSLOT 0x00004000 /* CAPABILITY: short
slottime */
+#define IEEE80211_C_SHPREAMBLE 0x00008000 /* CAPABILITY: short
preamble */
+#define IEEE80211_C_MONITOR 0x00010000 /* CAPABILITY: monitor
mode */
+#define IEEE80211_C_DFS 0x00020000 /* CAPABILITY:
DFS/radar avail*/
+#define IEEE80211_C_MBSS 0x00040000 /* CAPABILITY: MBSS
available */
+#define IEEE80211_C_SWSLEEP 0x00080000 /* CAPABILITY: do sleep
here */
+#define IEEE80211_C_SWAMSDUTX 0x00100000 /* CAPABILITY: software
A-MSDU TX */
+/* 0x7c0000 available */
+#define IEEE80211_C_WPA1 0x00800000 /* CAPABILITY: WPA1
avail */
+#define IEEE80211_C_WPA2 0x01000000 /* CAPABILITY: WPA2
avail */
+#define IEEE80211_C_WPA 0x01800000 /* CAPABILITY:
WPA1+WPA2 avail*/
+#define IEEE80211_C_BURST 0x02000000 /* CAPABILITY: frame
bursting */
+#define IEEE80211_C_WME 0x04000000 /* CAPABILITY: WME
avail */
+#define IEEE80211_C_WDS 0x08000000 /* CAPABILITY: 4-addr
support */
+/* 0x10000000 reserved */
+#define IEEE80211_C_BGSCAN 0x20000000 /* CAPABILITY: bg
scanning */
+#define IEEE80211_C_TXFRAG 0x40000000 /* CAPABILITY: tx
fragments */
+#define IEEE80211_C_TDMA 0x80000000 /* CAPABILITY: TDMA
avail */
+/* XXX protection/barker? */
+
+#define IEEE80211_C_OPMODE \
+ (IEEE80211_C_STA | IEEE80211_C_IBSS | IEEE80211_C_HOSTAP | \
+ IEEE80211_C_AHDEMO | IEEE80211_C_MONITOR | IEEE80211_C_WDS | \
+ IEEE80211_C_TDMA | IEEE80211_C_MBSS)
+
+#define IEEE80211_C_BITS \
+ "\20\1STA\002803ENCAP\7FF\10TURBOP\11IBSS\12PMGT" \
+ "\13HOSTAP\14AHDEMO\15SWRETRY\16TXPMGT\17SHSLOT\20SHPREAMBLE" \
+ "\21MONITOR\22DFS\23MBSS\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \
+ "\37TXFRAG\40TDMA"
+
+/*
+ * ic_htcaps/iv_htcaps: HT-specific device/driver capabilities
+ *
+ * NB: the low 16-bits are the 802.11 definitions, the upper
+ * 16-bits are used to define s/w/driver capabilities.
+ */
+#define IEEE80211_HTC_AMPDU 0x00010000 /* CAPABILITY: A-MPDU
tx */
+#define IEEE80211_HTC_AMSDU 0x00020000 /* CAPABILITY: A-MSDU
tx */
+/* NB: HT40 is implied by IEEE80211_HTCAP_CHWIDTH40 */
+#define IEEE80211_HTC_HT 0x00040000 /* CAPABILITY: HT
operation */
+#define IEEE80211_HTC_SMPS 0x00080000 /* CAPABILITY: MIMO
power save*/
+#define IEEE80211_HTC_RIFS 0x00100000 /* CAPABILITY: RIFS
support */
+#define IEEE80211_HTC_RXUNEQUAL 0x00200000 /* CAPABILITY: RX
unequal MCS */
+#define IEEE80211_HTC_RXMCS32 0x00400000 /* CAPABILITY: MCS32
support */
+#define IEEE80211_HTC_TXUNEQUAL 0x00800000 /* CAPABILITY: TX
unequal MCS */
+#define IEEE80211_HTC_TXMCS32 0x01000000 /* CAPABILITY: MCS32
support */
+#define IEEE80211_HTC_TXLDPC 0x02000000 /* CAPABILITY: TX using
LDPC */
+
+#define IEEE80211_C_HTCAP_BITS \
+ "\20\1LDPC\2CHWIDTH40\5GREENFIELD\6SHORTGI20\7SHORTGI40\10TXSTBC" \
+ "\21AMPDU\22AMSDU\23HT\24SMPS\25RIFS\32TXLDPC"
+
+/*
+ * RX status notification - which fields are valid.
+ */
+#define IEEE80211_R_NF 0x00000001 /* global NF value
valid */
+#define IEEE80211_R_RSSI 0x00000002 /* global RSSI value
valid */
+#define IEEE80211_R_C_CHAIN 0x00000004 /* RX chain count valid
*/
+#define IEEE80211_R_C_NF 0x00000008 /* per-chain NF value
valid */
+#define IEEE80211_R_C_RSSI 0x00000010 /* per-chain RSSI value
valid */
+#define IEEE80211_R_C_EVM 0x00000020 /* per-chain EVM valid
*/
+#define IEEE80211_R_C_HT40 0x00000040 /* RX'ed packet is
40mhz, pilots 4,5 valid */
+#define IEEE80211_R_FREQ 0x00000080 /* Freq value
populated, MHz */
+#define IEEE80211_R_IEEE 0x00000100 /* IEEE value populated
*/
+#define IEEE80211_R_BAND 0x00000200 /* Frequency band
populated */
+#define IEEE80211_R_TSF32 0x00004000 /* 32 bit TSF */
+#define IEEE80211_R_TSF64 0x00008000 /* 64 bit TSF */
+#define IEEE80211_R_TSF_START 0x00010000 /* TSF is sampled at
start of frame */
+#define IEEE80211_R_TSF_END 0x00020000 /* TSF is sampled at
end of frame */
+
+/*
+ * RX status notification - describe the packet.
+ */
+#define IEEE80211_RX_F_STBC 0x00000001
+#define IEEE80211_RX_F_LDPC 0x00000002
+#define IEEE80211_RX_F_AMSDU 0x00000004 /* This is the start
of an decap AMSDU list */
+#define IEEE80211_RX_F_AMSDU_MORE 0x00000008 /* This is another
decap AMSDU frame in the batch */
+#define IEEE80211_RX_F_AMPDU 0x00000010 /* This is the start
of an decap AMPDU list */
+#define IEEE80211_RX_F_AMPDU_MORE 0x00000020 /* This is another
decap AMPDU frame in the batch */
+#define IEEE80211_RX_F_FAIL_FCSCRC 0x00000040 /* Failed CRC/FCS */
+#define IEEE80211_RX_F_FAIL_MIC 0x00000080 /* Failed MIC check
*/
+#define IEEE80211_RX_F_DECRYPTED 0x00000100 /* Hardware
decrypted */
+#define IEEE80211_RX_F_IV_STRIP 0x00000200 /* Decrypted; IV
stripped */
+#define IEEE80211_RX_F_MMIC_STRIP 0x00000400 /* Decrypted; MMIC
stripped */
+#define IEEE80211_RX_F_SHORTGI 0x00000800 /* This is a
short-GI frame */
+#define IEEE80211_RX_F_CCK 0x00001000
+#define IEEE80211_RX_F_OFDM 0x00002000
+#define IEEE80211_RX_F_HT 0x00004000
+#define IEEE80211_RX_F_VHT 0x00008000
+
+/* Channel width */
+#define IEEE80211_RX_FW_20MHZ 1
+#define IEEE80211_RX_FW_40MHZ 2
+#define IEEE80211_RX_FW_80MHZ 3
+
+/* PHY type */
+#define IEEE80211_RX_FP_11B 1
+#define IEEE80211_RX_FP_11G 2
+#define IEEE80211_RX_FP_11A 3
+#define IEEE80211_RX_FP_11NA 4
+#define IEEE80211_RX_FP_11NG 5
+
+struct ieee80211_rx_stats {
+ uint32_t r_flags; /* IEEE80211_R_* flags */
+ uint32_t c_pktflags; /* IEEE80211_RX_F_* flags */
+
+ uint64_t c_rx_tsf; /* 32 or 64 bit TSF */
+
+ /* All DWORD aligned */
+ int16_t c_nf_ctl[IEEE80211_MAX_CHAINS]; /* per-chain NF */
+ int16_t c_nf_ext[IEEE80211_MAX_CHAINS]; /* per-chain NF */
+ int16_t c_rssi_ctl[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */
+ int16_t c_rssi_ext[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */
+
+ /* 32 bits */
+ uint8_t c_nf; /* global NF */
+ uint8_t c_rssi; /* global RSSI */
+ uint8_t c_chain; /* number of RX chains involved */
+ uint8_t c_rate; /* legacy; 11n rate code; VHT MCS */
+
+ /* 32 bits */
+ uint16_t c_freq; /* Frequency, MHz */
+ uint8_t c_ieee; /* Channel */
+ uint8_t c_width; /* channel width, FW flags above */
+
+ /* Force alignment to DWORD */
+ union {
+ uint8_t evm[IEEE80211_MAX_CHAINS][IEEE80211_MAX_EVM_PILOTS];
+ /* per-chain, per-pilot EVM values */
+ uint32_t __aln[8];
+ } evm;
+
+ /* 32 bits */
+ uint8_t c_phytype; /* PHY type, FW flags above */
+ uint8_t c_vhtnss; /* VHT - number of spatial streams */
+ uint8_t c_pad2[2];
};
+
+struct ieee80211_rx_params {
+ struct ieee80211_rx_stats params;
+};
+
#endif /* _NET80211__IEEE80211_H_ */
diff --git a/src/libs/compat/freebsd_wlan/net80211/ieee80211.c
b/src/libs/compat/freebsd_wlan/net80211/ieee80211.c
index 8dd2a3c6eb..03a7ef4c4c 100644
--- a/src/libs/compat/freebsd_wlan/net80211/ieee80211.c
+++ b/src/libs/compat/freebsd_wlan/net80211/ieee80211.c
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2001 Atsushi Onoe
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* All rights reserved.
@@ -25,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: releng/11.1/sys/net80211/ieee80211.c 300232 2016-05-19
21:08:33Z avos $");
+__FBSDID("$FreeBSD: releng/12.0/sys/net80211/ieee80211.c 336184 2018-07-10
23:30:19Z kevans $");
/*
* IEEE 802.11 generic handler
@@ -46,8 +48,8 @@ __FBSDID("$FreeBSD: releng/11.1/sys/net80211/ieee80211.c
300232 2016-05-19 21:08
#include <net/if_dl.h>
#include <net/if_media.h>
#include <net/if_types.h>
-#include <net/vnet.h>
#include <net/ethernet.h>
+#include <net/vnet.h>
#include <net80211/ieee80211_var.h>
#include <net80211/ieee80211_regdomain.h>
@@ -55,6 +57,7 @@ __FBSDID("$FreeBSD: releng/11.1/sys/net80211/ieee80211.c
300232 2016-05-19 21:08
#include <net80211/ieee80211_superg.h>
#endif
#include <net80211/ieee80211_ratectl.h>
+#include <net80211/ieee80211_vht.h>
#include <net/bpf.h>
@@ -71,6 +74,8 @@ const char *ieee80211_phymode_name[IEEE80211_MODE_MAX] = {
[IEEE80211_MODE_QUARTER] = "quarter",
[IEEE80211_MODE_11NA] = "11na",
[IEEE80211_MODE_11NG] = "11ng",
+ [IEEE80211_MODE_VHT_2GHZ] = "11acg",
+ [IEEE80211_MODE_VHT_5GHZ] = "11ac",
};
/* map ieee80211_opmode to the corresponding capability bit */
const int ieee80211_opcap[IEEE80211_OPMODE_MAX] = {
@@ -91,6 +96,7 @@ const uint8_t ieee80211broadcastaddr[IEEE80211_ADDR_LEN] =
static void ieee80211_syncflag_locked(struct ieee80211com *ic, int flag);
static void ieee80211_syncflag_ht_locked(struct ieee80211com *ic, int flag);
static void ieee80211_syncflag_ext_locked(struct ieee80211com *ic, int flag);
+static void ieee80211_syncflag_vht_locked(struct ieee80211com *ic, int flag);
static int ieee80211_media_setup(struct ieee80211com *ic,
struct ifmedia *media, int caps, int addsta,
ifm_change_cb_t media_change, ifm_stat_cb_t media_stat);
@@ -117,6 +123,8 @@ static const struct ieee80211_rateset ieee80211_rateset_11g
=
{ 12, { B(2), B(4), B(11), B(22), 12, 18, 24, 36, 48, 72, 96, 108 } };
#undef B
+static int set_vht_extchan(struct ieee80211_channel *c);
+
/*
* Fill in 802.11 available channel set, mark
* all available channels as active, and pick
@@ -148,10 +156,23 @@ ieee80211_chan_init(struct ieee80211com *ic)
*/
if (c->ic_ieee == 0)
c->ic_ieee = ieee80211_mhz2ieee(c->ic_freq,c->ic_flags);
+
+ /*
+ * Setup the HT40/VHT40 upper/lower bits.
+ * The VHT80 math is done elsewhere.
+ */
if (IEEE80211_IS_CHAN_HT40(c) && c->ic_extieee == 0)
c->ic_extieee = ieee80211_mhz2ieee(c->ic_freq +
(IEEE80211_IS_CHAN_HT40U(c) ? 20 : -20),
c->ic_flags);
+
+ /* Update VHT math */
+ /*
+ * XXX VHT again, note that this assumes VHT80 channels
+ * are legit already
+ */
+ set_vht_extchan(c);
+
/* default max tx power to max regulatory */
if (c->ic_maxpower == 0)
c->ic_maxpower = 2*c->ic_maxregpower;
@@ -181,6 +202,10 @@ ieee80211_chan_init(struct ieee80211com *ic)
setbit(ic->ic_modecaps, IEEE80211_MODE_11NA);
if (IEEE80211_IS_CHAN_HTG(c))
setbit(ic->ic_modecaps, IEEE80211_MODE_11NG);
+ if (IEEE80211_IS_CHAN_VHTA(c))
+ setbit(ic->ic_modecaps, IEEE80211_MODE_VHT_5GHZ);
+ if (IEEE80211_IS_CHAN_VHTG(c))
+ setbit(ic->ic_modecaps, IEEE80211_MODE_VHT_2GHZ);
}
/* initialize candidate channels to all available */
memcpy(ic->ic_chan_active, ic->ic_chan_avail,
@@ -208,6 +233,8 @@ ieee80211_chan_init(struct ieee80211com *ic)
DEFAULTRATES(IEEE80211_MODE_QUARTER, ieee80211_rateset_quarter);
DEFAULTRATES(IEEE80211_MODE_11NA, ieee80211_rateset_11a);
DEFAULTRATES(IEEE80211_MODE_11NG, ieee80211_rateset_11g);
+ DEFAULTRATES(IEEE80211_MODE_VHT_2GHZ, ieee80211_rateset_11g);
+ DEFAULTRATES(IEEE80211_MODE_VHT_5GHZ, ieee80211_rateset_11a);
/*
* Setup required information to fill the mcsset field, if driver did
@@ -218,6 +245,8 @@ ieee80211_chan_init(struct ieee80211com *ic)
if (ic->ic_txstream == 0)
ic->ic_txstream = 2;
+ ieee80211_init_suphtrates(ic);
+
/*
* Set auto mode to reset active channel state and any desired channel.
*/
@@ -260,10 +289,8 @@ ic_printf(struct ieee80211com *ic, const char * fmt, ...)
}
static LIST_HEAD(, ieee80211com) ic_head = LIST_HEAD_INITIALIZER(ic_head);
-struct mtx ic_list_mtx;
-#if 0
+static struct mtx ic_list_mtx;
MTX_SYSINIT(ic_list, &ic_list_mtx, "ieee80211com list", MTX_DEF);
-#endif
static int
sysctl_ieee80211coms(SYSCTL_HANDLER_ARGS)
@@ -339,12 +366,10 @@ ieee80211_ifattach(struct ieee80211com *ic)
ieee80211_superg_attach(ic);
#endif
ieee80211_ht_attach(ic);
+ ieee80211_vht_attach(ic);
ieee80211_scan_attach(ic);
ieee80211_regdomain_attach(ic);
ieee80211_dfs_attach(ic);
-#if defined(__HAIKU__)
- ieee80211_ratectl_attach(ic);
-#endif
ieee80211_sysctl_attach(ic);
@@ -388,15 +413,13 @@ ieee80211_ifdetach(struct ieee80211com *ic)
ieee80211_waitfor_parent(ic);
ieee80211_sysctl_detach(ic);
-#if defined(__HAIKU__)
- ieee80211_ratectl_detach(ic);
-#endif
ieee80211_dfs_detach(ic);
ieee80211_regdomain_detach(ic);
ieee80211_scan_detach(ic);
#ifdef IEEE80211_SUPPORT_SUPERG
ieee80211_superg_detach(ic);
#endif
+ ieee80211_vht_detach(ic);
ieee80211_ht_detach(ic);
/* NB: must be called before ieee80211_node_detach */
ieee80211_proto_detach(ic);
@@ -452,6 +475,22 @@ default_reset(struct ieee80211vap *vap, u_long cmd)
return ENETRESET;
}
+/*
+ * Default for updating the VAP default TX key index.
+ *
+ * Drivers that support TX offload as well as hardware encryption offload
+ * may need to be informed of key index changes separate from the key
+ * update.
+ */
+static void
+default_update_deftxkey(struct ieee80211vap *vap, ieee80211_keyix kid)
+{
+
+ /* XXX assert validity */
+ /* XXX assert we're in a key update block */
+ vap->iv_def_txkey = kid;
+}
+
/*
* Add underlying device errors to vap errors.
*/
@@ -510,8 +549,15 @@ ieee80211_vap_setup(struct ieee80211com *ic, struct
ieee80211vap *vap,
vap->iv_flags_ext = ic->ic_flags_ext;
vap->iv_flags_ven = ic->ic_flags_ven;
vap->iv_caps = ic->ic_caps &~ IEEE80211_C_OPMODE;
+
+ /* 11n capabilities - XXX methodize */
vap->iv_htcaps = ic->ic_htcaps;
vap->iv_htextcaps = ic->ic_htextcaps;
+
+ /* 11ac capabilities - XXX methodize */
+ vap->iv_vhtcaps = ic->ic_vhtcaps;
+ vap->iv_vhtextcaps = ic->ic_vhtextcaps;
+
vap->iv_opmode = opmode;
vap->iv_caps |= ieee80211_opcap[opmode];
IEEE80211_ADDR_COPY(vap->iv_myaddr, ic->ic_macaddr);
@@ -581,6 +627,12 @@ ieee80211_vap_setup(struct ieee80211com *ic, struct
ieee80211vap *vap,
*/
vap->iv_reset = default_reset;
+ /*
+ * Install a default crypto key update method, the driver
+ * can override this.
+ */
+ vap->iv_update_deftxkey = default_update_deftxkey;
+
ieee80211_sysctl_vattach(vap);
ieee80211_crypto_vattach(vap);
ieee80211_node_vattach(vap);
@@ -590,6 +642,7 @@ ieee80211_vap_setup(struct ieee80211com *ic, struct
ieee80211vap *vap,
ieee80211_superg_vattach(vap);
#endif
ieee80211_ht_vattach(vap);
+ ieee80211_vht_vattach(vap);
ieee80211_scan_vattach(vap);
ieee80211_regdomain_vattach(vap);
ieee80211_radiotap_vattach(vap);
@@ -650,6 +703,12 @@ ieee80211_vap_attach(struct ieee80211vap *vap,
ifm_change_cb_t media_change,
ieee80211_syncflag_locked(ic, IEEE80211_F_BURST);
ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_HT);
ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_USEHT40);
+
+ ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_VHT);
+ ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT40);
+ ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80);
+ ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80P80);
+ ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT160);
IEEE80211_UNLOCK(ic);
return 1;
@@ -682,6 +741,8 @@ ieee80211_vap_detach(struct ieee80211vap *vap)
*/
ieee80211_draintask(ic, &vap->iv_nstate_task);
ieee80211_draintask(ic, &vap->iv_swbmiss_task);
+ ieee80211_draintask(ic, &vap->iv_wme_task);
+ ieee80211_draintask(ic, &ic->ic_parent_task);
/* XXX band-aid until ifnet handles this for us */
taskqueue_drain(taskqueue_swi, &ifp->if_linktask);
@@ -697,6 +758,13 @@ ieee80211_vap_detach(struct ieee80211vap *vap)
ieee80211_syncflag_locked(ic, IEEE80211_F_BURST);
ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_HT);
ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_USEHT40);
+
+ ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_VHT);
+ ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT40);
+ ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80);
+ ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80P80);
+ ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT160);
+
/* NB: this handles the bpfdetach done below */
ieee80211_syncflag_ext_locked(ic, IEEE80211_FEXT_BPF);
if (vap->iv_ifflags & IFF_PROMISC)
@@ -713,6 +781,7 @@ ieee80211_vap_detach(struct ieee80211vap *vap)
#ifdef IEEE80211_SUPPORT_SUPERG
ieee80211_superg_vdetach(vap);
#endif
+ ieee80211_vht_vdetach(vap);
ieee80211_ht_vdetach(vap);
/* NB: must be before ieee80211_node_vdetach */
ieee80211_proto_vdetach(vap);
@@ -850,6 +919,46 @@ ieee80211_syncflag_ht(struct ieee80211vap *vap, int flag)
IEEE80211_UNLOCK(ic);
}
+/*
+ * Synchronize flags_vht bit state in the com structure
+ * according to the state of all vap's. This is used,
+ * for example, to handle state changes via ioctls.
+ */
+static void
+ieee80211_syncflag_vht_locked(struct ieee80211com *ic, int flag)
+{
+ struct ieee80211vap *vap;
+ int bit;
+
+ IEEE80211_LOCK_ASSERT(ic);
+
+ bit = 0;
+ TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next)
+ if (vap->iv_flags_vht & flag) {
+ bit = 1;
+ break;
+ }
+ if (bit)
+ ic->ic_flags_vht |= flag;
+ else
+ ic->ic_flags_vht &= ~flag;
+}
+
+void
+ieee80211_syncflag_vht(struct ieee80211vap *vap, int flag)
+{
+ struct ieee80211com *ic = vap->iv_ic;
+
+ IEEE80211_LOCK(ic);
+ if (flag < 0) {
+ flag = -flag;
+ vap->iv_flags_vht &= ~flag;
+ } else
+ vap->iv_flags_vht |= flag;
+ ieee80211_syncflag_vht_locked(ic, flag);
+ IEEE80211_UNLOCK(ic);
+}
+
/*
* Synchronize flags_ext bit state in the com structure
* according to the state of all vap's. This is used,
@@ -1017,6 +1126,110 @@ set_extchan(struct ieee80211_channel *c)
c->ic_extieee = 0;
}
+/*
+ * Populate the freq1/freq2 fields as appropriate for VHT channels.
+ *
+ * This for now uses a hard-coded list of 80MHz wide channels.
+ *
+ * For HT20/HT40, freq1 just is the centre frequency of the 40MHz
+ * wide channel we've already decided upon.
+ *
+ * For VHT80 and VHT160, there are only a small number of fixed
+ * 80/160MHz wide channels, so we just use those.
+ *
+ * This is all likely very very wrong - both the regulatory code
+ * and this code needs to ensure that all four channels are
+ * available and valid before the VHT80 (and eight for VHT160) channel
+ * is created.
+ */
+
+struct vht_chan_range {
+ uint16_t freq_start;
+ uint16_t freq_end;
+};
+
+struct vht_chan_range vht80_chan_ranges[] = {
+ { 5170, 5250 },
+ { 5250, 5330 },
+ { 5490, 5570 },
+ { 5570, 5650 },
+ { 5650, 5730 },
+ { 5735, 5815 },
+ { 0, 0, }
+};
+
+static int
+set_vht_extchan(struct ieee80211_channel *c)
+{
+ int i;
+
+ if (! IEEE80211_IS_CHAN_VHT(c)) {
+ return (0);
+ }
+
+ if (IEEE80211_IS_CHAN_VHT20(c)) {
+ c->ic_vht_ch_freq1 = c->ic_ieee;
+ return (1);
+ }
[ *** diff truncated: 10683 lines dropped *** ]
############################################################################
Commit: 6d0f2b487abf16ee4e949f3f31b61376ee64d595
URL: https://git.haiku-os.org/haiku/commit/?id=6d0f2b487abf
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Tue Jan 8 00:25:39 2019 UTC
freebsd_wlan: Update Haiku-specific code.
Now that we use SYSINIT for the "module" code instead of manually
maintaining lists, we have to make the static library slightly differently.
See inline comment.
----------------------------------------------------------------------------
############################################################################
Commit: bf3654699e979b5a770e537f3108fca341fcf28b
URL: https://git.haiku-os.org/haiku/commit/?id=bf3654699e97
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Tue Jan 8 00:27:50 2019 UTC
drivers/wlan: Merge the ratectl change commit from FreeBSD.
This is a relatively minor change that mostly just shuffles structs
around, so presumably it will not break any of these drivers.
----------------------------------------------------------------------------
############################################################################
Commit: 86734cc40e1a7992c58fd870bdc2ed3a376c0bb5
URL: https://git.haiku-os.org/haiku/commit/?id=86734cc40e1a
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Tue Jan 8 01:15:41 2019 UTC
idualwifi7260: Upgrade to FreeBSD 12.
Tested on a 7265D.
----------------------------------------------------------------------------
############################################################################
Revision: hrev52721
Commit: ac19c8509b35b15ad6bce3196f5ee48ea4a314cf
URL: https://git.haiku-os.org/haiku/commit/?id=ac19c8509b35
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Tue Jan 8 01:17:31 2019 UTC
freebsd_network: Fix redefinition warning.
----------------------------------------------------------------------------