diff --git a/repos/dde_linux/README b/repos/dde_linux/README
index 51381b0b8e..ad684de987 100644
--- a/repos/dde_linux/README
+++ b/repos/dde_linux/README
@@ -33,118 +33,6 @@ library named 'lxip.lib.so'. The IP stack can be interfaced using Genode's
version of 'libc' by linking your application to 'lxip_libc' plugin in your
'target.mk' file.
-WiFi
-####
-
-The wifi_drv component is a port of the Linux mac802.11 stack, including the
-iwlwifi driver as well as libnl and wpa_supplicant, to Genode.
-
-To start the component the following configuration snippet can be used:
-
-!
-!
-!
-!
-!
-!
-!
-!
-!
-!
-!
-!
-!
-!
-!
-!
-!
-!
-!
-
-To temporarily prevent any radio activity, the 'rfkill' attribute
-can be set to 'true'.
-
-If the network is protected by, e.g., WPA/WPA2, the protection type, either
-'WPA' or 'WPA2' as well as the the passphrase have to be specified.
-The 'bssid' attribute can be used to select a specifc accesspoint within a
-network. Of all attributes only the 'ssid' attribute is mandatory, all others
-are optional and should only be used when needed.
-
-The configuration may contain more than one network. In This case the driver
-will try to select the best one it gets a response from. To prevent it
-from automatically joining the network the 'auto_connect' attribute must be
-set to 'false'; the default value is 'true'. If the 'explicit_scan' attribute
-is set, the driver will pro-actively scan for a hidden network with the given
-SSID:
-
-!
-!
-!
-!
-
-By default, the driver scans for available networks only when not
-connected. This can be changed with the 'connected_scan_interval'
-attribute, which specifies the interval for connected scans in
-seconds and directly influences any roaming decision, i.e., select
-a better fit accesspoint for the configured network.
-
-Also, the driver can be switched to verbose logging during runtime
-by setting the 'verbose' or 'verbose_state' attribute to 'true'.
-
-The wifi_drv creates two distinct reports to communicate its state and
-information about the wireless infrastructure to other components. The
-first one is a list of all available accesspoints. The following examplary
-report shows its general structure:
-
-!
-!
-!
-!
-!
-
-Each accesspoint node has attributes that contain the SSID and the BSSID
-of the accesspoint as well as the link quality (signal strength). These
-attributes are mandatory. If the network is protected, the node will also
-have an attribute describing the type of protection in addition.
-
-The second report provides information about the state of the connection
-to the currently connected accesspoint:
-
-!
-!
-!
-
-Valid state values are 'connected', 'disconnected', 'connecting'. Depending
-on the state, there are additional attributes that can be checked. In case
-of an authentication error, e.g. the passphrase is wrong, the 'auth_failure'
-attribute will be set to 'true'. The 'rfkilled' attribute is set to 'true'
-if a disconnect was triggered by disabling the radio activity via setting
-the 'rfkill' attribute.
-
-By subscribing to both reports and providing the required 'wifi_config' ROM
-module, a component is able control the wireless driver.
-
-Currently only WPA/WPA2 protection using a passphrase is supported and the the
-SSID is copied verbatim. At the moment, there is no way to express or escape
-non alphanumeric characters.
-
-On certain cards, e.g. Intel Wireless 6200 ABG, it may be necessary to disable
-the 11n mode. This can be achieved by setting the 'use_11n' attribute in
-the 'wifi_config' node to 'no'.
-
-The driver optionally reports the following information under the
-label "devices" if requested in the config as depicted.
-
-!
-
-!
-
lx_kit
######
diff --git a/repos/dde_linux/lib/import/import-legacy_wifi_include.mk b/repos/dde_linux/lib/import/import-legacy_wifi_include.mk
deleted file mode 100644
index 842629ffdc..0000000000
--- a/repos/dde_linux/lib/import/import-legacy_wifi_include.mk
+++ /dev/null
@@ -1,27 +0,0 @@
-WIFI_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/lib/wifi
-SRC_DIR := $(REP_DIR)/src/lib/legacy/wifi
-
-# architecture-dependent includes
-ifeq ($(filter-out $(SPECS),x86),)
- ARCH_SRC_INC_DIR += $(REP_DIR)/src/include/spec/x86
- ifeq ($(filter-out $(SPECS),32bit),)
- ARCH_SRC_INC_DIR += $(REP_DIR)/src/include/spec/x86_32
- endif # 32bit
- ifeq ($(filter-out $(SPECS),64bit),)
- ARCH_SRC_INC_DIR += $(REP_DIR)/src/include/spec/x86_64
- endif # 64bit
-endif # x86
-
-
-#
-# The order of include-search directories is important, we need to look into
-# 'contrib' before falling back to our custom 'lx_emul.h' header.
-#
-INC_DIR += $(SRC_DIR) \
- $(SRC_DIR)/include
-INC_DIR += $(REP_DIR)/src/include
-INC_DIR += $(ARCH_SRC_INC_DIR)
-INC_DIR += $(WIFI_CONTRIB_DIR)/include \
- $(WIFI_CONTRIB_DIR)/include/uapi \
- $(WIFI_CONTRIB_DIR)/drivers/net/wireless/iwlwifi
-INC_DIR += $(LIB_CACHE_DIR)/legacy_wifi_include/include/include/include
diff --git a/repos/dde_linux/lib/mk/iwl_firmware.mk b/repos/dde_linux/lib/mk/iwl_firmware.mk
deleted file mode 100644
index 7f913b7757..0000000000
--- a/repos/dde_linux/lib/mk/iwl_firmware.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# Pseudo library to copy Intel Wireless firmware to build directory
-#
-
-WIFI_CONTRIB_DIR := $(call select_from_ports,dde_linux)
-
-IMAGES := $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/firmware/*.ucode))
-IMAGES += $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/firmware/*.db))
-BIN_DIR := $(BUILD_BASE_DIR)/bin
-FW_DIR := $(WIFI_CONTRIB_DIR)/firmware
-
-CUSTOM_TARGET_DEPS += $(addprefix $(BIN_DIR)/,$(IMAGES))
-
-$(BIN_DIR)/%.ucode: $(FW_DIR)/%.ucode
- $(VERBOSE)cp $^ $@
-
-$(BIN_DIR)/%.db: $(FW_DIR)/%.db
- $(VERBOSE)cp $^ $@
-
-
-CC_CXX_WARN_STRICT =
diff --git a/repos/dde_linux/lib/mk/legacy_wifi.inc b/repos/dde_linux/lib/mk/legacy_wifi.inc
deleted file mode 100644
index 86b3b5de53..0000000000
--- a/repos/dde_linux/lib/mk/legacy_wifi.inc
+++ /dev/null
@@ -1,134 +0,0 @@
-LIB_DIR := $(REP_DIR)/src/lib/legacy/wifi
-LIB_INC_DIR := $(LIB_DIR)/include
-
-WIFI_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/lib/wifi
-DRIVERS_DIR := $(WIFI_CONTRIB_DIR)/drivers
-WIFI_DIR := $(WIFI_CONTRIB_DIR)/net
-
-SHARED_LIB = yes
-
-#
-# legacy_wifi_include *must* be the first library, otherwise the include
-# order is wrong
-#
-LIBS += legacy_wifi_include lx_kit_setjmp nic_driver
-
-LD_OPT += --version-script=$(LIB_DIR)/symbol.map
-
-SRC_CC += dummies.cc init.cc lxcc_emul.cc nic.cc socket_call.cc random.cc \
- firmware.cc
-
-# lx_kit
-SRC_CC += mapped_io_mem_range.cc irq.cc pci.cc malloc.cc scheduler.cc \
- work.cc timer.cc printf.cc bug.cc env.cc
-
-SRC_C += lxc_emul.c dummies_new.c
-
-CC_WARN =
-CC_OPT += -fno-builtin-toupper
-
-CC_C_OPT += -std=gnu89
-CC_C_OPT += -include $(LIB_INC_DIR)/lx_emul.h
-CC_C_OPT += -Wall -Wno-unused-variable -Wno-unused-function -Wno-uninitialized
-CC_C_OPT += -Wno-unused-but-set-variable -Wno-pointer-sign -Wno-cast-qual
-CC_C_OPT += -Wno-stringop-truncation
-CC_CXX_OPT += -Wall -fpermissive
-
-CC_OPT += -U__linux__ -D __KERNEL__ -DCONFIG_PCI
-#CC_OPT += -DCONFIG_INET
-CC_OPT += -DCONFIG_NET -DCONFIG_NET_NS -DCONFIG_WLAN #-D__MAC80211_DRIVER_TRACE
-
-# CONFIG options
-CC_OPT += -DCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=1
-
-# needed for firmware loading
-CC_OPT += -DCONFIG_FW_LOADER
-
-# bling bling
-CC_OPT += -DCONFIG_LEDS_TRIGGERS -DCONFIG_MAC80211_LEDS
-
-# mesh
-CC_OPT += -DCONFIG_MAC80211_MESH
-
-# power management
-CC_OPT += -DCONFIG_PM -DCONFIG_PM_SLEEP
-
-# rfkill
-CC_OPT += -DCONFIG_RFKILL -DCONFIG_RFKILL_INPUT
-# choose default pid algorithm
-CC_OPT += -DCONFIG_MAC80211_RC_PID -DCONFIG_MAC80211_RC_DEFAULT=\"pid\"
-
-CC_OPT += -DCONFIG_CFG80211
-
-#
-# Suffix of global 'module_init' function
-#
-MOD_SUFFIX =
-CC_OPT += -DMOD_SUFFIX=$(MOD_SUFFIX)
-
-SRC_C += lib/bsearch.c
-SRC_C += lib/bucket_locks.c
-SRC_C += lib/crc32.c
-SRC_C += lib/ctype.c
-SRC_C += lib/gcd.c
-
-# crypto
-SRC_C += $(addprefix crypto/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/crypto/*.c)))
-
-# net
-SRC_C += net/core/datagram.c
-SRC_C += net/core/rtnetlink.c
-SRC_C += net/core/skbuff.c
-SRC_C += net/core/sock.c
-SRC_C += net/ethernet/eth.c
-SRC_C += net/netlink/af_netlink.c
-SRC_C += net/netlink/genetlink.c
-SRC_C += net/packet/af_packet.c
-
-# netlink
-SRC_C += lib/nlattr.c
-SRC_C += lib/rbtree.c
-SRC_C += lib/rhashtable.c
-
-# wifi mac80211
-SRC_C += $(addprefix net/mac80211/, $(notdir $(wildcard $(WIFI_DIR)/mac80211/*.c)))
-CC_OPT += -DCONFIG_MAC80211_RC_MINSTREL -DCONFIG_MAC80211_RC_MINSTREL_HT
-CC_OPT += -DCONFIG_MAC80211_STA_HASH_MAX_SIZE=0
-
-# wifi rfkill
-SRC_C += $(addprefix net/rfkill/, $(notdir $(wildcard $(WIFI_DIR)/rfkill/*.c)))
-INC_DIR += $(WIFI_DIR)/rfkill
-
-# wifi cfg80211
-SRC_C += $(addprefix net/wireless/, $(notdir $(wildcard $(WIFI_DIR)/wireless/*.c)))
-INC_DIR += $(WIFI_DIR)/wireless
-CC_OPT += -DCONFIG_CFG80211_REG_RELAX_NO_IR=0
-
-# led driver
-SRC_C += $(addprefix drivers/leds/, $(notdir $(wildcard $(DRIVERS_DIR)/leds/*.c)))
-CC_OPT += -DCONFIG_LEDS_TRIGGERS
-
-CC_OPT += -D__CHECK_ENDIAN__
-
-# iwlwifi driver
-DRV_DIR_IWLWIFI := drivers/net/wireless/intel/iwlwifi
-SRC_C += $(addprefix $(DRV_DIR_IWLWIFI)/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/*.c)))
-SRC_C += $(addprefix $(DRV_DIR_IWLWIFI)/cfg/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/cfg/*.c)))
-SRC_C += $(addprefix $(DRV_DIR_IWLWIFI)/dvm/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/dvm/*.c)))
-SRC_C += $(addprefix $(DRV_DIR_IWLWIFI)/fw/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/fw/*.c)))
-SRC_C += $(addprefix $(DRV_DIR_IWLWIFI)/mvm/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/mvm/*.c)))
-SRC_C += $(addprefix $(DRV_DIR_IWLWIFI)/pcie/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/pcie/*.c)))
-INC_DIR += $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)
-INC_DIR += $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/fw
-CC_OPT += -DCONFIG_IWLMVM -DCONFIG_IWLDVM -DCONFIG_IWLWIFI_LEDS
-CC_OPT += -DCONFIG_IWLWIFI_DEBUG
-
-vpath %.c $(DRIVERS_DIR)
-vpath %.c $(WIFI_CONTRIB_DIR)/drivers/net/wireless/
-vpath %.c $(WIFI_DIR)
-vpath %.c $(WIFI_CONTRIB_DIR)
-vpath %.c $(LIB_DIR)
-vpath %.cc $(LIB_DIR)
-vpath %.cc $(REP_DIR)/src/lib/legacy/lx_kit
-
-# vi: set ft=make :
diff --git a/repos/dde_linux/lib/mk/legacy_wifi_include.mk b/repos/dde_linux/lib/mk/legacy_wifi_include.mk
deleted file mode 100644
index c4320a2fac..0000000000
--- a/repos/dde_linux/lib/mk/legacy_wifi_include.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-ifeq ($(called_from_lib_mk),yes)
-
-WIFI_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/lib/wifi
-LX_EMUL_H := $(REP_DIR)/src/lib/legacy/wifi/include/lx_emul.h
-
-#
-# Determine the header files included by the contrib code. For each
-# of these header files we create a symlink to 'lx_emul.h'.
-#
-SCAN_DIRS := $(addprefix $(WIFI_CONTRIB_DIR)/include/, asm-generic crypto linux net trace uapi) \
- $(addprefix $(WIFI_CONTRIB_DIR)/, crypto drivers lib net)
-GEN_INCLUDES := $(shell grep -rIh "^\#include .*\/" $(SCAN_DIRS) |\
- sed "s/^\#include [^<\"]*[<\"]\([^>\"]*\)[>\"].*/\1/" |\
- sort | uniq)
-#
-# Filter out original Linux headers that exist in the contrib directory
-#
-NO_GEN_INCLUDES := $(shell cd $(WIFI_CONTRIB_DIR)/; find include -name "*.h" |\
- sed "s/.\///" | sed "s/.*include\///")
-GEN_INCLUDES := $(filter-out $(NO_GEN_INCLUDES),$(GEN_INCLUDES))
-
-#
-# Put Linux headers in 'GEN_INC' dir, since some include use "../../" paths use
-# three level include hierarchy
-#
-GEN_INC := $(shell pwd)/include/include/include
-GEN_INCLUDES := $(addprefix $(GEN_INC)/,$(GEN_INCLUDES))
-
-all: $(GEN_INCLUDES)
-
-$(GEN_INCLUDES):
- $(VERBOSE)mkdir -p $(dir $@)
- $(VERBOSE)ln -s $(LX_EMUL_H) $@
-
-endif
-
-# vi: set ft=make :
-
-CC_CXX_WARN_STRICT =
diff --git a/repos/dde_linux/lib/mk/spec/x86_32/legacy_wifi.mk b/repos/dde_linux/lib/mk/spec/x86_32/legacy_wifi.mk
deleted file mode 100644
index 8054d7c1e8..0000000000
--- a/repos/dde_linux/lib/mk/spec/x86_32/legacy_wifi.mk
+++ /dev/null
@@ -1,9 +0,0 @@
-include $(REP_DIR)/lib/mk/legacy_wifi.inc
-
-INC_DIR += $(LIB_INC_DIR)/spec/32bit $(LIB_INC_DIR)/spec/x86_32 $(LIB_INC_DIR)/spec/x86
-
-CC_OPT += -DCONFIG_64BIT=0
-
-vpath %.S $(REP_DIR)/src/lib/legacy/lx_kit/spec/x86_32
-
-CC_CXX_WARN_STRICT =
diff --git a/repos/dde_linux/lib/mk/spec/x86_64/legacy_wifi.mk b/repos/dde_linux/lib/mk/spec/x86_64/legacy_wifi.mk
deleted file mode 100644
index 6ba594454f..0000000000
--- a/repos/dde_linux/lib/mk/spec/x86_64/legacy_wifi.mk
+++ /dev/null
@@ -1,9 +0,0 @@
-include $(REP_DIR)/lib/mk/legacy_wifi.inc
-
-INC_DIR += $(LIB_INC_DIR)/spec/64bit $(LIB_INC_DIR)/spec/x86_64 $(LIB_INC_DIR)/spec/x86
-
-CC_OPT += -DCONFIG_64BIT=1
-
-vpath %.S $(REP_DIR)/src/lib/legacy/lx_kit/spec/x86_64
-
-CC_CXX_WARN_STRICT =
diff --git a/repos/dde_linux/patches/wifi.patch b/repos/dde_linux/patches/wifi.patch
deleted file mode 100644
index c77310ce26..0000000000
--- a/repos/dde_linux/patches/wifi.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-diff --git a/crypto/algboss.c b/crypto/algboss.c
-index 5e6df2a..6ec2ce3 100644
---- a/crypto/algboss.c
-+++ b/crypto/algboss.c
-@@ -90,6 +90,8 @@ out:
- crypto_alg_put(¶m->larval->alg);
- kfree(param);
- module_put_and_exit(0);
-+
-+ return 0;
- }
-
- static int cryptomgr_schedule_probe(struct crypto_larval *larval)
-@@ -227,6 +229,8 @@ skiptest:
-
- kfree(param);
- module_put_and_exit(0);
-+
-+ return 0;
- }
-
- static int cryptomgr_schedule_test(struct crypto_alg *alg)
-diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
-index 7bd704a..d329673 100644
---- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
-+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
-@@ -549,6 +549,8 @@ static struct scatterlist *alloc_sgtable(int size)
-
- void iwl_fw_error_dump(struct iwl_fw_runtime *fwrt)
- {
-+ return;
-+
- struct iwl_fw_error_dump_file *dump_file;
- struct iwl_fw_error_dump_data *dump_data;
- struct iwl_fw_error_dump_info *dump_info;
-@@ -1106,6 +1108,8 @@ IWL_EXPORT_SYMBOL(iwl_fw_start_dbg_conf);
-
- void iwl_fw_error_dump_wk(struct work_struct *work)
- {
-+ return;
-+
- struct iwl_fw_runtime *fwrt =
- container_of(work, struct iwl_fw_runtime, dump.wk.work);
-
-diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
-index 9c4a7f6..3bf610f 100644
---- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
-+++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
-@@ -1776,6 +1776,7 @@ MODULE_PARM_DESC(debug, "debug output mask");
- module_param_named(swcrypto, iwlwifi_mod_params.swcrypto, int, S_IRUGO);
- MODULE_PARM_DESC(swcrypto, "using crypto in software (default 0 [hardware])");
- module_param_named(11n_disable, iwlwifi_mod_params.disable_11n, uint, S_IRUGO);
-+unsigned int *module_param_11n_disable = &iwlwifi_mod_params.disable_11n;
- MODULE_PARM_DESC(11n_disable,
- "disable 11n functionality, bitmap: 1: full, 2: disable agg TX, 4: disable agg RX, 8 enable agg TX");
- module_param_named(amsdu_size, iwlwifi_mod_params.amsdu_size,
-diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/led.c b/drivers/net/wireless/intel/iwlwifi/mvm/led.c
-index b272695..143130d 100644
---- a/drivers/net/wireless/intel/iwlwifi/mvm/led.c
-+++ b/drivers/net/wireless/intel/iwlwifi/mvm/led.c
-@@ -142,7 +142,7 @@ int iwl_mvm_leds_init(struct iwl_mvm *mvm)
- if (ret) {
- kfree(mvm->led.name);
- IWL_INFO(mvm, "Failed to enable led\n");
-- return ret;
-+ return 0;
- }
-
- mvm->init_status |= IWL_MVM_INIT_STATUS_LEDS_INIT_COMPLETE;
-diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
-index 7152fdc..5d133e5 100644
---- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
-+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
-@@ -4368,7 +4368,7 @@ const struct ieee80211_ops iwl_mvm_hw_ops = {
- .add_interface = iwl_mvm_mac_add_interface,
- .remove_interface = iwl_mvm_mac_remove_interface,
- .config = iwl_mvm_mac_config,
-- .prepare_multicast = iwl_mvm_prepare_multicast,
-+ .prepare_multicast = 0,
- .configure_filter = iwl_mvm_configure_filter,
- .config_iface_filter = iwl_mvm_config_iface_filter,
- .bss_info_changed = iwl_mvm_bss_info_changed,
-diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
-index 5d133e5..ec770d4 100644
---- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
-+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
-@@ -1573,7 +1573,7 @@ static void iwl_mvm_recalc_multicast(struct iwl_mvm *mvm)
-
- lockdep_assert_held(&mvm->mutex);
-
-- if (WARN_ON_ONCE(!mvm->mcast_filter_cmd))
-+ if (!mvm->mcast_filter_cmd)
- return;
-
- ieee80211_iterate_active_interfaces_atomic(
-diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
-index f25ce3a..85007fc 100644
---- a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
-+++ b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
-@@ -1601,7 +1601,7 @@ irqreturn_t iwl_pcie_irq_handler(int irq, void *dev_id)
- * Re-enable interrupts here since we don't
- * have anything to service
- */
-- if (test_bit(STATUS_INT_ENABLED, &trans->status))
-+ // if (test_bit(STATUS_INT_ENABLED, &trans->status))
- _iwl_enable_interrupts(trans);
- spin_unlock(&trans_pcie->irq_lock);
- lock_map_release(&trans->sync_cmd_lockdep_map);
-diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
-index 99df171..4632cdf 100644
---- a/include/linux/skbuff.h
-+++ b/include/linux/skbuff.h
-@@ -3781,7 +3781,7 @@ static inline void skb_remcsum_process(struct sk_buff *skb, void *ptr,
-
- if (unlikely(skb->ip_summed != CHECKSUM_COMPLETE)) {
- __skb_checksum_complete(skb);
-- skb_postpull_rcsum(skb, skb->data, ptr - (void *)skb->data);
-+ skb_postpull_rcsum(skb, skb->data, (unsigned char*)ptr - skb->data);
- }
-
- delta = remcsum_adjust(ptr, skb->csum, start, offset);
-diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
-index 1fdcde9..5f221bd 100644
---- a/include/linux/rtnetlink.h
-+++ b/include/linux/rtnetlink.h
-@@ -97,9 +97,13 @@ void rtnetlink_init(void);
- void __rtnl_unlock(void);
- void rtnl_kfree_skbs(struct sk_buff *head, struct sk_buff *tail);
-
-+#if 1
-+#define ASSERT_RTNL()
-+# else
- #define ASSERT_RTNL() \
- WARN_ONCE(!rtnl_is_locked(), \
- "RTNL: assertion failed at %s (%d)\n", __FILE__, __LINE__)
-+#endif
-
- extern int ndo_dflt_fdb_dump(struct sk_buff *skb,
- struct netlink_callback *cb,
-diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
-index e0f3f4a..a309257 100644
---- a/net/packet/af_packet.c
-+++ b/net/packet/af_packet.c
-@@ -4544,8 +4547,10 @@ static int __net_init packet_net_init(struct net *net)
- mutex_init(&net->packet.sklist_lock);
- INIT_HLIST_HEAD(&net->packet.sklist);
-
-+#ifdef CONFIG_PROC_FS
- if (!proc_create("packet", 0, net->proc_net, &packet_seq_fops))
- return -ENOMEM;
-+#endif
-
- return 0;
- }
diff --git a/repos/dde_linux/patches/wifi_mem.patch b/repos/dde_linux/patches/wifi_mem.patch
deleted file mode 100644
index 3bdc5730f6..0000000000
--- a/repos/dde_linux/patches/wifi_mem.patch
+++ /dev/null
@@ -1,138 +0,0 @@
---- a/drivers/net/wireless/intel/iwlwifi/dvm/calib.c
-+++ b/drivers/net/wireless/intel/iwlwifi/dvm/calib.c
-@@ -120,7 +120,7 @@ int iwl_calib_set(struct iwl_priv *priv,
- struct iwl_calib_result *res, *tmp;
-
- res = kmalloc(sizeof(*res) + len - sizeof(struct iwl_calib_hdr),
-- GFP_ATOMIC);
-+ GFP_ATOMIC | GFP_LX_DMA);
- if (!res)
- return -ENOMEM;
- memcpy(&res->hdr, cmd, len);
---- a/drivers/net/wireless/intel/iwlwifi/dvm/scan.c
-+++ b/drivers/net/wireless/intel/iwlwifi/dvm/scan.c
-@@ -666,7 +666,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
- ctx = iwl_rxon_ctx_from_vif(vif);
-
- if (!priv->scan_cmd) {
-- priv->scan_cmd = kmalloc(scan_cmd_size, GFP_KERNEL);
-+ priv->scan_cmd = kmalloc(scan_cmd_size, GFP_KERNEL | GFP_LX_DMA);
- if (!priv->scan_cmd) {
- IWL_DEBUG_SCAN(priv,
- "fail to allocate memory for scan\n");
---- a/drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c
-+++ b/drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c
-@@ -251,7 +251,7 @@ int iwl_phy_db_set_section(struct iwl_phy_db *phy_db,
- return -EINVAL;
-
- kfree(entry->data);
-- entry->data = kmemdup(phy_db_notif->data, size, GFP_ATOMIC);
-+ entry->data = kmemdup(phy_db_notif->data, size, GFP_ATOMIC | GFP_LX_DMA);
- if (!entry->data) {
- entry->size = 0;
- return -ENOMEM;
---- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.c
-+++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.c
-@@ -99,7 +99,7 @@ struct iwl_trans *iwl_trans_alloc(unsigned int priv_size,
- kmem_cache_create(trans->dev_cmd_pool_name,
- sizeof(struct iwl_device_cmd),
- sizeof(void *),
-- SLAB_HWCACHE_ALIGN,
-+ SLAB_HWCACHE_ALIGN|SLAB_LX_DMA,
- NULL);
- if (!trans->dev_cmd_pool)
- return NULL;
---- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
-+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
-@@ -767,7 +767,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
-
- scan_size = iwl_mvm_scan_size(mvm);
-
-- mvm->scan_cmd = kmalloc(scan_size, GFP_KERNEL);
-+ mvm->scan_cmd = kmalloc(scan_size, GFP_KERNEL | GFP_LX_DMA);
- if (!mvm->scan_cmd)
- goto out_free;
-
---- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
-+++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
-@@ -501,11 +501,11 @@ iwl_mvm_config_sched_scan_profiles(struct iwl_mvm *mvm,
- else
- blacklist_len = IWL_SCAN_MAX_BLACKLIST_LEN;
-
-- blacklist = kzalloc(sizeof(*blacklist) * blacklist_len, GFP_KERNEL);
-+ blacklist = kzalloc(sizeof(*blacklist) * blacklist_len, GFP_KERNEL | GFP_LX_DMA);
- if (!blacklist)
- return -ENOMEM;
-
-- profile_cfg = kzalloc(sizeof(*profile_cfg), GFP_KERNEL);
-+ profile_cfg = kzalloc(sizeof(*profile_cfg), GFP_KERNEL | GFP_LX_DMA);
- if (!profile_cfg) {
- ret = -ENOMEM;
- goto free_blacklist;
-@@ -1052,7 +1052,7 @@ int iwl_mvm_config_scan(struct iwl_mvm *mvm)
- cmd_size = sizeof(struct iwl_scan_config_v1);
- cmd_size += mvm->fw->ucode_capa.n_scan_channels;
-
-- cfg = kzalloc(cmd_size, GFP_KERNEL);
-+ cfg = kzalloc(cmd_size, GFP_KERNEL | GFP_LX_DMA);
- if (!cfg)
- return -ENOMEM;
-
---- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
-+++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
-@@ -502,7 +502,7 @@ int iwl_pcie_txq_alloc(struct iwl_trans *trans, struct iwl_txq *txq,
-
- txq->entries = kcalloc(slots_num,
- sizeof(struct iwl_pcie_txq_entry),
-- GFP_KERNEL);
-+ GFP_KERNEL | GFP_LX_DMA);
-
- if (!txq->entries)
- goto error;
-@@ -511,7 +511,7 @@ int iwl_pcie_txq_alloc(struct iwl_trans *trans, struct iwl_txq *txq,
- for (i = 0; i < slots_num; i++) {
- txq->entries[i].cmd =
- kmalloc(sizeof(struct iwl_device_cmd),
-- GFP_KERNEL);
-+ GFP_KERNEL | GFP_LX_DMA);
- if (!txq->entries[i].cmd)
- goto error;
- }
-@@ -938,7 +938,7 @@ static int iwl_pcie_tx_alloc(struct iwl_trans *trans)
- }
-
- trans_pcie->txq_memory = kcalloc(trans->cfg->base_params->num_of_queues,
-- sizeof(struct iwl_txq), GFP_KERNEL);
-+ sizeof(struct iwl_txq), GFP_KERNEL | GFP_LX_DMA);
- if (!trans_pcie->txq_memory) {
- IWL_ERR(trans, "Not enough memory for txq\n");
- ret = -ENOMEM;
-@@ -1539,7 +1539,7 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,
- }
-
- dup_buf = kmemdup(cmddata[i], cmdlen[i],
-- GFP_ATOMIC);
-+ GFP_ATOMIC | GFP_LX_DMA);
- if (!dup_buf)
- return -ENOMEM;
- } else {
---- a/net/core/skbuff.c
-+++ b/net/core/skbuff.c
-@@ -130,6 +130,8 @@ static void *__kmalloc_reserve(size_t size, gfp_t flags, int node,
- void *obj;
- bool ret_pfmemalloc = false;
-
-+ flags |= GFP_LX_DMA;
-+
- /*
- * Try a regular allocation, when that fails and we're not entitled
- * to the reserves, fail.
-@@ -278,7 +280,7 @@ struct sk_buff *__build_skb(void *data, unsigned int frag_size)
- struct sk_buff *skb;
- unsigned int size = frag_size ? : ksize(data);
-
-- skb = kmem_cache_alloc(skbuff_head_cache, GFP_ATOMIC);
-+ skb = kmem_cache_alloc(skbuff_head_cache, GFP_ATOMIC|GFP_LX_DMA);
- if (!skb)
- return NULL;
-
diff --git a/repos/dde_linux/patches/wifi_rfkill.patch b/repos/dde_linux/patches/wifi_rfkill.patch
deleted file mode 100644
index bd4c70f833..0000000000
--- a/repos/dde_linux/patches/wifi_rfkill.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/net/rfkill/core.c
-+++ b/net/rfkill/core.c
-@@ -911,6 +911,19 @@ bool rfkill_blocked(struct rfkill *rfkill)
- }
- EXPORT_SYMBOL(rfkill_blocked);
-
-+bool rfkill_get_any(enum rfkill_type type)
-+{
-+ bool blocked = false;
-+
-+ struct rfkill *rfkill;
-+ list_for_each_entry(rfkill, &rfkill_list, node) {
-+ if (rfkill->type != type && type != RFKILL_TYPE_ALL)
-+ continue;
-+
-+ blocked |= rfkill_blocked(rfkill);
-+ }
-+ return blocked;
-+}
-
- struct rfkill * __must_check rfkill_alloc(const char *name,
- struct device *parent,
diff --git a/repos/dde_linux/ports/dde_linux.hash b/repos/dde_linux/ports/dde_linux.hash
index e8ca8ed553..419c9fc199 100644
--- a/repos/dde_linux/ports/dde_linux.hash
+++ b/repos/dde_linux/ports/dde_linux.hash
@@ -1 +1 @@
-72684892e704a964b714d37fbecad427d03f4f8f
+428ae50e4ae60462249210de908f941666d7d85f
diff --git a/repos/dde_linux/ports/dde_linux.port b/repos/dde_linux/ports/dde_linux.port
index 82e3925bda..56424b3d83 100644
--- a/repos/dde_linux/ports/dde_linux.port
+++ b/repos/dde_linux/ports/dde_linux.port
@@ -1,8 +1,8 @@
LICENSE := GPLv2
VERSION := 2
DOWNLOADS := intel_fb.archive lxip.archive \
- wifi.archive fec.archive libnl.archive wpa_supplicant.git \
- fw.archive usb_host.archive dwc_otg_host.git usb_hid.archive \
+ fec.archive libnl.archive wpa_supplicant.git \
+ usb_host.archive dwc_otg_host.git usb_hid.archive \
usb_modem.archive usb_net.archive
#
@@ -75,17 +75,6 @@ DIR(intel_fb) := $(SRC_DIR_INTEL_FB)
TAR_OPT(intel_fb) := --strip-components=1 --files-from - < <(sed 's/-x.x.x/-$(VERSION_INTEL_FB)/g' $(REP_DIR)/intel_fb.list)
HASH_INPUT += $(REP_DIR)/intel_fb.list
-#
-# mac80211 stack, iwlwifi sources
-#
-SRC_DIR_WIFI := src/lib/wifi
-VERSION_WIFI := 4.16.3
-URL(wifi) := https://www.kernel.org/pub/linux/kernel/v4.x/linux-$(VERSION_WIFI).tar.xz
-SHA(wifi) := 0d6971a81da97e38b974c5eba31a74803bfe41aabc46d406c3acda56306c81a3
-DIR(wifi) := $(SRC_DIR_WIFI)
-TAR_OPT(wifi) := --strip-components=1 --files-from - < <(sed 's/-x.x.x/-$(VERSION_WIFI)/g' $(REP_DIR)/wifi.list)
-HASH_INPUT += $(REP_DIR)/wifi.list
-
#
# IP stack sources
#
@@ -122,20 +111,11 @@ URL(wpa_supplicant) := git://w1.fi/srv/git/hostap.git
REV(wpa_supplicant) := 25bd4e7beb582509596fe60cb3591e1299f3121b
DIR(wpa_supplicant) := src/app/wpa_supplicant
-#
-# Firmware images
-#
-FW_REV := 73f503c65139f368e6155eed8c74d006a2f0219d
-URL(fw) := https://github.com/cnuke/dde_linux_firmware/archive/$(FW_REV).tar.gz
-SHA(fw) := d5a61cb07384a828560b8f869e4e899cb723d462646a48b45c398514bb246925
-DIR(fw) := firmware
-
#
# Patches
#
PATCHES := $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/wpa*.patch)))
PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/libnl*.patch)))
-PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/wifi*.patch)))
PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/lxip*.patch)))
PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/intel*.patch)))
PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/usb_host*.patch)))
@@ -155,12 +135,6 @@ PATCH_OPT(patches/lxip_request_sock.patch) := $(LXIP_OPT)
PATCH_OPT(patches/lxip_sk_wq.patch) := $(LXIP_OPT)
PATCH_OPT(patches/lxip_skbuff_cast.patch) := $(LXIP_OPT)
-# WIFI
-WIFI_OPT = -p1 -d$(SRC_DIR_WIFI)
-PATCH_OPT(patches/wifi.patch) := $(WIFI_OPT)
-PATCH_OPT(patches/wifi_mem.patch) := $(WIFI_OPT)
-PATCH_OPT(patches/wifi_rfkill.patch) := $(WIFI_OPT)
-
# libnl
PATCH_OPT(patches/libnl.patch) := -p1 -d ${DIR(libnl)}
diff --git a/repos/dde_linux/recipes/pkg/legacy_wifi/README b/repos/dde_linux/recipes/pkg/legacy_wifi/README
deleted file mode 100644
index 2186801aae..0000000000
--- a/repos/dde_linux/recipes/pkg/legacy_wifi/README
+++ /dev/null
@@ -1,2 +0,0 @@
-
- Package for bundling wifi_drv and wifi_firmware
diff --git a/repos/dde_linux/recipes/pkg/legacy_wifi/archives b/repos/dde_linux/recipes/pkg/legacy_wifi/archives
deleted file mode 100644
index 45061989a4..0000000000
--- a/repos/dde_linux/recipes/pkg/legacy_wifi/archives
+++ /dev/null
@@ -1,6 +0,0 @@
-_/src/legacy_wifi_drv
-_/src/openssl
-_/src/vfs
-_/src/vfs_jitterentropy
-_/src/libc
-_/raw/legacy_wifi_firmware
diff --git a/repos/dde_linux/recipes/pkg/legacy_wifi/hash b/repos/dde_linux/recipes/pkg/legacy_wifi/hash
deleted file mode 100644
index c5af301d91..0000000000
--- a/repos/dde_linux/recipes/pkg/legacy_wifi/hash
+++ /dev/null
@@ -1 +0,0 @@
-2022-04-27 1f23370e7434b6b34f323734fa58e84dd04b1eb8
diff --git a/repos/dde_linux/recipes/raw/legacy_wifi_firmware/content.mk b/repos/dde_linux/recipes/raw/legacy_wifi_firmware/content.mk
deleted file mode 100644
index e4fafce224..0000000000
--- a/repos/dde_linux/recipes/raw/legacy_wifi_firmware/content.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-PORT_DIR := $(call port_dir,$(REP_DIR)/ports/dde_linux)
-
-content: ucode_files LICENSE.wifi_drv
-
-
-.PHONY: ucode_files
-ucode_files:
- cp $(PORT_DIR)/firmware/*.ucode .
- cp $(PORT_DIR)/firmware/regulatory.db .
-
-LICENSE.wifi_drv:
- for i in $(PORT_DIR)/firmware/LICEN*E.*; do \
- echo "$${i##*/}:" >> $@; \
- cat $$i >> $@; \
- echo >> $@; \
- done
diff --git a/repos/dde_linux/recipes/raw/legacy_wifi_firmware/hash b/repos/dde_linux/recipes/raw/legacy_wifi_firmware/hash
deleted file mode 100644
index c1f691ebb5..0000000000
--- a/repos/dde_linux/recipes/raw/legacy_wifi_firmware/hash
+++ /dev/null
@@ -1 +0,0 @@
-2019-11-25 ff24f3bafaeeb47c053670264b5096dbc4b9a36d
diff --git a/repos/dde_linux/recipes/src/legacy_wifi_drv/content.mk b/repos/dde_linux/recipes/src/legacy_wifi_drv/content.mk
deleted file mode 100644
index 1bf2d197fc..0000000000
--- a/repos/dde_linux/recipes/src/legacy_wifi_drv/content.mk
+++ /dev/null
@@ -1,52 +0,0 @@
-LIB_MK := $(addprefix lib/mk/,libnl.inc libnl_include.mk iwl_firmware.mk legacy_wifi.inc \
- legacy_wifi_include.mk) \
- $(foreach SPEC,x86_32 x86_64,lib/mk/spec/$(SPEC)/libnl.mk) \
- $(foreach SPEC,x86_32 x86_64,lib/mk/spec/$(SPEC)/lx_kit_setjmp.mk) \
- $(foreach SPEC,x86_32 x86_64,lib/mk/spec/$(SPEC)/legacy_wifi.mk) \
- $(addprefix lib/mk/spec/x86/,wpa_driver_nl80211.mk wpa_supplicant.mk)
-
-PORT_DIR := $(call port_dir,$(REP_DIR)/ports/dde_linux)
-
-MIRROR_FROM_REP_DIR := $(LIB_MK) \
- lib/import/import-legacy_wifi_include.mk \
- lib/import/import-libnl_include.mk \
- lib/import/import-libnl.mk \
- include/wifi src/include/legacy src/lib/legacy/lx_kit \
- src/lib/lx_kit/spec \
- $(foreach SPEC, x86 x86_32 x86_64, \
- src/include/spec/$(SPEC)) \
- $(shell cd $(REP_DIR); find src/drivers/wifi -type f) \
- $(shell cd $(REP_DIR); find src/lib/libnl -type f) \
- $(shell cd $(REP_DIR); find src/lib/legacy/wifi -type f) \
- $(shell cd $(REP_DIR); find src/lib/wpa_driver_nl80211 -type f) \
- $(shell cd $(REP_DIR); find src/lib/wpa_supplicant -type f)
-
-MIRROR_FROM_PORT_DIR := $(shell cd $(PORT_DIR); find src/lib/libnl -type f) \
- $(shell cd $(PORT_DIR); find src/lib/wifi -type f) \
- $(shell cd $(PORT_DIR); find src/app/wpa_supplicant -type f)
-MIRROR_FROM_PORT_DIR := $(filter-out $(MIRROR_FROM_REP_DIR),$(MIRROR_FROM_PORT_DIR))
-
-content: $(MIRROR_FROM_REP_DIR) $(MIRROR_FROM_PORT_DIR) cleanup-wpa
-
-$(MIRROR_FROM_REP_DIR):
- $(mirror_from_rep_dir)
-
-$(MIRROR_FROM_PORT_DIR):
- mkdir -p $(dir $@)
- cp -r $(PORT_DIR)/$@ $@
-
-cleanup-wpa: $(MIRROR_FROM_PORT_DIR)
- @for dir in .git doc eap_example hs20 mac80211_hwsim radius_example \
- hostapd tests wlantest wpadebug wpaspy; do \
- rm -rf src/app/wpa_supplicant/$$dir; done
-
-content: LICENSE
-LICENSE:
- ( echo "Linux is subject to GNU General Public License version 2, see:"; \
- echo "https://www.kernel.org/pub/linux/kernel/COPYING"; \
- echo; \
- echo "Libnl is subject to GNU LESSER GENERAL PUBLIC LICENSE Verson 2.1, see:"; \
- echo " src/lib/libnl/COPYING"; \
- echo; \
- echo "Wpa_supplicant is subject to 3-clause BSD license, see:"; \
- echo " src/app/wpa_supplicant/COPYING"; ) > $@
diff --git a/repos/dde_linux/recipes/src/legacy_wifi_drv/hash b/repos/dde_linux/recipes/src/legacy_wifi_drv/hash
deleted file mode 100644
index 74c2e4c767..0000000000
--- a/repos/dde_linux/recipes/src/legacy_wifi_drv/hash
+++ /dev/null
@@ -1 +0,0 @@
-2022-04-27 7b52c2ae3613ade65895e2a4d0737a3a1461c74c
diff --git a/repos/dde_linux/recipes/src/legacy_wifi_drv/used_apis b/repos/dde_linux/recipes/src/legacy_wifi_drv/used_apis
deleted file mode 100644
index f348af3357..0000000000
--- a/repos/dde_linux/recipes/src/legacy_wifi_drv/used_apis
+++ /dev/null
@@ -1,11 +0,0 @@
-base
-os
-libc
-openssl
-nic_session
-uplink_session
-nic_driver
-platform_session
-report_session
-timer_session
-vfs
diff --git a/repos/dde_linux/run/legacy_wifi.run b/repos/dde_linux/run/legacy_wifi.run
deleted file mode 100644
index f7892f8132..0000000000
--- a/repos/dde_linux/run/legacy_wifi.run
+++ /dev/null
@@ -1,275 +0,0 @@
-#
-# Configure wireless lan
-#
-
-proc wifi_ssid { } {
- return $::env(GENODE_WIFI_SSID)
-}
-
-proc wifi_psk { } {
- return $::env(GENODE_WIFI_PSK)
-}
-
-#
-# widi_drv config generator (supporting a network list)
-#
-# You may script your tests with this function in the dynamic_rom config below.
-# The syntax for the networks parameter is
-#
-# { ssid protection passphrase explicit_scan }
-#
-# Example dynamic_rom config:
-#
-# {
-# } [wifi_config 30 5 no [list "net1 WPA2 net1_psk no" "net2 WPA2 net2_psk no"]] {
-#
-#
-# } [wifi_config 30 5 no [list "net1 WPA2 net1_psk no" "net2 WPA2 net2_psk yes"]] {
-# }
-
-set wifi_verbose false
-set wifi_verbose_state false
-
-proc wifi_config { connected_scan_interval scan_interval rfkill networks } {
- global wifi_verbose
- global wifi_verbose_state
-
- set config "\n"
- foreach n $networks {
- append config " \n"
- }
- append config "\n"
-
- return $config
-}
-
-#
-# Restrict platforms
-#
-assert_spec x86
-
-#
-# Build
-#
-
-set build_components {
- core init timer
- drivers/rtc
- drivers/wifi
- server/report_rom
- server/dynamic_rom
- server/nic_router
- test/lwip/http_srv
- lib/vfs/jitterentropy
- lib/vfs/lwip
-}
-
-source ${genode_dir}/repos/base/run/platform_drv.inc
-append_platform_drv_build_components
-
-build $build_components
-
-create_boot_directory
-
-#
-# Generate config
-#
-
-append config {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-} [wifi_config 30 5 no {}] {
-
-
-
-} [wifi_config 30 5 no [list "[wifi_ssid] WPA2 [wifi_psk] yes"]] {
-
-
-
-} [wifi_config 30 5 yes [list "[wifi_ssid] WPA2 [wifi_psk] yes"]] {
-
-
-
-} [wifi_config 30 5 no [list "[wifi_ssid] WPA2 [wifi_psk] yes"]] {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
-
-append_platform_drv_config
-
-append config {
-
-}
-
-install_config $config
-
-set firmware_modules {
- iwlwifi-6000-4.ucode
- iwlwifi-6000g2a-6.ucode
- iwlwifi-6000g2b-6.ucode
- iwlwifi-7260-17.ucode
- iwlwifi-7265-17.ucode
- iwlwifi-7265D-29.ucode
- iwlwifi-8000C-36.ucode
- iwlwifi-8265-36.ucode
- regulatory.db
-}
-
-#
-# Boot modules
-#
-
-# generic modules
-set boot_modules {
- core ld.lib.so init timer rtc_drv report_rom dynamic_rom
- vfs_jitterentropy.lib.so
- libc.lib.so vfs.lib.so libcrypto.lib.so libssl.lib.so
- wpa_driver_nl80211.lib.so wpa_supplicant.lib.so
- legacy_wifi.lib.so
- legacy_pc_wifi_drv
- nic_router
-
- test-lwip_httpsrv
- vfs_lwip.lib.so
-}
-
-append boot_modules $firmware_modules
-
-append_platform_drv_boot_modules
-
-build_boot_image $boot_modules
-
-run_genode_until forever
-
-# vi: set ft=tcl :
diff --git a/repos/dde_linux/src/drivers/wifi/frontend.h b/repos/dde_linux/src/drivers/wifi/frontend.h
deleted file mode 100644
index d3ce0ed7c2..0000000000
--- a/repos/dde_linux/src/drivers/wifi/frontend.h
+++ /dev/null
@@ -1,1656 +0,0 @@
-/*
- * \brief Startup Wifi driver
- * \author Josef Soentgen
- * \date 2018-07-31
- *
- * This wifi driver front end uses the CTRL interface of the wpa_supplicant via
- * a Genode specific backend, which merely wraps a shared memory buffer, to
- * manage the supplicant.
- *
- * Depending on the 'wifi_config' ROM content it will instruct the supplicant
- * to enable, disable and connect to wireless networks. Commands and their
- * corresponding execute result are handled by the '_cmd_handler' dispatcher.
- * This handler drives the front end's state-machine. Any different type of
- * action can only be initiated from the 'IDLE' state. Unsolicited events, e.g.
- * a scan-results-available event, may influence the current state. Config
- * updates are deferred in case the current state is not 'IDLE'.
- *
- * brain-dump
- * ==========
- *
- * config update overview:
- * [[block any new update]] > [mark stale] > [rm stale] > [add new] > [update new] > [[unblock update]]
- *
- * add new network:
- * [[new ap]] > [ssid] > bssid? + [bssid] > [psk] > auto? + [enable] > new ap? + [[new ap]]
- *
- * update network:
- * [[update ap] > bssid? + [bssid] > psk? + [psk] > auto? + [enable] > update ap? + [[update ap]]
- *
- * remove network:
- * [[mark stale]] > [remove network] > stale? + [remove network]
- */
-
-/*
- * Copyright (C) 2018 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-#ifndef _WIFI_FRONTEND_H_
-#define _WIFI_FRONTEND_H_
-
-/* Genode includes */
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-/* rep includes */
-#include
-#include
-
-/* local includes */
-#include
-
-/* declare manually as it is a internal hack^Winterface */
-extern void wifi_kick_socketcall();
-
-
-namespace Wifi {
- struct Frontend;
-}
-
-
-/* keep ordered! */
-static struct Recv_msg_table {
- char const *string;
- size_t len;
-} recv_table[] = {
- { "OK", 2 },
- { "FAIL", 4 },
- { "CTRL-EVENT-SCAN-RESULTS", 23 },
- { "CTRL-EVENT-CONNECTED", 20 },
- { "CTRL-EVENT-DISCONNECTED", 23 },
- { "SME: Trying to authenticate", 27 },
- { "CTRL-EVENT-NETWORK-NOT-FOUND", 28 },
-};
-
-enum Rmi {
- OK = 0,
- FAIL,
- SCAN_RESULTS,
- CONNECTED,
- DISCONNECTED,
- SME_AUTH,
- NOT_FOUND,
-};
-
-
-static inline bool check_recv_msg(char const *msg,
- Recv_msg_table const &entry) {
- return Genode::strcmp(entry.string, msg, entry.len) == 0; }
-
-
-static bool cmd_successful(char const *msg) {
- return check_recv_msg(msg, recv_table[OK]); }
-
-
-static bool cmd_fail(char const *msg) {
- return check_recv_msg(msg, recv_table[FAIL]); }
-
-
-static bool results_available(char const *msg) {
- return check_recv_msg(msg, recv_table[SCAN_RESULTS]); }
-
-
-static bool connecting_to_network(char const *msg) {
- return check_recv_msg(msg, recv_table[SME_AUTH]); }
-
-
-static bool network_not_found(char const *msg) {
- return check_recv_msg(msg, recv_table[NOT_FOUND]); }
-
-
-static bool scan_results(char const *msg) {
- return Genode::strcmp("bssid", msg, 5) == 0; }
-
-
-static bool list_network_results(char const *msg) {
- return Genode::strcmp("network", msg, 7) == 0; }
-
-
-/*
- * Central network data structure
- */
-struct Accesspoint : Genode::Interface
-{
- using Bssid = Genode::String<17+1>;
- using Freq = Genode::String< 4+1>;
- using Prot = Genode::String< 7+1>;
- using Ssid = Genode::String<32+1>;
- using Pass = Genode::String<63+1>;
-
- /*
- * Accesspoint information fields used by the front end
- */
- Bssid bssid { };
- Freq freq { };
- Prot prot { };
- Ssid ssid { };
- Pass pass { };
- unsigned signal { 0 };
-
- /*
- * CTRL interface fields
- *
- * The 'enabled' field is set to true if ENABLE_NETWORK
- * was successfully executed. The network itself might
- * get disabled by wpa_supplicant itself in case it cannot
- * connect to the network, which will _not_ be reflected
- * here.
- */
- int id { -1 };
- bool enabled { false };
-
- /*
- * Internal configuration fields
- */
- bool auto_connect { false };
- bool update { false };
- bool stale { false };
- bool explicit_scan { false };
-
- /**
- * Default constructor
- */
- Accesspoint() { }
-
- /**
- * Constructor that initializes information fields
- */
- Accesspoint(char const *bssid, char const *freq,
- char const *prot, char const *ssid, unsigned signal)
- : bssid(bssid), freq(freq), prot(prot), ssid(ssid), signal(signal)
- { }
-
- void invalidate() { ssid = Ssid(); bssid = Bssid(); }
-
- bool valid() const { return ssid.length() > 1; }
- bool bssid_valid() const { return bssid.length() > 1; }
- bool wpa() const { return prot != "NONE"; }
- bool stored() const { return id != -1; }
-};
-
-
-template
-static void for_each_line(char const *msg, FUNC const &func)
-{
- char line_buffer[1024];
- size_t cur = 0;
-
- while (msg[cur] != 0) {
- size_t until = Util::next_char(msg, cur, '\n');
- Genode::memcpy(line_buffer, &msg[cur], until);
- line_buffer[until] = 0;
- cur += until + 1;
-
- func(line_buffer);
- }
-}
-
-
-template
-static void for_each_result_line(char const *msg, FUNC const &func)
-{
- char line_buffer[1024];
- size_t cur = 0;
-
- /* skip headline */
- size_t until = Util::next_char(msg, cur, '\n');
- cur += until + 1;
-
- while (msg[cur] != 0) {
- until = Util::next_char(msg, cur, '\n');
- Genode::memcpy(line_buffer, &msg[cur], until);
- line_buffer[until] = 0;
- cur += until + 1;
-
- char const *s[5] = { };
-
- for (size_t c = 0, i = 0; i < 5; i++) {
- size_t pos = Util::next_char(line_buffer, c, '\t');
- line_buffer[c+pos] = 0;
- s[i] = (char const*)&line_buffer[c];
- c += pos + 1;
- }
-
- bool const is_wpa1 = Util::string_contains((char const*)s[3], "WPA");
- bool const is_wpa2 = Util::string_contains((char const*)s[3], "WPA2");
-
- unsigned signal = Util::approximate_quality(s[2]);
-
- char const *prot = is_wpa1 ? "WPA" : "NONE";
- prot = is_wpa2 ? "WPA2" : prot;
-
- Accesspoint ap(s[0], s[1], prot, s[4], signal);
-
- func(ap);
- }
-}
-
-
-/*
- * Wifi driver front end
- */
-struct Wifi::Frontend
-{
- /* accesspoint */
-
- Genode::Heap _ap_allocator;
-
- using Accesspoint_r = Genode::Registered;
-
- Genode::Registry _aps { };
-
- Accesspoint *_lookup_ap_by_ssid(Accesspoint::Ssid const &ssid)
- {
- Accesspoint *p = nullptr;
- _aps.for_each([&] (Accesspoint &ap) {
- if (ap.valid() && ap.ssid == ssid) { p = ≈ }
- });
- return p;
- }
-
- Accesspoint *_lookup_ap_by_bssid(Accesspoint::Bssid const &bssid)
- {
- Accesspoint *p = nullptr;
- _aps.for_each([&] (Accesspoint &ap) {
- if (ap.valid() && ap.bssid == bssid) { p = ≈ }
- });
- return p;
- }
-
- Accesspoint *_alloc_ap()
- {
- return new (&_ap_allocator) Accesspoint_r(_aps);
- }
-
- void _free_ap(Accesspoint &ap)
- {
- Genode::destroy(&_ap_allocator, &ap);
- }
-
- template
- void _for_each_ap(FUNC const &func)
- {
- _aps.for_each([&] (Accesspoint &ap) {
- func(ap);
- });
- }
-
- unsigned _count_to_be_enabled()
- {
- unsigned count = 0;
- auto enable = [&](Accesspoint const &ap) {
- count += ap.auto_connect;
- };
- _for_each_ap(enable);
- return count;
- }
-
- unsigned _count_enabled()
- {
- unsigned count = 0;
- auto enabled = [&](Accesspoint const &ap) {
- count += ap.enabled;
- };
- _for_each_ap(enabled);
- return count;
- }
-
- unsigned _count_stored()
- {
- unsigned count = 0;
- auto enabled = [&](Accesspoint const &ap) {
- count += ap.stored();
- };
- _for_each_ap(enabled);
- return count;
- }
-
- /* remaining stuff */
-
- Msg_buffer _msg;
-
- Genode::Blockade _notify_blockade { };
-
- void _notify_lock_lock() { _notify_blockade.block(); }
- void _notify_lock_unlock() { _notify_blockade.wakeup(); }
-
- bool _rfkilled { false };
-
- Genode::Signal_handler _rfkill_handler;
-
- void _handle_rfkill()
- {
- _rfkilled = wifi_get_rfkill();
-
- /* re-enable scan timer */
- if (!_rfkilled) {
- _scan_timer.sigh(_scan_timer_sigh);
- _arm_scan_timer(false);
- } else {
- _scan_timer.sigh(Genode::Signal_context_capability());
- }
-
- if (_rfkilled && _state != State::IDLE) {
- Genode::warning("rfkilled in state ", state_strings(_state));
- }
- }
-
- /* config */
-
- Genode::Attached_rom_dataspace _config_rom;
- Genode::Signal_handler _config_sigh;
-
- bool _verbose { false };
- bool _verbose_state { false };
- bool _use_11n { true };
-
- bool _deferred_config_update { false };
- bool _single_autoconnect { false };
-
- Genode::uint64_t _connected_scan_interval { 30 };
- Genode::uint64_t _scan_interval { 5 };
-
- void _config_update(bool signal)
- {
- _config_rom.update();
-
- if (!_config_rom.valid()) { return; }
-
- Genode::Xml_node config = _config_rom.xml();
-
- _verbose = config.attribute_value("verbose", _verbose);
- _verbose_state = config.attribute_value("verbose_state", _verbose_state);
-
- /* only evaluated at start-up */
- _use_11n = config.attribute_value("use_11n", _use_11n);
-
- Genode::uint64_t connected_scan_interval =
- Util::check_time(config.attribute_value("connected_scan_interval",
- _connected_scan_interval),
- 0, 15*60);
-
- Genode::uint64_t scan_interval =
- Util::check_time(config.attribute_value("scan_interval",
- _scan_interval),
- 5, 15*60);
-
- if ( connected_scan_interval > _connected_scan_interval
- || scan_interval > _scan_interval) {
- _arm_scan_timer(_connected_ap.bssid_valid());
- }
-
- _connected_scan_interval = connected_scan_interval;
- _scan_interval = scan_interval;
-
- /*
- * Always handle rfkill, regardless in which state we are currently in.
- * When we come back from rfkill, will most certainly will be IDLE anyway.
- */
- if (config.has_attribute("rfkill")) {
- bool const blocked = config.attribute_value("rfkill", false);
- wifi_set_rfkill(blocked);
-
- /*
- * In case we get blocked set rfkilled immediately to prevent
- * any further scanning operation. The actual value will be set
- * by the singal handler but is not expected to be any different
- * as the rfkill call is not supposed to fail.
- */
- if (blocked && !_rfkilled) {
- _rfkilled = true;
-
- Genode::Reporter::Xml_generator xml(*_state_reporter, [&] () {
- xml.node("accesspoint", [&] () {
- xml.attribute("state", "disconnected");
- xml.attribute("rfkilled", _rfkilled);
- });
- });
-
- _connected_ap.invalidate();
- }
- }
-
- /*
- * Block any further config updates until we have finished applying
- * the current one.
- */
- if (_state != State::IDLE) {
- Genode::warning("deferring config update (", state_strings(_state), ")");
- _deferred_config_update = true;
- return;
- }
-
- bool single_autoconnect = false;
-
- /* update AP list */
- auto parse = [&] ( Genode::Xml_node node) {
-
- Accesspoint ap;
- ap.ssid = node.attribute_value("ssid", Accesspoint::Ssid());
- ap.bssid = node.attribute_value("bssid", Accesspoint::Bssid());
-
- size_t const ssid_len = ap.ssid.length() - 1;
- if (ssid_len == 0 || ssid_len > 32) {
- Genode::warning("ignoring accesspoint with invalid ssid");
- return;
- }
-
- Accesspoint *p = _lookup_ap_by_ssid(ap.ssid);
- if (p) {
- if (_verbose) { Genode::log("Update: '", p->ssid, "'"); }
- /* mark for updating */
- p->update = true;
- } else {
- p = _alloc_ap();
- if (!p) {
- Genode::warning("could not add accesspoint, no slots left");
- return;
- }
- }
-
- ap.pass = node.attribute_value("passphrase", Accesspoint::Pass(""));
- ap.prot = node.attribute_value("protection", Accesspoint::Prot("NONE"));
- ap.auto_connect = node.attribute_value("auto_connect", true);
- ap.explicit_scan = node.attribute_value("explicit_scan", false);
-
- if (ap.wpa()) {
- size_t const psk_len = ap.pass.length() - 1;
- if (psk_len < 8 || psk_len > 63) {
- Genode::warning("ignoring accesspoint '", ap.ssid,
- "' with invalid pass");
- return;
- }
- }
-
-
- /* check if updating is really necessary */
- if (p->update) {
- p->update = ((ap.bssid.length() > 1 && ap.bssid != p->bssid)
- || ap.pass != p->pass
- || ap.prot != p->prot
- || ap.auto_connect != p->auto_connect);
- }
-
- /* TODO add better way to check validity */
- if (ap.bssid.length() == 17 + 1) { p->bssid = ap.bssid; }
-
- p->ssid = ap.ssid;
- p->prot = ap.prot;
- p->pass = ap.pass;
- p->auto_connect = ap.auto_connect;
- p->explicit_scan = ap.explicit_scan;
-
- single_autoconnect |= (p->update || p->auto_connect) && !_connected_ap.valid();
- };
- config.for_each_sub_node("network", parse);
-
- /*
- * To accomodate a management component that only deals
- * with on network, e.g. the sculpt_manager, generate a
- * fake connecting event. Either a connected or disconnected
- * event will bring us to square one.
- */
- if (signal && _count_to_be_enabled() == 1 && single_autoconnect && !_rfkilled) {
-
- auto lookup = [&] (Accesspoint const &ap) {
- if (!ap.auto_connect) { return; }
-
- if (_verbose) { Genode::log("Single autoconnect event for '", ap.ssid, "'"); }
-
- try {
- Genode::Reporter::Xml_generator xml(*_state_reporter, [&] () {
- xml.node("accesspoint", [&] () {
- xml.attribute("ssid", ap.ssid);
- xml.attribute("state", "connecting");
- });
- });
-
- _single_autoconnect = true;
-
- } catch (...) { }
- };
- _for_each_ap(lookup);
- }
-
- /*
- * Marking removes stale APs first and triggers adding of
- * new ones afterwards.
- */
- _mark_stale_aps(config);
- }
-
- void _handle_config_update() { _config_update(true); }
-
- /* state */
-
- Accesspoint *_processed_ap { nullptr };
- Accesspoint _connected_ap { };
-
- enum State {
- IDLE = 0x00,
- SCAN = 0x01,
- NETWORK = 0x02,
- CONNECT = 0x03,
- STATUS = 0x04,
- INFO = 0x05,
-
- INITIATE_SCAN = 0x00|SCAN,
- PENDING_RESULTS = 0x10|SCAN,
-
- ADD_NETWORK = 0x00|NETWORK,
- FILL_NETWORK_SSID = 0x10|NETWORK,
- FILL_NETWORK_BSSID = 0x20|NETWORK,
- FILL_NETWORK_PSK = 0x30|NETWORK,
- REMOVE_NETWORK = 0x40|NETWORK,
- ENABLE_NETWORK = 0x50|NETWORK,
- DISABLE_NETWORK = 0x60|NETWORK,
- DISCONNECT_NETWORK = 0x70|NETWORK,
- LIST_NETWORKS = 0x80|NETWORK,
-
- CONNECTING = 0x00|CONNECT,
- CONNECTED = 0x10|CONNECT,
- DISCONNECTED = 0x20|CONNECT,
- };
-
- State _state { State::IDLE };
-
- char const *state_strings(State state)
- {
- switch (state) {
- case IDLE: return "idle";
- case INITIATE_SCAN: return "initiate scan";
- case PENDING_RESULTS: return "pending results";
- case ADD_NETWORK: return "add network";
- case FILL_NETWORK_SSID: return "fill network ssid";
- case FILL_NETWORK_BSSID: return "fill network bssid";
- case FILL_NETWORK_PSK: return "fill network pass";
- case REMOVE_NETWORK: return "remove network";
- case ENABLE_NETWORK: return "enable network";
- case DISABLE_NETWORK: return "disable network";
- case CONNECTING: return "connecting";
- case CONNECTED: return "connected";
- case DISCONNECTED: return "disconnected";
- case STATUS: return "status";
- case LIST_NETWORKS: return "list networks";
- case INFO: return "info";
- default: return "unknown";
- };
- }
-
- void _state_transition(State ¤t, State next)
- {
- if (_verbose_state) {
- using namespace Genode;
- log("Transition: ", state_strings(current), " -> ",
- state_strings(next));
- }
-
- current = next;
- }
-
- using Cmd_str = Genode::String;
-
- void _submit_cmd(Cmd_str const &str)
- {
- Genode::memset(_msg.send, 0, sizeof(_msg.send));
- Genode::memcpy(_msg.send, str.string(), str.length());
- ++_msg.send_id;
-
- wpa_ctrl_set_fd();
-
- /*
- * We might have to pull the socketcall task out of poll_all()
- * because otherwise we might be late and wpa_supplicant has
- * already removed all scan results due to BSS age settings.
- */
- wifi_kick_socketcall();
- }
-
- /* scan */
-
- Timer::Connection _scan_timer;
- Genode::Signal_handler _scan_timer_sigh;
-
- void _handle_scan_timer()
- {
- /*
- * If we are blocked or currently trying to join a network
- * suspend scanning.
- */
- if (_rfkilled || _connecting.length() > 1) {
- if (_verbose) { Genode::log("Suspend scan timer"); }
- return;
- }
-
- /* scanning was disabled, ignore current request */
- if (!_arm_scan_timer(_connected_ap.bssid_valid())) {
- if (_verbose) { Genode::log("Scanning disabled, ignore current scan request"); }
- return;
- }
-
- /* skip as we will be scheduled some time soon(tm) anyway */
- if (_state != State::IDLE) {
- if (_verbose) {
- Genode::log("Not idle, ignore scan request, state: ",
- Genode::Hex((unsigned)_state));
- }
- return;
- }
-
- /* left one attempt out */
- if (_scan_busy) {
- if (_verbose) { Genode::log("Scan already pending, ignore scan request"); }
- _scan_busy = false;
- return;
- }
-
- enum { SSID_ARG_LEN = 6 + 64, /* " ssid " + "a5a5a5a5..." */ };
- /* send buffer - 'SCAN ' + stuff */
- char ssid_buffer[sizeof(Msg_buffer::send)-16] = { };
- size_t buffer_pos = 0;
-
- auto valid_ssid = [&] (Accesspoint const &ap) {
-
- if (buffer_pos + SSID_ARG_LEN >= sizeof(ssid_buffer)) {
- return;
- }
-
- if (!ap.explicit_scan) { return; }
-
- char ssid_hex[64+1] = { };
- char const *ssid = ap.ssid.string();
-
- for (size_t i = 0; i < ap.ssid.length() - 1; i++) {
- Util::byte2hex((ssid_hex + i * 2), ssid[i]);
- }
-
- Genode::String tmp(" ssid ", (char const*)ssid_hex);
- size_t const tmp_len = tmp.length() - 1;
-
- Genode::memcpy((ssid_buffer + buffer_pos), tmp.string(), tmp_len);
- buffer_pos += tmp_len;
- };
- _for_each_ap(valid_ssid);
-
- _state_transition(_state, State::INITIATE_SCAN);
- _submit_cmd(Cmd_str("SCAN", (char const*)ssid_buffer));
- }
-
- bool _arm_scan_timer(bool connected)
- {
- Genode::uint64_t const sec = connected ? _connected_scan_interval : _scan_interval;
- if (!sec) { return false; }
-
- if (_verbose) {
- Genode::log("Arm ", connected ? "connected " : "",
- "scan: ", sec, " sec");
- }
-
- _scan_timer.trigger_once(sec * (1000 * 1000));
- return true;
- }
-
- Genode::Constructible _ap_reporter;
-
- void _generate_scan_results_report(char const *msg)
- {
- unsigned count_lines = 0;
- for_each_line(msg, [&] (char const*) { count_lines++; });
-
- if (!count_lines) {
- if (_verbose) { Genode::log("Scan results empty"); }
- return;
- }
-
- bool connecting_attempt = false;
- try {
-
- _ap_reporter->generate([&] (Genode::Xml_generator &xml) {
-
- for_each_result_line(msg, [&] (Accesspoint const &ap) {
-
- /* ignore potentially empty ssids */
- if (ap.ssid == "") { return; }
-
- xml.node("accesspoint", [&]() {
- xml.attribute("ssid", ap.ssid);
- xml.attribute("bssid", ap.bssid);
- xml.attribute("freq", ap.freq);
- xml.attribute("quality", ap.signal);
- if (ap.wpa()) { xml.attribute("protection", ap.prot); }
- });
-
- auto check_existence = [&] (Accesspoint &lap) {
- connecting_attempt |= (lap.ssid == ap.ssid) && ap.auto_connect;
- };
- _for_each_ap(check_existence);
- });
- });
-
- } catch (...) { /* silently omit report */ }
-
- try {
- if (!_connected_ap.bssid_valid() && connecting_attempt) {
-
- Genode::Reporter::Xml_generator xml(*_state_reporter, [&] () {
- xml.node("accesspoint", [&] () {
- xml.attribute("state", "connecting");
- });
- });
- }
- } catch (...) { /* silently omit state */ }
- }
-
- /* network commands */
-
- void _mark_stale_aps(Genode::Xml_node const &config)
- {
- auto mark_stale = [&] (Accesspoint &ap) {
- ap.stale = true;
-
- config.for_each_sub_node("network", [&] ( Genode::Xml_node node) {
- Accesspoint::Ssid ssid = node.attribute_value("ssid", Accesspoint::Ssid(""));
-
- if (ap.ssid == ssid) { ap.stale = false; }
- });
- };
- _for_each_ap(mark_stale);
-
- _remove_stale_aps();
- }
-
- void _remove_stale_aps()
- {
- if (_state != State::IDLE) {
- Genode::warning("cannot remove stale APs in non-idle state "
- "(", state_strings(_state), ")");
- return;
- }
-
- if (_processed_ap) { return; }
-
- _aps.for_each([&] (Accesspoint &ap) {
- if (!_processed_ap && ap.valid() && ap.stale) {
- _processed_ap = ≈
- }
- });
-
- if (!_processed_ap) {
- /* TODO move State transition somewhere more sane */
- _state_transition(_state, State::IDLE);
- _add_new_aps();
- return;
- }
-
- if (_verbose) {
- Genode::log("Remove network: '", _processed_ap->ssid, "'");
- }
-
- _state_transition(_state, State::REMOVE_NETWORK);
- _submit_cmd(Cmd_str("REMOVE_NETWORK ", _processed_ap->id));
- }
-
- void _update_aps()
- {
- if (_state != State::IDLE) {
- Genode::warning("cannot enable network in non-idle state");
- return;
- }
-
- if (_processed_ap) { return; }
-
- _aps.for_each([&] (Accesspoint &ap) {
- if (!_processed_ap && ap.stored() && ap.update) {
- _processed_ap = ≈
- }
- });
-
- if (!_processed_ap) { return; }
-
- if (_verbose) {
- Genode::log("Update network: '", _processed_ap->ssid, "'");
- }
-
- /* re-use state to change PSK */
- _state_transition(_state, State::FILL_NETWORK_PSK);
- _network_set_psk();
- }
-
-
- void _add_new_aps()
- {
- if (_state != State::IDLE) {
- Genode::warning("cannot enable network in non-idle state");
- return;
- }
-
- if (_processed_ap) { return; }
-
- _aps.for_each([&] (Accesspoint &ap) {
- if (!_processed_ap && ap.valid() && !ap.stored()) {
- _processed_ap = ≈
- }
- });
-
- if (!_processed_ap) {
- /* XXX move State transition somewhere more sane */
- _state_transition(_state, State::IDLE);
- _update_aps();
- return;
- }
-
- if (_verbose) {
- Genode::log("Add network: '", _processed_ap->ssid, "'");
- }
-
- _state_transition(_state, State::ADD_NETWORK);
- _submit_cmd(Cmd_str("ADD_NETWORK"));
- }
-
- void _network_enable()
- {
- if (_state != State::IDLE) {
- Genode::warning("cannot enable network in non-idle state");
- return;
- }
-
- if (_processed_ap) { return; }
-
- _aps.for_each([&] (Accesspoint &ap) {
- if ( !_processed_ap && ap.valid()
- && !ap.enabled && ap.auto_connect) {
- _processed_ap = ≈
- }
- });
-
- if (!_processed_ap) {
-
- return;
- }
-
- if (_verbose) {
- Genode::log("Enable network: '", _processed_ap->ssid, "'");
- }
-
- _state_transition(_state, State::ENABLE_NETWORK);
- _submit_cmd(Cmd_str("ENABLE_NETWORK ", _processed_ap->id));
- }
-
- void _network_disable()
- {
- if (_state != State::IDLE) {
- Genode::warning("cannot enable network in non-idle state");
- return;
- }
-
- if (_processed_ap) { return; }
-
- _aps.for_each([&] (Accesspoint &ap) {
- if ( !_processed_ap && ap.valid()
- && ap.enabled && ap.auto_connect) {
- _processed_ap = ≈
- }
- });
-
- if (!_processed_ap) {
- /* XXX move State transition somewhere more sane */
- _state_transition(_state, State::IDLE);
- _add_new_aps();
- return;
- }
-
- if (_verbose) {
- Genode::log("Disable network: '", _processed_ap->ssid, "'");
- }
-
- _state_transition(_state, State::DISABLE_NETWORK);
- _submit_cmd(Cmd_str("DISABLE_NETWORK ", _processed_ap->id));
- }
-
- void _network_disconnect()
- {
- _state_transition(_state, State::DISCONNECT_NETWORK);
- _submit_cmd(Cmd_str("DISCONNECT"));
- }
-
- void _network_set_ssid(char const *msg)
- {
- long id = -1;
- Genode::ascii_to(msg, id);
-
- _processed_ap->id = id;
- _submit_cmd(Cmd_str("SET_NETWORK ", _processed_ap->id,
- " ssid \"", _processed_ap->ssid, "\""));
- }
-
- void _network_set_bssid()
- {
- bool const valid = _processed_ap->bssid.length() == 17 + 1;
- char const *bssid = valid ? _processed_ap->bssid.string() : "";
-
- _submit_cmd(Cmd_str("SET_NETWORK ", _processed_ap->id,
- " bssid ", bssid));
- }
-
- void _network_set_psk()
- {
- if (_processed_ap->wpa()) {
- _submit_cmd(Cmd_str("SET_NETWORK ", _processed_ap->id,
- " psk \"", _processed_ap->pass, "\""));
- } else {
- _submit_cmd(Cmd_str("SET_NETWORK ", _processed_ap->id,
- " key_mgmt NONE"));
- }
- }
-
- /* result handling */
-
- bool _scan_busy { false };
-
- void _handle_scan_results(State state, char const *msg)
- {
- switch (state) {
- case State::INITIATE_SCAN:
- if (!cmd_successful(msg)) {
- _scan_busy = Genode::strcmp(msg, "FAIL-BUSY");
- if (!_scan_busy) {
- Genode::warning("could not initiate scan: ", msg);
- }
- }
- _state_transition(_state, State::IDLE);
- break;
- case State::PENDING_RESULTS:
- if (scan_results(msg)) {
- _state_transition(_state, State::IDLE);
- _generate_scan_results_report(msg);
- }
- break;
- default:
- Genode::warning("unknown SCAN state: ", msg);
- break;
- }
- }
-
- void _handle_network_results(State state, char const *msg)
- {
- bool successfully = false;
-
- switch (state) {
- case State::ADD_NETWORK:
- if (cmd_fail(msg)) {
- Genode::error("could not add network: ", msg);
- _state_transition(_state, State::IDLE);
- } else {
- _state_transition(_state, State::FILL_NETWORK_SSID);
- _network_set_ssid(msg);
-
- successfully = true;
- }
- break;
- case State::REMOVE_NETWORK:
- _state_transition(_state, State::IDLE);
-
- if (cmd_fail(msg)) {
- Genode::error("could not remove network: ", msg);
- } else {
- _free_ap(*_processed_ap);
-
- /* trigger the next round */
- _processed_ap = nullptr;
- _remove_stale_aps();
-
- successfully = true;
- }
- break;
- case State::FILL_NETWORK_SSID:
- _state_transition(_state, State::IDLE);
-
- if (!cmd_successful(msg)) {
- Genode::error("could not set ssid for network: ", msg);
- _state_transition(_state, State::IDLE);
- } else {
- _state_transition(_state, State::FILL_NETWORK_BSSID);
- _network_set_bssid();
-
- successfully = true;
- }
- break;
- case State::FILL_NETWORK_BSSID:
- _state_transition(_state, State::IDLE);
-
- if (!cmd_successful(msg)) {
- Genode::error("could not set bssid for network: ", msg);
- _state_transition(_state, State::IDLE);
- } else {
-
- _state_transition(_state, State::FILL_NETWORK_PSK);
- _network_set_psk();
-
- successfully = true;
- }
- break;
- case State::FILL_NETWORK_PSK:
- _state_transition(_state, State::IDLE);
-
- if (!cmd_successful(msg)) {
- Genode::error("could not set passphrase for network: ", msg);
- } else {
-
- /*
- * Disable network to trick wpa_supplicant into reloading
- * the settings.
- */
- if (_processed_ap->update) {
- _processed_ap->enabled = false;
-
- _state_transition(_state, State::DISABLE_NETWORK);
- _submit_cmd(Cmd_str("DISABLE_NETWORK ", _processed_ap->id));
- } else
-
- if (_processed_ap->auto_connect) {
-
- _state_transition(_state, State::ENABLE_NETWORK);
- _submit_cmd(Cmd_str("ENABLE_NETWORK ", _processed_ap->id));
- } else {
- /* trigger the next round */
- _processed_ap = nullptr;
- _add_new_aps();
- }
-
- successfully = true;
- }
- break;
- case State::ENABLE_NETWORK:
- _state_transition(_state, State::IDLE);
-
- if (!cmd_successful(msg)) {
- Genode::error("could not enable network: ", msg);
- } else {
- _processed_ap->enabled = true;
-
- /* trigger the next round */
- _processed_ap = nullptr;
- _add_new_aps();
-
- successfully = true;
- }
- break;
- case State::DISABLE_NETWORK:
- _state_transition(_state, State::IDLE);
-
- if (!cmd_successful(msg)) {
- Genode::error("could not disable network: ", msg);
- } else {
-
- /*
- * Updated settings are applied, enable the network
- * anew an try again.
- */
- if (_processed_ap->update) {
- _processed_ap->update = false;
-
- if (_processed_ap->auto_connect) {
- _state_transition(_state, State::ENABLE_NETWORK);
- _submit_cmd(Cmd_str("ENABLE_NETWORK ", _processed_ap->id));
- }
- } else {
-
- _processed_ap->enabled = false;
-
- /* trigger the next round */
- _processed_ap = nullptr;
- _network_disable();
- }
-
- successfully = true;
- }
- break;
- case State::DISCONNECT_NETWORK:
- _state_transition(_state, State::IDLE);
-
- if (!cmd_successful(msg)) {
- Genode::error("could not disconnect from network: ", msg);
- } else {
- _network_disable();
- successfully = true;
- }
- break;
- case State::LIST_NETWORKS:
- _state_transition(_state, State::IDLE);
-
- if (list_network_results(msg)) {
- Genode::error("List networks:\n", msg);
- }
- break;
- default:
- Genode::warning("unknown network state: ", msg);
- break;
- }
-
- /*
- * If some step failed we have to generate a fake
- * disconnect event.
- */
- if (_single_autoconnect && !successfully) {
- try {
- Genode::Reporter::Xml_generator xml(*_state_reporter, [&] () {
- xml.node("accesspoint", [&] () {
- xml.attribute("state", "disconnected");
- xml.attribute("rfkilled", _rfkilled);
- xml.attribute("config_error", true);
- });
- });
-
- _single_autoconnect = false;
- } catch (...) { }
- }
- }
-
- void _handle_status_result(State state, char const *msg)
- {
- _state_transition(_state, State::IDLE);
-
- /*
- * Querying the status might have failed but we already sent
- * out a rudimentary report, just stop here.
- */
- if (0 == msg[0]) { return; }
-
- Accesspoint ap { };
-
- auto fill_ap = [&] (char const *line) {
- if (Genode::strcmp(line, "ssid=", 5) == 0) {
- ap.ssid = Accesspoint::Ssid(line+5);
- } else
-
- if (Genode::strcmp(line, "bssid=", 6) == 0) {
- ap.bssid = Accesspoint::Bssid(line+6);
- } else
-
- if (Genode::strcmp(line, "freq=", 5) == 0) {
- ap.freq = Accesspoint::Freq(line+5);
- }
- };
- for_each_line(msg, fill_ap);
-
- if (!ap.ssid.valid()) {
- Genode::error("Cannot query SSID :-(");
- return;
- }
-
- Accesspoint *p = _lookup_ap_by_ssid(ap.ssid);
- if (p) {
- p->bssid = ap.bssid;
- p->freq = ap.freq;
- }
-
- _connected_ap.ssid = ap.ssid;
-
- Genode::Reporter::Xml_generator xml(*_state_reporter, [&] () {
- xml.node("accesspoint", [&] () {
- xml.attribute("ssid", ap.ssid);
- xml.attribute("bssid", ap.bssid);
- xml.attribute("freq", ap.freq);
- xml.attribute("state", "connected");
- });
- });
- }
-
- void _handle_info_result(State state, char const *msg)
- {
- _state_transition(_state, State::IDLE);
-
- if (!_connected_event && !_disconnected_event) { return; }
-
- /*
- * It might happen that the supplicant already flushed
- * its internal BSS information and cannot help us out.
- * Since we already sent out a rudimentary report, just
- * stop here.
- */
- if (0 == msg[0]) { return; }
-
- Accesspoint ap { };
-
- auto fill_ap = [&] (char const *line) {
- if (Genode::strcmp(line, "ssid=", 5) == 0) {
- ap.ssid = Accesspoint::Ssid(line+5);
- } else
-
- if (Genode::strcmp(line, "bssid=", 6) == 0) {
- ap.bssid = Accesspoint::Bssid(line+6);
- } else
-
- if (Genode::strcmp(line, "freq=", 5) == 0) {
- ap.freq = Accesspoint::Freq(line+5);
- }
- };
- for_each_line(msg, fill_ap);
-
- /*
- * When the config is changed while we are still connecting and
- * for some reasons the accesspoint does not get disabled
- * a connected event could arrive and we will get a nullptr...
- */
- Accesspoint *p = _lookup_ap_by_ssid(ap.ssid);
-
- /*
- * ... but we still generate a report and let the management
- * component deal with it.
- */
- Genode::Reporter::Xml_generator xml(*_state_reporter, [&] () {
- xml.node("accesspoint", [&] () {
- xml.attribute("ssid", ap.ssid);
- xml.attribute("bssid", ap.bssid);
- xml.attribute("freq", ap.freq);
- xml.attribute("state", _connected_event ? "connected"
- : "disconnected");
- if (!_connected_event) {
- xml.attribute("rfkilled", _rfkilled);
- xml.attribute("auth_failure", _disconnected_fail);
- }
- });
- });
-
- if (_disconnected_fail) {
- /*
- * Being able to remove a failed network from the internal
- * state of the supplicant relies on a sucessful BSS request.
- * In case that failes the supplicant will try to join the
- * network again and again...
- */
- if (!p || _processed_ap) {
- Genode::error("cannot disabled failed network");
- } else {
- _processed_ap = p;
- _state_transition(_state, State::DISABLE_NETWORK);
- _submit_cmd(Cmd_str("DISABLE_NETWORK ", p->id));
- }
- } else
-
- if (_connected_event) {
- /*
- * In case the BSS cmd did not return a valid SSID, which
- * was observed only with hidden networks so far, check the
- * current status.
- */
- if (!p) {
- _state_transition(_state, State::STATUS);
- _submit_cmd(Cmd_str("STATUS"));
-
- } else {
- p->bssid = ap.bssid;
- p->freq = ap.freq;
- }
-
- _connected_ap = ap;
- }
- }
-
- /* connection state */
-
- Genode::Constructible _state_reporter { };
-
- Accesspoint::Bssid _connecting { };
-
- Accesspoint::Bssid const _extract_bssid(char const *msg, State state)
- {
- char bssid[32] = { };
- /* by the power of wc -c, I have the start pos... */
- enum { BSSID_CONNECT = 37, BSSID_DISCONNECT = 30, BSSID_CONNECTING = 33, };
-
- bool const connected = state == State::CONNECTED;
- bool const connecting = state == State::CONNECTING;
-
- size_t const len = 17;
- size_t const start = connected ? BSSID_CONNECT
- : connecting ? BSSID_CONNECTING
- : BSSID_DISCONNECT;
- Genode::memcpy(bssid, msg + start, len);
- return Accesspoint::Bssid((char const*)bssid);
- }
-
- bool _auth_failure(char const *msg)
- {
- enum { REASON_OFFSET = 55, };
- unsigned reason = 0;
- Genode::ascii_to((msg + REASON_OFFSET), reason);
- switch (reason) {
- case 2: /* prev auth no longer valid */
- case 15: /* 4-way handshake timeout/failed */
- return true;
- default:
- return false;
- }
- }
-
- /* events */
-
- bool _connected_event { false };
- bool _disconnected_event { false };
- bool _disconnected_fail { false };
-
- enum { MAX_ATTEMPTS = 3, };
- unsigned _scan_attempts { 0 };
-
- Accesspoint::Bssid _pending_bssid { };
-
- void _handle_connection_events(char const *msg)
- {
- bool const connected = check_recv_msg(msg, recv_table[Rmi::CONNECTED]);
- bool const disconnected = check_recv_msg(msg, recv_table[Rmi::DISCONNECTED]);
- bool const auth_failed = disconnected && _auth_failure(msg);
-
- State state = connected ? State::CONNECTED : State::DISCONNECTED;
- Accesspoint::Bssid const &bssid = _extract_bssid(msg, state);
-
- /*
- * Always reset the "global" connection state first
- */
- _connected_ap.invalidate();
- if (connected) { _connected_ap.bssid = bssid; }
- if (connected || disconnected) { _connecting = Accesspoint::Bssid(); }
-
- /*
- * Save local connection state here for later re-use when
- * the BSS information are handled.
- */
- _connected_event = connected;
- _disconnected_event = disconnected;
- _disconnected_fail = auth_failed;
-
- if (!_rfkilled) {
-
- /*
- * As we only received the BSSID, try to gather more information
- * so we may generate a more thorough follow-up state report.
- */
- if (_state != State::IDLE) {
- _pending_bssid = bssid;
- } else {
- _state_transition(_state, State::INFO);
- _submit_cmd(Cmd_str("BSS ", bssid));
- }
-
- _arm_scan_timer(connected);
- }
-
- /*
- * Generate the first rudimentary report whose missing information
- * are (potentially) filled in later (see above).
- */
- Genode::Reporter::Xml_generator xml(*_state_reporter, [&] () {
- xml.node("accesspoint", [&] () {
- xml.attribute("bssid", bssid);
- xml.attribute("state", connected ? "connected"
- : "disconnected");
- if (disconnected) {
- xml.attribute("rfkilled", _rfkilled);
- if (auth_failed) {
- xml.attribute("auth_failure", auth_failed);
- }
- }
- });
- });
-
- /* reset */
- _single_autoconnect = false;
- }
-
- Genode::Signal_handler _events_handler;
-
- unsigned _last_event_id { 0 };
-
- void _handle_events()
- {
- char const *msg = reinterpret_cast(_msg.event);
- unsigned const event_id = _msg.event_id;
-
- /* return early */
- if (_last_event_id == event_id) {
- _notify_lock_unlock();
- return;
- }
-
- if (results_available(msg)) {
-
- /*
- * We might have to pull the socketcall task out of poll_all()
- * because otherwise we might be late and wpa_supplicant has
- * already removed all scan results due to BSS age settings.
- */
- wifi_kick_socketcall();
-
- if (_state == State::IDLE) {
- _state_transition(_state, State::PENDING_RESULTS);
- _submit_cmd(Cmd_str("SCAN_RESULTS"));
- }
- } else
-
- if (connecting_to_network(msg)) {
- if (!_single_autoconnect) {
- Accesspoint::Bssid const &bssid = _extract_bssid(msg, State::CONNECTING);
- _connecting = bssid;
-
- Genode::Reporter::Xml_generator xml(*_state_reporter, [&] () {
- xml.node("accesspoint", [&] () {
- xml.attribute("bssid", bssid);
- xml.attribute("state", "connecting");
- });
- });
- }
- } else
-
- if (network_not_found(msg)) {
-
- /* always try to update the accesspoint list */
- if (_state == State::IDLE) {
- _state_transition(_state, State::PENDING_RESULTS);
- _submit_cmd(Cmd_str("SCAN_RESULTS"));
- }
-
- if (_single_autoconnect && ++_scan_attempts >= MAX_ATTEMPTS) {
- _scan_attempts = 0;
- _single_autoconnect = false;
-
- Genode::Reporter::Xml_generator xml(*_state_reporter, [&] () {
- xml.node("accesspoint", [&] () {
- xml.attribute("state", "disconnected");
- xml.attribute("rfkilled", _rfkilled);
- xml.attribute("not_found", true);
- });
- });
- }
-
- } else
-
- {
- _handle_connection_events(msg);
- }
-
- _notify_lock_unlock();
- }
-
- Genode::Signal_handler _cmd_handler;
-
- unsigned _last_recv_id { 0 };
-
- void _handle_cmds()
- {
- char const *msg = reinterpret_cast(_msg.recv);
- unsigned const recv_id = _msg.recv_id;
-
-
- /* return early */
- if (_last_recv_id == recv_id) {
- _notify_lock_unlock();
- return;
- }
-
- _last_recv_id = recv_id;
-
- switch (_state & 0xf) {
- case State::SCAN:
- _handle_scan_results(_state, msg);
- break;
- case State::NETWORK:
- _handle_network_results(_state, msg);
- break;
- case State::STATUS:
- _handle_status_result(_state, msg);
- break;
- case State::INFO:
- _handle_info_result(_state, msg);
- break;
- case State::IDLE:
- default:
- break;
- }
- _notify_lock_unlock();
-
- if (_verbose_state) {
- Genode::log("State:",
- " connected: ", _connected_ap.bssid_valid(),
- " connecting: ", _connecting.length() > 1,
- " enabled: ", _count_enabled(),
- " stored: ", _count_stored(),
- "");
- }
-
- if (_state == State::IDLE && _deferred_config_update) {
- _deferred_config_update = false;
- _handle_config_update();
- }
-
- if (_state == State::IDLE && _pending_bssid.length() > 1) {
- _state_transition(_state, State::INFO);
- _submit_cmd(Cmd_str("BSS ", _pending_bssid));
-
- _pending_bssid = Accesspoint::Bssid();
- }
- }
-
- /**
- * Constructor
- */
- Frontend(Genode::Env &env)
- :
- _ap_allocator(env.ram(), env.rm()),
- _rfkill_handler(env.ep(), *this, &Wifi::Frontend::_handle_rfkill),
- _config_rom(env, "wifi_config"),
- _config_sigh(env.ep(), *this, &Wifi::Frontend::_handle_config_update),
- _scan_timer(env),
- _scan_timer_sigh(env.ep(), *this, &Wifi::Frontend::_handle_scan_timer),
- _events_handler(env.ep(), *this, &Wifi::Frontend::_handle_events),
- _cmd_handler(env.ep(), *this, &Wifi::Frontend::_handle_cmds)
- {
- _config_rom.sigh(_config_sigh);
- _scan_timer.sigh(_scan_timer_sigh);
-
- /* set/initialize as unblocked */
- _notify_blockade.wakeup();
-
- try {
- _ap_reporter.construct(env, "accesspoints", "accesspoints");
- _ap_reporter->generate([&] (Genode::Xml_generator &xml) { });
- } catch (...) {
- Genode::warning("no Report session available, scan results will "
- "not be reported");
- }
-
- try {
- _state_reporter.construct(env, "state");
- _state_reporter->enabled(true);
-
- Genode::Reporter::Xml_generator xml(*_state_reporter, [&] () {
- xml.node("accesspoint", [&] () {
- xml.attribute("state", "disconnected");
- xml.attribute("rfkilled", _rfkilled);
- });
- });
- } catch (...) {
- Genode::warning("no Report session available, connectivity will "
- "not be reported");
- }
-
- /* read in list of APs */
- _config_update(false);
-
- /* kick-off initial scanning */
- _handle_scan_timer();
- }
-
- /**
- * Return if 11n operation is enabled
- */
- bool use_11n() const { return _use_11n; }
-
- /**
- * Get RFKILL signal capability
- *
- * Used by the wifi_drv to notify front end.
- */
- Genode::Signal_context_capability rfkill_sigh()
- {
- return _rfkill_handler;
- }
-
- /**
- * Get result signal capability
- *
- * Used by the wpa_supplicant to notify front end after processing
- * a command.
- */
- Genode::Signal_context_capability result_sigh()
- {
- return _cmd_handler;
- }
-
- /**
- * Get event signal capability
- *
- * Used by the wpa_supplicant to notify front whenever a event
- * was triggered.
- */
- Genode::Signal_context_capability event_sigh()
- {
- return _events_handler;
- }
-
- /**
- * Block until events were handled by the front end
- *
- * Used by the wpa_supplicant to wait for the front end.
- */
- void block_for_processing() { _notify_lock_lock(); }
-
- /**
- * Return shared memory message buffer
- *
- * Used for communication between front end and wpa_supplicant.
- */
- Msg_buffer &msg_buffer() { return _msg; }
-};
-
-#endif /* _WIFI_FRONTEND_H_ */
diff --git a/repos/dde_linux/src/drivers/wifi/main.cc b/repos/dde_linux/src/drivers/wifi/main.cc
deleted file mode 100644
index fc866c1990..0000000000
--- a/repos/dde_linux/src/drivers/wifi/main.cc
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * \brief Startup Wifi driver
- * \author Josef Soentgen
- * \date 2014-03-03
- */
-
-/*
- * Copyright (C) 2014-2017 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-/* Genode includes */
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-/* local includes */
-#include
-#include
-#include
-
-
-static Wifi::Frontend *_wifi_frontend = nullptr;
-
-
-/**
- * Notify front end about command processing
- *
- * Called by the CTRL interface after wpa_supplicant has processed
- * the command.
- */
-void wifi_block_for_processing(void)
-{
- if (!_wifi_frontend) {
- Genode::warning("frontend not available, dropping notification");
- return;
- }
-
- /*
- * Next time we block as long as the front end has not finished
- * handling our previous request
- */
- _wifi_frontend->block_for_processing();
-
- /* XXX hack to trick poll() into returning faster */
- wpa_ctrl_set_fd();
-}
-
-
-void wifi_notify_cmd_result(void)
-{
- if (!_wifi_frontend) {
- Genode::warning("frontend not available, dropping notification");
- return;
- }
-
- Genode::Signal_transmitter(_wifi_frontend->result_sigh()).submit();
-}
-
-
-/**
- * Notify front end about triggered event
- *
- * Called by the CTRL interface whenever wpa_supplicant has triggered
- * a event.
- */
-void wifi_notify_event(void)
-{
- if (!_wifi_frontend) {
- Genode::warning("frontend not available, dropping notification");
- return;
- }
-
- Genode::Signal_transmitter(_wifi_frontend->event_sigh()).submit();
-}
-
-
-/**
- * Return shared-memory message buffer
- *
- * It is used by the wpa_supplicant CTRL interface.
- */
-void *wifi_get_buffer(void)
-{
- return _wifi_frontend ? &_wifi_frontend->msg_buffer() : nullptr;
-}
-
-
-/* exported by wifi.lib.so */
-extern void wifi_init(Genode::Env&,
- Genode::Blockade&,
- bool,
- Genode::Signal_context_capability);
-
-
-struct Main
-{
- Genode::Env &env;
-
- Genode::Constructible _wpa;
- Genode::Constructible _frontend;
-
- Genode::Blockade _wpa_startup_blockade { };
-
- Main(Genode::Env &env) : env(env)
- {
- _frontend.construct(env);
- _wifi_frontend = &*_frontend;
-
- _wpa.construct(env, _wpa_startup_blockade);
-
- /*
- * Forcefully disable 11n but for convenience the attribute is used the
- * other way araound.
- */
- bool const disable_11n = !_frontend->use_11n();
- wifi_init(env, _wpa_startup_blockade, disable_11n,
- _frontend->rfkill_sigh());
- }
-};
-
-
-void Libc::Component::construct(Libc::Env &env)
-{
- Libc::with_libc([&] () { static Main server(env); });
-}
diff --git a/repos/dde_linux/src/drivers/wifi/target.mk b/repos/dde_linux/src/drivers/wifi/target.mk
deleted file mode 100644
index 5b307b5cc9..0000000000
--- a/repos/dde_linux/src/drivers/wifi/target.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-REQUIRES = x86
-
-TARGET := legacy_pc_wifi_drv
-SRC_CC = main.cc wpa.cc
-LIBS = base legacy_wifi iwl_firmware
-LIBS += wpa_supplicant libc nic_driver
-LIBS += libcrypto libssl wpa_driver_nl80211
-
-# needed for firmware.h
-INC_DIR += $(REP_DIR)/src/lib/legacy/wifi/include
-INC_DIR += $(PRG_DIR)
-
-CC_CXX_WARN_STRICT :=
diff --git a/repos/dde_linux/src/drivers/wifi/util.h b/repos/dde_linux/src/drivers/wifi/util.h
deleted file mode 100644
index 1cdb40d658..0000000000
--- a/repos/dde_linux/src/drivers/wifi/util.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * \brief Wifi front end utilities
- * \author Josef Soentgen
- * \date 2018-07-23
- */
-
-/*
- * Copyright (C) 2018 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-#ifndef _WIFI__UTIL_H_
-#define _WIFI__UTIL_H_
-
-/* Genode includes */
-#include
-
-typedef unsigned long size_t;
-typedef long long ssize_t;
-typedef unsigned char uint8_t;
-
-
-namespace Util {
-
- using size_t = Genode::size_t;
- using uint8_t = Genode::uint8_t;
-
- size_t next_char(char const *s, size_t start, char const c)
- {
- size_t v = start;
- while (s[v]) {
- if (s[v] == c) { break; }
- v++;
- }
- return v - start;
- }
-
- bool string_contains(char const *str, char const *pattern)
- {
- char const *p = pattern;
- while (*str && *p) {
- p = *str == *p ? p + 1 : pattern;
- str++;
- }
- return !*p;
- }
-
- void byte2hex(char *dest, uint8_t b)
- {
- int i = 1;
- if (b < 16) { dest[i--] = '0'; }
-
- for (; b > 0; b /= 16) {
- uint8_t const v = b % 16;
- uint8_t const c = (v > 9) ? v + 'a' - 10 : v + '0';
- dest[i--] = (char)c;
- }
- }
-
- /**********************************
- ** Front end specific utilities **
- **********************************/
-
- inline unsigned approximate_quality(char const *str)
- {
- long level = 0;
- Genode::ascii_to(str, level);
-
- /*
- * We provide an quality value by transforming the actual
- * signal level [-50,-100] (dBm) to [100,0] (%).
- */
- if (level <= -100) { return 0; }
- else if (level >= -50) { return 100; }
-
- return 2 * (level + 100);
- }
-
- inline Genode::uint64_t check_time(Genode::uint64_t value, Genode::uint64_t min, Genode::uint64_t max)
- {
- if (value < min) { return min; }
- else if (value > max) { return max; }
- return value;
- }
-
-} /* namespace Util */
-
-#endif /* _WIFI__UTIL_H_ */
diff --git a/repos/dde_linux/src/drivers/wifi/wpa.cc b/repos/dde_linux/src/drivers/wifi/wpa.cc
deleted file mode 100644
index 61c342281d..0000000000
--- a/repos/dde_linux/src/drivers/wifi/wpa.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * \brief Wpa_supplicant thread of the wifi driver
- * \author Josef Soentgen
- * \author Christian Helmuth
- * \date 2019-12-18
- */
-
-/*
- * Copyright (C) 2019 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-/* Genode includes */
-#include
-#include
-#include
-
-/* libc includes */
-#include
-#include
-#include
-
-#include "wpa.h"
-
-
-/* entry function */
-extern "C" int wpa_main(void);
-
-
-void * Wpa_thread::_entry_trampoline(void *arg)
-{
- Wpa_thread *t = (Wpa_thread *)arg;
- t->_entry();
- return nullptr;
-}
-
-
-void Wpa_thread::_entry()
-{
- /* wait until the wifi driver is up and running */
- _blockade.block();
- _exit = wpa_main();
- Genode::sleep_forever();
-}
-
-
-Wpa_thread::Wpa_thread(Genode::Env &env, Genode::Blockade &blockade)
-: _blockade(blockade), _exit(-1)
-{
- pthread_t tid = 0;
- if (pthread_create(&tid, 0, _entry_trampoline, this) != 0) {
- printf("Error: pthread_create() failed\n");
- exit(-1);
- }
-}
diff --git a/repos/dde_linux/src/drivers/wifi/wpa.h b/repos/dde_linux/src/drivers/wifi/wpa.h
deleted file mode 100644
index 3a124cc142..0000000000
--- a/repos/dde_linux/src/drivers/wifi/wpa.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * \brief Wpa_supplicant thread of the wifi driver
- * \author Josef Soentgen
- * \date 2014-03-03
- */
-
-/*
- * Copyright (C) 2014-2017 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-#ifndef _WIFI__WPA_H_
-#define _WIFI__WPA_H_
-
-
-namespace Genode {
- struct Env;
- struct Blockade;
-}
-
-class Wpa_thread
-{
- private:
-
- Genode::Blockade &_blockade;
- int _exit;
-
- static void * _entry_trampoline(void *arg);
-
- void _entry();
-
- public:
-
- Wpa_thread(Genode::Env &, Genode::Blockade &);
-};
-
-#endif /* _WIFI__WPA_H_ */
diff --git a/repos/dde_linux/src/lib/legacy/wifi/dummies.cc b/repos/dde_linux/src/lib/legacy/wifi/dummies.cc
deleted file mode 100644
index a0cd49152f..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/dummies.cc
+++ /dev/null
@@ -1,578 +0,0 @@
-/*
- * \brief Dummy functions
- * \author Josef Soentgen
- * \date 2014-03-03
- */
-
-/*
- * Copyright (C) 2014-2017 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-/* Genode includes */
-#include
-#include
-
-extern "C" {
- typedef long DUMMY;
-
-enum {
- SHOW_DUMMY = 0,
- SHOW_SKIP = 0,
- SHOW_RET = 0,
-};
-
-#define DUMMY(retval, name) \
- DUMMY name(void) { \
- if (SHOW_DUMMY) \
- Genode::log(__func__, ": " #name " called " \
- "(from ", __builtin_return_address(0), ") " \
- "not implemented"); \
- return retval; \
- }
-
-#define DUMMY_SKIP(retval, name) \
- DUMMY name(void) { \
- if (SHOW_SKIP) \
- Genode::log(__func__, ": " #name " called " \
- "(from ", __builtin_return_address(0), ") " \
- "skipped"); \
- return retval; \
- }
-
-#define DUMMY_RET(retval, name) \
- DUMMY name(void) { \
- if (SHOW_RET) \
- Genode::log(__func__, ": " #name " called " \
- "(from ", __builtin_return_address(0), ") " \
- "return ", retval); \
- return retval; \
- }
-
-#define DUMMY_STOP(retval, name) \
- DUMMY name(void) { \
- do { \
- Genode::warning(__func__, ": " #name " called " \
- "(from ", __builtin_return_address(0), ") " \
- "stopped"); \
- Genode::sleep_forever(); \
- } while (0); \
- return retval; \
- }
-
-/* return sucessful */
-DUMMY_RET(0, netdev_kobject_init)
-DUMMY_RET(0, vlan_tx_nonzero_tag_present)
-DUMMY_RET(0, vlan_tx_tag_present)
-DUMMY_RET(1, capable)
-DUMMY_RET(1, rcu_read_lock_bh_held)
-DUMMY_RET(1, softirq_count);
-DUMMY_RET(1, try_module_get)
-DUMMY_RET(0, security_sk_alloc)
-DUMMY_RET(0, net_ratelimit)
-DUMMY_RET(0, static_key_false)
-DUMMY_RET(1, dma_supported)
-DUMMY_RET(1, ns_capable)
-DUMMY_RET(0, sock_tx_timestamp)
-
-/* not needed */
-DUMMY_SKIP(0, module_put_and_exit)
-DUMMY_SKIP(-1, might_sleep)
-DUMMY_SKIP(-1, read_lock_bh)
-DUMMY_SKIP(-1, read_unlock_bh)
-DUMMY_SKIP(-1, rwlock_init)
-DUMMY_SKIP(-1, spin_lock_irqsave)
-DUMMY_SKIP(-1, spin_unlock_irqrestore)
-DUMMY_SKIP(-1, write_lock_bh)
-DUMMY_SKIP(-1, write_unlock_bh)
-DUMMY_SKIP(0, debugfs_create_dir)
-DUMMY_SKIP(0, debugfs_remove_recursive)
-DUMMY_SKIP(0, debugfs_rename)
-DUMMY_SKIP(0, destroy_workqueue)
-DUMMY_SKIP(0, device_create)
-DUMMY_SKIP(0, device_initialize)
-DUMMY_SKIP(0, down_read)
-DUMMY_SKIP(0, down_write)
-DUMMY_SKIP(0, free_irq)
-DUMMY_SKIP(0, init_rwsem)
-DUMMY_SKIP(0, iounmap)
-DUMMY_SKIP(0, kparam_block_sysfs_write)
-DUMMY_SKIP(0, kparam_unblock_sysfs_write)
-DUMMY_SKIP(0, pci_disable_device)
-DUMMY_SKIP(0, pci_disable_link_state)
-DUMMY_SKIP(0, pci_disable_msi)
-DUMMY_SKIP(0, pci_enable_device)
-DUMMY_SKIP(0, pci_enable_msi)
-DUMMY_SKIP(0, pci_release_regions)
-DUMMY_SKIP(0, pci_request_regions)
-DUMMY_SKIP(0, pci_set_master)
-DUMMY_SKIP(0, put_device)
-DUMMY_SKIP(0, scm_destroy)
-DUMMY_SKIP(0, scm_recv)
-DUMMY_SKIP(0, scm_send)
-DUMMY_SKIP(0, security_netlink_send)
-DUMMY_SKIP(0, sk_filter)
-DUMMY_SKIP(0, sk_filter_release_rcu)
-DUMMY_SKIP(-1, sk_filter_size)
-DUMMY_SKIP(0, spin_lock)
-DUMMY_SKIP(0, spin_lock_bh)
-DUMMY_SKIP(0, spin_lock_init)
-DUMMY_SKIP(0, spin_lock_irq)
-DUMMY_SKIP(0, spin_unlock)
-DUMMY_SKIP(0, spin_unlock_bh)
-DUMMY_SKIP(0, spin_unlock_irq)
-DUMMY_SKIP(0, up_read)
-DUMMY_SKIP(0, up_write)
-DUMMY_SKIP(1, in_interrupt) /* XXX * */
-DUMMY_SKIP(0, in_softirq) /* XXX */
-DUMMY_SKIP(0, is_vmalloc_addr) /* XXX */
-DUMMY_SKIP(0, in_irq) /* XXX */
-
-DUMMY_SKIP(0, local_bh_disable)
-DUMMY_SKIP(0, local_bh_enable)
-
-DUMMY_SKIP(0, dma_set_coherent_mask) /* we set the mask always to ~0UL */
-DUMMY_SKIP(0, dma_set_mask) /* in the PCI driver */
-DUMMY_SKIP(0, dma_sync_single_for_cpu)
-DUMMY_SKIP(0, dma_sync_single_for_device)
-/*
- * There is no actual mapping going on as the memory is always
- * allocated from the DMA backend. It is safe to _not_ implement
- * the unmap functions.
- */
-DUMMY_SKIP(0, dma_unmap_page)
-DUMMY_SKIP(0, dma_unmap_single)
-
-DUMMY_SKIP(-1, dump_stack)
-DUMMY_SKIP(-1, gfp_pfmemalloc_allowed)
-DUMMY_SKIP(-1, prefetchw)
-DUMMY_SKIP(-1, write_lock_irq)
-DUMMY_SKIP(-1, write_lock_irqsave)
-DUMMY_SKIP(-1, write_unlock_irq)
-DUMMY_SKIP(-1, write_unlock_irqrestore)
-DUMMY_SKIP(0, read_lock)
-DUMMY_SKIP(0, read_unlock)
-DUMMY_SKIP(0, sysfs_create_group)
-DUMMY_SKIP(0, sysfs_remove_group)
-DUMMY_SKIP(0, sysfs_create_link)
-DUMMY_SKIP(0, sysfs_remove_link)
-DUMMY_SKIP(0, module_put)
-
-DUMMY(0, device_release_driver)
-DUMMY(-1, __vlan_put_tag)
-DUMMY(-1, dev_printk_emit)
-DUMMY(-1, gen_kill_estimator)
-DUMMY(-1, generic_pipe_buf_confirm)
-DUMMY(-1, generic_pipe_buf_map)
-DUMMY(-1, generic_pipe_buf_unmap)
-DUMMY(-1, linkwatch_fire_event)
-DUMMY(-1, need_resched)
-DUMMY(-1, open_softirq)
-DUMMY(-1, raw_notifier_chain_unregister)
-DUMMY(-1, vlan_do_receive)
-DUMMY(-1, vlan_untag)
-DUMMY(-1, yield)
-DUMMY(0, __raise_softirq_irqoff)
-DUMMY(0, __this_cpu_read)
-DUMMY(-1, add_device_randomness)
-DUMMY(0, add_uevent_var)
-DUMMY(0, atomic64_read)
-DUMMY(0, bitmap_empty)
-DUMMY_SKIP(0, call_rcu)
-DUMMY(0, csum_block_add)
-DUMMY(0, csum_fold)
-DUMMY(0, csum_partial)
-DUMMY(0, device_del)
-DUMMY(0, device_rename)
-DUMMY(0, device_unregister)
-DUMMY(0, do_posix_clock_monotonic_gettime)
-DUMMY(0, do_softirq)
-DUMMY(0, genl_dump_check_consistent)
-DUMMY(0, genl_info_net)
-DUMMY(0, genlmsg_cancel)
-DUMMY(0, genlmsg_end)
-DUMMY(0, genlmsg_multicast)
-DUMMY(0, genlmsg_multicast_netns)
-DUMMY(0, genlmsg_reply)
-DUMMY(0, genlmsg_unicast)
-DUMMY(0, get_cpu)
-DUMMY(0, get_seconds)
-DUMMY(0, hweight16)
-DUMMY(0, hweight64)
-DUMMY(0, idr_destroy)
-DUMMY(0, idr_for_each)
-DUMMY(0, idr_init)
-DUMMY(0, idr_remove)
-DUMMY(0, ip_hdr)
-DUMMY(0, ipv4_get_dsfield)
-DUMMY(0, ipv6_get_dsfield)
-DUMMY(0, ipv6_hdr)
-DUMMY(0, irqs_disabled)
-DUMMY(0, jhash_2words)
-DUMMY(0, kobject_uevent)
-DUMMY(0, kobject_uevent_env)
-DUMMY(0, kstrtoul)
-DUMMY(0, linkwatch_init_dev)
-DUMMY(0, local_softirq_pending)
-DUMMY(0, mb)
-DUMMY_SKIP(0, misc_register)
-DUMMY(0, mmiowb)
-DUMMY(0, net_dmaengine_put)
-DUMMY(0, net_info_ratelimited)
-DUMMY(0, net_ns_type_operations)
-DUMMY(0, netdev_pick_tx)
-DUMMY(0, netdev_register_kobject)
-DUMMY(0, netdev_unregister_kobject)
-DUMMY(0, netpoll_poll_lock)
-DUMMY(0, netpoll_poll_unlock)
-DUMMY(0, netpoll_receive_skb)
-DUMMY(0, netpoll_rx)
-DUMMY(0, netpoll_rx_disable)
-DUMMY(0, netpoll_rx_enable)
-DUMMY(0, nla_data)
-DUMMY(0, nla_get_be32)
-DUMMY(0, nla_get_flag)
-DUMMY(0, nla_get_s8)
-DUMMY(0, nla_get_u16)
-DUMMY(0, nla_get_u32)
-DUMMY(0, nla_get_u64)
-DUMMY(0, nla_get_u8)
-DUMMY(0, nla_len)
-DUMMY(0, nla_nest_end)
-DUMMY(0, nla_nest_start)
-DUMMY(0, nla_parse_nested)
-DUMMY(0, nla_put_be32)
-DUMMY(0, nla_put_flag)
-DUMMY(0, nla_put_string)
-DUMMY(0, nla_put_u16)
-DUMMY(0, nla_put_u32)
-DUMMY(0, nla_put_u64)
-DUMMY(0, nla_put_u8)
-DUMMY(0, nla_type)
-DUMMY(0, nlmsg_free)
-DUMMY(0, nlmsg_new)
-DUMMY(0, nlmsg_parse)
-DUMMY(0, nonseekable_open)
-DUMMY(0, ntohs)
-DUMMY(0, pci_pme_capable)
-DUMMY(0, pm_qos_add_notifier)
-DUMMY(0, pm_qos_remove_notifier)
-DUMMY(0, pm_qos_request)
-DUMMY(0, poll_wait)
-DUMMY(0, preempt_disable)
-DUMMY(0, preempt_enable)
-DUMMY(0, put_cpu)
-DUMMY(0, put_unaligned_le64)
-DUMMY(0, qdisc_all_tx_empty)
-DUMMY(0, raise_softirq_irqoff)
-DUMMY(0, rcu_barrier)
-DUMMY(0, rcu_read_lock_bh)
-DUMMY(0, rcu_read_lock_held)
-DUMMY(0, rcu_read_unlock_bh)
-DUMMY(-1, release_net)
-DUMMY(0, rtnl_dereference)
-DUMMY(-1, seq_printf)
-DUMMY(0, smp_mb)
-DUMMY(0, smp_mb__before_clear_bit)
-DUMMY(0, smp_processor_id)
-DUMMY(0, smp_rmb)
-DUMMY(0, sock_net)
-DUMMY(0, sock_release)
-DUMMY(0, spin_trylock)
-DUMMY(0, synchronize_irq)
-DUMMY(0, synchronize_rcu_expedited)
-DUMMY(0, tasklet_disable)
-DUMMY(0, tasklet_enable)
-DUMMY(0, tasklet_kill)
-DUMMY(0, tcp_hdrlen)
-DUMMY(0, this_cpu_dec)
-DUMMY(0, this_cpu_inc)
-DUMMY(0, toupper)
-DUMMY(0, wait_event_interruptible)
-DUMMY(0, work_busy)
-DUMMY_SKIP(0, class_register)
-DUMMY(0, class_unregister)
-DUMMY(0, debugfs_remove)
-DUMMY(0, dev_set_uevent_suppress)
-DUMMY(0, ethtool_op_get_link)
-DUMMY(0, genl_register_family_with_ops)
-DUMMY(0, genl_register_mc_group)
-DUMMY(0, init_utsname)
-DUMMY(0, platform_device_unregister)
-DUMMY(0, atomic_notifier_chain_register)
-DUMMY(0, __get_free_pages)
-DUMMY(0, __get_free_page)
-DUMMY(0, __set_current_state)
-// DUMMY(0, add_wait_queue)
-DUMMY(0, add_wait_queue_exclusive)
-DUMMY(0, atomic_notifier_call_chain)
-DUMMY(0, cond_resched)
-DUMMY(0, current)
-DUMMY(0, debug_check_no_locks_freed)
-DUMMY(0, get_user)
-DUMMY(0, jhash_1word)
-DUMMY(0, kernel_sendmsg)
-DUMMY(0, put_cmsg)
-DUMMY(0, put_cred)
-DUMMY(0, put_pid)
-DUMMY(0, schedule)
-DUMMY(-1, security_sk_free)
-DUMMY(0, set_current_state)
-DUMMY(0, signal_pending)
-DUMMY(0, smp_wmb)
-DUMMY_SKIP(0, sock_update_classid)
-DUMMY_SKIP(0, sock_update_netprioidx)
-DUMMY(0, sock_wake_async)
-DUMMY(0, static_key_slow_dec)
-DUMMY(0, task_tgid_vnr)
-DUMMY(0, totalram_pages)
-DUMMY(0, wake_up_interruptible_poll)
-
-DUMMY(-1, __this_cpu_write)
-DUMMY(-1, csum_block_add_ext)
-DUMMY(-1, csum_partial_ext)
-DUMMY(-1, genl_register_family_with_ops_groups)
-DUMMY(-1, sg_init_one)
-DUMMY(-1, vlan_hw_offload_capable)
-DUMMY(-1, vlan_tx_tag_get_id)
-DUMMY(-1, tsk_restore_flags)
-DUMMY(-1, put_user)
-
-DUMMY(-1, write_seqcount_begin)
-DUMMY(-1, write_seqcount_end)
-DUMMY(-1, net_dmaengine_get)
-DUMMY(-1, audit_enabled)
-DUMMY(-1, audit_get_sessionid)
-DUMMY(-1, audit_get_loginuid)
-DUMMY(-1, init_user_ns)
-DUMMY(-1, from_kgid)
-DUMMY(-1, from_kuid)
-DUMMY(-1, pci_num_vf)
-DUMMY(-1, audit_log)
-DUMMY(-1, linkwatch_forget_dev)
-DUMMY(-1, linkwatch_run_queue)
-DUMMY(-1, on_each_cpu)
-DUMMY(-1, kobject_put)
-DUMMY(-1, mq_qdisc_ops)
-DUMMY(-1, get_net_ns_by_pid)
-DUMMY(-1, get_net_ns_by_fd)
-DUMMY(-1, unregister_pernet_device)
-
-DUMMY(0, __hw_addr_init)
-DUMMY(0, __hw_addr_sync)
-DUMMY(0, __hw_addr_unsync)
-DUMMY_SKIP(0, dev_alloc_name)
-DUMMY(0, dev_change_net_namespace)
-DUMMY(0, dev_kfree_skb_any)
-DUMMY(0, dev_net_set)
-DUMMY(0, dev_open)
-DUMMY_SKIP(0, dev_hold)
-DUMMY_SKIP(0, dev_put)
-DUMMY(0, dst_release)
-DUMMY(0, free_netdev)
-DUMMY(0, net_disable_timestamp)
-DUMMY(0, next_net_device)
-DUMMY_SKIP(0, synchronize_net)
-DUMMY(0, unregister_netdevice_many)
-DUMMY(0, unregister_netdevice_notifier)
-DUMMY(0, unregister_netdevice_queue)
-DUMMY(-1, task_pid_nr)
-DUMMY(-1, pid_vnr)
-DUMMY(-1, from_kuid_munged)
-DUMMY(-1, from_kgid_munged)
-DUMMY(-1, sk_get_filter)
-DUMMY(-1, sk_detach_filter)
-DUMMY(-1, cond_resched_softirq)
-DUMMY(-1, prefetch)
-DUMMY(-1, security_socket_getpeersec_stream)
-DUMMY(-1, net_enable_timestamp)
-DUMMY(-1, __lock_sock)
-DUMMY(-1, bpf_tell_extensions)
-
-DUMMY(0, atomic64_set)
-DUMMY(0, device_can_wakeup)
-DUMMY(0, device_reprobe)
-DUMMY(0, device_set_wakeup_enable)
-DUMMY(0, ip_fast_csum)
-DUMMY(0, request_firmware)
-DUMMY(0, tcp_v4_check)
-DUMMY(0, sk_attach_filter)
-
-DUMMY(0, __module_get)
-DUMMY(0, __sock_recv_timestamp)
-DUMMY(0, __sock_recv_wifi_status)
-DUMMY(0, _sigprocmask)
-DUMMY(0, acpi_match_device)
-DUMMY(0, atomic_notifier_chain_unregister)
-DUMMY(0, can_checksum_protocol)
-DUMMY(0, class_destroy)
-DUMMY(0, clk_disable)
-DUMMY(0, clk_enable)
-DUMMY(0, csum_ipv6_magic)
-DUMMY(0, csum_partial_copy)
-DUMMY(0, csum_sub)
-DUMMY(0, csum_tcpudp_nofold)
-DUMMY(0, devm_clk_get)
-DUMMY(0, devm_gpiod_get_index)
-DUMMY(0, file_inode)
-DUMMY(0, gpiod_direction_output)
-DUMMY(0, gpiod_set_value)
-DUMMY(0, hex_dump_to_buffer)
-DUMMY(0, __ilog2_u32)
-DUMMY(0, __ilog2_u64)
-DUMMY(0, input_close_device)
-DUMMY(0, input_open_device)
-DUMMY(0, input_register_handle)
-DUMMY(0, input_register_handler)
-DUMMY(0, input_unregister_handle)
-DUMMY(0, input_unregister_handler)
-DUMMY(0, ip_hdrlen)
-DUMMY(0, ipv6_authlen)
-DUMMY(0, ipv6_optlen)
-DUMMY(0, misc_deregister)
-DUMMY(0, net_gso_ok)
-DUMMY(0, nosteal_pipe_buf_ops)
-DUMMY(0, pci_unregister_driver)
-DUMMY(0, platform_get_drvdata)
-DUMMY(0, platform_set_drvdata)
-DUMMY(0, regulator_disable)
-DUMMY(0, regulator_enable)
-DUMMY(0, regulator_get_exclusive)
-DUMMY(0, regulator_is_enabled)
-DUMMY(0, regulator_put)
-DUMMY(0, send_sigurg)
-DUMMY(0, simple_strtoul)
-DUMMY(0, skb_gro_len)
-DUMMY(0, skb_gro_offset)
-DUMMY(0, skb_network_protocol)
-DUMMY(0, spin_lock_nested)
-DUMMY(0, splice_to_pipe)
-DUMMY(0, static_key_slow_inc)
-DUMMY(0, tcp_hdr)
-DUMMY(0, textsearch_find)
-DUMMY(0, udp_hdr)
-DUMMY(0, virt_to_page)
-DUMMY(0, xfrm_sk_clone_policy)
-DUMMY(0, xfrm_sk_free_policy)
-
-DUMMY(0, __ethtool_get_settings)
-DUMMY(0, __skb_get_hash)
-DUMMY(0, __sock_recv_ts_and_drops)
-DUMMY(0, cpu_relax)
-DUMMY(0, dev_get_by_name)
-DUMMY(0, dev_get_by_name_rcu)
-DUMMY(0, dev_mc_add)
-DUMMY(0, dev_mc_del)
-DUMMY(0, dev_remove_pack)
-DUMMY(0, dev_set_allmulti)
-DUMMY(0, dev_set_promiscuity)
-DUMMY(0, dev_uc_add)
-DUMMY(0, dev_uc_del)
-DUMMY(0, dev_xmit_complete)
-DUMMY(0, ethtool_cmd_speed)
-DUMMY(0, flush_dcache_page)
-DUMMY(0, getnstimeofday)
-DUMMY(0, ip_check_defrag)
-DUMMY(0, netdev_get_tx_queue)
-DUMMY(0, offset_in_page)
-DUMMY(0, prandom_u32_max)
-DUMMY(0, raw_smp_processor_id)
-DUMMY(0, sk_run_filter)
-DUMMY(0, skb_flow_dissect)
-DUMMY(0, sock_unregister)
-DUMMY(0, txq_trans_update)
-DUMMY(0, unregister_pernet_subsys)
-DUMMY(0, vm_insert_page)
-DUMMY(0, vmalloc_to_page)
-
-DUMMY(0, __dev_change_flags)
-DUMMY(0, __dev_get_by_name)
-DUMMY(0, __dev_notify_flags)
-DUMMY(0, call_netdevice_notifiers)
-DUMMY(0, dev_base_lock)
-DUMMY(0, dev_change_carrier)
-DUMMY(0, dev_change_flags)
-DUMMY(0, dev_change_name)
-DUMMY(0, dev_get_flags)
-DUMMY(0, dev_get_phys_port_id)
-DUMMY(0, dev_get_stats)
-DUMMY(0, dev_mc_add_excl)
-DUMMY(0, dev_set_alias)
-DUMMY(0, dev_set_group)
-DUMMY(0, dev_set_mac_address)
-DUMMY(0, dev_set_mtu)
-DUMMY(0, dev_uc_add_excl)
-DUMMY(0, is_link_local_ether_addr)
-DUMMY(0, jiffies_to_clock_t)
-DUMMY(0, netdev_boot_setup)
-DUMMY(0, netdev_master_upper_dev_get)
-DUMMY(0, netdev_state_change)
-DUMMY(0, netdev_unregistering_wq)
-
-DUMMY(0, autoremove_wake_function)
-DUMMY(0, get_user_pages_fast)
-DUMMY(0, memcpy_toiovecend)
-DUMMY(0, netdev_rx_csum_fault)
-DUMMY(0, release_pages)
-DUMMY(0, sk_busy_loop)
-DUMMY(0, sk_can_busy_loop)
-
-DUMMY_SKIP(0, simple_strtol)
-DUMMY_SKIP(0, alg_test)
-
-DUMMY(0, __cfg80211_leave_ocb)
-DUMMY(0, __skb_flow_dissect)
-DUMMY(0, __sock_tx_timestamp)
-DUMMY(0, bpf_prog_create_from_user)
-DUMMY(0, bpf_prog_destroy)
-DUMMY(0, bpf_prog_run_clear_cb)
-DUMMY(0, cfg80211_join_ocb)
-DUMMY(0, cfg80211_leave_ocb)
-DUMMY(0, class_find_device)
-DUMMY(0, config_enabled)
-DUMMY(0, dev_change_proto_down)
-DUMMY(0, dev_get_iflink)
-DUMMY(0, dev_get_phys_port_name)
-DUMMY(0, device_enable_async_suspend)
-DUMMY(0, fatal_signal_pending)
-DUMMY_RET(1, file_ns_capable)
-DUMMY(0, flow_keys_dissector)
-DUMMY(0, get_net_ns_by_id)
-DUMMY_SKIP(0, gfpflags_allow_blocking)
-DUMMY(0, init_dummy_netdev)
-DUMMY(0, napi_gro_flush)
-DUMMY(0, netdev_start_xmit)
-DUMMY_RET(0, netdev_uses_dsa)
-DUMMY_RET(0, page_is_pfmemalloc)
-DUMMY_RET(0, peernet2id)
-DUMMY(0, pr_err_once)
-DUMMY(0, sk_attach_bpf)
-DUMMY(0, sk_filter_uncharge)
-DUMMY(0, skb_checksum_help)
-DUMMY(0, skb_get_tx_queue)
-DUMMY(0, skb_gso_segment)
-DUMMY(0, skb_vlan_tag_get)
-DUMMY(0, skb_vlan_tag_present)
-DUMMY(0, smp_mb__before_atomic)
-DUMMY(0, sock_diag_broadcast_destroy)
-DUMMY(0, sock_diag_has_destroy_listeners)
-DUMMY(0, switchdev_port_attr_get)
-
-DUMMY_RET(0, netif_dormant)
-DUMMY(0, netif_napi_add)
-DUMMY(0, netif_napi_del)
-DUMMY_STOP(0, netif_rx)
-DUMMY(0, netif_skb_features)
-DUMMY(0, netif_supports_nofcs)
-DUMMY(0, netif_xmit_frozen_or_drv_stopped)
-DUMMY(0, netif_xmit_frozen_or_stopped)
-DUMMY_STOP(0, netif_rx_ni)
-DUMMY_STOP(0, netif_tx_start_all_queues)
-DUMMY(0, netif_tx_stop_all_queues)
-
-DUMMY(0, peernet_has_id)
-DUMMY(0, peernet2id_alloc)
-
-} /* extern "C" */
diff --git a/repos/dde_linux/src/lib/legacy/wifi/dummies_new.c b/repos/dde_linux/src/lib/legacy/wifi/dummies_new.c
deleted file mode 100644
index 01839c5346..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/dummies_new.c
+++ /dev/null
@@ -1,516 +0,0 @@
-/*
- * \brief Dummy functions
- * \author Josef Soentgen
- * \date 2018-04-26
- */
-
-/*
- * Copyright (C) 2018 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-/* local includes */
-#include
-
-#if 0
-#define TRACE \
- do { \
- lx_printf("%s not implemented from: %p\n", __func__, \
- __builtin_return_address(0)); \
- } while (0)
-#define TRACE_OK \
- do { \
- lx_printf("%s not implemented but OK\n", __func__); \
- } while (0)
-#else
-#define TRACE do { ; } while (0)
-#define TRACE_OK do { ; } while (0)
-#endif
-
-
-void __dev_xdp_query(struct net_device *dev, bpf_op_t xdp_op, struct netdev_bpf *xdp)
-{
- TRACE;
-}
-
-
-int __ethtool_get_link_ksettings(struct net_device *dev,
- struct ethtool_link_ksettings *link_ksettings)
-{
- TRACE;
- return -1;
-}
-
-
-u32 __skb_get_hash_symmetric(const struct sk_buff *skb)
-{
- TRACE;
- return 0;
-}
-
-
-// typedef int (*bpf_op_t)(struct net_device *dev, struct netdev_bpf *bpf);
-// struct bpf_prog *bpf_prog_get_type(u32 ufd, enum bpf_prog_type type)
-// {
-// TRACE;
-// return NULL;
-// }
-
-
-struct sk_buff **call_gro_receive(gro_receive_t cb, struct sk_buff **head, struct sk_buff *skb)
-{
- TRACE;
- return NULL;
-}
-
-
-struct user_struct *current_user()
-{
- TRACE;
- return NULL;
-}
-
-
-int dev_change_tx_queue_len(struct net_device *dev, unsigned long d)
-{
- TRACE;
- return -1;
-}
-
-
-int dev_change_xdp_fd(struct net_device *dev, struct netlink_ext_ack *extack,
- int fd, u32 flags)
-{
- TRACE;
- return -1;
-}
-
-
-int dev_get_alias(const struct net_device *dev, char *p, size_t n)
-{
- TRACE;
- return -1;
-}
-
-
-int dev_recursion_level(void)
-{
- TRACE;
- return 0;
-}
-
-
-bool dev_validate_header(const struct net_device *dev, char *ll_header, int len)
-{
- TRACE;
- return false;
-}
-
-
-void free_uid(struct user_struct *user)
-{
- TRACE;
-}
-
-
-void iov_iter_revert(struct iov_iter *i, size_t bytes)
-{
- TRACE;
-}
-
-
-kuid_t make_kuid(struct user_namespace *from, uid_t uid)
-{
- TRACE;
- return 0;
-}
-
-
-void memalloc_noreclaim_restore(unsigned int flags)
-{
- TRACE;
-}
-
-
-unsigned int memalloc_noreclaim_save(void)
-{
- TRACE;
- return 0;
-}
-
-
-struct fq_flow *fq_flow_classify(struct fq *fq, struct fq_tin *tin,
- struct sk_buff *skb,
- fq_flow_get_default_t get_default_func)
-{
- TRACE;
- return 0;
-}
-
-
-
-void fq_flow_init(struct fq_flow *flow)
-{
- TRACE;
-}
-
-
-int fq_init(struct fq *fq, int flows_cnt)
-{
- TRACE;
- return -1;
-}
-
-
-void fq_recalc_backlog(struct fq *fq, struct fq_tin *tin, struct fq_flow *flow)
-{
- TRACE;
-}
-
-
-void fq_reset(struct fq *fq, fq_skb_free_t free_func)
-{
- TRACE;
-}
-
-
-void fq_tin_enqueue(struct fq *fq, struct fq_tin *tin, struct sk_buff *skb,
- fq_skb_free_t free_func, fq_flow_get_default_t get_default_func)
-{
- TRACE;
-}
-
-
-void fq_tin_filter(struct fq *fq, struct fq_tin *tin, fq_skb_filter_t filter_func,
- void *filter_data, fq_skb_free_t free_func)
-{
- TRACE;
-}
-
-
-void fq_tin_init(struct fq_tin *tin)
-{
- TRACE;
-}
-
-
-void fq_tin_reset(struct fq *fq, struct fq_tin *tin, fq_skb_free_t free_func)
-{
- TRACE;
-}
-
-
-int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m)
-{
- TRACE;
- return 0;
-}
-
-
-struct net_device *netdev_master_upper_dev_get_rcu(struct net_device *dev)
-{
- TRACE;
- return NULL;
-}
-
-
-void netdev_rss_key_fill(void *buffer, size_t len)
-{
- TRACE;
- /* XXX get_random_once() to fill cmd.secret_key */
-}
-
-
-const void *of_get_mac_address(struct device_node *np)
-{
- TRACE;
- return NULL;
-}
-
-
-struct device_node * pci_device_to_OF_node(const struct pci_dev *pdev)
-{
- TRACE;
- return NULL;
-}
-
-
-int pci_enable_msix_range(struct pci_dev *dev, struct msix_entry *entries,
- int minvec, int maxvec)
-{
- TRACE;
- return -1;
-}
-
-
-int pci_find_ext_capability(struct pci_dev *dev, int cap)
-{
- TRACE;
- return -1;
-}
-
-
-int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
-{
- // TRACE_OK;
- return 0;
-}
-
-
-int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
-{
- // TRACE_OK;
- return 0;
-}
-
-
-struct pci_dev *pcie_find_root_port(struct pci_dev *dev)
-{
- TRACE;
- return NULL;
-}
-
-
-int pcim_enable_device(struct pci_dev *pdev)
-{
- TRACE;
- return 0;
-}
-
-
-bool pm_runtime_active(struct device *dev)
-{
- TRACE;
- return true;
-}
-
-
-void pm_runtime_allow(struct device *dev)
-{
- TRACE;
-}
-
-
-void pm_runtime_forbid(struct device *dev)
-{
- TRACE;
-}
-
-
-int pm_runtime_get(struct device *dev)
-{
- TRACE;
- return 1;
-}
-
-
-void pm_runtime_mark_last_busy(struct device *dev)
-{
- TRACE;
-}
-
-
-int pm_runtime_put_autosuspend(struct device *dev)
-{
- TRACE;
- return -1;
-}
-
-
-int pm_runtime_resume(struct device *dev)
-{
- TRACE;
- return 1;
-}
-
-
-int pm_runtime_set_active(struct device *dev)
-{
- TRACE;
- return 0;
-}
-
-
-void pm_runtime_set_autosuspend_delay(struct device *dev, int delay)
-{
- TRACE;
-}
-
-
-bool pm_runtime_suspended(struct device *dev)
-{
- // TRACE_OK;
- return false;
-}
-
-
-void pm_runtime_use_autosuspend(struct device *dev)
-{
- TRACE;
-}
-
-
-void pm_wakeup_event(struct device *dev, unsigned int msec)
-{
- TRACE;
-}
-
-
-void reuseport_detach_sock(struct sock *sk)
-{
- TRACE;
-}
-
-
-int sg_nents(struct scatterlist *sg)
-{
- TRACE;
- return -1;
-}
-
-
-size_t sg_pcopy_from_buffer(struct scatterlist *sgl, unsigned int nents,
- const void *buf, size_t buflen, off_t skip)
-{
- TRACE;
- return 0;
-}
-
-
-int sk_reuseport_attach_bpf(u32 ufd, struct sock *sk)
-{
- TRACE;
- return -1;
-}
-
-
-int sk_reuseport_attach_filter(struct sock_fprog *fprog, struct sock *sk)
-{
- TRACE;
- return -1;
-}
-
-
-void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff **pp, int flush)
-{
- TRACE;
-}
-
-
-void *skb_gro_header_fast(struct sk_buff *skb, unsigned int offset)
-{
- TRACE;
- return NULL;
-}
-
-
-int skb_gro_header_hard(struct sk_buff *skb, unsigned int hlen)
-{
- TRACE;
- return 0; // XXX
-}
-
-
-void *skb_gro_header_slow(struct sk_buff *skb, unsigned int hlen, unsigned int offset)
-{
- TRACE;
- return NULL;
-}
-
-
-void skb_gro_postpull_rcsum(struct sk_buff *skb, const void *start, unsigned int len)
-{
- TRACE;
-}
-
-
-void skb_gro_pull(struct sk_buff *skb, unsigned int len)
-{
- TRACE;
-}
-
-
-u64 sock_gen_cookie(struct sock *sk)
-{
- TRACE;
- return 0;
-}
-
-
-unsigned int u64_stats_fetch_begin(const struct u64_stats_sync *syncp)
-{
- // TRACE;
- return 0;
-}
-
-
-unsigned int u64_stats_fetch_begin_irq(const struct u64_stats_sync *syncp)
-{
- // TRACE;
- return 0;
-}
-
-
-bool u64_stats_fetch_retry(const struct u64_stats_sync *syncp, unsigned int start)
-{
- // TRACE;
- return false;
-}
-
-
-bool u64_stats_fetch_retry_irq(const struct u64_stats_sync *syncp, unsigned int start)
-{
- // TRACE;
- return false;
-}
-
-
-void u64_stats_init(struct u64_stats_sync *syncp)
-{
- // TRACE;
-}
-
-
-struct sk_buff *validate_xmit_skb_list(struct sk_buff *skb, struct net_device *dev,
- bool *again)
-{
- TRACE;
- return NULL;
-}
-
-int virtio_net_hdr_from_skb(const struct sk_buff *skb, struct virtio_net_hdr *hdr,
- bool little_endian, bool has_data_valid)
-{
- TRACE;
- return -1;
-}
-
-
-int virtio_net_hdr_to_skb(struct sk_buff *skb, const struct virtio_net_hdr *hdr,
- bool little_endian)
-{
- TRACE;
- return -1;
-}
-
-
-void wireless_nlevent_flush(void)
-{
- TRACE;
-}
-
-
-bool wq_has_sleeper(struct wait_queue_head *wq_head)
-{
- TRACE_OK;
- return true;
-}
-
-
-bool sysfs_streq(const char *s1, const char *s2)
-{
- TRACE;
- return false;
-}
diff --git a/repos/dde_linux/src/lib/legacy/wifi/firmware.cc b/repos/dde_linux/src/lib/legacy/wifi/firmware.cc
deleted file mode 100644
index 508bde8939..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/firmware.cc
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * \brief Linux wireless stack
- * \author Josef Soentgen
- * \date 2018-06-29
- */
-
-/*
- * Copyright (C) 2018 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-/* Genode includes */
-#include
-
-/* local includes */
-#include
-#include
-#include
-
-
-Firmware_list fw_list[] = {
- { "regulatory.db", 4144, nullptr },
-
- { "iwlwifi-1000-5.ucode", 337520, nullptr },
- { "iwlwifi-3160-17.ucode", 918268, nullptr },
- { "iwlwifi-5000-5.ucode", 340696, nullptr },
- { "iwlwifi-6000-4.ucode", 454608, nullptr },
- { "iwlwifi-6000-6.ucode", 454608, "iwlwifi-6000-4.ucode" },
- { "iwlwifi-6000g2a-6.ucode", 677296, nullptr },
- { "iwlwifi-6000g2b-6.ucode", 679436, nullptr },
- { "iwlwifi-7260-17.ucode", 1049340, nullptr },
- { "iwlwifi-7265-16.ucode", 1180412, nullptr },
- { "iwlwifi-7265D-22.ucode", 1028376, nullptr },
- { "iwlwifi-7265D-29.ucode", 1036432, nullptr },
- { "iwlwifi-8000C-22.ucode", 2120860, nullptr },
- { "iwlwifi-8000C-36.ucode", 2486572, nullptr },
- { "iwlwifi-8265-22.ucode", 1811984, nullptr },
- { "iwlwifi-8265-36.ucode", 2498044, nullptr },
-
- { "iwlwifi-9000-pu-b0-jf-b0-34.ucode", 2678284, nullptr },
- { "iwlwifi-9000-pu-b0-jf-b0-36.ucode", 2678284, "iwlwifi-9000-pu-b0-jf-b0-34.ucode" }
-};
-
-
-size_t fw_list_len = sizeof(fw_list) / sizeof(fw_list[0]);
-
-
-/**********************
- ** linux/firmware.h **
- **********************/
-
-int request_firmware_nowait(struct module *module, bool uevent,
- const char *name, struct device *device,
- gfp_t gfp, void *context,
- void (*cont)(const struct firmware *, void *))
-{
- /* only try to load known firmware images */
- Firmware_list *fwl = 0;
- for (size_t i = 0; i < fw_list_len; i++) {
- if (Genode::strcmp(name, fw_list[i].requested_name) == 0) {
- fwl = &fw_list[i];
- break;
- }
- }
-
- if (!fwl) {
- Genode::error("firmware '", name, "' is not in the firmware white list");
- return -1;
- }
-
- char const *fw_name = fwl->available_name
- ? fwl->available_name : fwl->requested_name;
- Genode::Rom_connection rom(Lx_kit::env().env(), fw_name);
- Genode::Dataspace_capability ds_cap = rom.dataspace();
-
- if (!ds_cap.valid()) {
- Genode::error("could not get firmware ROM dataspace");
- return -1;
- }
-
- struct firmware *fw = (struct firmware *)kzalloc(sizeof(struct firmware), 0);
- if (!fw) {
- Genode::error("could not allocate memory for firmware metadata");
- return -1;
- }
-
- /* use allocator because fw is too big for slab */
- Lx_kit::env().heap().try_alloc(fwl->size).with_result(
- [&] (void *ptr) { fw->data = (u8 *)ptr; },
- [&] (Genode::Allocator::Alloc_error) {
- Genode::error("Could not allocate memory for firmware image"); });
-
- if (!fw->data) {
- kfree(fw);
- return -1;
- }
-
- void const *image = Lx_kit::env().env().rm().attach(ds_cap);
- Genode::memcpy((void*)fw->data, image, fwl->size);
- Lx_kit::env().env().rm().detach(image);
-
- fw->size = fwl->size;
-
- cont(fw, context);
-
- return 0;
-}
-
-void release_firmware(const struct firmware *fw)
-{
- Lx_kit::env().heap().free(const_cast(fw->data), fw->size);
- kfree(fw);
-}
diff --git a/repos/dde_linux/src/lib/legacy/wifi/include/crc32table.h b/repos/dde_linux/src/lib/legacy/wifi/include/crc32table.h
deleted file mode 100644
index a9da51ae9f..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/include/crc32table.h
+++ /dev/null
@@ -1,1565 +0,0 @@
-/* this file is generated - do not edit */
-
-static u32 __cacheline_aligned crc32table_le[8][256] = {{
-tole(0x00000000L), tole(0x77073096L), tole(0xee0e612cL), tole(0x990951baL),
-tole(0x076dc419L), tole(0x706af48fL), tole(0xe963a535L), tole(0x9e6495a3L),
-tole(0x0edb8832L), tole(0x79dcb8a4L), tole(0xe0d5e91eL), tole(0x97d2d988L),
-tole(0x09b64c2bL), tole(0x7eb17cbdL), tole(0xe7b82d07L), tole(0x90bf1d91L),
-tole(0x1db71064L), tole(0x6ab020f2L), tole(0xf3b97148L), tole(0x84be41deL),
-tole(0x1adad47dL), tole(0x6ddde4ebL), tole(0xf4d4b551L), tole(0x83d385c7L),
-tole(0x136c9856L), tole(0x646ba8c0L), tole(0xfd62f97aL), tole(0x8a65c9ecL),
-tole(0x14015c4fL), tole(0x63066cd9L), tole(0xfa0f3d63L), tole(0x8d080df5L),
-tole(0x3b6e20c8L), tole(0x4c69105eL), tole(0xd56041e4L), tole(0xa2677172L),
-tole(0x3c03e4d1L), tole(0x4b04d447L), tole(0xd20d85fdL), tole(0xa50ab56bL),
-tole(0x35b5a8faL), tole(0x42b2986cL), tole(0xdbbbc9d6L), tole(0xacbcf940L),
-tole(0x32d86ce3L), tole(0x45df5c75L), tole(0xdcd60dcfL), tole(0xabd13d59L),
-tole(0x26d930acL), tole(0x51de003aL), tole(0xc8d75180L), tole(0xbfd06116L),
-tole(0x21b4f4b5L), tole(0x56b3c423L), tole(0xcfba9599L), tole(0xb8bda50fL),
-tole(0x2802b89eL), tole(0x5f058808L), tole(0xc60cd9b2L), tole(0xb10be924L),
-tole(0x2f6f7c87L), tole(0x58684c11L), tole(0xc1611dabL), tole(0xb6662d3dL),
-tole(0x76dc4190L), tole(0x01db7106L), tole(0x98d220bcL), tole(0xefd5102aL),
-tole(0x71b18589L), tole(0x06b6b51fL), tole(0x9fbfe4a5L), tole(0xe8b8d433L),
-tole(0x7807c9a2L), tole(0x0f00f934L), tole(0x9609a88eL), tole(0xe10e9818L),
-tole(0x7f6a0dbbL), tole(0x086d3d2dL), tole(0x91646c97L), tole(0xe6635c01L),
-tole(0x6b6b51f4L), tole(0x1c6c6162L), tole(0x856530d8L), tole(0xf262004eL),
-tole(0x6c0695edL), tole(0x1b01a57bL), tole(0x8208f4c1L), tole(0xf50fc457L),
-tole(0x65b0d9c6L), tole(0x12b7e950L), tole(0x8bbeb8eaL), tole(0xfcb9887cL),
-tole(0x62dd1ddfL), tole(0x15da2d49L), tole(0x8cd37cf3L), tole(0xfbd44c65L),
-tole(0x4db26158L), tole(0x3ab551ceL), tole(0xa3bc0074L), tole(0xd4bb30e2L),
-tole(0x4adfa541L), tole(0x3dd895d7L), tole(0xa4d1c46dL), tole(0xd3d6f4fbL),
-tole(0x4369e96aL), tole(0x346ed9fcL), tole(0xad678846L), tole(0xda60b8d0L),
-tole(0x44042d73L), tole(0x33031de5L), tole(0xaa0a4c5fL), tole(0xdd0d7cc9L),
-tole(0x5005713cL), tole(0x270241aaL), tole(0xbe0b1010L), tole(0xc90c2086L),
-tole(0x5768b525L), tole(0x206f85b3L), tole(0xb966d409L), tole(0xce61e49fL),
-tole(0x5edef90eL), tole(0x29d9c998L), tole(0xb0d09822L), tole(0xc7d7a8b4L),
-tole(0x59b33d17L), tole(0x2eb40d81L), tole(0xb7bd5c3bL), tole(0xc0ba6cadL),
-tole(0xedb88320L), tole(0x9abfb3b6L), tole(0x03b6e20cL), tole(0x74b1d29aL),
-tole(0xead54739L), tole(0x9dd277afL), tole(0x04db2615L), tole(0x73dc1683L),
-tole(0xe3630b12L), tole(0x94643b84L), tole(0x0d6d6a3eL), tole(0x7a6a5aa8L),
-tole(0xe40ecf0bL), tole(0x9309ff9dL), tole(0x0a00ae27L), tole(0x7d079eb1L),
-tole(0xf00f9344L), tole(0x8708a3d2L), tole(0x1e01f268L), tole(0x6906c2feL),
-tole(0xf762575dL), tole(0x806567cbL), tole(0x196c3671L), tole(0x6e6b06e7L),
-tole(0xfed41b76L), tole(0x89d32be0L), tole(0x10da7a5aL), tole(0x67dd4accL),
-tole(0xf9b9df6fL), tole(0x8ebeeff9L), tole(0x17b7be43L), tole(0x60b08ed5L),
-tole(0xd6d6a3e8L), tole(0xa1d1937eL), tole(0x38d8c2c4L), tole(0x4fdff252L),
-tole(0xd1bb67f1L), tole(0xa6bc5767L), tole(0x3fb506ddL), tole(0x48b2364bL),
-tole(0xd80d2bdaL), tole(0xaf0a1b4cL), tole(0x36034af6L), tole(0x41047a60L),
-tole(0xdf60efc3L), tole(0xa867df55L), tole(0x316e8eefL), tole(0x4669be79L),
-tole(0xcb61b38cL), tole(0xbc66831aL), tole(0x256fd2a0L), tole(0x5268e236L),
-tole(0xcc0c7795L), tole(0xbb0b4703L), tole(0x220216b9L), tole(0x5505262fL),
-tole(0xc5ba3bbeL), tole(0xb2bd0b28L), tole(0x2bb45a92L), tole(0x5cb36a04L),
-tole(0xc2d7ffa7L), tole(0xb5d0cf31L), tole(0x2cd99e8bL), tole(0x5bdeae1dL),
-tole(0x9b64c2b0L), tole(0xec63f226L), tole(0x756aa39cL), tole(0x026d930aL),
-tole(0x9c0906a9L), tole(0xeb0e363fL), tole(0x72076785L), tole(0x05005713L),
-tole(0x95bf4a82L), tole(0xe2b87a14L), tole(0x7bb12baeL), tole(0x0cb61b38L),
-tole(0x92d28e9bL), tole(0xe5d5be0dL), tole(0x7cdcefb7L), tole(0x0bdbdf21L),
-tole(0x86d3d2d4L), tole(0xf1d4e242L), tole(0x68ddb3f8L), tole(0x1fda836eL),
-tole(0x81be16cdL), tole(0xf6b9265bL), tole(0x6fb077e1L), tole(0x18b74777L),
-tole(0x88085ae6L), tole(0xff0f6a70L), tole(0x66063bcaL), tole(0x11010b5cL),
-tole(0x8f659effL), tole(0xf862ae69L), tole(0x616bffd3L), tole(0x166ccf45L),
-tole(0xa00ae278L), tole(0xd70dd2eeL), tole(0x4e048354L), tole(0x3903b3c2L),
-tole(0xa7672661L), tole(0xd06016f7L), tole(0x4969474dL), tole(0x3e6e77dbL),
-tole(0xaed16a4aL), tole(0xd9d65adcL), tole(0x40df0b66L), tole(0x37d83bf0L),
-tole(0xa9bcae53L), tole(0xdebb9ec5L), tole(0x47b2cf7fL), tole(0x30b5ffe9L),
-tole(0xbdbdf21cL), tole(0xcabac28aL), tole(0x53b39330L), tole(0x24b4a3a6L),
-tole(0xbad03605L), tole(0xcdd70693L), tole(0x54de5729L), tole(0x23d967bfL),
-tole(0xb3667a2eL), tole(0xc4614ab8L), tole(0x5d681b02L), tole(0x2a6f2b94L),
-tole(0xb40bbe37L), tole(0xc30c8ea1L), tole(0x5a05df1bL), tole(0x2d02ef8dL)},
-{
-tole(0x00000000L), tole(0x191b3141L), tole(0x32366282L), tole(0x2b2d53c3L),
-tole(0x646cc504L), tole(0x7d77f445L), tole(0x565aa786L), tole(0x4f4196c7L),
-tole(0xc8d98a08L), tole(0xd1c2bb49L), tole(0xfaefe88aL), tole(0xe3f4d9cbL),
-tole(0xacb54f0cL), tole(0xb5ae7e4dL), tole(0x9e832d8eL), tole(0x87981ccfL),
-tole(0x4ac21251L), tole(0x53d92310L), tole(0x78f470d3L), tole(0x61ef4192L),
-tole(0x2eaed755L), tole(0x37b5e614L), tole(0x1c98b5d7L), tole(0x05838496L),
-tole(0x821b9859L), tole(0x9b00a918L), tole(0xb02dfadbL), tole(0xa936cb9aL),
-tole(0xe6775d5dL), tole(0xff6c6c1cL), tole(0xd4413fdfL), tole(0xcd5a0e9eL),
-tole(0x958424a2L), tole(0x8c9f15e3L), tole(0xa7b24620L), tole(0xbea97761L),
-tole(0xf1e8e1a6L), tole(0xe8f3d0e7L), tole(0xc3de8324L), tole(0xdac5b265L),
-tole(0x5d5daeaaL), tole(0x44469febL), tole(0x6f6bcc28L), tole(0x7670fd69L),
-tole(0x39316baeL), tole(0x202a5aefL), tole(0x0b07092cL), tole(0x121c386dL),
-tole(0xdf4636f3L), tole(0xc65d07b2L), tole(0xed705471L), tole(0xf46b6530L),
-tole(0xbb2af3f7L), tole(0xa231c2b6L), tole(0x891c9175L), tole(0x9007a034L),
-tole(0x179fbcfbL), tole(0x0e848dbaL), tole(0x25a9de79L), tole(0x3cb2ef38L),
-tole(0x73f379ffL), tole(0x6ae848beL), tole(0x41c51b7dL), tole(0x58de2a3cL),
-tole(0xf0794f05L), tole(0xe9627e44L), tole(0xc24f2d87L), tole(0xdb541cc6L),
-tole(0x94158a01L), tole(0x8d0ebb40L), tole(0xa623e883L), tole(0xbf38d9c2L),
-tole(0x38a0c50dL), tole(0x21bbf44cL), tole(0x0a96a78fL), tole(0x138d96ceL),
-tole(0x5ccc0009L), tole(0x45d73148L), tole(0x6efa628bL), tole(0x77e153caL),
-tole(0xbabb5d54L), tole(0xa3a06c15L), tole(0x888d3fd6L), tole(0x91960e97L),
-tole(0xded79850L), tole(0xc7cca911L), tole(0xece1fad2L), tole(0xf5facb93L),
-tole(0x7262d75cL), tole(0x6b79e61dL), tole(0x4054b5deL), tole(0x594f849fL),
-tole(0x160e1258L), tole(0x0f152319L), tole(0x243870daL), tole(0x3d23419bL),
-tole(0x65fd6ba7L), tole(0x7ce65ae6L), tole(0x57cb0925L), tole(0x4ed03864L),
-tole(0x0191aea3L), tole(0x188a9fe2L), tole(0x33a7cc21L), tole(0x2abcfd60L),
-tole(0xad24e1afL), tole(0xb43fd0eeL), tole(0x9f12832dL), tole(0x8609b26cL),
-tole(0xc94824abL), tole(0xd05315eaL), tole(0xfb7e4629L), tole(0xe2657768L),
-tole(0x2f3f79f6L), tole(0x362448b7L), tole(0x1d091b74L), tole(0x04122a35L),
-tole(0x4b53bcf2L), tole(0x52488db3L), tole(0x7965de70L), tole(0x607eef31L),
-tole(0xe7e6f3feL), tole(0xfefdc2bfL), tole(0xd5d0917cL), tole(0xcccba03dL),
-tole(0x838a36faL), tole(0x9a9107bbL), tole(0xb1bc5478L), tole(0xa8a76539L),
-tole(0x3b83984bL), tole(0x2298a90aL), tole(0x09b5fac9L), tole(0x10aecb88L),
-tole(0x5fef5d4fL), tole(0x46f46c0eL), tole(0x6dd93fcdL), tole(0x74c20e8cL),
-tole(0xf35a1243L), tole(0xea412302L), tole(0xc16c70c1L), tole(0xd8774180L),
-tole(0x9736d747L), tole(0x8e2de606L), tole(0xa500b5c5L), tole(0xbc1b8484L),
-tole(0x71418a1aL), tole(0x685abb5bL), tole(0x4377e898L), tole(0x5a6cd9d9L),
-tole(0x152d4f1eL), tole(0x0c367e5fL), tole(0x271b2d9cL), tole(0x3e001cddL),
-tole(0xb9980012L), tole(0xa0833153L), tole(0x8bae6290L), tole(0x92b553d1L),
-tole(0xddf4c516L), tole(0xc4eff457L), tole(0xefc2a794L), tole(0xf6d996d5L),
-tole(0xae07bce9L), tole(0xb71c8da8L), tole(0x9c31de6bL), tole(0x852aef2aL),
-tole(0xca6b79edL), tole(0xd37048acL), tole(0xf85d1b6fL), tole(0xe1462a2eL),
-tole(0x66de36e1L), tole(0x7fc507a0L), tole(0x54e85463L), tole(0x4df36522L),
-tole(0x02b2f3e5L), tole(0x1ba9c2a4L), tole(0x30849167L), tole(0x299fa026L),
-tole(0xe4c5aeb8L), tole(0xfdde9ff9L), tole(0xd6f3cc3aL), tole(0xcfe8fd7bL),
-tole(0x80a96bbcL), tole(0x99b25afdL), tole(0xb29f093eL), tole(0xab84387fL),
-tole(0x2c1c24b0L), tole(0x350715f1L), tole(0x1e2a4632L), tole(0x07317773L),
-tole(0x4870e1b4L), tole(0x516bd0f5L), tole(0x7a468336L), tole(0x635db277L),
-tole(0xcbfad74eL), tole(0xd2e1e60fL), tole(0xf9ccb5ccL), tole(0xe0d7848dL),
-tole(0xaf96124aL), tole(0xb68d230bL), tole(0x9da070c8L), tole(0x84bb4189L),
-tole(0x03235d46L), tole(0x1a386c07L), tole(0x31153fc4L), tole(0x280e0e85L),
-tole(0x674f9842L), tole(0x7e54a903L), tole(0x5579fac0L), tole(0x4c62cb81L),
-tole(0x8138c51fL), tole(0x9823f45eL), tole(0xb30ea79dL), tole(0xaa1596dcL),
-tole(0xe554001bL), tole(0xfc4f315aL), tole(0xd7626299L), tole(0xce7953d8L),
-tole(0x49e14f17L), tole(0x50fa7e56L), tole(0x7bd72d95L), tole(0x62cc1cd4L),
-tole(0x2d8d8a13L), tole(0x3496bb52L), tole(0x1fbbe891L), tole(0x06a0d9d0L),
-tole(0x5e7ef3ecL), tole(0x4765c2adL), tole(0x6c48916eL), tole(0x7553a02fL),
-tole(0x3a1236e8L), tole(0x230907a9L), tole(0x0824546aL), tole(0x113f652bL),
-tole(0x96a779e4L), tole(0x8fbc48a5L), tole(0xa4911b66L), tole(0xbd8a2a27L),
-tole(0xf2cbbce0L), tole(0xebd08da1L), tole(0xc0fdde62L), tole(0xd9e6ef23L),
-tole(0x14bce1bdL), tole(0x0da7d0fcL), tole(0x268a833fL), tole(0x3f91b27eL),
-tole(0x70d024b9L), tole(0x69cb15f8L), tole(0x42e6463bL), tole(0x5bfd777aL),
-tole(0xdc656bb5L), tole(0xc57e5af4L), tole(0xee530937L), tole(0xf7483876L),
-tole(0xb809aeb1L), tole(0xa1129ff0L), tole(0x8a3fcc33L), tole(0x9324fd72L)},
-{
-tole(0x00000000L), tole(0x01c26a37L), tole(0x0384d46eL), tole(0x0246be59L),
-tole(0x0709a8dcL), tole(0x06cbc2ebL), tole(0x048d7cb2L), tole(0x054f1685L),
-tole(0x0e1351b8L), tole(0x0fd13b8fL), tole(0x0d9785d6L), tole(0x0c55efe1L),
-tole(0x091af964L), tole(0x08d89353L), tole(0x0a9e2d0aL), tole(0x0b5c473dL),
-tole(0x1c26a370L), tole(0x1de4c947L), tole(0x1fa2771eL), tole(0x1e601d29L),
-tole(0x1b2f0bacL), tole(0x1aed619bL), tole(0x18abdfc2L), tole(0x1969b5f5L),
-tole(0x1235f2c8L), tole(0x13f798ffL), tole(0x11b126a6L), tole(0x10734c91L),
-tole(0x153c5a14L), tole(0x14fe3023L), tole(0x16b88e7aL), tole(0x177ae44dL),
-tole(0x384d46e0L), tole(0x398f2cd7L), tole(0x3bc9928eL), tole(0x3a0bf8b9L),
-tole(0x3f44ee3cL), tole(0x3e86840bL), tole(0x3cc03a52L), tole(0x3d025065L),
-tole(0x365e1758L), tole(0x379c7d6fL), tole(0x35dac336L), tole(0x3418a901L),
-tole(0x3157bf84L), tole(0x3095d5b3L), tole(0x32d36beaL), tole(0x331101ddL),
-tole(0x246be590L), tole(0x25a98fa7L), tole(0x27ef31feL), tole(0x262d5bc9L),
-tole(0x23624d4cL), tole(0x22a0277bL), tole(0x20e69922L), tole(0x2124f315L),
-tole(0x2a78b428L), tole(0x2bbade1fL), tole(0x29fc6046L), tole(0x283e0a71L),
-tole(0x2d711cf4L), tole(0x2cb376c3L), tole(0x2ef5c89aL), tole(0x2f37a2adL),
-tole(0x709a8dc0L), tole(0x7158e7f7L), tole(0x731e59aeL), tole(0x72dc3399L),
-tole(0x7793251cL), tole(0x76514f2bL), tole(0x7417f172L), tole(0x75d59b45L),
-tole(0x7e89dc78L), tole(0x7f4bb64fL), tole(0x7d0d0816L), tole(0x7ccf6221L),
-tole(0x798074a4L), tole(0x78421e93L), tole(0x7a04a0caL), tole(0x7bc6cafdL),
-tole(0x6cbc2eb0L), tole(0x6d7e4487L), tole(0x6f38fadeL), tole(0x6efa90e9L),
-tole(0x6bb5866cL), tole(0x6a77ec5bL), tole(0x68315202L), tole(0x69f33835L),
-tole(0x62af7f08L), tole(0x636d153fL), tole(0x612bab66L), tole(0x60e9c151L),
-tole(0x65a6d7d4L), tole(0x6464bde3L), tole(0x662203baL), tole(0x67e0698dL),
-tole(0x48d7cb20L), tole(0x4915a117L), tole(0x4b531f4eL), tole(0x4a917579L),
-tole(0x4fde63fcL), tole(0x4e1c09cbL), tole(0x4c5ab792L), tole(0x4d98dda5L),
-tole(0x46c49a98L), tole(0x4706f0afL), tole(0x45404ef6L), tole(0x448224c1L),
-tole(0x41cd3244L), tole(0x400f5873L), tole(0x4249e62aL), tole(0x438b8c1dL),
-tole(0x54f16850L), tole(0x55330267L), tole(0x5775bc3eL), tole(0x56b7d609L),
-tole(0x53f8c08cL), tole(0x523aaabbL), tole(0x507c14e2L), tole(0x51be7ed5L),
-tole(0x5ae239e8L), tole(0x5b2053dfL), tole(0x5966ed86L), tole(0x58a487b1L),
-tole(0x5deb9134L), tole(0x5c29fb03L), tole(0x5e6f455aL), tole(0x5fad2f6dL),
-tole(0xe1351b80L), tole(0xe0f771b7L), tole(0xe2b1cfeeL), tole(0xe373a5d9L),
-tole(0xe63cb35cL), tole(0xe7fed96bL), tole(0xe5b86732L), tole(0xe47a0d05L),
-tole(0xef264a38L), tole(0xeee4200fL), tole(0xeca29e56L), tole(0xed60f461L),
-tole(0xe82fe2e4L), tole(0xe9ed88d3L), tole(0xebab368aL), tole(0xea695cbdL),
-tole(0xfd13b8f0L), tole(0xfcd1d2c7L), tole(0xfe976c9eL), tole(0xff5506a9L),
-tole(0xfa1a102cL), tole(0xfbd87a1bL), tole(0xf99ec442L), tole(0xf85cae75L),
-tole(0xf300e948L), tole(0xf2c2837fL), tole(0xf0843d26L), tole(0xf1465711L),
-tole(0xf4094194L), tole(0xf5cb2ba3L), tole(0xf78d95faL), tole(0xf64fffcdL),
-tole(0xd9785d60L), tole(0xd8ba3757L), tole(0xdafc890eL), tole(0xdb3ee339L),
-tole(0xde71f5bcL), tole(0xdfb39f8bL), tole(0xddf521d2L), tole(0xdc374be5L),
-tole(0xd76b0cd8L), tole(0xd6a966efL), tole(0xd4efd8b6L), tole(0xd52db281L),
-tole(0xd062a404L), tole(0xd1a0ce33L), tole(0xd3e6706aL), tole(0xd2241a5dL),
-tole(0xc55efe10L), tole(0xc49c9427L), tole(0xc6da2a7eL), tole(0xc7184049L),
-tole(0xc25756ccL), tole(0xc3953cfbL), tole(0xc1d382a2L), tole(0xc011e895L),
-tole(0xcb4dafa8L), tole(0xca8fc59fL), tole(0xc8c97bc6L), tole(0xc90b11f1L),
-tole(0xcc440774L), tole(0xcd866d43L), tole(0xcfc0d31aL), tole(0xce02b92dL),
-tole(0x91af9640L), tole(0x906dfc77L), tole(0x922b422eL), tole(0x93e92819L),
-tole(0x96a63e9cL), tole(0x976454abL), tole(0x9522eaf2L), tole(0x94e080c5L),
-tole(0x9fbcc7f8L), tole(0x9e7eadcfL), tole(0x9c381396L), tole(0x9dfa79a1L),
-tole(0x98b56f24L), tole(0x99770513L), tole(0x9b31bb4aL), tole(0x9af3d17dL),
-tole(0x8d893530L), tole(0x8c4b5f07L), tole(0x8e0de15eL), tole(0x8fcf8b69L),
-tole(0x8a809decL), tole(0x8b42f7dbL), tole(0x89044982L), tole(0x88c623b5L),
-tole(0x839a6488L), tole(0x82580ebfL), tole(0x801eb0e6L), tole(0x81dcdad1L),
-tole(0x8493cc54L), tole(0x8551a663L), tole(0x8717183aL), tole(0x86d5720dL),
-tole(0xa9e2d0a0L), tole(0xa820ba97L), tole(0xaa6604ceL), tole(0xaba46ef9L),
-tole(0xaeeb787cL), tole(0xaf29124bL), tole(0xad6fac12L), tole(0xacadc625L),
-tole(0xa7f18118L), tole(0xa633eb2fL), tole(0xa4755576L), tole(0xa5b73f41L),
-tole(0xa0f829c4L), tole(0xa13a43f3L), tole(0xa37cfdaaL), tole(0xa2be979dL),
-tole(0xb5c473d0L), tole(0xb40619e7L), tole(0xb640a7beL), tole(0xb782cd89L),
-tole(0xb2cddb0cL), tole(0xb30fb13bL), tole(0xb1490f62L), tole(0xb08b6555L),
-tole(0xbbd72268L), tole(0xba15485fL), tole(0xb853f606L), tole(0xb9919c31L),
-tole(0xbcde8ab4L), tole(0xbd1ce083L), tole(0xbf5a5edaL), tole(0xbe9834edL)},
-{
-tole(0x00000000L), tole(0xb8bc6765L), tole(0xaa09c88bL), tole(0x12b5afeeL),
-tole(0x8f629757L), tole(0x37def032L), tole(0x256b5fdcL), tole(0x9dd738b9L),
-tole(0xc5b428efL), tole(0x7d084f8aL), tole(0x6fbde064L), tole(0xd7018701L),
-tole(0x4ad6bfb8L), tole(0xf26ad8ddL), tole(0xe0df7733L), tole(0x58631056L),
-tole(0x5019579fL), tole(0xe8a530faL), tole(0xfa109f14L), tole(0x42acf871L),
-tole(0xdf7bc0c8L), tole(0x67c7a7adL), tole(0x75720843L), tole(0xcdce6f26L),
-tole(0x95ad7f70L), tole(0x2d111815L), tole(0x3fa4b7fbL), tole(0x8718d09eL),
-tole(0x1acfe827L), tole(0xa2738f42L), tole(0xb0c620acL), tole(0x087a47c9L),
-tole(0xa032af3eL), tole(0x188ec85bL), tole(0x0a3b67b5L), tole(0xb28700d0L),
-tole(0x2f503869L), tole(0x97ec5f0cL), tole(0x8559f0e2L), tole(0x3de59787L),
-tole(0x658687d1L), tole(0xdd3ae0b4L), tole(0xcf8f4f5aL), tole(0x7733283fL),
-tole(0xeae41086L), tole(0x525877e3L), tole(0x40edd80dL), tole(0xf851bf68L),
-tole(0xf02bf8a1L), tole(0x48979fc4L), tole(0x5a22302aL), tole(0xe29e574fL),
-tole(0x7f496ff6L), tole(0xc7f50893L), tole(0xd540a77dL), tole(0x6dfcc018L),
-tole(0x359fd04eL), tole(0x8d23b72bL), tole(0x9f9618c5L), tole(0x272a7fa0L),
-tole(0xbafd4719L), tole(0x0241207cL), tole(0x10f48f92L), tole(0xa848e8f7L),
-tole(0x9b14583dL), tole(0x23a83f58L), tole(0x311d90b6L), tole(0x89a1f7d3L),
-tole(0x1476cf6aL), tole(0xaccaa80fL), tole(0xbe7f07e1L), tole(0x06c36084L),
-tole(0x5ea070d2L), tole(0xe61c17b7L), tole(0xf4a9b859L), tole(0x4c15df3cL),
-tole(0xd1c2e785L), tole(0x697e80e0L), tole(0x7bcb2f0eL), tole(0xc377486bL),
-tole(0xcb0d0fa2L), tole(0x73b168c7L), tole(0x6104c729L), tole(0xd9b8a04cL),
-tole(0x446f98f5L), tole(0xfcd3ff90L), tole(0xee66507eL), tole(0x56da371bL),
-tole(0x0eb9274dL), tole(0xb6054028L), tole(0xa4b0efc6L), tole(0x1c0c88a3L),
-tole(0x81dbb01aL), tole(0x3967d77fL), tole(0x2bd27891L), tole(0x936e1ff4L),
-tole(0x3b26f703L), tole(0x839a9066L), tole(0x912f3f88L), tole(0x299358edL),
-tole(0xb4446054L), tole(0x0cf80731L), tole(0x1e4da8dfL), tole(0xa6f1cfbaL),
-tole(0xfe92dfecL), tole(0x462eb889L), tole(0x549b1767L), tole(0xec277002L),
-tole(0x71f048bbL), tole(0xc94c2fdeL), tole(0xdbf98030L), tole(0x6345e755L),
-tole(0x6b3fa09cL), tole(0xd383c7f9L), tole(0xc1366817L), tole(0x798a0f72L),
-tole(0xe45d37cbL), tole(0x5ce150aeL), tole(0x4e54ff40L), tole(0xf6e89825L),
-tole(0xae8b8873L), tole(0x1637ef16L), tole(0x048240f8L), tole(0xbc3e279dL),
-tole(0x21e91f24L), tole(0x99557841L), tole(0x8be0d7afL), tole(0x335cb0caL),
-tole(0xed59b63bL), tole(0x55e5d15eL), tole(0x47507eb0L), tole(0xffec19d5L),
-tole(0x623b216cL), tole(0xda874609L), tole(0xc832e9e7L), tole(0x708e8e82L),
-tole(0x28ed9ed4L), tole(0x9051f9b1L), tole(0x82e4565fL), tole(0x3a58313aL),
-tole(0xa78f0983L), tole(0x1f336ee6L), tole(0x0d86c108L), tole(0xb53aa66dL),
-tole(0xbd40e1a4L), tole(0x05fc86c1L), tole(0x1749292fL), tole(0xaff54e4aL),
-tole(0x322276f3L), tole(0x8a9e1196L), tole(0x982bbe78L), tole(0x2097d91dL),
-tole(0x78f4c94bL), tole(0xc048ae2eL), tole(0xd2fd01c0L), tole(0x6a4166a5L),
-tole(0xf7965e1cL), tole(0x4f2a3979L), tole(0x5d9f9697L), tole(0xe523f1f2L),
-tole(0x4d6b1905L), tole(0xf5d77e60L), tole(0xe762d18eL), tole(0x5fdeb6ebL),
-tole(0xc2098e52L), tole(0x7ab5e937L), tole(0x680046d9L), tole(0xd0bc21bcL),
-tole(0x88df31eaL), tole(0x3063568fL), tole(0x22d6f961L), tole(0x9a6a9e04L),
-tole(0x07bda6bdL), tole(0xbf01c1d8L), tole(0xadb46e36L), tole(0x15080953L),
-tole(0x1d724e9aL), tole(0xa5ce29ffL), tole(0xb77b8611L), tole(0x0fc7e174L),
-tole(0x9210d9cdL), tole(0x2aacbea8L), tole(0x38191146L), tole(0x80a57623L),
-tole(0xd8c66675L), tole(0x607a0110L), tole(0x72cfaefeL), tole(0xca73c99bL),
-tole(0x57a4f122L), tole(0xef189647L), tole(0xfdad39a9L), tole(0x45115eccL),
-tole(0x764dee06L), tole(0xcef18963L), tole(0xdc44268dL), tole(0x64f841e8L),
-tole(0xf92f7951L), tole(0x41931e34L), tole(0x5326b1daL), tole(0xeb9ad6bfL),
-tole(0xb3f9c6e9L), tole(0x0b45a18cL), tole(0x19f00e62L), tole(0xa14c6907L),
-tole(0x3c9b51beL), tole(0x842736dbL), tole(0x96929935L), tole(0x2e2efe50L),
-tole(0x2654b999L), tole(0x9ee8defcL), tole(0x8c5d7112L), tole(0x34e11677L),
-tole(0xa9362eceL), tole(0x118a49abL), tole(0x033fe645L), tole(0xbb838120L),
-tole(0xe3e09176L), tole(0x5b5cf613L), tole(0x49e959fdL), tole(0xf1553e98L),
-tole(0x6c820621L), tole(0xd43e6144L), tole(0xc68bceaaL), tole(0x7e37a9cfL),
-tole(0xd67f4138L), tole(0x6ec3265dL), tole(0x7c7689b3L), tole(0xc4caeed6L),
-tole(0x591dd66fL), tole(0xe1a1b10aL), tole(0xf3141ee4L), tole(0x4ba87981L),
-tole(0x13cb69d7L), tole(0xab770eb2L), tole(0xb9c2a15cL), tole(0x017ec639L),
-tole(0x9ca9fe80L), tole(0x241599e5L), tole(0x36a0360bL), tole(0x8e1c516eL),
-tole(0x866616a7L), tole(0x3eda71c2L), tole(0x2c6fde2cL), tole(0x94d3b949L),
-tole(0x090481f0L), tole(0xb1b8e695L), tole(0xa30d497bL), tole(0x1bb12e1eL),
-tole(0x43d23e48L), tole(0xfb6e592dL), tole(0xe9dbf6c3L), tole(0x516791a6L),
-tole(0xccb0a91fL), tole(0x740cce7aL), tole(0x66b96194L), tole(0xde0506f1L)},
-{
-tole(0x00000000L), tole(0x3d6029b0L), tole(0x7ac05360L), tole(0x47a07ad0L),
-tole(0xf580a6c0L), tole(0xc8e08f70L), tole(0x8f40f5a0L), tole(0xb220dc10L),
-tole(0x30704bc1L), tole(0x0d106271L), tole(0x4ab018a1L), tole(0x77d03111L),
-tole(0xc5f0ed01L), tole(0xf890c4b1L), tole(0xbf30be61L), tole(0x825097d1L),
-tole(0x60e09782L), tole(0x5d80be32L), tole(0x1a20c4e2L), tole(0x2740ed52L),
-tole(0x95603142L), tole(0xa80018f2L), tole(0xefa06222L), tole(0xd2c04b92L),
-tole(0x5090dc43L), tole(0x6df0f5f3L), tole(0x2a508f23L), tole(0x1730a693L),
-tole(0xa5107a83L), tole(0x98705333L), tole(0xdfd029e3L), tole(0xe2b00053L),
-tole(0xc1c12f04L), tole(0xfca106b4L), tole(0xbb017c64L), tole(0x866155d4L),
-tole(0x344189c4L), tole(0x0921a074L), tole(0x4e81daa4L), tole(0x73e1f314L),
-tole(0xf1b164c5L), tole(0xccd14d75L), tole(0x8b7137a5L), tole(0xb6111e15L),
-tole(0x0431c205L), tole(0x3951ebb5L), tole(0x7ef19165L), tole(0x4391b8d5L),
-tole(0xa121b886L), tole(0x9c419136L), tole(0xdbe1ebe6L), tole(0xe681c256L),
-tole(0x54a11e46L), tole(0x69c137f6L), tole(0x2e614d26L), tole(0x13016496L),
-tole(0x9151f347L), tole(0xac31daf7L), tole(0xeb91a027L), tole(0xd6f18997L),
-tole(0x64d15587L), tole(0x59b17c37L), tole(0x1e1106e7L), tole(0x23712f57L),
-tole(0x58f35849L), tole(0x659371f9L), tole(0x22330b29L), tole(0x1f532299L),
-tole(0xad73fe89L), tole(0x9013d739L), tole(0xd7b3ade9L), tole(0xead38459L),
-tole(0x68831388L), tole(0x55e33a38L), tole(0x124340e8L), tole(0x2f236958L),
-tole(0x9d03b548L), tole(0xa0639cf8L), tole(0xe7c3e628L), tole(0xdaa3cf98L),
-tole(0x3813cfcbL), tole(0x0573e67bL), tole(0x42d39cabL), tole(0x7fb3b51bL),
-tole(0xcd93690bL), tole(0xf0f340bbL), tole(0xb7533a6bL), tole(0x8a3313dbL),
-tole(0x0863840aL), tole(0x3503adbaL), tole(0x72a3d76aL), tole(0x4fc3fedaL),
-tole(0xfde322caL), tole(0xc0830b7aL), tole(0x872371aaL), tole(0xba43581aL),
-tole(0x9932774dL), tole(0xa4525efdL), tole(0xe3f2242dL), tole(0xde920d9dL),
-tole(0x6cb2d18dL), tole(0x51d2f83dL), tole(0x167282edL), tole(0x2b12ab5dL),
-tole(0xa9423c8cL), tole(0x9422153cL), tole(0xd3826fecL), tole(0xeee2465cL),
-tole(0x5cc29a4cL), tole(0x61a2b3fcL), tole(0x2602c92cL), tole(0x1b62e09cL),
-tole(0xf9d2e0cfL), tole(0xc4b2c97fL), tole(0x8312b3afL), tole(0xbe729a1fL),
-tole(0x0c52460fL), tole(0x31326fbfL), tole(0x7692156fL), tole(0x4bf23cdfL),
-tole(0xc9a2ab0eL), tole(0xf4c282beL), tole(0xb362f86eL), tole(0x8e02d1deL),
-tole(0x3c220dceL), tole(0x0142247eL), tole(0x46e25eaeL), tole(0x7b82771eL),
-tole(0xb1e6b092L), tole(0x8c869922L), tole(0xcb26e3f2L), tole(0xf646ca42L),
-tole(0x44661652L), tole(0x79063fe2L), tole(0x3ea64532L), tole(0x03c66c82L),
-tole(0x8196fb53L), tole(0xbcf6d2e3L), tole(0xfb56a833L), tole(0xc6368183L),
-tole(0x74165d93L), tole(0x49767423L), tole(0x0ed60ef3L), tole(0x33b62743L),
-tole(0xd1062710L), tole(0xec660ea0L), tole(0xabc67470L), tole(0x96a65dc0L),
-tole(0x248681d0L), tole(0x19e6a860L), tole(0x5e46d2b0L), tole(0x6326fb00L),
-tole(0xe1766cd1L), tole(0xdc164561L), tole(0x9bb63fb1L), tole(0xa6d61601L),
-tole(0x14f6ca11L), tole(0x2996e3a1L), tole(0x6e369971L), tole(0x5356b0c1L),
-tole(0x70279f96L), tole(0x4d47b626L), tole(0x0ae7ccf6L), tole(0x3787e546L),
-tole(0x85a73956L), tole(0xb8c710e6L), tole(0xff676a36L), tole(0xc2074386L),
-tole(0x4057d457L), tole(0x7d37fde7L), tole(0x3a978737L), tole(0x07f7ae87L),
-tole(0xb5d77297L), tole(0x88b75b27L), tole(0xcf1721f7L), tole(0xf2770847L),
-tole(0x10c70814L), tole(0x2da721a4L), tole(0x6a075b74L), tole(0x576772c4L),
-tole(0xe547aed4L), tole(0xd8278764L), tole(0x9f87fdb4L), tole(0xa2e7d404L),
-tole(0x20b743d5L), tole(0x1dd76a65L), tole(0x5a7710b5L), tole(0x67173905L),
-tole(0xd537e515L), tole(0xe857cca5L), tole(0xaff7b675L), tole(0x92979fc5L),
-tole(0xe915e8dbL), tole(0xd475c16bL), tole(0x93d5bbbbL), tole(0xaeb5920bL),
-tole(0x1c954e1bL), tole(0x21f567abL), tole(0x66551d7bL), tole(0x5b3534cbL),
-tole(0xd965a31aL), tole(0xe4058aaaL), tole(0xa3a5f07aL), tole(0x9ec5d9caL),
-tole(0x2ce505daL), tole(0x11852c6aL), tole(0x562556baL), tole(0x6b457f0aL),
-tole(0x89f57f59L), tole(0xb49556e9L), tole(0xf3352c39L), tole(0xce550589L),
-tole(0x7c75d999L), tole(0x4115f029L), tole(0x06b58af9L), tole(0x3bd5a349L),
-tole(0xb9853498L), tole(0x84e51d28L), tole(0xc34567f8L), tole(0xfe254e48L),
-tole(0x4c059258L), tole(0x7165bbe8L), tole(0x36c5c138L), tole(0x0ba5e888L),
-tole(0x28d4c7dfL), tole(0x15b4ee6fL), tole(0x521494bfL), tole(0x6f74bd0fL),
-tole(0xdd54611fL), tole(0xe03448afL), tole(0xa794327fL), tole(0x9af41bcfL),
-tole(0x18a48c1eL), tole(0x25c4a5aeL), tole(0x6264df7eL), tole(0x5f04f6ceL),
-tole(0xed242adeL), tole(0xd044036eL), tole(0x97e479beL), tole(0xaa84500eL),
-tole(0x4834505dL), tole(0x755479edL), tole(0x32f4033dL), tole(0x0f942a8dL),
-tole(0xbdb4f69dL), tole(0x80d4df2dL), tole(0xc774a5fdL), tole(0xfa148c4dL),
-tole(0x78441b9cL), tole(0x4524322cL), tole(0x028448fcL), tole(0x3fe4614cL),
-tole(0x8dc4bd5cL), tole(0xb0a494ecL), tole(0xf704ee3cL), tole(0xca64c78cL)},
-{
-tole(0x00000000L), tole(0xcb5cd3a5L), tole(0x4dc8a10bL), tole(0x869472aeL),
-tole(0x9b914216L), tole(0x50cd91b3L), tole(0xd659e31dL), tole(0x1d0530b8L),
-tole(0xec53826dL), tole(0x270f51c8L), tole(0xa19b2366L), tole(0x6ac7f0c3L),
-tole(0x77c2c07bL), tole(0xbc9e13deL), tole(0x3a0a6170L), tole(0xf156b2d5L),
-tole(0x03d6029bL), tole(0xc88ad13eL), tole(0x4e1ea390L), tole(0x85427035L),
-tole(0x9847408dL), tole(0x531b9328L), tole(0xd58fe186L), tole(0x1ed33223L),
-tole(0xef8580f6L), tole(0x24d95353L), tole(0xa24d21fdL), tole(0x6911f258L),
-tole(0x7414c2e0L), tole(0xbf481145L), tole(0x39dc63ebL), tole(0xf280b04eL),
-tole(0x07ac0536L), tole(0xccf0d693L), tole(0x4a64a43dL), tole(0x81387798L),
-tole(0x9c3d4720L), tole(0x57619485L), tole(0xd1f5e62bL), tole(0x1aa9358eL),
-tole(0xebff875bL), tole(0x20a354feL), tole(0xa6372650L), tole(0x6d6bf5f5L),
-tole(0x706ec54dL), tole(0xbb3216e8L), tole(0x3da66446L), tole(0xf6fab7e3L),
-tole(0x047a07adL), tole(0xcf26d408L), tole(0x49b2a6a6L), tole(0x82ee7503L),
-tole(0x9feb45bbL), tole(0x54b7961eL), tole(0xd223e4b0L), tole(0x197f3715L),
-tole(0xe82985c0L), tole(0x23755665L), tole(0xa5e124cbL), tole(0x6ebdf76eL),
-tole(0x73b8c7d6L), tole(0xb8e41473L), tole(0x3e7066ddL), tole(0xf52cb578L),
-tole(0x0f580a6cL), tole(0xc404d9c9L), tole(0x4290ab67L), tole(0x89cc78c2L),
-tole(0x94c9487aL), tole(0x5f959bdfL), tole(0xd901e971L), tole(0x125d3ad4L),
-tole(0xe30b8801L), tole(0x28575ba4L), tole(0xaec3290aL), tole(0x659ffaafL),
-tole(0x789aca17L), tole(0xb3c619b2L), tole(0x35526b1cL), tole(0xfe0eb8b9L),
-tole(0x0c8e08f7L), tole(0xc7d2db52L), tole(0x4146a9fcL), tole(0x8a1a7a59L),
-tole(0x971f4ae1L), tole(0x5c439944L), tole(0xdad7ebeaL), tole(0x118b384fL),
-tole(0xe0dd8a9aL), tole(0x2b81593fL), tole(0xad152b91L), tole(0x6649f834L),
-tole(0x7b4cc88cL), tole(0xb0101b29L), tole(0x36846987L), tole(0xfdd8ba22L),
-tole(0x08f40f5aL), tole(0xc3a8dcffL), tole(0x453cae51L), tole(0x8e607df4L),
-tole(0x93654d4cL), tole(0x58399ee9L), tole(0xdeadec47L), tole(0x15f13fe2L),
-tole(0xe4a78d37L), tole(0x2ffb5e92L), tole(0xa96f2c3cL), tole(0x6233ff99L),
-tole(0x7f36cf21L), tole(0xb46a1c84L), tole(0x32fe6e2aL), tole(0xf9a2bd8fL),
-tole(0x0b220dc1L), tole(0xc07ede64L), tole(0x46eaaccaL), tole(0x8db67f6fL),
-tole(0x90b34fd7L), tole(0x5bef9c72L), tole(0xdd7beedcL), tole(0x16273d79L),
-tole(0xe7718facL), tole(0x2c2d5c09L), tole(0xaab92ea7L), tole(0x61e5fd02L),
-tole(0x7ce0cdbaL), tole(0xb7bc1e1fL), tole(0x31286cb1L), tole(0xfa74bf14L),
-tole(0x1eb014d8L), tole(0xd5ecc77dL), tole(0x5378b5d3L), tole(0x98246676L),
-tole(0x852156ceL), tole(0x4e7d856bL), tole(0xc8e9f7c5L), tole(0x03b52460L),
-tole(0xf2e396b5L), tole(0x39bf4510L), tole(0xbf2b37beL), tole(0x7477e41bL),
-tole(0x6972d4a3L), tole(0xa22e0706L), tole(0x24ba75a8L), tole(0xefe6a60dL),
-tole(0x1d661643L), tole(0xd63ac5e6L), tole(0x50aeb748L), tole(0x9bf264edL),
-tole(0x86f75455L), tole(0x4dab87f0L), tole(0xcb3ff55eL), tole(0x006326fbL),
-tole(0xf135942eL), tole(0x3a69478bL), tole(0xbcfd3525L), tole(0x77a1e680L),
-tole(0x6aa4d638L), tole(0xa1f8059dL), tole(0x276c7733L), tole(0xec30a496L),
-tole(0x191c11eeL), tole(0xd240c24bL), tole(0x54d4b0e5L), tole(0x9f886340L),
-tole(0x828d53f8L), tole(0x49d1805dL), tole(0xcf45f2f3L), tole(0x04192156L),
-tole(0xf54f9383L), tole(0x3e134026L), tole(0xb8873288L), tole(0x73dbe12dL),
-tole(0x6eded195L), tole(0xa5820230L), tole(0x2316709eL), tole(0xe84aa33bL),
-tole(0x1aca1375L), tole(0xd196c0d0L), tole(0x5702b27eL), tole(0x9c5e61dbL),
-tole(0x815b5163L), tole(0x4a0782c6L), tole(0xcc93f068L), tole(0x07cf23cdL),
-tole(0xf6999118L), tole(0x3dc542bdL), tole(0xbb513013L), tole(0x700de3b6L),
-tole(0x6d08d30eL), tole(0xa65400abL), tole(0x20c07205L), tole(0xeb9ca1a0L),
-tole(0x11e81eb4L), tole(0xdab4cd11L), tole(0x5c20bfbfL), tole(0x977c6c1aL),
-tole(0x8a795ca2L), tole(0x41258f07L), tole(0xc7b1fda9L), tole(0x0ced2e0cL),
-tole(0xfdbb9cd9L), tole(0x36e74f7cL), tole(0xb0733dd2L), tole(0x7b2fee77L),
-tole(0x662adecfL), tole(0xad760d6aL), tole(0x2be27fc4L), tole(0xe0beac61L),
-tole(0x123e1c2fL), tole(0xd962cf8aL), tole(0x5ff6bd24L), tole(0x94aa6e81L),
-tole(0x89af5e39L), tole(0x42f38d9cL), tole(0xc467ff32L), tole(0x0f3b2c97L),
-tole(0xfe6d9e42L), tole(0x35314de7L), tole(0xb3a53f49L), tole(0x78f9ececL),
-tole(0x65fcdc54L), tole(0xaea00ff1L), tole(0x28347d5fL), tole(0xe368aefaL),
-tole(0x16441b82L), tole(0xdd18c827L), tole(0x5b8cba89L), tole(0x90d0692cL),
-tole(0x8dd55994L), tole(0x46898a31L), tole(0xc01df89fL), tole(0x0b412b3aL),
-tole(0xfa1799efL), tole(0x314b4a4aL), tole(0xb7df38e4L), tole(0x7c83eb41L),
-tole(0x6186dbf9L), tole(0xaada085cL), tole(0x2c4e7af2L), tole(0xe712a957L),
-tole(0x15921919L), tole(0xdececabcL), tole(0x585ab812L), tole(0x93066bb7L),
-tole(0x8e035b0fL), tole(0x455f88aaL), tole(0xc3cbfa04L), tole(0x089729a1L),
-tole(0xf9c19b74L), tole(0x329d48d1L), tole(0xb4093a7fL), tole(0x7f55e9daL),
-tole(0x6250d962L), tole(0xa90c0ac7L), tole(0x2f987869L), tole(0xe4c4abccL)},
-{
-tole(0x00000000L), tole(0xa6770bb4L), tole(0x979f1129L), tole(0x31e81a9dL),
-tole(0xf44f2413L), tole(0x52382fa7L), tole(0x63d0353aL), tole(0xc5a73e8eL),
-tole(0x33ef4e67L), tole(0x959845d3L), tole(0xa4705f4eL), tole(0x020754faL),
-tole(0xc7a06a74L), tole(0x61d761c0L), tole(0x503f7b5dL), tole(0xf64870e9L),
-tole(0x67de9cceL), tole(0xc1a9977aL), tole(0xf0418de7L), tole(0x56368653L),
-tole(0x9391b8ddL), tole(0x35e6b369L), tole(0x040ea9f4L), tole(0xa279a240L),
-tole(0x5431d2a9L), tole(0xf246d91dL), tole(0xc3aec380L), tole(0x65d9c834L),
-tole(0xa07ef6baL), tole(0x0609fd0eL), tole(0x37e1e793L), tole(0x9196ec27L),
-tole(0xcfbd399cL), tole(0x69ca3228L), tole(0x582228b5L), tole(0xfe552301L),
-tole(0x3bf21d8fL), tole(0x9d85163bL), tole(0xac6d0ca6L), tole(0x0a1a0712L),
-tole(0xfc5277fbL), tole(0x5a257c4fL), tole(0x6bcd66d2L), tole(0xcdba6d66L),
-tole(0x081d53e8L), tole(0xae6a585cL), tole(0x9f8242c1L), tole(0x39f54975L),
-tole(0xa863a552L), tole(0x0e14aee6L), tole(0x3ffcb47bL), tole(0x998bbfcfL),
-tole(0x5c2c8141L), tole(0xfa5b8af5L), tole(0xcbb39068L), tole(0x6dc49bdcL),
-tole(0x9b8ceb35L), tole(0x3dfbe081L), tole(0x0c13fa1cL), tole(0xaa64f1a8L),
-tole(0x6fc3cf26L), tole(0xc9b4c492L), tole(0xf85cde0fL), tole(0x5e2bd5bbL),
-tole(0x440b7579L), tole(0xe27c7ecdL), tole(0xd3946450L), tole(0x75e36fe4L),
-tole(0xb044516aL), tole(0x16335adeL), tole(0x27db4043L), tole(0x81ac4bf7L),
-tole(0x77e43b1eL), tole(0xd19330aaL), tole(0xe07b2a37L), tole(0x460c2183L),
-tole(0x83ab1f0dL), tole(0x25dc14b9L), tole(0x14340e24L), tole(0xb2430590L),
-tole(0x23d5e9b7L), tole(0x85a2e203L), tole(0xb44af89eL), tole(0x123df32aL),
-tole(0xd79acda4L), tole(0x71edc610L), tole(0x4005dc8dL), tole(0xe672d739L),
-tole(0x103aa7d0L), tole(0xb64dac64L), tole(0x87a5b6f9L), tole(0x21d2bd4dL),
-tole(0xe47583c3L), tole(0x42028877L), tole(0x73ea92eaL), tole(0xd59d995eL),
-tole(0x8bb64ce5L), tole(0x2dc14751L), tole(0x1c295dccL), tole(0xba5e5678L),
-tole(0x7ff968f6L), tole(0xd98e6342L), tole(0xe86679dfL), tole(0x4e11726bL),
-tole(0xb8590282L), tole(0x1e2e0936L), tole(0x2fc613abL), tole(0x89b1181fL),
-tole(0x4c162691L), tole(0xea612d25L), tole(0xdb8937b8L), tole(0x7dfe3c0cL),
-tole(0xec68d02bL), tole(0x4a1fdb9fL), tole(0x7bf7c102L), tole(0xdd80cab6L),
-tole(0x1827f438L), tole(0xbe50ff8cL), tole(0x8fb8e511L), tole(0x29cfeea5L),
-tole(0xdf879e4cL), tole(0x79f095f8L), tole(0x48188f65L), tole(0xee6f84d1L),
-tole(0x2bc8ba5fL), tole(0x8dbfb1ebL), tole(0xbc57ab76L), tole(0x1a20a0c2L),
-tole(0x8816eaf2L), tole(0x2e61e146L), tole(0x1f89fbdbL), tole(0xb9fef06fL),
-tole(0x7c59cee1L), tole(0xda2ec555L), tole(0xebc6dfc8L), tole(0x4db1d47cL),
-tole(0xbbf9a495L), tole(0x1d8eaf21L), tole(0x2c66b5bcL), tole(0x8a11be08L),
-tole(0x4fb68086L), tole(0xe9c18b32L), tole(0xd82991afL), tole(0x7e5e9a1bL),
-tole(0xefc8763cL), tole(0x49bf7d88L), tole(0x78576715L), tole(0xde206ca1L),
-tole(0x1b87522fL), tole(0xbdf0599bL), tole(0x8c184306L), tole(0x2a6f48b2L),
-tole(0xdc27385bL), tole(0x7a5033efL), tole(0x4bb82972L), tole(0xedcf22c6L),
-tole(0x28681c48L), tole(0x8e1f17fcL), tole(0xbff70d61L), tole(0x198006d5L),
-tole(0x47abd36eL), tole(0xe1dcd8daL), tole(0xd034c247L), tole(0x7643c9f3L),
-tole(0xb3e4f77dL), tole(0x1593fcc9L), tole(0x247be654L), tole(0x820cede0L),
-tole(0x74449d09L), tole(0xd23396bdL), tole(0xe3db8c20L), tole(0x45ac8794L),
-tole(0x800bb91aL), tole(0x267cb2aeL), tole(0x1794a833L), tole(0xb1e3a387L),
-tole(0x20754fa0L), tole(0x86024414L), tole(0xb7ea5e89L), tole(0x119d553dL),
-tole(0xd43a6bb3L), tole(0x724d6007L), tole(0x43a57a9aL), tole(0xe5d2712eL),
-tole(0x139a01c7L), tole(0xb5ed0a73L), tole(0x840510eeL), tole(0x22721b5aL),
-tole(0xe7d525d4L), tole(0x41a22e60L), tole(0x704a34fdL), tole(0xd63d3f49L),
-tole(0xcc1d9f8bL), tole(0x6a6a943fL), tole(0x5b828ea2L), tole(0xfdf58516L),
-tole(0x3852bb98L), tole(0x9e25b02cL), tole(0xafcdaab1L), tole(0x09baa105L),
-tole(0xfff2d1ecL), tole(0x5985da58L), tole(0x686dc0c5L), tole(0xce1acb71L),
-tole(0x0bbdf5ffL), tole(0xadcafe4bL), tole(0x9c22e4d6L), tole(0x3a55ef62L),
-tole(0xabc30345L), tole(0x0db408f1L), tole(0x3c5c126cL), tole(0x9a2b19d8L),
-tole(0x5f8c2756L), tole(0xf9fb2ce2L), tole(0xc813367fL), tole(0x6e643dcbL),
-tole(0x982c4d22L), tole(0x3e5b4696L), tole(0x0fb35c0bL), tole(0xa9c457bfL),
-tole(0x6c636931L), tole(0xca146285L), tole(0xfbfc7818L), tole(0x5d8b73acL),
-tole(0x03a0a617L), tole(0xa5d7ada3L), tole(0x943fb73eL), tole(0x3248bc8aL),
-tole(0xf7ef8204L), tole(0x519889b0L), tole(0x6070932dL), tole(0xc6079899L),
-tole(0x304fe870L), tole(0x9638e3c4L), tole(0xa7d0f959L), tole(0x01a7f2edL),
-tole(0xc400cc63L), tole(0x6277c7d7L), tole(0x539fdd4aL), tole(0xf5e8d6feL),
-tole(0x647e3ad9L), tole(0xc209316dL), tole(0xf3e12bf0L), tole(0x55962044L),
-tole(0x90311ecaL), tole(0x3646157eL), tole(0x07ae0fe3L), tole(0xa1d90457L),
-tole(0x579174beL), tole(0xf1e67f0aL), tole(0xc00e6597L), tole(0x66796e23L),
-tole(0xa3de50adL), tole(0x05a95b19L), tole(0x34414184L), tole(0x92364a30L)},
-{
-tole(0x00000000L), tole(0xccaa009eL), tole(0x4225077dL), tole(0x8e8f07e3L),
-tole(0x844a0efaL), tole(0x48e00e64L), tole(0xc66f0987L), tole(0x0ac50919L),
-tole(0xd3e51bb5L), tole(0x1f4f1b2bL), tole(0x91c01cc8L), tole(0x5d6a1c56L),
-tole(0x57af154fL), tole(0x9b0515d1L), tole(0x158a1232L), tole(0xd92012acL),
-tole(0x7cbb312bL), tole(0xb01131b5L), tole(0x3e9e3656L), tole(0xf23436c8L),
-tole(0xf8f13fd1L), tole(0x345b3f4fL), tole(0xbad438acL), tole(0x767e3832L),
-tole(0xaf5e2a9eL), tole(0x63f42a00L), tole(0xed7b2de3L), tole(0x21d12d7dL),
-tole(0x2b142464L), tole(0xe7be24faL), tole(0x69312319L), tole(0xa59b2387L),
-tole(0xf9766256L), tole(0x35dc62c8L), tole(0xbb53652bL), tole(0x77f965b5L),
-tole(0x7d3c6cacL), tole(0xb1966c32L), tole(0x3f196bd1L), tole(0xf3b36b4fL),
-tole(0x2a9379e3L), tole(0xe639797dL), tole(0x68b67e9eL), tole(0xa41c7e00L),
-tole(0xaed97719L), tole(0x62737787L), tole(0xecfc7064L), tole(0x205670faL),
-tole(0x85cd537dL), tole(0x496753e3L), tole(0xc7e85400L), tole(0x0b42549eL),
-tole(0x01875d87L), tole(0xcd2d5d19L), tole(0x43a25afaL), tole(0x8f085a64L),
-tole(0x562848c8L), tole(0x9a824856L), tole(0x140d4fb5L), tole(0xd8a74f2bL),
-tole(0xd2624632L), tole(0x1ec846acL), tole(0x9047414fL), tole(0x5ced41d1L),
-tole(0x299dc2edL), tole(0xe537c273L), tole(0x6bb8c590L), tole(0xa712c50eL),
-tole(0xadd7cc17L), tole(0x617dcc89L), tole(0xeff2cb6aL), tole(0x2358cbf4L),
-tole(0xfa78d958L), tole(0x36d2d9c6L), tole(0xb85dde25L), tole(0x74f7debbL),
-tole(0x7e32d7a2L), tole(0xb298d73cL), tole(0x3c17d0dfL), tole(0xf0bdd041L),
-tole(0x5526f3c6L), tole(0x998cf358L), tole(0x1703f4bbL), tole(0xdba9f425L),
-tole(0xd16cfd3cL), tole(0x1dc6fda2L), tole(0x9349fa41L), tole(0x5fe3fadfL),
-tole(0x86c3e873L), tole(0x4a69e8edL), tole(0xc4e6ef0eL), tole(0x084cef90L),
-tole(0x0289e689L), tole(0xce23e617L), tole(0x40ace1f4L), tole(0x8c06e16aL),
-tole(0xd0eba0bbL), tole(0x1c41a025L), tole(0x92cea7c6L), tole(0x5e64a758L),
-tole(0x54a1ae41L), tole(0x980baedfL), tole(0x1684a93cL), tole(0xda2ea9a2L),
-tole(0x030ebb0eL), tole(0xcfa4bb90L), tole(0x412bbc73L), tole(0x8d81bcedL),
-tole(0x8744b5f4L), tole(0x4beeb56aL), tole(0xc561b289L), tole(0x09cbb217L),
-tole(0xac509190L), tole(0x60fa910eL), tole(0xee7596edL), tole(0x22df9673L),
-tole(0x281a9f6aL), tole(0xe4b09ff4L), tole(0x6a3f9817L), tole(0xa6959889L),
-tole(0x7fb58a25L), tole(0xb31f8abbL), tole(0x3d908d58L), tole(0xf13a8dc6L),
-tole(0xfbff84dfL), tole(0x37558441L), tole(0xb9da83a2L), tole(0x7570833cL),
-tole(0x533b85daL), tole(0x9f918544L), tole(0x111e82a7L), tole(0xddb48239L),
-tole(0xd7718b20L), tole(0x1bdb8bbeL), tole(0x95548c5dL), tole(0x59fe8cc3L),
-tole(0x80de9e6fL), tole(0x4c749ef1L), tole(0xc2fb9912L), tole(0x0e51998cL),
-tole(0x04949095L), tole(0xc83e900bL), tole(0x46b197e8L), tole(0x8a1b9776L),
-tole(0x2f80b4f1L), tole(0xe32ab46fL), tole(0x6da5b38cL), tole(0xa10fb312L),
-tole(0xabcaba0bL), tole(0x6760ba95L), tole(0xe9efbd76L), tole(0x2545bde8L),
-tole(0xfc65af44L), tole(0x30cfafdaL), tole(0xbe40a839L), tole(0x72eaa8a7L),
-tole(0x782fa1beL), tole(0xb485a120L), tole(0x3a0aa6c3L), tole(0xf6a0a65dL),
-tole(0xaa4de78cL), tole(0x66e7e712L), tole(0xe868e0f1L), tole(0x24c2e06fL),
-tole(0x2e07e976L), tole(0xe2ade9e8L), tole(0x6c22ee0bL), tole(0xa088ee95L),
-tole(0x79a8fc39L), tole(0xb502fca7L), tole(0x3b8dfb44L), tole(0xf727fbdaL),
-tole(0xfde2f2c3L), tole(0x3148f25dL), tole(0xbfc7f5beL), tole(0x736df520L),
-tole(0xd6f6d6a7L), tole(0x1a5cd639L), tole(0x94d3d1daL), tole(0x5879d144L),
-tole(0x52bcd85dL), tole(0x9e16d8c3L), tole(0x1099df20L), tole(0xdc33dfbeL),
-tole(0x0513cd12L), tole(0xc9b9cd8cL), tole(0x4736ca6fL), tole(0x8b9ccaf1L),
-tole(0x8159c3e8L), tole(0x4df3c376L), tole(0xc37cc495L), tole(0x0fd6c40bL),
-tole(0x7aa64737L), tole(0xb60c47a9L), tole(0x3883404aL), tole(0xf42940d4L),
-tole(0xfeec49cdL), tole(0x32464953L), tole(0xbcc94eb0L), tole(0x70634e2eL),
-tole(0xa9435c82L), tole(0x65e95c1cL), tole(0xeb665bffL), tole(0x27cc5b61L),
-tole(0x2d095278L), tole(0xe1a352e6L), tole(0x6f2c5505L), tole(0xa386559bL),
-tole(0x061d761cL), tole(0xcab77682L), tole(0x44387161L), tole(0x889271ffL),
-tole(0x825778e6L), tole(0x4efd7878L), tole(0xc0727f9bL), tole(0x0cd87f05L),
-tole(0xd5f86da9L), tole(0x19526d37L), tole(0x97dd6ad4L), tole(0x5b776a4aL),
-tole(0x51b26353L), tole(0x9d1863cdL), tole(0x1397642eL), tole(0xdf3d64b0L),
-tole(0x83d02561L), tole(0x4f7a25ffL), tole(0xc1f5221cL), tole(0x0d5f2282L),
-tole(0x079a2b9bL), tole(0xcb302b05L), tole(0x45bf2ce6L), tole(0x89152c78L),
-tole(0x50353ed4L), tole(0x9c9f3e4aL), tole(0x121039a9L), tole(0xdeba3937L),
-tole(0xd47f302eL), tole(0x18d530b0L), tole(0x965a3753L), tole(0x5af037cdL),
-tole(0xff6b144aL), tole(0x33c114d4L), tole(0xbd4e1337L), tole(0x71e413a9L),
-tole(0x7b211ab0L), tole(0xb78b1a2eL), tole(0x39041dcdL), tole(0xf5ae1d53L),
-tole(0x2c8e0fffL), tole(0xe0240f61L), tole(0x6eab0882L), tole(0xa201081cL),
-tole(0xa8c40105L), tole(0x646e019bL), tole(0xeae10678L), tole(0x264b06e6L)},
-};
-static u32 __cacheline_aligned crc32table_be[8][256] = {{
-tobe(0x00000000L), tobe(0x04c11db7L), tobe(0x09823b6eL), tobe(0x0d4326d9L),
-tobe(0x130476dcL), tobe(0x17c56b6bL), tobe(0x1a864db2L), tobe(0x1e475005L),
-tobe(0x2608edb8L), tobe(0x22c9f00fL), tobe(0x2f8ad6d6L), tobe(0x2b4bcb61L),
-tobe(0x350c9b64L), tobe(0x31cd86d3L), tobe(0x3c8ea00aL), tobe(0x384fbdbdL),
-tobe(0x4c11db70L), tobe(0x48d0c6c7L), tobe(0x4593e01eL), tobe(0x4152fda9L),
-tobe(0x5f15adacL), tobe(0x5bd4b01bL), tobe(0x569796c2L), tobe(0x52568b75L),
-tobe(0x6a1936c8L), tobe(0x6ed82b7fL), tobe(0x639b0da6L), tobe(0x675a1011L),
-tobe(0x791d4014L), tobe(0x7ddc5da3L), tobe(0x709f7b7aL), tobe(0x745e66cdL),
-tobe(0x9823b6e0L), tobe(0x9ce2ab57L), tobe(0x91a18d8eL), tobe(0x95609039L),
-tobe(0x8b27c03cL), tobe(0x8fe6dd8bL), tobe(0x82a5fb52L), tobe(0x8664e6e5L),
-tobe(0xbe2b5b58L), tobe(0xbaea46efL), tobe(0xb7a96036L), tobe(0xb3687d81L),
-tobe(0xad2f2d84L), tobe(0xa9ee3033L), tobe(0xa4ad16eaL), tobe(0xa06c0b5dL),
-tobe(0xd4326d90L), tobe(0xd0f37027L), tobe(0xddb056feL), tobe(0xd9714b49L),
-tobe(0xc7361b4cL), tobe(0xc3f706fbL), tobe(0xceb42022L), tobe(0xca753d95L),
-tobe(0xf23a8028L), tobe(0xf6fb9d9fL), tobe(0xfbb8bb46L), tobe(0xff79a6f1L),
-tobe(0xe13ef6f4L), tobe(0xe5ffeb43L), tobe(0xe8bccd9aL), tobe(0xec7dd02dL),
-tobe(0x34867077L), tobe(0x30476dc0L), tobe(0x3d044b19L), tobe(0x39c556aeL),
-tobe(0x278206abL), tobe(0x23431b1cL), tobe(0x2e003dc5L), tobe(0x2ac12072L),
-tobe(0x128e9dcfL), tobe(0x164f8078L), tobe(0x1b0ca6a1L), tobe(0x1fcdbb16L),
-tobe(0x018aeb13L), tobe(0x054bf6a4L), tobe(0x0808d07dL), tobe(0x0cc9cdcaL),
-tobe(0x7897ab07L), tobe(0x7c56b6b0L), tobe(0x71159069L), tobe(0x75d48ddeL),
-tobe(0x6b93dddbL), tobe(0x6f52c06cL), tobe(0x6211e6b5L), tobe(0x66d0fb02L),
-tobe(0x5e9f46bfL), tobe(0x5a5e5b08L), tobe(0x571d7dd1L), tobe(0x53dc6066L),
-tobe(0x4d9b3063L), tobe(0x495a2dd4L), tobe(0x44190b0dL), tobe(0x40d816baL),
-tobe(0xaca5c697L), tobe(0xa864db20L), tobe(0xa527fdf9L), tobe(0xa1e6e04eL),
-tobe(0xbfa1b04bL), tobe(0xbb60adfcL), tobe(0xb6238b25L), tobe(0xb2e29692L),
-tobe(0x8aad2b2fL), tobe(0x8e6c3698L), tobe(0x832f1041L), tobe(0x87ee0df6L),
-tobe(0x99a95df3L), tobe(0x9d684044L), tobe(0x902b669dL), tobe(0x94ea7b2aL),
-tobe(0xe0b41de7L), tobe(0xe4750050L), tobe(0xe9362689L), tobe(0xedf73b3eL),
-tobe(0xf3b06b3bL), tobe(0xf771768cL), tobe(0xfa325055L), tobe(0xfef34de2L),
-tobe(0xc6bcf05fL), tobe(0xc27dede8L), tobe(0xcf3ecb31L), tobe(0xcbffd686L),
-tobe(0xd5b88683L), tobe(0xd1799b34L), tobe(0xdc3abdedL), tobe(0xd8fba05aL),
-tobe(0x690ce0eeL), tobe(0x6dcdfd59L), tobe(0x608edb80L), tobe(0x644fc637L),
-tobe(0x7a089632L), tobe(0x7ec98b85L), tobe(0x738aad5cL), tobe(0x774bb0ebL),
-tobe(0x4f040d56L), tobe(0x4bc510e1L), tobe(0x46863638L), tobe(0x42472b8fL),
-tobe(0x5c007b8aL), tobe(0x58c1663dL), tobe(0x558240e4L), tobe(0x51435d53L),
-tobe(0x251d3b9eL), tobe(0x21dc2629L), tobe(0x2c9f00f0L), tobe(0x285e1d47L),
-tobe(0x36194d42L), tobe(0x32d850f5L), tobe(0x3f9b762cL), tobe(0x3b5a6b9bL),
-tobe(0x0315d626L), tobe(0x07d4cb91L), tobe(0x0a97ed48L), tobe(0x0e56f0ffL),
-tobe(0x1011a0faL), tobe(0x14d0bd4dL), tobe(0x19939b94L), tobe(0x1d528623L),
-tobe(0xf12f560eL), tobe(0xf5ee4bb9L), tobe(0xf8ad6d60L), tobe(0xfc6c70d7L),
-tobe(0xe22b20d2L), tobe(0xe6ea3d65L), tobe(0xeba91bbcL), tobe(0xef68060bL),
-tobe(0xd727bbb6L), tobe(0xd3e6a601L), tobe(0xdea580d8L), tobe(0xda649d6fL),
-tobe(0xc423cd6aL), tobe(0xc0e2d0ddL), tobe(0xcda1f604L), tobe(0xc960ebb3L),
-tobe(0xbd3e8d7eL), tobe(0xb9ff90c9L), tobe(0xb4bcb610L), tobe(0xb07daba7L),
-tobe(0xae3afba2L), tobe(0xaafbe615L), tobe(0xa7b8c0ccL), tobe(0xa379dd7bL),
-tobe(0x9b3660c6L), tobe(0x9ff77d71L), tobe(0x92b45ba8L), tobe(0x9675461fL),
-tobe(0x8832161aL), tobe(0x8cf30badL), tobe(0x81b02d74L), tobe(0x857130c3L),
-tobe(0x5d8a9099L), tobe(0x594b8d2eL), tobe(0x5408abf7L), tobe(0x50c9b640L),
-tobe(0x4e8ee645L), tobe(0x4a4ffbf2L), tobe(0x470cdd2bL), tobe(0x43cdc09cL),
-tobe(0x7b827d21L), tobe(0x7f436096L), tobe(0x7200464fL), tobe(0x76c15bf8L),
-tobe(0x68860bfdL), tobe(0x6c47164aL), tobe(0x61043093L), tobe(0x65c52d24L),
-tobe(0x119b4be9L), tobe(0x155a565eL), tobe(0x18197087L), tobe(0x1cd86d30L),
-tobe(0x029f3d35L), tobe(0x065e2082L), tobe(0x0b1d065bL), tobe(0x0fdc1becL),
-tobe(0x3793a651L), tobe(0x3352bbe6L), tobe(0x3e119d3fL), tobe(0x3ad08088L),
-tobe(0x2497d08dL), tobe(0x2056cd3aL), tobe(0x2d15ebe3L), tobe(0x29d4f654L),
-tobe(0xc5a92679L), tobe(0xc1683bceL), tobe(0xcc2b1d17L), tobe(0xc8ea00a0L),
-tobe(0xd6ad50a5L), tobe(0xd26c4d12L), tobe(0xdf2f6bcbL), tobe(0xdbee767cL),
-tobe(0xe3a1cbc1L), tobe(0xe760d676L), tobe(0xea23f0afL), tobe(0xeee2ed18L),
-tobe(0xf0a5bd1dL), tobe(0xf464a0aaL), tobe(0xf9278673L), tobe(0xfde69bc4L),
-tobe(0x89b8fd09L), tobe(0x8d79e0beL), tobe(0x803ac667L), tobe(0x84fbdbd0L),
-tobe(0x9abc8bd5L), tobe(0x9e7d9662L), tobe(0x933eb0bbL), tobe(0x97ffad0cL),
-tobe(0xafb010b1L), tobe(0xab710d06L), tobe(0xa6322bdfL), tobe(0xa2f33668L),
-tobe(0xbcb4666dL), tobe(0xb8757bdaL), tobe(0xb5365d03L), tobe(0xb1f740b4L)},
-{
-tobe(0x00000000L), tobe(0xd219c1dcL), tobe(0xa0f29e0fL), tobe(0x72eb5fd3L),
-tobe(0x452421a9L), tobe(0x973de075L), tobe(0xe5d6bfa6L), tobe(0x37cf7e7aL),
-tobe(0x8a484352L), tobe(0x5851828eL), tobe(0x2abadd5dL), tobe(0xf8a31c81L),
-tobe(0xcf6c62fbL), tobe(0x1d75a327L), tobe(0x6f9efcf4L), tobe(0xbd873d28L),
-tobe(0x10519b13L), tobe(0xc2485acfL), tobe(0xb0a3051cL), tobe(0x62bac4c0L),
-tobe(0x5575babaL), tobe(0x876c7b66L), tobe(0xf58724b5L), tobe(0x279ee569L),
-tobe(0x9a19d841L), tobe(0x4800199dL), tobe(0x3aeb464eL), tobe(0xe8f28792L),
-tobe(0xdf3df9e8L), tobe(0x0d243834L), tobe(0x7fcf67e7L), tobe(0xadd6a63bL),
-tobe(0x20a33626L), tobe(0xf2baf7faL), tobe(0x8051a829L), tobe(0x524869f5L),
-tobe(0x6587178fL), tobe(0xb79ed653L), tobe(0xc5758980L), tobe(0x176c485cL),
-tobe(0xaaeb7574L), tobe(0x78f2b4a8L), tobe(0x0a19eb7bL), tobe(0xd8002aa7L),
-tobe(0xefcf54ddL), tobe(0x3dd69501L), tobe(0x4f3dcad2L), tobe(0x9d240b0eL),
-tobe(0x30f2ad35L), tobe(0xe2eb6ce9L), tobe(0x9000333aL), tobe(0x4219f2e6L),
-tobe(0x75d68c9cL), tobe(0xa7cf4d40L), tobe(0xd5241293L), tobe(0x073dd34fL),
-tobe(0xbabaee67L), tobe(0x68a32fbbL), tobe(0x1a487068L), tobe(0xc851b1b4L),
-tobe(0xff9ecfceL), tobe(0x2d870e12L), tobe(0x5f6c51c1L), tobe(0x8d75901dL),
-tobe(0x41466c4cL), tobe(0x935fad90L), tobe(0xe1b4f243L), tobe(0x33ad339fL),
-tobe(0x04624de5L), tobe(0xd67b8c39L), tobe(0xa490d3eaL), tobe(0x76891236L),
-tobe(0xcb0e2f1eL), tobe(0x1917eec2L), tobe(0x6bfcb111L), tobe(0xb9e570cdL),
-tobe(0x8e2a0eb7L), tobe(0x5c33cf6bL), tobe(0x2ed890b8L), tobe(0xfcc15164L),
-tobe(0x5117f75fL), tobe(0x830e3683L), tobe(0xf1e56950L), tobe(0x23fca88cL),
-tobe(0x1433d6f6L), tobe(0xc62a172aL), tobe(0xb4c148f9L), tobe(0x66d88925L),
-tobe(0xdb5fb40dL), tobe(0x094675d1L), tobe(0x7bad2a02L), tobe(0xa9b4ebdeL),
-tobe(0x9e7b95a4L), tobe(0x4c625478L), tobe(0x3e890babL), tobe(0xec90ca77L),
-tobe(0x61e55a6aL), tobe(0xb3fc9bb6L), tobe(0xc117c465L), tobe(0x130e05b9L),
-tobe(0x24c17bc3L), tobe(0xf6d8ba1fL), tobe(0x8433e5ccL), tobe(0x562a2410L),
-tobe(0xebad1938L), tobe(0x39b4d8e4L), tobe(0x4b5f8737L), tobe(0x994646ebL),
-tobe(0xae893891L), tobe(0x7c90f94dL), tobe(0x0e7ba69eL), tobe(0xdc626742L),
-tobe(0x71b4c179L), tobe(0xa3ad00a5L), tobe(0xd1465f76L), tobe(0x035f9eaaL),
-tobe(0x3490e0d0L), tobe(0xe689210cL), tobe(0x94627edfL), tobe(0x467bbf03L),
-tobe(0xfbfc822bL), tobe(0x29e543f7L), tobe(0x5b0e1c24L), tobe(0x8917ddf8L),
-tobe(0xbed8a382L), tobe(0x6cc1625eL), tobe(0x1e2a3d8dL), tobe(0xcc33fc51L),
-tobe(0x828cd898L), tobe(0x50951944L), tobe(0x227e4697L), tobe(0xf067874bL),
-tobe(0xc7a8f931L), tobe(0x15b138edL), tobe(0x675a673eL), tobe(0xb543a6e2L),
-tobe(0x08c49bcaL), tobe(0xdadd5a16L), tobe(0xa83605c5L), tobe(0x7a2fc419L),
-tobe(0x4de0ba63L), tobe(0x9ff97bbfL), tobe(0xed12246cL), tobe(0x3f0be5b0L),
-tobe(0x92dd438bL), tobe(0x40c48257L), tobe(0x322fdd84L), tobe(0xe0361c58L),
-tobe(0xd7f96222L), tobe(0x05e0a3feL), tobe(0x770bfc2dL), tobe(0xa5123df1L),
-tobe(0x189500d9L), tobe(0xca8cc105L), tobe(0xb8679ed6L), tobe(0x6a7e5f0aL),
-tobe(0x5db12170L), tobe(0x8fa8e0acL), tobe(0xfd43bf7fL), tobe(0x2f5a7ea3L),
-tobe(0xa22feebeL), tobe(0x70362f62L), tobe(0x02dd70b1L), tobe(0xd0c4b16dL),
-tobe(0xe70bcf17L), tobe(0x35120ecbL), tobe(0x47f95118L), tobe(0x95e090c4L),
-tobe(0x2867adecL), tobe(0xfa7e6c30L), tobe(0x889533e3L), tobe(0x5a8cf23fL),
-tobe(0x6d438c45L), tobe(0xbf5a4d99L), tobe(0xcdb1124aL), tobe(0x1fa8d396L),
-tobe(0xb27e75adL), tobe(0x6067b471L), tobe(0x128ceba2L), tobe(0xc0952a7eL),
-tobe(0xf75a5404L), tobe(0x254395d8L), tobe(0x57a8ca0bL), tobe(0x85b10bd7L),
-tobe(0x383636ffL), tobe(0xea2ff723L), tobe(0x98c4a8f0L), tobe(0x4add692cL),
-tobe(0x7d121756L), tobe(0xaf0bd68aL), tobe(0xdde08959L), tobe(0x0ff94885L),
-tobe(0xc3cab4d4L), tobe(0x11d37508L), tobe(0x63382adbL), tobe(0xb121eb07L),
-tobe(0x86ee957dL), tobe(0x54f754a1L), tobe(0x261c0b72L), tobe(0xf405caaeL),
-tobe(0x4982f786L), tobe(0x9b9b365aL), tobe(0xe9706989L), tobe(0x3b69a855L),
-tobe(0x0ca6d62fL), tobe(0xdebf17f3L), tobe(0xac544820L), tobe(0x7e4d89fcL),
-tobe(0xd39b2fc7L), tobe(0x0182ee1bL), tobe(0x7369b1c8L), tobe(0xa1707014L),
-tobe(0x96bf0e6eL), tobe(0x44a6cfb2L), tobe(0x364d9061L), tobe(0xe45451bdL),
-tobe(0x59d36c95L), tobe(0x8bcaad49L), tobe(0xf921f29aL), tobe(0x2b383346L),
-tobe(0x1cf74d3cL), tobe(0xceee8ce0L), tobe(0xbc05d333L), tobe(0x6e1c12efL),
-tobe(0xe36982f2L), tobe(0x3170432eL), tobe(0x439b1cfdL), tobe(0x9182dd21L),
-tobe(0xa64da35bL), tobe(0x74546287L), tobe(0x06bf3d54L), tobe(0xd4a6fc88L),
-tobe(0x6921c1a0L), tobe(0xbb38007cL), tobe(0xc9d35fafL), tobe(0x1bca9e73L),
-tobe(0x2c05e009L), tobe(0xfe1c21d5L), tobe(0x8cf77e06L), tobe(0x5eeebfdaL),
-tobe(0xf33819e1L), tobe(0x2121d83dL), tobe(0x53ca87eeL), tobe(0x81d34632L),
-tobe(0xb61c3848L), tobe(0x6405f994L), tobe(0x16eea647L), tobe(0xc4f7679bL),
-tobe(0x79705ab3L), tobe(0xab699b6fL), tobe(0xd982c4bcL), tobe(0x0b9b0560L),
-tobe(0x3c547b1aL), tobe(0xee4dbac6L), tobe(0x9ca6e515L), tobe(0x4ebf24c9L)},
-{
-tobe(0x00000000L), tobe(0x01d8ac87L), tobe(0x03b1590eL), tobe(0x0269f589L),
-tobe(0x0762b21cL), tobe(0x06ba1e9bL), tobe(0x04d3eb12L), tobe(0x050b4795L),
-tobe(0x0ec56438L), tobe(0x0f1dc8bfL), tobe(0x0d743d36L), tobe(0x0cac91b1L),
-tobe(0x09a7d624L), tobe(0x087f7aa3L), tobe(0x0a168f2aL), tobe(0x0bce23adL),
-tobe(0x1d8ac870L), tobe(0x1c5264f7L), tobe(0x1e3b917eL), tobe(0x1fe33df9L),
-tobe(0x1ae87a6cL), tobe(0x1b30d6ebL), tobe(0x19592362L), tobe(0x18818fe5L),
-tobe(0x134fac48L), tobe(0x129700cfL), tobe(0x10fef546L), tobe(0x112659c1L),
-tobe(0x142d1e54L), tobe(0x15f5b2d3L), tobe(0x179c475aL), tobe(0x1644ebddL),
-tobe(0x3b1590e0L), tobe(0x3acd3c67L), tobe(0x38a4c9eeL), tobe(0x397c6569L),
-tobe(0x3c7722fcL), tobe(0x3daf8e7bL), tobe(0x3fc67bf2L), tobe(0x3e1ed775L),
-tobe(0x35d0f4d8L), tobe(0x3408585fL), tobe(0x3661add6L), tobe(0x37b90151L),
-tobe(0x32b246c4L), tobe(0x336aea43L), tobe(0x31031fcaL), tobe(0x30dbb34dL),
-tobe(0x269f5890L), tobe(0x2747f417L), tobe(0x252e019eL), tobe(0x24f6ad19L),
-tobe(0x21fdea8cL), tobe(0x2025460bL), tobe(0x224cb382L), tobe(0x23941f05L),
-tobe(0x285a3ca8L), tobe(0x2982902fL), tobe(0x2beb65a6L), tobe(0x2a33c921L),
-tobe(0x2f388eb4L), tobe(0x2ee02233L), tobe(0x2c89d7baL), tobe(0x2d517b3dL),
-tobe(0x762b21c0L), tobe(0x77f38d47L), tobe(0x759a78ceL), tobe(0x7442d449L),
-tobe(0x714993dcL), tobe(0x70913f5bL), tobe(0x72f8cad2L), tobe(0x73206655L),
-tobe(0x78ee45f8L), tobe(0x7936e97fL), tobe(0x7b5f1cf6L), tobe(0x7a87b071L),
-tobe(0x7f8cf7e4L), tobe(0x7e545b63L), tobe(0x7c3daeeaL), tobe(0x7de5026dL),
-tobe(0x6ba1e9b0L), tobe(0x6a794537L), tobe(0x6810b0beL), tobe(0x69c81c39L),
-tobe(0x6cc35bacL), tobe(0x6d1bf72bL), tobe(0x6f7202a2L), tobe(0x6eaaae25L),
-tobe(0x65648d88L), tobe(0x64bc210fL), tobe(0x66d5d486L), tobe(0x670d7801L),
-tobe(0x62063f94L), tobe(0x63de9313L), tobe(0x61b7669aL), tobe(0x606fca1dL),
-tobe(0x4d3eb120L), tobe(0x4ce61da7L), tobe(0x4e8fe82eL), tobe(0x4f5744a9L),
-tobe(0x4a5c033cL), tobe(0x4b84afbbL), tobe(0x49ed5a32L), tobe(0x4835f6b5L),
-tobe(0x43fbd518L), tobe(0x4223799fL), tobe(0x404a8c16L), tobe(0x41922091L),
-tobe(0x44996704L), tobe(0x4541cb83L), tobe(0x47283e0aL), tobe(0x46f0928dL),
-tobe(0x50b47950L), tobe(0x516cd5d7L), tobe(0x5305205eL), tobe(0x52dd8cd9L),
-tobe(0x57d6cb4cL), tobe(0x560e67cbL), tobe(0x54679242L), tobe(0x55bf3ec5L),
-tobe(0x5e711d68L), tobe(0x5fa9b1efL), tobe(0x5dc04466L), tobe(0x5c18e8e1L),
-tobe(0x5913af74L), tobe(0x58cb03f3L), tobe(0x5aa2f67aL), tobe(0x5b7a5afdL),
-tobe(0xec564380L), tobe(0xed8eef07L), tobe(0xefe71a8eL), tobe(0xee3fb609L),
-tobe(0xeb34f19cL), tobe(0xeaec5d1bL), tobe(0xe885a892L), tobe(0xe95d0415L),
-tobe(0xe29327b8L), tobe(0xe34b8b3fL), tobe(0xe1227eb6L), tobe(0xe0fad231L),
-tobe(0xe5f195a4L), tobe(0xe4293923L), tobe(0xe640ccaaL), tobe(0xe798602dL),
-tobe(0xf1dc8bf0L), tobe(0xf0042777L), tobe(0xf26dd2feL), tobe(0xf3b57e79L),
-tobe(0xf6be39ecL), tobe(0xf766956bL), tobe(0xf50f60e2L), tobe(0xf4d7cc65L),
-tobe(0xff19efc8L), tobe(0xfec1434fL), tobe(0xfca8b6c6L), tobe(0xfd701a41L),
-tobe(0xf87b5dd4L), tobe(0xf9a3f153L), tobe(0xfbca04daL), tobe(0xfa12a85dL),
-tobe(0xd743d360L), tobe(0xd69b7fe7L), tobe(0xd4f28a6eL), tobe(0xd52a26e9L),
-tobe(0xd021617cL), tobe(0xd1f9cdfbL), tobe(0xd3903872L), tobe(0xd24894f5L),
-tobe(0xd986b758L), tobe(0xd85e1bdfL), tobe(0xda37ee56L), tobe(0xdbef42d1L),
-tobe(0xdee40544L), tobe(0xdf3ca9c3L), tobe(0xdd555c4aL), tobe(0xdc8df0cdL),
-tobe(0xcac91b10L), tobe(0xcb11b797L), tobe(0xc978421eL), tobe(0xc8a0ee99L),
-tobe(0xcdaba90cL), tobe(0xcc73058bL), tobe(0xce1af002L), tobe(0xcfc25c85L),
-tobe(0xc40c7f28L), tobe(0xc5d4d3afL), tobe(0xc7bd2626L), tobe(0xc6658aa1L),
-tobe(0xc36ecd34L), tobe(0xc2b661b3L), tobe(0xc0df943aL), tobe(0xc10738bdL),
-tobe(0x9a7d6240L), tobe(0x9ba5cec7L), tobe(0x99cc3b4eL), tobe(0x981497c9L),
-tobe(0x9d1fd05cL), tobe(0x9cc77cdbL), tobe(0x9eae8952L), tobe(0x9f7625d5L),
-tobe(0x94b80678L), tobe(0x9560aaffL), tobe(0x97095f76L), tobe(0x96d1f3f1L),
-tobe(0x93dab464L), tobe(0x920218e3L), tobe(0x906bed6aL), tobe(0x91b341edL),
-tobe(0x87f7aa30L), tobe(0x862f06b7L), tobe(0x8446f33eL), tobe(0x859e5fb9L),
-tobe(0x8095182cL), tobe(0x814db4abL), tobe(0x83244122L), tobe(0x82fceda5L),
-tobe(0x8932ce08L), tobe(0x88ea628fL), tobe(0x8a839706L), tobe(0x8b5b3b81L),
-tobe(0x8e507c14L), tobe(0x8f88d093L), tobe(0x8de1251aL), tobe(0x8c39899dL),
-tobe(0xa168f2a0L), tobe(0xa0b05e27L), tobe(0xa2d9abaeL), tobe(0xa3010729L),
-tobe(0xa60a40bcL), tobe(0xa7d2ec3bL), tobe(0xa5bb19b2L), tobe(0xa463b535L),
-tobe(0xafad9698L), tobe(0xae753a1fL), tobe(0xac1ccf96L), tobe(0xadc46311L),
-tobe(0xa8cf2484L), tobe(0xa9178803L), tobe(0xab7e7d8aL), tobe(0xaaa6d10dL),
-tobe(0xbce23ad0L), tobe(0xbd3a9657L), tobe(0xbf5363deL), tobe(0xbe8bcf59L),
-tobe(0xbb8088ccL), tobe(0xba58244bL), tobe(0xb831d1c2L), tobe(0xb9e97d45L),
-tobe(0xb2275ee8L), tobe(0xb3fff26fL), tobe(0xb19607e6L), tobe(0xb04eab61L),
-tobe(0xb545ecf4L), tobe(0xb49d4073L), tobe(0xb6f4b5faL), tobe(0xb72c197dL)},
-{
-tobe(0x00000000L), tobe(0xdc6d9ab7L), tobe(0xbc1a28d9L), tobe(0x6077b26eL),
-tobe(0x7cf54c05L), tobe(0xa098d6b2L), tobe(0xc0ef64dcL), tobe(0x1c82fe6bL),
-tobe(0xf9ea980aL), tobe(0x258702bdL), tobe(0x45f0b0d3L), tobe(0x999d2a64L),
-tobe(0x851fd40fL), tobe(0x59724eb8L), tobe(0x3905fcd6L), tobe(0xe5686661L),
-tobe(0xf7142da3L), tobe(0x2b79b714L), tobe(0x4b0e057aL), tobe(0x97639fcdL),
-tobe(0x8be161a6L), tobe(0x578cfb11L), tobe(0x37fb497fL), tobe(0xeb96d3c8L),
-tobe(0x0efeb5a9L), tobe(0xd2932f1eL), tobe(0xb2e49d70L), tobe(0x6e8907c7L),
-tobe(0x720bf9acL), tobe(0xae66631bL), tobe(0xce11d175L), tobe(0x127c4bc2L),
-tobe(0xeae946f1L), tobe(0x3684dc46L), tobe(0x56f36e28L), tobe(0x8a9ef49fL),
-tobe(0x961c0af4L), tobe(0x4a719043L), tobe(0x2a06222dL), tobe(0xf66bb89aL),
-tobe(0x1303defbL), tobe(0xcf6e444cL), tobe(0xaf19f622L), tobe(0x73746c95L),
-tobe(0x6ff692feL), tobe(0xb39b0849L), tobe(0xd3ecba27L), tobe(0x0f812090L),
-tobe(0x1dfd6b52L), tobe(0xc190f1e5L), tobe(0xa1e7438bL), tobe(0x7d8ad93cL),
-tobe(0x61082757L), tobe(0xbd65bde0L), tobe(0xdd120f8eL), tobe(0x017f9539L),
-tobe(0xe417f358L), tobe(0x387a69efL), tobe(0x580ddb81L), tobe(0x84604136L),
-tobe(0x98e2bf5dL), tobe(0x448f25eaL), tobe(0x24f89784L), tobe(0xf8950d33L),
-tobe(0xd1139055L), tobe(0x0d7e0ae2L), tobe(0x6d09b88cL), tobe(0xb164223bL),
-tobe(0xade6dc50L), tobe(0x718b46e7L), tobe(0x11fcf489L), tobe(0xcd916e3eL),
-tobe(0x28f9085fL), tobe(0xf49492e8L), tobe(0x94e32086L), tobe(0x488eba31L),
-tobe(0x540c445aL), tobe(0x8861deedL), tobe(0xe8166c83L), tobe(0x347bf634L),
-tobe(0x2607bdf6L), tobe(0xfa6a2741L), tobe(0x9a1d952fL), tobe(0x46700f98L),
-tobe(0x5af2f1f3L), tobe(0x869f6b44L), tobe(0xe6e8d92aL), tobe(0x3a85439dL),
-tobe(0xdfed25fcL), tobe(0x0380bf4bL), tobe(0x63f70d25L), tobe(0xbf9a9792L),
-tobe(0xa31869f9L), tobe(0x7f75f34eL), tobe(0x1f024120L), tobe(0xc36fdb97L),
-tobe(0x3bfad6a4L), tobe(0xe7974c13L), tobe(0x87e0fe7dL), tobe(0x5b8d64caL),
-tobe(0x470f9aa1L), tobe(0x9b620016L), tobe(0xfb15b278L), tobe(0x277828cfL),
-tobe(0xc2104eaeL), tobe(0x1e7dd419L), tobe(0x7e0a6677L), tobe(0xa267fcc0L),
-tobe(0xbee502abL), tobe(0x6288981cL), tobe(0x02ff2a72L), tobe(0xde92b0c5L),
-tobe(0xcceefb07L), tobe(0x108361b0L), tobe(0x70f4d3deL), tobe(0xac994969L),
-tobe(0xb01bb702L), tobe(0x6c762db5L), tobe(0x0c019fdbL), tobe(0xd06c056cL),
-tobe(0x3504630dL), tobe(0xe969f9baL), tobe(0x891e4bd4L), tobe(0x5573d163L),
-tobe(0x49f12f08L), tobe(0x959cb5bfL), tobe(0xf5eb07d1L), tobe(0x29869d66L),
-tobe(0xa6e63d1dL), tobe(0x7a8ba7aaL), tobe(0x1afc15c4L), tobe(0xc6918f73L),
-tobe(0xda137118L), tobe(0x067eebafL), tobe(0x660959c1L), tobe(0xba64c376L),
-tobe(0x5f0ca517L), tobe(0x83613fa0L), tobe(0xe3168dceL), tobe(0x3f7b1779L),
-tobe(0x23f9e912L), tobe(0xff9473a5L), tobe(0x9fe3c1cbL), tobe(0x438e5b7cL),
-tobe(0x51f210beL), tobe(0x8d9f8a09L), tobe(0xede83867L), tobe(0x3185a2d0L),
-tobe(0x2d075cbbL), tobe(0xf16ac60cL), tobe(0x911d7462L), tobe(0x4d70eed5L),
-tobe(0xa81888b4L), tobe(0x74751203L), tobe(0x1402a06dL), tobe(0xc86f3adaL),
-tobe(0xd4edc4b1L), tobe(0x08805e06L), tobe(0x68f7ec68L), tobe(0xb49a76dfL),
-tobe(0x4c0f7becL), tobe(0x9062e15bL), tobe(0xf0155335L), tobe(0x2c78c982L),
-tobe(0x30fa37e9L), tobe(0xec97ad5eL), tobe(0x8ce01f30L), tobe(0x508d8587L),
-tobe(0xb5e5e3e6L), tobe(0x69887951L), tobe(0x09ffcb3fL), tobe(0xd5925188L),
-tobe(0xc910afe3L), tobe(0x157d3554L), tobe(0x750a873aL), tobe(0xa9671d8dL),
-tobe(0xbb1b564fL), tobe(0x6776ccf8L), tobe(0x07017e96L), tobe(0xdb6ce421L),
-tobe(0xc7ee1a4aL), tobe(0x1b8380fdL), tobe(0x7bf43293L), tobe(0xa799a824L),
-tobe(0x42f1ce45L), tobe(0x9e9c54f2L), tobe(0xfeebe69cL), tobe(0x22867c2bL),
-tobe(0x3e048240L), tobe(0xe26918f7L), tobe(0x821eaa99L), tobe(0x5e73302eL),
-tobe(0x77f5ad48L), tobe(0xab9837ffL), tobe(0xcbef8591L), tobe(0x17821f26L),
-tobe(0x0b00e14dL), tobe(0xd76d7bfaL), tobe(0xb71ac994L), tobe(0x6b775323L),
-tobe(0x8e1f3542L), tobe(0x5272aff5L), tobe(0x32051d9bL), tobe(0xee68872cL),
-tobe(0xf2ea7947L), tobe(0x2e87e3f0L), tobe(0x4ef0519eL), tobe(0x929dcb29L),
-tobe(0x80e180ebL), tobe(0x5c8c1a5cL), tobe(0x3cfba832L), tobe(0xe0963285L),
-tobe(0xfc14cceeL), tobe(0x20795659L), tobe(0x400ee437L), tobe(0x9c637e80L),
-tobe(0x790b18e1L), tobe(0xa5668256L), tobe(0xc5113038L), tobe(0x197caa8fL),
-tobe(0x05fe54e4L), tobe(0xd993ce53L), tobe(0xb9e47c3dL), tobe(0x6589e68aL),
-tobe(0x9d1cebb9L), tobe(0x4171710eL), tobe(0x2106c360L), tobe(0xfd6b59d7L),
-tobe(0xe1e9a7bcL), tobe(0x3d843d0bL), tobe(0x5df38f65L), tobe(0x819e15d2L),
-tobe(0x64f673b3L), tobe(0xb89be904L), tobe(0xd8ec5b6aL), tobe(0x0481c1ddL),
-tobe(0x18033fb6L), tobe(0xc46ea501L), tobe(0xa419176fL), tobe(0x78748dd8L),
-tobe(0x6a08c61aL), tobe(0xb6655cadL), tobe(0xd612eec3L), tobe(0x0a7f7474L),
-tobe(0x16fd8a1fL), tobe(0xca9010a8L), tobe(0xaae7a2c6L), tobe(0x768a3871L),
-tobe(0x93e25e10L), tobe(0x4f8fc4a7L), tobe(0x2ff876c9L), tobe(0xf395ec7eL),
-tobe(0xef171215L), tobe(0x337a88a2L), tobe(0x530d3accL), tobe(0x8f60a07bL)},
-{
-tobe(0x00000000L), tobe(0x490d678dL), tobe(0x921acf1aL), tobe(0xdb17a897L),
-tobe(0x20f48383L), tobe(0x69f9e40eL), tobe(0xb2ee4c99L), tobe(0xfbe32b14L),
-tobe(0x41e90706L), tobe(0x08e4608bL), tobe(0xd3f3c81cL), tobe(0x9afeaf91L),
-tobe(0x611d8485L), tobe(0x2810e308L), tobe(0xf3074b9fL), tobe(0xba0a2c12L),
-tobe(0x83d20e0cL), tobe(0xcadf6981L), tobe(0x11c8c116L), tobe(0x58c5a69bL),
-tobe(0xa3268d8fL), tobe(0xea2bea02L), tobe(0x313c4295L), tobe(0x78312518L),
-tobe(0xc23b090aL), tobe(0x8b366e87L), tobe(0x5021c610L), tobe(0x192ca19dL),
-tobe(0xe2cf8a89L), tobe(0xabc2ed04L), tobe(0x70d54593L), tobe(0x39d8221eL),
-tobe(0x036501afL), tobe(0x4a686622L), tobe(0x917fceb5L), tobe(0xd872a938L),
-tobe(0x2391822cL), tobe(0x6a9ce5a1L), tobe(0xb18b4d36L), tobe(0xf8862abbL),
-tobe(0x428c06a9L), tobe(0x0b816124L), tobe(0xd096c9b3L), tobe(0x999bae3eL),
-tobe(0x6278852aL), tobe(0x2b75e2a7L), tobe(0xf0624a30L), tobe(0xb96f2dbdL),
-tobe(0x80b70fa3L), tobe(0xc9ba682eL), tobe(0x12adc0b9L), tobe(0x5ba0a734L),
-tobe(0xa0438c20L), tobe(0xe94eebadL), tobe(0x3259433aL), tobe(0x7b5424b7L),
-tobe(0xc15e08a5L), tobe(0x88536f28L), tobe(0x5344c7bfL), tobe(0x1a49a032L),
-tobe(0xe1aa8b26L), tobe(0xa8a7ecabL), tobe(0x73b0443cL), tobe(0x3abd23b1L),
-tobe(0x06ca035eL), tobe(0x4fc764d3L), tobe(0x94d0cc44L), tobe(0xddddabc9L),
-tobe(0x263e80ddL), tobe(0x6f33e750L), tobe(0xb4244fc7L), tobe(0xfd29284aL),
-tobe(0x47230458L), tobe(0x0e2e63d5L), tobe(0xd539cb42L), tobe(0x9c34accfL),
-tobe(0x67d787dbL), tobe(0x2edae056L), tobe(0xf5cd48c1L), tobe(0xbcc02f4cL),
-tobe(0x85180d52L), tobe(0xcc156adfL), tobe(0x1702c248L), tobe(0x5e0fa5c5L),
-tobe(0xa5ec8ed1L), tobe(0xece1e95cL), tobe(0x37f641cbL), tobe(0x7efb2646L),
-tobe(0xc4f10a54L), tobe(0x8dfc6dd9L), tobe(0x56ebc54eL), tobe(0x1fe6a2c3L),
-tobe(0xe40589d7L), tobe(0xad08ee5aL), tobe(0x761f46cdL), tobe(0x3f122140L),
-tobe(0x05af02f1L), tobe(0x4ca2657cL), tobe(0x97b5cdebL), tobe(0xdeb8aa66L),
-tobe(0x255b8172L), tobe(0x6c56e6ffL), tobe(0xb7414e68L), tobe(0xfe4c29e5L),
-tobe(0x444605f7L), tobe(0x0d4b627aL), tobe(0xd65ccaedL), tobe(0x9f51ad60L),
-tobe(0x64b28674L), tobe(0x2dbfe1f9L), tobe(0xf6a8496eL), tobe(0xbfa52ee3L),
-tobe(0x867d0cfdL), tobe(0xcf706b70L), tobe(0x1467c3e7L), tobe(0x5d6aa46aL),
-tobe(0xa6898f7eL), tobe(0xef84e8f3L), tobe(0x34934064L), tobe(0x7d9e27e9L),
-tobe(0xc7940bfbL), tobe(0x8e996c76L), tobe(0x558ec4e1L), tobe(0x1c83a36cL),
-tobe(0xe7608878L), tobe(0xae6deff5L), tobe(0x757a4762L), tobe(0x3c7720efL),
-tobe(0x0d9406bcL), tobe(0x44996131L), tobe(0x9f8ec9a6L), tobe(0xd683ae2bL),
-tobe(0x2d60853fL), tobe(0x646de2b2L), tobe(0xbf7a4a25L), tobe(0xf6772da8L),
-tobe(0x4c7d01baL), tobe(0x05706637L), tobe(0xde67cea0L), tobe(0x976aa92dL),
-tobe(0x6c898239L), tobe(0x2584e5b4L), tobe(0xfe934d23L), tobe(0xb79e2aaeL),
-tobe(0x8e4608b0L), tobe(0xc74b6f3dL), tobe(0x1c5cc7aaL), tobe(0x5551a027L),
-tobe(0xaeb28b33L), tobe(0xe7bfecbeL), tobe(0x3ca84429L), tobe(0x75a523a4L),
-tobe(0xcfaf0fb6L), tobe(0x86a2683bL), tobe(0x5db5c0acL), tobe(0x14b8a721L),
-tobe(0xef5b8c35L), tobe(0xa656ebb8L), tobe(0x7d41432fL), tobe(0x344c24a2L),
-tobe(0x0ef10713L), tobe(0x47fc609eL), tobe(0x9cebc809L), tobe(0xd5e6af84L),
-tobe(0x2e058490L), tobe(0x6708e31dL), tobe(0xbc1f4b8aL), tobe(0xf5122c07L),
-tobe(0x4f180015L), tobe(0x06156798L), tobe(0xdd02cf0fL), tobe(0x940fa882L),
-tobe(0x6fec8396L), tobe(0x26e1e41bL), tobe(0xfdf64c8cL), tobe(0xb4fb2b01L),
-tobe(0x8d23091fL), tobe(0xc42e6e92L), tobe(0x1f39c605L), tobe(0x5634a188L),
-tobe(0xadd78a9cL), tobe(0xe4daed11L), tobe(0x3fcd4586L), tobe(0x76c0220bL),
-tobe(0xccca0e19L), tobe(0x85c76994L), tobe(0x5ed0c103L), tobe(0x17dda68eL),
-tobe(0xec3e8d9aL), tobe(0xa533ea17L), tobe(0x7e244280L), tobe(0x3729250dL),
-tobe(0x0b5e05e2L), tobe(0x4253626fL), tobe(0x9944caf8L), tobe(0xd049ad75L),
-tobe(0x2baa8661L), tobe(0x62a7e1ecL), tobe(0xb9b0497bL), tobe(0xf0bd2ef6L),
-tobe(0x4ab702e4L), tobe(0x03ba6569L), tobe(0xd8adcdfeL), tobe(0x91a0aa73L),
-tobe(0x6a438167L), tobe(0x234ee6eaL), tobe(0xf8594e7dL), tobe(0xb15429f0L),
-tobe(0x888c0beeL), tobe(0xc1816c63L), tobe(0x1a96c4f4L), tobe(0x539ba379L),
-tobe(0xa878886dL), tobe(0xe175efe0L), tobe(0x3a624777L), tobe(0x736f20faL),
-tobe(0xc9650ce8L), tobe(0x80686b65L), tobe(0x5b7fc3f2L), tobe(0x1272a47fL),
-tobe(0xe9918f6bL), tobe(0xa09ce8e6L), tobe(0x7b8b4071L), tobe(0x328627fcL),
-tobe(0x083b044dL), tobe(0x413663c0L), tobe(0x9a21cb57L), tobe(0xd32cacdaL),
-tobe(0x28cf87ceL), tobe(0x61c2e043L), tobe(0xbad548d4L), tobe(0xf3d82f59L),
-tobe(0x49d2034bL), tobe(0x00df64c6L), tobe(0xdbc8cc51L), tobe(0x92c5abdcL),
-tobe(0x692680c8L), tobe(0x202be745L), tobe(0xfb3c4fd2L), tobe(0xb231285fL),
-tobe(0x8be90a41L), tobe(0xc2e46dccL), tobe(0x19f3c55bL), tobe(0x50fea2d6L),
-tobe(0xab1d89c2L), tobe(0xe210ee4fL), tobe(0x390746d8L), tobe(0x700a2155L),
-tobe(0xca000d47L), tobe(0x830d6acaL), tobe(0x581ac25dL), tobe(0x1117a5d0L),
-tobe(0xeaf48ec4L), tobe(0xa3f9e949L), tobe(0x78ee41deL), tobe(0x31e32653L)},
-{
-tobe(0x00000000L), tobe(0x1b280d78L), tobe(0x36501af0L), tobe(0x2d781788L),
-tobe(0x6ca035e0L), tobe(0x77883898L), tobe(0x5af02f10L), tobe(0x41d82268L),
-tobe(0xd9406bc0L), tobe(0xc26866b8L), tobe(0xef107130L), tobe(0xf4387c48L),
-tobe(0xb5e05e20L), tobe(0xaec85358L), tobe(0x83b044d0L), tobe(0x989849a8L),
-tobe(0xb641ca37L), tobe(0xad69c74fL), tobe(0x8011d0c7L), tobe(0x9b39ddbfL),
-tobe(0xdae1ffd7L), tobe(0xc1c9f2afL), tobe(0xecb1e527L), tobe(0xf799e85fL),
-tobe(0x6f01a1f7L), tobe(0x7429ac8fL), tobe(0x5951bb07L), tobe(0x4279b67fL),
-tobe(0x03a19417L), tobe(0x1889996fL), tobe(0x35f18ee7L), tobe(0x2ed9839fL),
-tobe(0x684289d9L), tobe(0x736a84a1L), tobe(0x5e129329L), tobe(0x453a9e51L),
-tobe(0x04e2bc39L), tobe(0x1fcab141L), tobe(0x32b2a6c9L), tobe(0x299aabb1L),
-tobe(0xb102e219L), tobe(0xaa2aef61L), tobe(0x8752f8e9L), tobe(0x9c7af591L),
-tobe(0xdda2d7f9L), tobe(0xc68ada81L), tobe(0xebf2cd09L), tobe(0xf0dac071L),
-tobe(0xde0343eeL), tobe(0xc52b4e96L), tobe(0xe853591eL), tobe(0xf37b5466L),
-tobe(0xb2a3760eL), tobe(0xa98b7b76L), tobe(0x84f36cfeL), tobe(0x9fdb6186L),
-tobe(0x0743282eL), tobe(0x1c6b2556L), tobe(0x311332deL), tobe(0x2a3b3fa6L),
-tobe(0x6be31dceL), tobe(0x70cb10b6L), tobe(0x5db3073eL), tobe(0x469b0a46L),
-tobe(0xd08513b2L), tobe(0xcbad1ecaL), tobe(0xe6d50942L), tobe(0xfdfd043aL),
-tobe(0xbc252652L), tobe(0xa70d2b2aL), tobe(0x8a753ca2L), tobe(0x915d31daL),
-tobe(0x09c57872L), tobe(0x12ed750aL), tobe(0x3f956282L), tobe(0x24bd6ffaL),
-tobe(0x65654d92L), tobe(0x7e4d40eaL), tobe(0x53355762L), tobe(0x481d5a1aL),
-tobe(0x66c4d985L), tobe(0x7decd4fdL), tobe(0x5094c375L), tobe(0x4bbcce0dL),
-tobe(0x0a64ec65L), tobe(0x114ce11dL), tobe(0x3c34f695L), tobe(0x271cfbedL),
-tobe(0xbf84b245L), tobe(0xa4acbf3dL), tobe(0x89d4a8b5L), tobe(0x92fca5cdL),
-tobe(0xd32487a5L), tobe(0xc80c8addL), tobe(0xe5749d55L), tobe(0xfe5c902dL),
-tobe(0xb8c79a6bL), tobe(0xa3ef9713L), tobe(0x8e97809bL), tobe(0x95bf8de3L),
-tobe(0xd467af8bL), tobe(0xcf4fa2f3L), tobe(0xe237b57bL), tobe(0xf91fb803L),
-tobe(0x6187f1abL), tobe(0x7aaffcd3L), tobe(0x57d7eb5bL), tobe(0x4cffe623L),
-tobe(0x0d27c44bL), tobe(0x160fc933L), tobe(0x3b77debbL), tobe(0x205fd3c3L),
-tobe(0x0e86505cL), tobe(0x15ae5d24L), tobe(0x38d64aacL), tobe(0x23fe47d4L),
-tobe(0x622665bcL), tobe(0x790e68c4L), tobe(0x54767f4cL), tobe(0x4f5e7234L),
-tobe(0xd7c63b9cL), tobe(0xccee36e4L), tobe(0xe196216cL), tobe(0xfabe2c14L),
-tobe(0xbb660e7cL), tobe(0xa04e0304L), tobe(0x8d36148cL), tobe(0x961e19f4L),
-tobe(0xa5cb3ad3L), tobe(0xbee337abL), tobe(0x939b2023L), tobe(0x88b32d5bL),
-tobe(0xc96b0f33L), tobe(0xd243024bL), tobe(0xff3b15c3L), tobe(0xe41318bbL),
-tobe(0x7c8b5113L), tobe(0x67a35c6bL), tobe(0x4adb4be3L), tobe(0x51f3469bL),
-tobe(0x102b64f3L), tobe(0x0b03698bL), tobe(0x267b7e03L), tobe(0x3d53737bL),
-tobe(0x138af0e4L), tobe(0x08a2fd9cL), tobe(0x25daea14L), tobe(0x3ef2e76cL),
-tobe(0x7f2ac504L), tobe(0x6402c87cL), tobe(0x497adff4L), tobe(0x5252d28cL),
-tobe(0xcaca9b24L), tobe(0xd1e2965cL), tobe(0xfc9a81d4L), tobe(0xe7b28cacL),
-tobe(0xa66aaec4L), tobe(0xbd42a3bcL), tobe(0x903ab434L), tobe(0x8b12b94cL),
-tobe(0xcd89b30aL), tobe(0xd6a1be72L), tobe(0xfbd9a9faL), tobe(0xe0f1a482L),
-tobe(0xa12986eaL), tobe(0xba018b92L), tobe(0x97799c1aL), tobe(0x8c519162L),
-tobe(0x14c9d8caL), tobe(0x0fe1d5b2L), tobe(0x2299c23aL), tobe(0x39b1cf42L),
-tobe(0x7869ed2aL), tobe(0x6341e052L), tobe(0x4e39f7daL), tobe(0x5511faa2L),
-tobe(0x7bc8793dL), tobe(0x60e07445L), tobe(0x4d9863cdL), tobe(0x56b06eb5L),
-tobe(0x17684cddL), tobe(0x0c4041a5L), tobe(0x2138562dL), tobe(0x3a105b55L),
-tobe(0xa28812fdL), tobe(0xb9a01f85L), tobe(0x94d8080dL), tobe(0x8ff00575L),
-tobe(0xce28271dL), tobe(0xd5002a65L), tobe(0xf8783dedL), tobe(0xe3503095L),
-tobe(0x754e2961L), tobe(0x6e662419L), tobe(0x431e3391L), tobe(0x58363ee9L),
-tobe(0x19ee1c81L), tobe(0x02c611f9L), tobe(0x2fbe0671L), tobe(0x34960b09L),
-tobe(0xac0e42a1L), tobe(0xb7264fd9L), tobe(0x9a5e5851L), tobe(0x81765529L),
-tobe(0xc0ae7741L), tobe(0xdb867a39L), tobe(0xf6fe6db1L), tobe(0xedd660c9L),
-tobe(0xc30fe356L), tobe(0xd827ee2eL), tobe(0xf55ff9a6L), tobe(0xee77f4deL),
-tobe(0xafafd6b6L), tobe(0xb487dbceL), tobe(0x99ffcc46L), tobe(0x82d7c13eL),
-tobe(0x1a4f8896L), tobe(0x016785eeL), tobe(0x2c1f9266L), tobe(0x37379f1eL),
-tobe(0x76efbd76L), tobe(0x6dc7b00eL), tobe(0x40bfa786L), tobe(0x5b97aafeL),
-tobe(0x1d0ca0b8L), tobe(0x0624adc0L), tobe(0x2b5cba48L), tobe(0x3074b730L),
-tobe(0x71ac9558L), tobe(0x6a849820L), tobe(0x47fc8fa8L), tobe(0x5cd482d0L),
-tobe(0xc44ccb78L), tobe(0xdf64c600L), tobe(0xf21cd188L), tobe(0xe934dcf0L),
-tobe(0xa8ecfe98L), tobe(0xb3c4f3e0L), tobe(0x9ebce468L), tobe(0x8594e910L),
-tobe(0xab4d6a8fL), tobe(0xb06567f7L), tobe(0x9d1d707fL), tobe(0x86357d07L),
-tobe(0xc7ed5f6fL), tobe(0xdcc55217L), tobe(0xf1bd459fL), tobe(0xea9548e7L),
-tobe(0x720d014fL), tobe(0x69250c37L), tobe(0x445d1bbfL), tobe(0x5f7516c7L),
-tobe(0x1ead34afL), tobe(0x058539d7L), tobe(0x28fd2e5fL), tobe(0x33d52327L)},
-{
-tobe(0x00000000L), tobe(0x4f576811L), tobe(0x9eaed022L), tobe(0xd1f9b833L),
-tobe(0x399cbdf3L), tobe(0x76cbd5e2L), tobe(0xa7326dd1L), tobe(0xe86505c0L),
-tobe(0x73397be6L), tobe(0x3c6e13f7L), tobe(0xed97abc4L), tobe(0xa2c0c3d5L),
-tobe(0x4aa5c615L), tobe(0x05f2ae04L), tobe(0xd40b1637L), tobe(0x9b5c7e26L),
-tobe(0xe672f7ccL), tobe(0xa9259fddL), tobe(0x78dc27eeL), tobe(0x378b4fffL),
-tobe(0xdfee4a3fL), tobe(0x90b9222eL), tobe(0x41409a1dL), tobe(0x0e17f20cL),
-tobe(0x954b8c2aL), tobe(0xda1ce43bL), tobe(0x0be55c08L), tobe(0x44b23419L),
-tobe(0xacd731d9L), tobe(0xe38059c8L), tobe(0x3279e1fbL), tobe(0x7d2e89eaL),
-tobe(0xc824f22fL), tobe(0x87739a3eL), tobe(0x568a220dL), tobe(0x19dd4a1cL),
-tobe(0xf1b84fdcL), tobe(0xbeef27cdL), tobe(0x6f169ffeL), tobe(0x2041f7efL),
-tobe(0xbb1d89c9L), tobe(0xf44ae1d8L), tobe(0x25b359ebL), tobe(0x6ae431faL),
-tobe(0x8281343aL), tobe(0xcdd65c2bL), tobe(0x1c2fe418L), tobe(0x53788c09L),
-tobe(0x2e5605e3L), tobe(0x61016df2L), tobe(0xb0f8d5c1L), tobe(0xffafbdd0L),
-tobe(0x17cab810L), tobe(0x589dd001L), tobe(0x89646832L), tobe(0xc6330023L),
-tobe(0x5d6f7e05L), tobe(0x12381614L), tobe(0xc3c1ae27L), tobe(0x8c96c636L),
-tobe(0x64f3c3f6L), tobe(0x2ba4abe7L), tobe(0xfa5d13d4L), tobe(0xb50a7bc5L),
-tobe(0x9488f9e9L), tobe(0xdbdf91f8L), tobe(0x0a2629cbL), tobe(0x457141daL),
-tobe(0xad14441aL), tobe(0xe2432c0bL), tobe(0x33ba9438L), tobe(0x7cedfc29L),
-tobe(0xe7b1820fL), tobe(0xa8e6ea1eL), tobe(0x791f522dL), tobe(0x36483a3cL),
-tobe(0xde2d3ffcL), tobe(0x917a57edL), tobe(0x4083efdeL), tobe(0x0fd487cfL),
-tobe(0x72fa0e25L), tobe(0x3dad6634L), tobe(0xec54de07L), tobe(0xa303b616L),
-tobe(0x4b66b3d6L), tobe(0x0431dbc7L), tobe(0xd5c863f4L), tobe(0x9a9f0be5L),
-tobe(0x01c375c3L), tobe(0x4e941dd2L), tobe(0x9f6da5e1L), tobe(0xd03acdf0L),
-tobe(0x385fc830L), tobe(0x7708a021L), tobe(0xa6f11812L), tobe(0xe9a67003L),
-tobe(0x5cac0bc6L), tobe(0x13fb63d7L), tobe(0xc202dbe4L), tobe(0x8d55b3f5L),
-tobe(0x6530b635L), tobe(0x2a67de24L), tobe(0xfb9e6617L), tobe(0xb4c90e06L),
-tobe(0x2f957020L), tobe(0x60c21831L), tobe(0xb13ba002L), tobe(0xfe6cc813L),
-tobe(0x1609cdd3L), tobe(0x595ea5c2L), tobe(0x88a71df1L), tobe(0xc7f075e0L),
-tobe(0xbadefc0aL), tobe(0xf589941bL), tobe(0x24702c28L), tobe(0x6b274439L),
-tobe(0x834241f9L), tobe(0xcc1529e8L), tobe(0x1dec91dbL), tobe(0x52bbf9caL),
-tobe(0xc9e787ecL), tobe(0x86b0effdL), tobe(0x574957ceL), tobe(0x181e3fdfL),
-tobe(0xf07b3a1fL), tobe(0xbf2c520eL), tobe(0x6ed5ea3dL), tobe(0x2182822cL),
-tobe(0x2dd0ee65L), tobe(0x62878674L), tobe(0xb37e3e47L), tobe(0xfc295656L),
-tobe(0x144c5396L), tobe(0x5b1b3b87L), tobe(0x8ae283b4L), tobe(0xc5b5eba5L),
-tobe(0x5ee99583L), tobe(0x11befd92L), tobe(0xc04745a1L), tobe(0x8f102db0L),
-tobe(0x67752870L), tobe(0x28224061L), tobe(0xf9dbf852L), tobe(0xb68c9043L),
-tobe(0xcba219a9L), tobe(0x84f571b8L), tobe(0x550cc98bL), tobe(0x1a5ba19aL),
-tobe(0xf23ea45aL), tobe(0xbd69cc4bL), tobe(0x6c907478L), tobe(0x23c71c69L),
-tobe(0xb89b624fL), tobe(0xf7cc0a5eL), tobe(0x2635b26dL), tobe(0x6962da7cL),
-tobe(0x8107dfbcL), tobe(0xce50b7adL), tobe(0x1fa90f9eL), tobe(0x50fe678fL),
-tobe(0xe5f41c4aL), tobe(0xaaa3745bL), tobe(0x7b5acc68L), tobe(0x340da479L),
-tobe(0xdc68a1b9L), tobe(0x933fc9a8L), tobe(0x42c6719bL), tobe(0x0d91198aL),
-tobe(0x96cd67acL), tobe(0xd99a0fbdL), tobe(0x0863b78eL), tobe(0x4734df9fL),
-tobe(0xaf51da5fL), tobe(0xe006b24eL), tobe(0x31ff0a7dL), tobe(0x7ea8626cL),
-tobe(0x0386eb86L), tobe(0x4cd18397L), tobe(0x9d283ba4L), tobe(0xd27f53b5L),
-tobe(0x3a1a5675L), tobe(0x754d3e64L), tobe(0xa4b48657L), tobe(0xebe3ee46L),
-tobe(0x70bf9060L), tobe(0x3fe8f871L), tobe(0xee114042L), tobe(0xa1462853L),
-tobe(0x49232d93L), tobe(0x06744582L), tobe(0xd78dfdb1L), tobe(0x98da95a0L),
-tobe(0xb958178cL), tobe(0xf60f7f9dL), tobe(0x27f6c7aeL), tobe(0x68a1afbfL),
-tobe(0x80c4aa7fL), tobe(0xcf93c26eL), tobe(0x1e6a7a5dL), tobe(0x513d124cL),
-tobe(0xca616c6aL), tobe(0x8536047bL), tobe(0x54cfbc48L), tobe(0x1b98d459L),
-tobe(0xf3fdd199L), tobe(0xbcaab988L), tobe(0x6d5301bbL), tobe(0x220469aaL),
-tobe(0x5f2ae040L), tobe(0x107d8851L), tobe(0xc1843062L), tobe(0x8ed35873L),
-tobe(0x66b65db3L), tobe(0x29e135a2L), tobe(0xf8188d91L), tobe(0xb74fe580L),
-tobe(0x2c139ba6L), tobe(0x6344f3b7L), tobe(0xb2bd4b84L), tobe(0xfdea2395L),
-tobe(0x158f2655L), tobe(0x5ad84e44L), tobe(0x8b21f677L), tobe(0xc4769e66L),
-tobe(0x717ce5a3L), tobe(0x3e2b8db2L), tobe(0xefd23581L), tobe(0xa0855d90L),
-tobe(0x48e05850L), tobe(0x07b73041L), tobe(0xd64e8872L), tobe(0x9919e063L),
-tobe(0x02459e45L), tobe(0x4d12f654L), tobe(0x9ceb4e67L), tobe(0xd3bc2676L),
-tobe(0x3bd923b6L), tobe(0x748e4ba7L), tobe(0xa577f394L), tobe(0xea209b85L),
-tobe(0x970e126fL), tobe(0xd8597a7eL), tobe(0x09a0c24dL), tobe(0x46f7aa5cL),
-tobe(0xae92af9cL), tobe(0xe1c5c78dL), tobe(0x303c7fbeL), tobe(0x7f6b17afL),
-tobe(0xe4376989L), tobe(0xab600198L), tobe(0x7a99b9abL), tobe(0x35ced1baL),
-tobe(0xddabd47aL), tobe(0x92fcbc6bL), tobe(0x43050458L), tobe(0x0c526c49L)},
-{
-tobe(0x00000000L), tobe(0x5ba1dccaL), tobe(0xb743b994L), tobe(0xece2655eL),
-tobe(0x6a466e9fL), tobe(0x31e7b255L), tobe(0xdd05d70bL), tobe(0x86a40bc1L),
-tobe(0xd48cdd3eL), tobe(0x8f2d01f4L), tobe(0x63cf64aaL), tobe(0x386eb860L),
-tobe(0xbecab3a1L), tobe(0xe56b6f6bL), tobe(0x09890a35L), tobe(0x5228d6ffL),
-tobe(0xadd8a7cbL), tobe(0xf6797b01L), tobe(0x1a9b1e5fL), tobe(0x413ac295L),
-tobe(0xc79ec954L), tobe(0x9c3f159eL), tobe(0x70dd70c0L), tobe(0x2b7cac0aL),
-tobe(0x79547af5L), tobe(0x22f5a63fL), tobe(0xce17c361L), tobe(0x95b61fabL),
-tobe(0x1312146aL), tobe(0x48b3c8a0L), tobe(0xa451adfeL), tobe(0xfff07134L),
-tobe(0x5f705221L), tobe(0x04d18eebL), tobe(0xe833ebb5L), tobe(0xb392377fL),
-tobe(0x35363cbeL), tobe(0x6e97e074L), tobe(0x8275852aL), tobe(0xd9d459e0L),
-tobe(0x8bfc8f1fL), tobe(0xd05d53d5L), tobe(0x3cbf368bL), tobe(0x671eea41L),
-tobe(0xe1bae180L), tobe(0xba1b3d4aL), tobe(0x56f95814L), tobe(0x0d5884deL),
-tobe(0xf2a8f5eaL), tobe(0xa9092920L), tobe(0x45eb4c7eL), tobe(0x1e4a90b4L),
-tobe(0x98ee9b75L), tobe(0xc34f47bfL), tobe(0x2fad22e1L), tobe(0x740cfe2bL),
-tobe(0x262428d4L), tobe(0x7d85f41eL), tobe(0x91679140L), tobe(0xcac64d8aL),
-tobe(0x4c62464bL), tobe(0x17c39a81L), tobe(0xfb21ffdfL), tobe(0xa0802315L),
-tobe(0xbee0a442L), tobe(0xe5417888L), tobe(0x09a31dd6L), tobe(0x5202c11cL),
-tobe(0xd4a6caddL), tobe(0x8f071617L), tobe(0x63e57349L), tobe(0x3844af83L),
-tobe(0x6a6c797cL), tobe(0x31cda5b6L), tobe(0xdd2fc0e8L), tobe(0x868e1c22L),
-tobe(0x002a17e3L), tobe(0x5b8bcb29L), tobe(0xb769ae77L), tobe(0xecc872bdL),
-tobe(0x13380389L), tobe(0x4899df43L), tobe(0xa47bba1dL), tobe(0xffda66d7L),
-tobe(0x797e6d16L), tobe(0x22dfb1dcL), tobe(0xce3dd482L), tobe(0x959c0848L),
-tobe(0xc7b4deb7L), tobe(0x9c15027dL), tobe(0x70f76723L), tobe(0x2b56bbe9L),
-tobe(0xadf2b028L), tobe(0xf6536ce2L), tobe(0x1ab109bcL), tobe(0x4110d576L),
-tobe(0xe190f663L), tobe(0xba312aa9L), tobe(0x56d34ff7L), tobe(0x0d72933dL),
-tobe(0x8bd698fcL), tobe(0xd0774436L), tobe(0x3c952168L), tobe(0x6734fda2L),
-tobe(0x351c2b5dL), tobe(0x6ebdf797L), tobe(0x825f92c9L), tobe(0xd9fe4e03L),
-tobe(0x5f5a45c2L), tobe(0x04fb9908L), tobe(0xe819fc56L), tobe(0xb3b8209cL),
-tobe(0x4c4851a8L), tobe(0x17e98d62L), tobe(0xfb0be83cL), tobe(0xa0aa34f6L),
-tobe(0x260e3f37L), tobe(0x7dafe3fdL), tobe(0x914d86a3L), tobe(0xcaec5a69L),
-tobe(0x98c48c96L), tobe(0xc365505cL), tobe(0x2f873502L), tobe(0x7426e9c8L),
-tobe(0xf282e209L), tobe(0xa9233ec3L), tobe(0x45c15b9dL), tobe(0x1e608757L),
-tobe(0x79005533L), tobe(0x22a189f9L), tobe(0xce43eca7L), tobe(0x95e2306dL),
-tobe(0x13463bacL), tobe(0x48e7e766L), tobe(0xa4058238L), tobe(0xffa45ef2L),
-tobe(0xad8c880dL), tobe(0xf62d54c7L), tobe(0x1acf3199L), tobe(0x416eed53L),
-tobe(0xc7cae692L), tobe(0x9c6b3a58L), tobe(0x70895f06L), tobe(0x2b2883ccL),
-tobe(0xd4d8f2f8L), tobe(0x8f792e32L), tobe(0x639b4b6cL), tobe(0x383a97a6L),
-tobe(0xbe9e9c67L), tobe(0xe53f40adL), tobe(0x09dd25f3L), tobe(0x527cf939L),
-tobe(0x00542fc6L), tobe(0x5bf5f30cL), tobe(0xb7179652L), tobe(0xecb64a98L),
-tobe(0x6a124159L), tobe(0x31b39d93L), tobe(0xdd51f8cdL), tobe(0x86f02407L),
-tobe(0x26700712L), tobe(0x7dd1dbd8L), tobe(0x9133be86L), tobe(0xca92624cL),
-tobe(0x4c36698dL), tobe(0x1797b547L), tobe(0xfb75d019L), tobe(0xa0d40cd3L),
-tobe(0xf2fcda2cL), tobe(0xa95d06e6L), tobe(0x45bf63b8L), tobe(0x1e1ebf72L),
-tobe(0x98bab4b3L), tobe(0xc31b6879L), tobe(0x2ff90d27L), tobe(0x7458d1edL),
-tobe(0x8ba8a0d9L), tobe(0xd0097c13L), tobe(0x3ceb194dL), tobe(0x674ac587L),
-tobe(0xe1eece46L), tobe(0xba4f128cL), tobe(0x56ad77d2L), tobe(0x0d0cab18L),
-tobe(0x5f247de7L), tobe(0x0485a12dL), tobe(0xe867c473L), tobe(0xb3c618b9L),
-tobe(0x35621378L), tobe(0x6ec3cfb2L), tobe(0x8221aaecL), tobe(0xd9807626L),
-tobe(0xc7e0f171L), tobe(0x9c412dbbL), tobe(0x70a348e5L), tobe(0x2b02942fL),
-tobe(0xada69feeL), tobe(0xf6074324L), tobe(0x1ae5267aL), tobe(0x4144fab0L),
-tobe(0x136c2c4fL), tobe(0x48cdf085L), tobe(0xa42f95dbL), tobe(0xff8e4911L),
-tobe(0x792a42d0L), tobe(0x228b9e1aL), tobe(0xce69fb44L), tobe(0x95c8278eL),
-tobe(0x6a3856baL), tobe(0x31998a70L), tobe(0xdd7bef2eL), tobe(0x86da33e4L),
-tobe(0x007e3825L), tobe(0x5bdfe4efL), tobe(0xb73d81b1L), tobe(0xec9c5d7bL),
-tobe(0xbeb48b84L), tobe(0xe515574eL), tobe(0x09f73210L), tobe(0x5256eedaL),
-tobe(0xd4f2e51bL), tobe(0x8f5339d1L), tobe(0x63b15c8fL), tobe(0x38108045L),
-tobe(0x9890a350L), tobe(0xc3317f9aL), tobe(0x2fd31ac4L), tobe(0x7472c60eL),
-tobe(0xf2d6cdcfL), tobe(0xa9771105L), tobe(0x4595745bL), tobe(0x1e34a891L),
-tobe(0x4c1c7e6eL), tobe(0x17bda2a4L), tobe(0xfb5fc7faL), tobe(0xa0fe1b30L),
-tobe(0x265a10f1L), tobe(0x7dfbcc3bL), tobe(0x9119a965L), tobe(0xcab875afL),
-tobe(0x3548049bL), tobe(0x6ee9d851L), tobe(0x820bbd0fL), tobe(0xd9aa61c5L),
-tobe(0x5f0e6a04L), tobe(0x04afb6ceL), tobe(0xe84dd390L), tobe(0xb3ec0f5aL),
-tobe(0xe1c4d9a5L), tobe(0xba65056fL), tobe(0x56876031L), tobe(0x0d26bcfbL),
-tobe(0x8b82b73aL), tobe(0xd0236bf0L), tobe(0x3cc10eaeL), tobe(0x6760d264L)},
-};
-static u32 __cacheline_aligned crc32ctable_le[8][256] = {{
-tole(0x00000000L), tole(0xf26b8303L), tole(0xe13b70f7L), tole(0x1350f3f4L),
-tole(0xc79a971fL), tole(0x35f1141cL), tole(0x26a1e7e8L), tole(0xd4ca64ebL),
-tole(0x8ad958cfL), tole(0x78b2dbccL), tole(0x6be22838L), tole(0x9989ab3bL),
-tole(0x4d43cfd0L), tole(0xbf284cd3L), tole(0xac78bf27L), tole(0x5e133c24L),
-tole(0x105ec76fL), tole(0xe235446cL), tole(0xf165b798L), tole(0x030e349bL),
-tole(0xd7c45070L), tole(0x25afd373L), tole(0x36ff2087L), tole(0xc494a384L),
-tole(0x9a879fa0L), tole(0x68ec1ca3L), tole(0x7bbcef57L), tole(0x89d76c54L),
-tole(0x5d1d08bfL), tole(0xaf768bbcL), tole(0xbc267848L), tole(0x4e4dfb4bL),
-tole(0x20bd8edeL), tole(0xd2d60dddL), tole(0xc186fe29L), tole(0x33ed7d2aL),
-tole(0xe72719c1L), tole(0x154c9ac2L), tole(0x061c6936L), tole(0xf477ea35L),
-tole(0xaa64d611L), tole(0x580f5512L), tole(0x4b5fa6e6L), tole(0xb93425e5L),
-tole(0x6dfe410eL), tole(0x9f95c20dL), tole(0x8cc531f9L), tole(0x7eaeb2faL),
-tole(0x30e349b1L), tole(0xc288cab2L), tole(0xd1d83946L), tole(0x23b3ba45L),
-tole(0xf779deaeL), tole(0x05125dadL), tole(0x1642ae59L), tole(0xe4292d5aL),
-tole(0xba3a117eL), tole(0x4851927dL), tole(0x5b016189L), tole(0xa96ae28aL),
-tole(0x7da08661L), tole(0x8fcb0562L), tole(0x9c9bf696L), tole(0x6ef07595L),
-tole(0x417b1dbcL), tole(0xb3109ebfL), tole(0xa0406d4bL), tole(0x522bee48L),
-tole(0x86e18aa3L), tole(0x748a09a0L), tole(0x67dafa54L), tole(0x95b17957L),
-tole(0xcba24573L), tole(0x39c9c670L), tole(0x2a993584L), tole(0xd8f2b687L),
-tole(0x0c38d26cL), tole(0xfe53516fL), tole(0xed03a29bL), tole(0x1f682198L),
-tole(0x5125dad3L), tole(0xa34e59d0L), tole(0xb01eaa24L), tole(0x42752927L),
-tole(0x96bf4dccL), tole(0x64d4cecfL), tole(0x77843d3bL), tole(0x85efbe38L),
-tole(0xdbfc821cL), tole(0x2997011fL), tole(0x3ac7f2ebL), tole(0xc8ac71e8L),
-tole(0x1c661503L), tole(0xee0d9600L), tole(0xfd5d65f4L), tole(0x0f36e6f7L),
-tole(0x61c69362L), tole(0x93ad1061L), tole(0x80fde395L), tole(0x72966096L),
-tole(0xa65c047dL), tole(0x5437877eL), tole(0x4767748aL), tole(0xb50cf789L),
-tole(0xeb1fcbadL), tole(0x197448aeL), tole(0x0a24bb5aL), tole(0xf84f3859L),
-tole(0x2c855cb2L), tole(0xdeeedfb1L), tole(0xcdbe2c45L), tole(0x3fd5af46L),
-tole(0x7198540dL), tole(0x83f3d70eL), tole(0x90a324faL), tole(0x62c8a7f9L),
-tole(0xb602c312L), tole(0x44694011L), tole(0x5739b3e5L), tole(0xa55230e6L),
-tole(0xfb410cc2L), tole(0x092a8fc1L), tole(0x1a7a7c35L), tole(0xe811ff36L),
-tole(0x3cdb9bddL), tole(0xceb018deL), tole(0xdde0eb2aL), tole(0x2f8b6829L),
-tole(0x82f63b78L), tole(0x709db87bL), tole(0x63cd4b8fL), tole(0x91a6c88cL),
-tole(0x456cac67L), tole(0xb7072f64L), tole(0xa457dc90L), tole(0x563c5f93L),
-tole(0x082f63b7L), tole(0xfa44e0b4L), tole(0xe9141340L), tole(0x1b7f9043L),
-tole(0xcfb5f4a8L), tole(0x3dde77abL), tole(0x2e8e845fL), tole(0xdce5075cL),
-tole(0x92a8fc17L), tole(0x60c37f14L), tole(0x73938ce0L), tole(0x81f80fe3L),
-tole(0x55326b08L), tole(0xa759e80bL), tole(0xb4091bffL), tole(0x466298fcL),
-tole(0x1871a4d8L), tole(0xea1a27dbL), tole(0xf94ad42fL), tole(0x0b21572cL),
-tole(0xdfeb33c7L), tole(0x2d80b0c4L), tole(0x3ed04330L), tole(0xccbbc033L),
-tole(0xa24bb5a6L), tole(0x502036a5L), tole(0x4370c551L), tole(0xb11b4652L),
-tole(0x65d122b9L), tole(0x97baa1baL), tole(0x84ea524eL), tole(0x7681d14dL),
-tole(0x2892ed69L), tole(0xdaf96e6aL), tole(0xc9a99d9eL), tole(0x3bc21e9dL),
-tole(0xef087a76L), tole(0x1d63f975L), tole(0x0e330a81L), tole(0xfc588982L),
-tole(0xb21572c9L), tole(0x407ef1caL), tole(0x532e023eL), tole(0xa145813dL),
-tole(0x758fe5d6L), tole(0x87e466d5L), tole(0x94b49521L), tole(0x66df1622L),
-tole(0x38cc2a06L), tole(0xcaa7a905L), tole(0xd9f75af1L), tole(0x2b9cd9f2L),
-tole(0xff56bd19L), tole(0x0d3d3e1aL), tole(0x1e6dcdeeL), tole(0xec064eedL),
-tole(0xc38d26c4L), tole(0x31e6a5c7L), tole(0x22b65633L), tole(0xd0ddd530L),
-tole(0x0417b1dbL), tole(0xf67c32d8L), tole(0xe52cc12cL), tole(0x1747422fL),
-tole(0x49547e0bL), tole(0xbb3ffd08L), tole(0xa86f0efcL), tole(0x5a048dffL),
-tole(0x8ecee914L), tole(0x7ca56a17L), tole(0x6ff599e3L), tole(0x9d9e1ae0L),
-tole(0xd3d3e1abL), tole(0x21b862a8L), tole(0x32e8915cL), tole(0xc083125fL),
-tole(0x144976b4L), tole(0xe622f5b7L), tole(0xf5720643L), tole(0x07198540L),
-tole(0x590ab964L), tole(0xab613a67L), tole(0xb831c993L), tole(0x4a5a4a90L),
-tole(0x9e902e7bL), tole(0x6cfbad78L), tole(0x7fab5e8cL), tole(0x8dc0dd8fL),
-tole(0xe330a81aL), tole(0x115b2b19L), tole(0x020bd8edL), tole(0xf0605beeL),
-tole(0x24aa3f05L), tole(0xd6c1bc06L), tole(0xc5914ff2L), tole(0x37faccf1L),
-tole(0x69e9f0d5L), tole(0x9b8273d6L), tole(0x88d28022L), tole(0x7ab90321L),
-tole(0xae7367caL), tole(0x5c18e4c9L), tole(0x4f48173dL), tole(0xbd23943eL),
-tole(0xf36e6f75L), tole(0x0105ec76L), tole(0x12551f82L), tole(0xe03e9c81L),
-tole(0x34f4f86aL), tole(0xc69f7b69L), tole(0xd5cf889dL), tole(0x27a40b9eL),
-tole(0x79b737baL), tole(0x8bdcb4b9L), tole(0x988c474dL), tole(0x6ae7c44eL),
-tole(0xbe2da0a5L), tole(0x4c4623a6L), tole(0x5f16d052L), tole(0xad7d5351L)},
-{
-tole(0x00000000L), tole(0x13a29877L), tole(0x274530eeL), tole(0x34e7a899L),
-tole(0x4e8a61dcL), tole(0x5d28f9abL), tole(0x69cf5132L), tole(0x7a6dc945L),
-tole(0x9d14c3b8L), tole(0x8eb65bcfL), tole(0xba51f356L), tole(0xa9f36b21L),
-tole(0xd39ea264L), tole(0xc03c3a13L), tole(0xf4db928aL), tole(0xe7790afdL),
-tole(0x3fc5f181L), tole(0x2c6769f6L), tole(0x1880c16fL), tole(0x0b225918L),
-tole(0x714f905dL), tole(0x62ed082aL), tole(0x560aa0b3L), tole(0x45a838c4L),
-tole(0xa2d13239L), tole(0xb173aa4eL), tole(0x859402d7L), tole(0x96369aa0L),
-tole(0xec5b53e5L), tole(0xfff9cb92L), tole(0xcb1e630bL), tole(0xd8bcfb7cL),
-tole(0x7f8be302L), tole(0x6c297b75L), tole(0x58ced3ecL), tole(0x4b6c4b9bL),
-tole(0x310182deL), tole(0x22a31aa9L), tole(0x1644b230L), tole(0x05e62a47L),
-tole(0xe29f20baL), tole(0xf13db8cdL), tole(0xc5da1054L), tole(0xd6788823L),
-tole(0xac154166L), tole(0xbfb7d911L), tole(0x8b507188L), tole(0x98f2e9ffL),
-tole(0x404e1283L), tole(0x53ec8af4L), tole(0x670b226dL), tole(0x74a9ba1aL),
-tole(0x0ec4735fL), tole(0x1d66eb28L), tole(0x298143b1L), tole(0x3a23dbc6L),
-tole(0xdd5ad13bL), tole(0xcef8494cL), tole(0xfa1fe1d5L), tole(0xe9bd79a2L),
-tole(0x93d0b0e7L), tole(0x80722890L), tole(0xb4958009L), tole(0xa737187eL),
-tole(0xff17c604L), tole(0xecb55e73L), tole(0xd852f6eaL), tole(0xcbf06e9dL),
-tole(0xb19da7d8L), tole(0xa23f3fafL), tole(0x96d89736L), tole(0x857a0f41L),
-tole(0x620305bcL), tole(0x71a19dcbL), tole(0x45463552L), tole(0x56e4ad25L),
-tole(0x2c896460L), tole(0x3f2bfc17L), tole(0x0bcc548eL), tole(0x186eccf9L),
-tole(0xc0d23785L), tole(0xd370aff2L), tole(0xe797076bL), tole(0xf4359f1cL),
-tole(0x8e585659L), tole(0x9dface2eL), tole(0xa91d66b7L), tole(0xbabffec0L),
-tole(0x5dc6f43dL), tole(0x4e646c4aL), tole(0x7a83c4d3L), tole(0x69215ca4L),
-tole(0x134c95e1L), tole(0x00ee0d96L), tole(0x3409a50fL), tole(0x27ab3d78L),
-tole(0x809c2506L), tole(0x933ebd71L), tole(0xa7d915e8L), tole(0xb47b8d9fL),
-tole(0xce1644daL), tole(0xddb4dcadL), tole(0xe9537434L), tole(0xfaf1ec43L),
-tole(0x1d88e6beL), tole(0x0e2a7ec9L), tole(0x3acdd650L), tole(0x296f4e27L),
-tole(0x53028762L), tole(0x40a01f15L), tole(0x7447b78cL), tole(0x67e52ffbL),
-tole(0xbf59d487L), tole(0xacfb4cf0L), tole(0x981ce469L), tole(0x8bbe7c1eL),
-tole(0xf1d3b55bL), tole(0xe2712d2cL), tole(0xd69685b5L), tole(0xc5341dc2L),
-tole(0x224d173fL), tole(0x31ef8f48L), tole(0x050827d1L), tole(0x16aabfa6L),
-tole(0x6cc776e3L), tole(0x7f65ee94L), tole(0x4b82460dL), tole(0x5820de7aL),
-tole(0xfbc3faf9L), tole(0xe861628eL), tole(0xdc86ca17L), tole(0xcf245260L),
-tole(0xb5499b25L), tole(0xa6eb0352L), tole(0x920cabcbL), tole(0x81ae33bcL),
-tole(0x66d73941L), tole(0x7575a136L), tole(0x419209afL), tole(0x523091d8L),
-tole(0x285d589dL), tole(0x3bffc0eaL), tole(0x0f186873L), tole(0x1cbaf004L),
-tole(0xc4060b78L), tole(0xd7a4930fL), tole(0xe3433b96L), tole(0xf0e1a3e1L),
-tole(0x8a8c6aa4L), tole(0x992ef2d3L), tole(0xadc95a4aL), tole(0xbe6bc23dL),
-tole(0x5912c8c0L), tole(0x4ab050b7L), tole(0x7e57f82eL), tole(0x6df56059L),
-tole(0x1798a91cL), tole(0x043a316bL), tole(0x30dd99f2L), tole(0x237f0185L),
-tole(0x844819fbL), tole(0x97ea818cL), tole(0xa30d2915L), tole(0xb0afb162L),
-tole(0xcac27827L), tole(0xd960e050L), tole(0xed8748c9L), tole(0xfe25d0beL),
-tole(0x195cda43L), tole(0x0afe4234L), tole(0x3e19eaadL), tole(0x2dbb72daL),
-tole(0x57d6bb9fL), tole(0x447423e8L), tole(0x70938b71L), tole(0x63311306L),
-tole(0xbb8de87aL), tole(0xa82f700dL), tole(0x9cc8d894L), tole(0x8f6a40e3L),
-tole(0xf50789a6L), tole(0xe6a511d1L), tole(0xd242b948L), tole(0xc1e0213fL),
-tole(0x26992bc2L), tole(0x353bb3b5L), tole(0x01dc1b2cL), tole(0x127e835bL),
-tole(0x68134a1eL), tole(0x7bb1d269L), tole(0x4f567af0L), tole(0x5cf4e287L),
-tole(0x04d43cfdL), tole(0x1776a48aL), tole(0x23910c13L), tole(0x30339464L),
-tole(0x4a5e5d21L), tole(0x59fcc556L), tole(0x6d1b6dcfL), tole(0x7eb9f5b8L),
-tole(0x99c0ff45L), tole(0x8a626732L), tole(0xbe85cfabL), tole(0xad2757dcL),
-tole(0xd74a9e99L), tole(0xc4e806eeL), tole(0xf00fae77L), tole(0xe3ad3600L),
-tole(0x3b11cd7cL), tole(0x28b3550bL), tole(0x1c54fd92L), tole(0x0ff665e5L),
-tole(0x759baca0L), tole(0x663934d7L), tole(0x52de9c4eL), tole(0x417c0439L),
-tole(0xa6050ec4L), tole(0xb5a796b3L), tole(0x81403e2aL), tole(0x92e2a65dL),
-tole(0xe88f6f18L), tole(0xfb2df76fL), tole(0xcfca5ff6L), tole(0xdc68c781L),
-tole(0x7b5fdfffL), tole(0x68fd4788L), tole(0x5c1aef11L), tole(0x4fb87766L),
-tole(0x35d5be23L), tole(0x26772654L), tole(0x12908ecdL), tole(0x013216baL),
-tole(0xe64b1c47L), tole(0xf5e98430L), tole(0xc10e2ca9L), tole(0xd2acb4deL),
-tole(0xa8c17d9bL), tole(0xbb63e5ecL), tole(0x8f844d75L), tole(0x9c26d502L),
-tole(0x449a2e7eL), tole(0x5738b609L), tole(0x63df1e90L), tole(0x707d86e7L),
-tole(0x0a104fa2L), tole(0x19b2d7d5L), tole(0x2d557f4cL), tole(0x3ef7e73bL),
-tole(0xd98eedc6L), tole(0xca2c75b1L), tole(0xfecbdd28L), tole(0xed69455fL),
-tole(0x97048c1aL), tole(0x84a6146dL), tole(0xb041bcf4L), tole(0xa3e32483L)},
-{
-tole(0x00000000L), tole(0xa541927eL), tole(0x4f6f520dL), tole(0xea2ec073L),
-tole(0x9edea41aL), tole(0x3b9f3664L), tole(0xd1b1f617L), tole(0x74f06469L),
-tole(0x38513ec5L), tole(0x9d10acbbL), tole(0x773e6cc8L), tole(0xd27ffeb6L),
-tole(0xa68f9adfL), tole(0x03ce08a1L), tole(0xe9e0c8d2L), tole(0x4ca15aacL),
-tole(0x70a27d8aL), tole(0xd5e3eff4L), tole(0x3fcd2f87L), tole(0x9a8cbdf9L),
-tole(0xee7cd990L), tole(0x4b3d4beeL), tole(0xa1138b9dL), tole(0x045219e3L),
-tole(0x48f3434fL), tole(0xedb2d131L), tole(0x079c1142L), tole(0xa2dd833cL),
-tole(0xd62de755L), tole(0x736c752bL), tole(0x9942b558L), tole(0x3c032726L),
-tole(0xe144fb14L), tole(0x4405696aL), tole(0xae2ba919L), tole(0x0b6a3b67L),
-tole(0x7f9a5f0eL), tole(0xdadbcd70L), tole(0x30f50d03L), tole(0x95b49f7dL),
-tole(0xd915c5d1L), tole(0x7c5457afL), tole(0x967a97dcL), tole(0x333b05a2L),
-tole(0x47cb61cbL), tole(0xe28af3b5L), tole(0x08a433c6L), tole(0xade5a1b8L),
-tole(0x91e6869eL), tole(0x34a714e0L), tole(0xde89d493L), tole(0x7bc846edL),
-tole(0x0f382284L), tole(0xaa79b0faL), tole(0x40577089L), tole(0xe516e2f7L),
-tole(0xa9b7b85bL), tole(0x0cf62a25L), tole(0xe6d8ea56L), tole(0x43997828L),
-tole(0x37691c41L), tole(0x92288e3fL), tole(0x78064e4cL), tole(0xdd47dc32L),
-tole(0xc76580d9L), tole(0x622412a7L), tole(0x880ad2d4L), tole(0x2d4b40aaL),
-tole(0x59bb24c3L), tole(0xfcfab6bdL), tole(0x16d476ceL), tole(0xb395e4b0L),
-tole(0xff34be1cL), tole(0x5a752c62L), tole(0xb05bec11L), tole(0x151a7e6fL),
-tole(0x61ea1a06L), tole(0xc4ab8878L), tole(0x2e85480bL), tole(0x8bc4da75L),
-tole(0xb7c7fd53L), tole(0x12866f2dL), tole(0xf8a8af5eL), tole(0x5de93d20L),
-tole(0x29195949L), tole(0x8c58cb37L), tole(0x66760b44L), tole(0xc337993aL),
-tole(0x8f96c396L), tole(0x2ad751e8L), tole(0xc0f9919bL), tole(0x65b803e5L),
-tole(0x1148678cL), tole(0xb409f5f2L), tole(0x5e273581L), tole(0xfb66a7ffL),
-tole(0x26217bcdL), tole(0x8360e9b3L), tole(0x694e29c0L), tole(0xcc0fbbbeL),
-tole(0xb8ffdfd7L), tole(0x1dbe4da9L), tole(0xf7908ddaL), tole(0x52d11fa4L),
-tole(0x1e704508L), tole(0xbb31d776L), tole(0x511f1705L), tole(0xf45e857bL),
-tole(0x80aee112L), tole(0x25ef736cL), tole(0xcfc1b31fL), tole(0x6a802161L),
-tole(0x56830647L), tole(0xf3c29439L), tole(0x19ec544aL), tole(0xbcadc634L),
-tole(0xc85da25dL), tole(0x6d1c3023L), tole(0x8732f050L), tole(0x2273622eL),
-tole(0x6ed23882L), tole(0xcb93aafcL), tole(0x21bd6a8fL), tole(0x84fcf8f1L),
-tole(0xf00c9c98L), tole(0x554d0ee6L), tole(0xbf63ce95L), tole(0x1a225cebL),
-tole(0x8b277743L), tole(0x2e66e53dL), tole(0xc448254eL), tole(0x6109b730L),
-tole(0x15f9d359L), tole(0xb0b84127L), tole(0x5a968154L), tole(0xffd7132aL),
-tole(0xb3764986L), tole(0x1637dbf8L), tole(0xfc191b8bL), tole(0x595889f5L),
-tole(0x2da8ed9cL), tole(0x88e97fe2L), tole(0x62c7bf91L), tole(0xc7862defL),
-tole(0xfb850ac9L), tole(0x5ec498b7L), tole(0xb4ea58c4L), tole(0x11abcabaL),
-tole(0x655baed3L), tole(0xc01a3cadL), tole(0x2a34fcdeL), tole(0x8f756ea0L),
-tole(0xc3d4340cL), tole(0x6695a672L), tole(0x8cbb6601L), tole(0x29faf47fL),
-tole(0x5d0a9016L), tole(0xf84b0268L), tole(0x1265c21bL), tole(0xb7245065L),
-tole(0x6a638c57L), tole(0xcf221e29L), tole(0x250cde5aL), tole(0x804d4c24L),
-tole(0xf4bd284dL), tole(0x51fcba33L), tole(0xbbd27a40L), tole(0x1e93e83eL),
-tole(0x5232b292L), tole(0xf77320ecL), tole(0x1d5de09fL), tole(0xb81c72e1L),
-tole(0xccec1688L), tole(0x69ad84f6L), tole(0x83834485L), tole(0x26c2d6fbL),
-tole(0x1ac1f1ddL), tole(0xbf8063a3L), tole(0x55aea3d0L), tole(0xf0ef31aeL),
-tole(0x841f55c7L), tole(0x215ec7b9L), tole(0xcb7007caL), tole(0x6e3195b4L),
-tole(0x2290cf18L), tole(0x87d15d66L), tole(0x6dff9d15L), tole(0xc8be0f6bL),
-tole(0xbc4e6b02L), tole(0x190ff97cL), tole(0xf321390fL), tole(0x5660ab71L),
-tole(0x4c42f79aL), tole(0xe90365e4L), tole(0x032da597L), tole(0xa66c37e9L),
-tole(0xd29c5380L), tole(0x77ddc1feL), tole(0x9df3018dL), tole(0x38b293f3L),
-tole(0x7413c95fL), tole(0xd1525b21L), tole(0x3b7c9b52L), tole(0x9e3d092cL),
-tole(0xeacd6d45L), tole(0x4f8cff3bL), tole(0xa5a23f48L), tole(0x00e3ad36L),
-tole(0x3ce08a10L), tole(0x99a1186eL), tole(0x738fd81dL), tole(0xd6ce4a63L),
-tole(0xa23e2e0aL), tole(0x077fbc74L), tole(0xed517c07L), tole(0x4810ee79L),
-tole(0x04b1b4d5L), tole(0xa1f026abL), tole(0x4bdee6d8L), tole(0xee9f74a6L),
-tole(0x9a6f10cfL), tole(0x3f2e82b1L), tole(0xd50042c2L), tole(0x7041d0bcL),
-tole(0xad060c8eL), tole(0x08479ef0L), tole(0xe2695e83L), tole(0x4728ccfdL),
-tole(0x33d8a894L), tole(0x96993aeaL), tole(0x7cb7fa99L), tole(0xd9f668e7L),
-tole(0x9557324bL), tole(0x3016a035L), tole(0xda386046L), tole(0x7f79f238L),
-tole(0x0b899651L), tole(0xaec8042fL), tole(0x44e6c45cL), tole(0xe1a75622L),
-tole(0xdda47104L), tole(0x78e5e37aL), tole(0x92cb2309L), tole(0x378ab177L),
-tole(0x437ad51eL), tole(0xe63b4760L), tole(0x0c158713L), tole(0xa954156dL),
-tole(0xe5f54fc1L), tole(0x40b4ddbfL), tole(0xaa9a1dccL), tole(0x0fdb8fb2L),
-tole(0x7b2bebdbL), tole(0xde6a79a5L), tole(0x3444b9d6L), tole(0x91052ba8L)},
-{
-tole(0x00000000L), tole(0xdd45aab8L), tole(0xbf672381L), tole(0x62228939L),
-tole(0x7b2231f3L), tole(0xa6679b4bL), tole(0xc4451272L), tole(0x1900b8caL),
-tole(0xf64463e6L), tole(0x2b01c95eL), tole(0x49234067L), tole(0x9466eadfL),
-tole(0x8d665215L), tole(0x5023f8adL), tole(0x32017194L), tole(0xef44db2cL),
-tole(0xe964b13dL), tole(0x34211b85L), tole(0x560392bcL), tole(0x8b463804L),
-tole(0x924680ceL), tole(0x4f032a76L), tole(0x2d21a34fL), tole(0xf06409f7L),
-tole(0x1f20d2dbL), tole(0xc2657863L), tole(0xa047f15aL), tole(0x7d025be2L),
-tole(0x6402e328L), tole(0xb9474990L), tole(0xdb65c0a9L), tole(0x06206a11L),
-tole(0xd725148bL), tole(0x0a60be33L), tole(0x6842370aL), tole(0xb5079db2L),
-tole(0xac072578L), tole(0x71428fc0L), tole(0x136006f9L), tole(0xce25ac41L),
-tole(0x2161776dL), tole(0xfc24ddd5L), tole(0x9e0654ecL), tole(0x4343fe54L),
-tole(0x5a43469eL), tole(0x8706ec26L), tole(0xe524651fL), tole(0x3861cfa7L),
-tole(0x3e41a5b6L), tole(0xe3040f0eL), tole(0x81268637L), tole(0x5c632c8fL),
-tole(0x45639445L), tole(0x98263efdL), tole(0xfa04b7c4L), tole(0x27411d7cL),
-tole(0xc805c650L), tole(0x15406ce8L), tole(0x7762e5d1L), tole(0xaa274f69L),
-tole(0xb327f7a3L), tole(0x6e625d1bL), tole(0x0c40d422L), tole(0xd1057e9aL),
-tole(0xaba65fe7L), tole(0x76e3f55fL), tole(0x14c17c66L), tole(0xc984d6deL),
-tole(0xd0846e14L), tole(0x0dc1c4acL), tole(0x6fe34d95L), tole(0xb2a6e72dL),
-tole(0x5de23c01L), tole(0x80a796b9L), tole(0xe2851f80L), tole(0x3fc0b538L),
-tole(0x26c00df2L), tole(0xfb85a74aL), tole(0x99a72e73L), tole(0x44e284cbL),
-tole(0x42c2eedaL), tole(0x9f874462L), tole(0xfda5cd5bL), tole(0x20e067e3L),
-tole(0x39e0df29L), tole(0xe4a57591L), tole(0x8687fca8L), tole(0x5bc25610L),
-tole(0xb4868d3cL), tole(0x69c32784L), tole(0x0be1aebdL), tole(0xd6a40405L),
-tole(0xcfa4bccfL), tole(0x12e11677L), tole(0x70c39f4eL), tole(0xad8635f6L),
-tole(0x7c834b6cL), tole(0xa1c6e1d4L), tole(0xc3e468edL), tole(0x1ea1c255L),
-tole(0x07a17a9fL), tole(0xdae4d027L), tole(0xb8c6591eL), tole(0x6583f3a6L),
-tole(0x8ac7288aL), tole(0x57828232L), tole(0x35a00b0bL), tole(0xe8e5a1b3L),
-tole(0xf1e51979L), tole(0x2ca0b3c1L), tole(0x4e823af8L), tole(0x93c79040L),
-tole(0x95e7fa51L), tole(0x48a250e9L), tole(0x2a80d9d0L), tole(0xf7c57368L),
-tole(0xeec5cba2L), tole(0x3380611aL), tole(0x51a2e823L), tole(0x8ce7429bL),
-tole(0x63a399b7L), tole(0xbee6330fL), tole(0xdcc4ba36L), tole(0x0181108eL),
-tole(0x1881a844L), tole(0xc5c402fcL), tole(0xa7e68bc5L), tole(0x7aa3217dL),
-tole(0x52a0c93fL), tole(0x8fe56387L), tole(0xedc7eabeL), tole(0x30824006L),
-tole(0x2982f8ccL), tole(0xf4c75274L), tole(0x96e5db4dL), tole(0x4ba071f5L),
-tole(0xa4e4aad9L), tole(0x79a10061L), tole(0x1b838958L), tole(0xc6c623e0L),
-tole(0xdfc69b2aL), tole(0x02833192L), tole(0x60a1b8abL), tole(0xbde41213L),
-tole(0xbbc47802L), tole(0x6681d2baL), tole(0x04a35b83L), tole(0xd9e6f13bL),
-tole(0xc0e649f1L), tole(0x1da3e349L), tole(0x7f816a70L), tole(0xa2c4c0c8L),
-tole(0x4d801be4L), tole(0x90c5b15cL), tole(0xf2e73865L), tole(0x2fa292ddL),
-tole(0x36a22a17L), tole(0xebe780afL), tole(0x89c50996L), tole(0x5480a32eL),
-tole(0x8585ddb4L), tole(0x58c0770cL), tole(0x3ae2fe35L), tole(0xe7a7548dL),
-tole(0xfea7ec47L), tole(0x23e246ffL), tole(0x41c0cfc6L), tole(0x9c85657eL),
-tole(0x73c1be52L), tole(0xae8414eaL), tole(0xcca69dd3L), tole(0x11e3376bL),
-tole(0x08e38fa1L), tole(0xd5a62519L), tole(0xb784ac20L), tole(0x6ac10698L),
-tole(0x6ce16c89L), tole(0xb1a4c631L), tole(0xd3864f08L), tole(0x0ec3e5b0L),
-tole(0x17c35d7aL), tole(0xca86f7c2L), tole(0xa8a47efbL), tole(0x75e1d443L),
-tole(0x9aa50f6fL), tole(0x47e0a5d7L), tole(0x25c22ceeL), tole(0xf8878656L),
-tole(0xe1873e9cL), tole(0x3cc29424L), tole(0x5ee01d1dL), tole(0x83a5b7a5L),
-tole(0xf90696d8L), tole(0x24433c60L), tole(0x4661b559L), tole(0x9b241fe1L),
-tole(0x8224a72bL), tole(0x5f610d93L), tole(0x3d4384aaL), tole(0xe0062e12L),
-tole(0x0f42f53eL), tole(0xd2075f86L), tole(0xb025d6bfL), tole(0x6d607c07L),
-tole(0x7460c4cdL), tole(0xa9256e75L), tole(0xcb07e74cL), tole(0x16424df4L),
-tole(0x106227e5L), tole(0xcd278d5dL), tole(0xaf050464L), tole(0x7240aedcL),
-tole(0x6b401616L), tole(0xb605bcaeL), tole(0xd4273597L), tole(0x09629f2fL),
-tole(0xe6264403L), tole(0x3b63eebbL), tole(0x59416782L), tole(0x8404cd3aL),
-tole(0x9d0475f0L), tole(0x4041df48L), tole(0x22635671L), tole(0xff26fcc9L),
-tole(0x2e238253L), tole(0xf36628ebL), tole(0x9144a1d2L), tole(0x4c010b6aL),
-tole(0x5501b3a0L), tole(0x88441918L), tole(0xea669021L), tole(0x37233a99L),
-tole(0xd867e1b5L), tole(0x05224b0dL), tole(0x6700c234L), tole(0xba45688cL),
-tole(0xa345d046L), tole(0x7e007afeL), tole(0x1c22f3c7L), tole(0xc167597fL),
-tole(0xc747336eL), tole(0x1a0299d6L), tole(0x782010efL), tole(0xa565ba57L),
-tole(0xbc65029dL), tole(0x6120a825L), tole(0x0302211cL), tole(0xde478ba4L),
-tole(0x31035088L), tole(0xec46fa30L), tole(0x8e647309L), tole(0x5321d9b1L),
-tole(0x4a21617bL), tole(0x9764cbc3L), tole(0xf54642faL), tole(0x2803e842L)},
-{
-tole(0x00000000L), tole(0x38116facL), tole(0x7022df58L), tole(0x4833b0f4L),
-tole(0xe045beb0L), tole(0xd854d11cL), tole(0x906761e8L), tole(0xa8760e44L),
-tole(0xc5670b91L), tole(0xfd76643dL), tole(0xb545d4c9L), tole(0x8d54bb65L),
-tole(0x2522b521L), tole(0x1d33da8dL), tole(0x55006a79L), tole(0x6d1105d5L),
-tole(0x8f2261d3L), tole(0xb7330e7fL), tole(0xff00be8bL), tole(0xc711d127L),
-tole(0x6f67df63L), tole(0x5776b0cfL), tole(0x1f45003bL), tole(0x27546f97L),
-tole(0x4a456a42L), tole(0x725405eeL), tole(0x3a67b51aL), tole(0x0276dab6L),
-tole(0xaa00d4f2L), tole(0x9211bb5eL), tole(0xda220baaL), tole(0xe2336406L),
-tole(0x1ba8b557L), tole(0x23b9dafbL), tole(0x6b8a6a0fL), tole(0x539b05a3L),
-tole(0xfbed0be7L), tole(0xc3fc644bL), tole(0x8bcfd4bfL), tole(0xb3debb13L),
-tole(0xdecfbec6L), tole(0xe6ded16aL), tole(0xaeed619eL), tole(0x96fc0e32L),
-tole(0x3e8a0076L), tole(0x069b6fdaL), tole(0x4ea8df2eL), tole(0x76b9b082L),
-tole(0x948ad484L), tole(0xac9bbb28L), tole(0xe4a80bdcL), tole(0xdcb96470L),
-tole(0x74cf6a34L), tole(0x4cde0598L), tole(0x04edb56cL), tole(0x3cfcdac0L),
-tole(0x51eddf15L), tole(0x69fcb0b9L), tole(0x21cf004dL), tole(0x19de6fe1L),
-tole(0xb1a861a5L), tole(0x89b90e09L), tole(0xc18abefdL), tole(0xf99bd151L),
-tole(0x37516aaeL), tole(0x0f400502L), tole(0x4773b5f6L), tole(0x7f62da5aL),
-tole(0xd714d41eL), tole(0xef05bbb2L), tole(0xa7360b46L), tole(0x9f2764eaL),
-tole(0xf236613fL), tole(0xca270e93L), tole(0x8214be67L), tole(0xba05d1cbL),
-tole(0x1273df8fL), tole(0x2a62b023L), tole(0x625100d7L), tole(0x5a406f7bL),
-tole(0xb8730b7dL), tole(0x806264d1L), tole(0xc851d425L), tole(0xf040bb89L),
-tole(0x5836b5cdL), tole(0x6027da61L), tole(0x28146a95L), tole(0x10050539L),
-tole(0x7d1400ecL), tole(0x45056f40L), tole(0x0d36dfb4L), tole(0x3527b018L),
-tole(0x9d51be5cL), tole(0xa540d1f0L), tole(0xed736104L), tole(0xd5620ea8L),
-tole(0x2cf9dff9L), tole(0x14e8b055L), tole(0x5cdb00a1L), tole(0x64ca6f0dL),
-tole(0xccbc6149L), tole(0xf4ad0ee5L), tole(0xbc9ebe11L), tole(0x848fd1bdL),
-tole(0xe99ed468L), tole(0xd18fbbc4L), tole(0x99bc0b30L), tole(0xa1ad649cL),
-tole(0x09db6ad8L), tole(0x31ca0574L), tole(0x79f9b580L), tole(0x41e8da2cL),
-tole(0xa3dbbe2aL), tole(0x9bcad186L), tole(0xd3f96172L), tole(0xebe80edeL),
-tole(0x439e009aL), tole(0x7b8f6f36L), tole(0x33bcdfc2L), tole(0x0badb06eL),
-tole(0x66bcb5bbL), tole(0x5eadda17L), tole(0x169e6ae3L), tole(0x2e8f054fL),
-tole(0x86f90b0bL), tole(0xbee864a7L), tole(0xf6dbd453L), tole(0xcecabbffL),
-tole(0x6ea2d55cL), tole(0x56b3baf0L), tole(0x1e800a04L), tole(0x269165a8L),
-tole(0x8ee76becL), tole(0xb6f60440L), tole(0xfec5b4b4L), tole(0xc6d4db18L),
-tole(0xabc5decdL), tole(0x93d4b161L), tole(0xdbe70195L), tole(0xe3f66e39L),
-tole(0x4b80607dL), tole(0x73910fd1L), tole(0x3ba2bf25L), tole(0x03b3d089L),
-tole(0xe180b48fL), tole(0xd991db23L), tole(0x91a26bd7L), tole(0xa9b3047bL),
-tole(0x01c50a3fL), tole(0x39d46593L), tole(0x71e7d567L), tole(0x49f6bacbL),
-tole(0x24e7bf1eL), tole(0x1cf6d0b2L), tole(0x54c56046L), tole(0x6cd40feaL),
-tole(0xc4a201aeL), tole(0xfcb36e02L), tole(0xb480def6L), tole(0x8c91b15aL),
-tole(0x750a600bL), tole(0x4d1b0fa7L), tole(0x0528bf53L), tole(0x3d39d0ffL),
-tole(0x954fdebbL), tole(0xad5eb117L), tole(0xe56d01e3L), tole(0xdd7c6e4fL),
-tole(0xb06d6b9aL), tole(0x887c0436L), tole(0xc04fb4c2L), tole(0xf85edb6eL),
-tole(0x5028d52aL), tole(0x6839ba86L), tole(0x200a0a72L), tole(0x181b65deL),
-tole(0xfa2801d8L), tole(0xc2396e74L), tole(0x8a0ade80L), tole(0xb21bb12cL),
-tole(0x1a6dbf68L), tole(0x227cd0c4L), tole(0x6a4f6030L), tole(0x525e0f9cL),
-tole(0x3f4f0a49L), tole(0x075e65e5L), tole(0x4f6dd511L), tole(0x777cbabdL),
-tole(0xdf0ab4f9L), tole(0xe71bdb55L), tole(0xaf286ba1L), tole(0x9739040dL),
-tole(0x59f3bff2L), tole(0x61e2d05eL), tole(0x29d160aaL), tole(0x11c00f06L),
-tole(0xb9b60142L), tole(0x81a76eeeL), tole(0xc994de1aL), tole(0xf185b1b6L),
-tole(0x9c94b463L), tole(0xa485dbcfL), tole(0xecb66b3bL), tole(0xd4a70497L),
-tole(0x7cd10ad3L), tole(0x44c0657fL), tole(0x0cf3d58bL), tole(0x34e2ba27L),
-tole(0xd6d1de21L), tole(0xeec0b18dL), tole(0xa6f30179L), tole(0x9ee26ed5L),
-tole(0x36946091L), tole(0x0e850f3dL), tole(0x46b6bfc9L), tole(0x7ea7d065L),
-tole(0x13b6d5b0L), tole(0x2ba7ba1cL), tole(0x63940ae8L), tole(0x5b856544L),
-tole(0xf3f36b00L), tole(0xcbe204acL), tole(0x83d1b458L), tole(0xbbc0dbf4L),
-tole(0x425b0aa5L), tole(0x7a4a6509L), tole(0x3279d5fdL), tole(0x0a68ba51L),
-tole(0xa21eb415L), tole(0x9a0fdbb9L), tole(0xd23c6b4dL), tole(0xea2d04e1L),
-tole(0x873c0134L), tole(0xbf2d6e98L), tole(0xf71ede6cL), tole(0xcf0fb1c0L),
-tole(0x6779bf84L), tole(0x5f68d028L), tole(0x175b60dcL), tole(0x2f4a0f70L),
-tole(0xcd796b76L), tole(0xf56804daL), tole(0xbd5bb42eL), tole(0x854adb82L),
-tole(0x2d3cd5c6L), tole(0x152dba6aL), tole(0x5d1e0a9eL), tole(0x650f6532L),
-tole(0x081e60e7L), tole(0x300f0f4bL), tole(0x783cbfbfL), tole(0x402dd013L),
-tole(0xe85bde57L), tole(0xd04ab1fbL), tole(0x9879010fL), tole(0xa0686ea3L)},
-{
-tole(0x00000000L), tole(0xef306b19L), tole(0xdb8ca0c3L), tole(0x34bccbdaL),
-tole(0xb2f53777L), tole(0x5dc55c6eL), tole(0x697997b4L), tole(0x8649fcadL),
-tole(0x6006181fL), tole(0x8f367306L), tole(0xbb8ab8dcL), tole(0x54bad3c5L),
-tole(0xd2f32f68L), tole(0x3dc34471L), tole(0x097f8fabL), tole(0xe64fe4b2L),
-tole(0xc00c303eL), tole(0x2f3c5b27L), tole(0x1b8090fdL), tole(0xf4b0fbe4L),
-tole(0x72f90749L), tole(0x9dc96c50L), tole(0xa975a78aL), tole(0x4645cc93L),
-tole(0xa00a2821L), tole(0x4f3a4338L), tole(0x7b8688e2L), tole(0x94b6e3fbL),
-tole(0x12ff1f56L), tole(0xfdcf744fL), tole(0xc973bf95L), tole(0x2643d48cL),
-tole(0x85f4168dL), tole(0x6ac47d94L), tole(0x5e78b64eL), tole(0xb148dd57L),
-tole(0x370121faL), tole(0xd8314ae3L), tole(0xec8d8139L), tole(0x03bdea20L),
-tole(0xe5f20e92L), tole(0x0ac2658bL), tole(0x3e7eae51L), tole(0xd14ec548L),
-tole(0x570739e5L), tole(0xb83752fcL), tole(0x8c8b9926L), tole(0x63bbf23fL),
-tole(0x45f826b3L), tole(0xaac84daaL), tole(0x9e748670L), tole(0x7144ed69L),
-tole(0xf70d11c4L), tole(0x183d7addL), tole(0x2c81b107L), tole(0xc3b1da1eL),
-tole(0x25fe3eacL), tole(0xcace55b5L), tole(0xfe729e6fL), tole(0x1142f576L),
-tole(0x970b09dbL), tole(0x783b62c2L), tole(0x4c87a918L), tole(0xa3b7c201L),
-tole(0x0e045bebL), tole(0xe13430f2L), tole(0xd588fb28L), tole(0x3ab89031L),
-tole(0xbcf16c9cL), tole(0x53c10785L), tole(0x677dcc5fL), tole(0x884da746L),
-tole(0x6e0243f4L), tole(0x813228edL), tole(0xb58ee337L), tole(0x5abe882eL),
-tole(0xdcf77483L), tole(0x33c71f9aL), tole(0x077bd440L), tole(0xe84bbf59L),
-tole(0xce086bd5L), tole(0x213800ccL), tole(0x1584cb16L), tole(0xfab4a00fL),
-tole(0x7cfd5ca2L), tole(0x93cd37bbL), tole(0xa771fc61L), tole(0x48419778L),
-tole(0xae0e73caL), tole(0x413e18d3L), tole(0x7582d309L), tole(0x9ab2b810L),
-tole(0x1cfb44bdL), tole(0xf3cb2fa4L), tole(0xc777e47eL), tole(0x28478f67L),
-tole(0x8bf04d66L), tole(0x64c0267fL), tole(0x507ceda5L), tole(0xbf4c86bcL),
-tole(0x39057a11L), tole(0xd6351108L), tole(0xe289dad2L), tole(0x0db9b1cbL),
-tole(0xebf65579L), tole(0x04c63e60L), tole(0x307af5baL), tole(0xdf4a9ea3L),
-tole(0x5903620eL), tole(0xb6330917L), tole(0x828fc2cdL), tole(0x6dbfa9d4L),
-tole(0x4bfc7d58L), tole(0xa4cc1641L), tole(0x9070dd9bL), tole(0x7f40b682L),
-tole(0xf9094a2fL), tole(0x16392136L), tole(0x2285eaecL), tole(0xcdb581f5L),
-tole(0x2bfa6547L), tole(0xc4ca0e5eL), tole(0xf076c584L), tole(0x1f46ae9dL),
-tole(0x990f5230L), tole(0x763f3929L), tole(0x4283f2f3L), tole(0xadb399eaL),
-tole(0x1c08b7d6L), tole(0xf338dccfL), tole(0xc7841715L), tole(0x28b47c0cL),
-tole(0xaefd80a1L), tole(0x41cdebb8L), tole(0x75712062L), tole(0x9a414b7bL),
-tole(0x7c0eafc9L), tole(0x933ec4d0L), tole(0xa7820f0aL), tole(0x48b26413L),
-tole(0xcefb98beL), tole(0x21cbf3a7L), tole(0x1577387dL), tole(0xfa475364L),
-tole(0xdc0487e8L), tole(0x3334ecf1L), tole(0x0788272bL), tole(0xe8b84c32L),
-tole(0x6ef1b09fL), tole(0x81c1db86L), tole(0xb57d105cL), tole(0x5a4d7b45L),
-tole(0xbc029ff7L), tole(0x5332f4eeL), tole(0x678e3f34L), tole(0x88be542dL),
-tole(0x0ef7a880L), tole(0xe1c7c399L), tole(0xd57b0843L), tole(0x3a4b635aL),
-tole(0x99fca15bL), tole(0x76ccca42L), tole(0x42700198L), tole(0xad406a81L),
-tole(0x2b09962cL), tole(0xc439fd35L), tole(0xf08536efL), tole(0x1fb55df6L),
-tole(0xf9fab944L), tole(0x16cad25dL), tole(0x22761987L), tole(0xcd46729eL),
-tole(0x4b0f8e33L), tole(0xa43fe52aL), tole(0x90832ef0L), tole(0x7fb345e9L),
-tole(0x59f09165L), tole(0xb6c0fa7cL), tole(0x827c31a6L), tole(0x6d4c5abfL),
-tole(0xeb05a612L), tole(0x0435cd0bL), tole(0x308906d1L), tole(0xdfb96dc8L),
-tole(0x39f6897aL), tole(0xd6c6e263L), tole(0xe27a29b9L), tole(0x0d4a42a0L),
-tole(0x8b03be0dL), tole(0x6433d514L), tole(0x508f1eceL), tole(0xbfbf75d7L),
-tole(0x120cec3dL), tole(0xfd3c8724L), tole(0xc9804cfeL), tole(0x26b027e7L),
-tole(0xa0f9db4aL), tole(0x4fc9b053L), tole(0x7b757b89L), tole(0x94451090L),
-tole(0x720af422L), tole(0x9d3a9f3bL), tole(0xa98654e1L), tole(0x46b63ff8L),
-tole(0xc0ffc355L), tole(0x2fcfa84cL), tole(0x1b736396L), tole(0xf443088fL),
-tole(0xd200dc03L), tole(0x3d30b71aL), tole(0x098c7cc0L), tole(0xe6bc17d9L),
-tole(0x60f5eb74L), tole(0x8fc5806dL), tole(0xbb794bb7L), tole(0x544920aeL),
-tole(0xb206c41cL), tole(0x5d36af05L), tole(0x698a64dfL), tole(0x86ba0fc6L),
-tole(0x00f3f36bL), tole(0xefc39872L), tole(0xdb7f53a8L), tole(0x344f38b1L),
-tole(0x97f8fab0L), tole(0x78c891a9L), tole(0x4c745a73L), tole(0xa344316aL),
-tole(0x250dcdc7L), tole(0xca3da6deL), tole(0xfe816d04L), tole(0x11b1061dL),
-tole(0xf7fee2afL), tole(0x18ce89b6L), tole(0x2c72426cL), tole(0xc3422975L),
-tole(0x450bd5d8L), tole(0xaa3bbec1L), tole(0x9e87751bL), tole(0x71b71e02L),
-tole(0x57f4ca8eL), tole(0xb8c4a197L), tole(0x8c786a4dL), tole(0x63480154L),
-tole(0xe501fdf9L), tole(0x0a3196e0L), tole(0x3e8d5d3aL), tole(0xd1bd3623L),
-tole(0x37f2d291L), tole(0xd8c2b988L), tole(0xec7e7252L), tole(0x034e194bL),
-tole(0x8507e5e6L), tole(0x6a378effL), tole(0x5e8b4525L), tole(0xb1bb2e3cL)},
-{
-tole(0x00000000L), tole(0x68032cc8L), tole(0xd0065990L), tole(0xb8057558L),
-tole(0xa5e0c5d1L), tole(0xcde3e919L), tole(0x75e69c41L), tole(0x1de5b089L),
-tole(0x4e2dfd53L), tole(0x262ed19bL), tole(0x9e2ba4c3L), tole(0xf628880bL),
-tole(0xebcd3882L), tole(0x83ce144aL), tole(0x3bcb6112L), tole(0x53c84ddaL),
-tole(0x9c5bfaa6L), tole(0xf458d66eL), tole(0x4c5da336L), tole(0x245e8ffeL),
-tole(0x39bb3f77L), tole(0x51b813bfL), tole(0xe9bd66e7L), tole(0x81be4a2fL),
-tole(0xd27607f5L), tole(0xba752b3dL), tole(0x02705e65L), tole(0x6a7372adL),
-tole(0x7796c224L), tole(0x1f95eeecL), tole(0xa7909bb4L), tole(0xcf93b77cL),
-tole(0x3d5b83bdL), tole(0x5558af75L), tole(0xed5dda2dL), tole(0x855ef6e5L),
-tole(0x98bb466cL), tole(0xf0b86aa4L), tole(0x48bd1ffcL), tole(0x20be3334L),
-tole(0x73767eeeL), tole(0x1b755226L), tole(0xa370277eL), tole(0xcb730bb6L),
-tole(0xd696bb3fL), tole(0xbe9597f7L), tole(0x0690e2afL), tole(0x6e93ce67L),
-tole(0xa100791bL), tole(0xc90355d3L), tole(0x7106208bL), tole(0x19050c43L),
-tole(0x04e0bccaL), tole(0x6ce39002L), tole(0xd4e6e55aL), tole(0xbce5c992L),
-tole(0xef2d8448L), tole(0x872ea880L), tole(0x3f2bddd8L), tole(0x5728f110L),
-tole(0x4acd4199L), tole(0x22ce6d51L), tole(0x9acb1809L), tole(0xf2c834c1L),
-tole(0x7ab7077aL), tole(0x12b42bb2L), tole(0xaab15eeaL), tole(0xc2b27222L),
-tole(0xdf57c2abL), tole(0xb754ee63L), tole(0x0f519b3bL), tole(0x6752b7f3L),
-tole(0x349afa29L), tole(0x5c99d6e1L), tole(0xe49ca3b9L), tole(0x8c9f8f71L),
-tole(0x917a3ff8L), tole(0xf9791330L), tole(0x417c6668L), tole(0x297f4aa0L),
-tole(0xe6ecfddcL), tole(0x8eefd114L), tole(0x36eaa44cL), tole(0x5ee98884L),
-tole(0x430c380dL), tole(0x2b0f14c5L), tole(0x930a619dL), tole(0xfb094d55L),
-tole(0xa8c1008fL), tole(0xc0c22c47L), tole(0x78c7591fL), tole(0x10c475d7L),
-tole(0x0d21c55eL), tole(0x6522e996L), tole(0xdd279cceL), tole(0xb524b006L),
-tole(0x47ec84c7L), tole(0x2fefa80fL), tole(0x97eadd57L), tole(0xffe9f19fL),
-tole(0xe20c4116L), tole(0x8a0f6ddeL), tole(0x320a1886L), tole(0x5a09344eL),
-tole(0x09c17994L), tole(0x61c2555cL), tole(0xd9c72004L), tole(0xb1c40cccL),
-tole(0xac21bc45L), tole(0xc422908dL), tole(0x7c27e5d5L), tole(0x1424c91dL),
-tole(0xdbb77e61L), tole(0xb3b452a9L), tole(0x0bb127f1L), tole(0x63b20b39L),
-tole(0x7e57bbb0L), tole(0x16549778L), tole(0xae51e220L), tole(0xc652cee8L),
-tole(0x959a8332L), tole(0xfd99affaL), tole(0x459cdaa2L), tole(0x2d9ff66aL),
-tole(0x307a46e3L), tole(0x58796a2bL), tole(0xe07c1f73L), tole(0x887f33bbL),
-tole(0xf56e0ef4L), tole(0x9d6d223cL), tole(0x25685764L), tole(0x4d6b7bacL),
-tole(0x508ecb25L), tole(0x388de7edL), tole(0x808892b5L), tole(0xe88bbe7dL),
-tole(0xbb43f3a7L), tole(0xd340df6fL), tole(0x6b45aa37L), tole(0x034686ffL),
-tole(0x1ea33676L), tole(0x76a01abeL), tole(0xcea56fe6L), tole(0xa6a6432eL),
-tole(0x6935f452L), tole(0x0136d89aL), tole(0xb933adc2L), tole(0xd130810aL),
-tole(0xccd53183L), tole(0xa4d61d4bL), tole(0x1cd36813L), tole(0x74d044dbL),
-tole(0x27180901L), tole(0x4f1b25c9L), tole(0xf71e5091L), tole(0x9f1d7c59L),
-tole(0x82f8ccd0L), tole(0xeafbe018L), tole(0x52fe9540L), tole(0x3afdb988L),
-tole(0xc8358d49L), tole(0xa036a181L), tole(0x1833d4d9L), tole(0x7030f811L),
-tole(0x6dd54898L), tole(0x05d66450L), tole(0xbdd31108L), tole(0xd5d03dc0L),
-tole(0x8618701aL), tole(0xee1b5cd2L), tole(0x561e298aL), tole(0x3e1d0542L),
-tole(0x23f8b5cbL), tole(0x4bfb9903L), tole(0xf3feec5bL), tole(0x9bfdc093L),
-tole(0x546e77efL), tole(0x3c6d5b27L), tole(0x84682e7fL), tole(0xec6b02b7L),
-tole(0xf18eb23eL), tole(0x998d9ef6L), tole(0x2188ebaeL), tole(0x498bc766L),
-tole(0x1a438abcL), tole(0x7240a674L), tole(0xca45d32cL), tole(0xa246ffe4L),
-tole(0xbfa34f6dL), tole(0xd7a063a5L), tole(0x6fa516fdL), tole(0x07a63a35L),
-tole(0x8fd9098eL), tole(0xe7da2546L), tole(0x5fdf501eL), tole(0x37dc7cd6L),
-tole(0x2a39cc5fL), tole(0x423ae097L), tole(0xfa3f95cfL), tole(0x923cb907L),
-tole(0xc1f4f4ddL), tole(0xa9f7d815L), tole(0x11f2ad4dL), tole(0x79f18185L),
-tole(0x6414310cL), tole(0x0c171dc4L), tole(0xb412689cL), tole(0xdc114454L),
-tole(0x1382f328L), tole(0x7b81dfe0L), tole(0xc384aab8L), tole(0xab878670L),
-tole(0xb66236f9L), tole(0xde611a31L), tole(0x66646f69L), tole(0x0e6743a1L),
-tole(0x5daf0e7bL), tole(0x35ac22b3L), tole(0x8da957ebL), tole(0xe5aa7b23L),
-tole(0xf84fcbaaL), tole(0x904ce762L), tole(0x2849923aL), tole(0x404abef2L),
-tole(0xb2828a33L), tole(0xda81a6fbL), tole(0x6284d3a3L), tole(0x0a87ff6bL),
-tole(0x17624fe2L), tole(0x7f61632aL), tole(0xc7641672L), tole(0xaf673abaL),
-tole(0xfcaf7760L), tole(0x94ac5ba8L), tole(0x2ca92ef0L), tole(0x44aa0238L),
-tole(0x594fb2b1L), tole(0x314c9e79L), tole(0x8949eb21L), tole(0xe14ac7e9L),
-tole(0x2ed97095L), tole(0x46da5c5dL), tole(0xfedf2905L), tole(0x96dc05cdL),
-tole(0x8b39b544L), tole(0xe33a998cL), tole(0x5b3fecd4L), tole(0x333cc01cL),
-tole(0x60f48dc6L), tole(0x08f7a10eL), tole(0xb0f2d456L), tole(0xd8f1f89eL),
-tole(0xc5144817L), tole(0xad1764dfL), tole(0x15121187L), tole(0x7d113d4fL)},
-{
-tole(0x00000000L), tole(0x493c7d27L), tole(0x9278fa4eL), tole(0xdb448769L),
-tole(0x211d826dL), tole(0x6821ff4aL), tole(0xb3657823L), tole(0xfa590504L),
-tole(0x423b04daL), tole(0x0b0779fdL), tole(0xd043fe94L), tole(0x997f83b3L),
-tole(0x632686b7L), tole(0x2a1afb90L), tole(0xf15e7cf9L), tole(0xb86201deL),
-tole(0x847609b4L), tole(0xcd4a7493L), tole(0x160ef3faL), tole(0x5f328eddL),
-tole(0xa56b8bd9L), tole(0xec57f6feL), tole(0x37137197L), tole(0x7e2f0cb0L),
-tole(0xc64d0d6eL), tole(0x8f717049L), tole(0x5435f720L), tole(0x1d098a07L),
-tole(0xe7508f03L), tole(0xae6cf224L), tole(0x7528754dL), tole(0x3c14086aL),
-tole(0x0d006599L), tole(0x443c18beL), tole(0x9f789fd7L), tole(0xd644e2f0L),
-tole(0x2c1de7f4L), tole(0x65219ad3L), tole(0xbe651dbaL), tole(0xf759609dL),
-tole(0x4f3b6143L), tole(0x06071c64L), tole(0xdd439b0dL), tole(0x947fe62aL),
-tole(0x6e26e32eL), tole(0x271a9e09L), tole(0xfc5e1960L), tole(0xb5626447L),
-tole(0x89766c2dL), tole(0xc04a110aL), tole(0x1b0e9663L), tole(0x5232eb44L),
-tole(0xa86bee40L), tole(0xe1579367L), tole(0x3a13140eL), tole(0x732f6929L),
-tole(0xcb4d68f7L), tole(0x827115d0L), tole(0x593592b9L), tole(0x1009ef9eL),
-tole(0xea50ea9aL), tole(0xa36c97bdL), tole(0x782810d4L), tole(0x31146df3L),
-tole(0x1a00cb32L), tole(0x533cb615L), tole(0x8878317cL), tole(0xc1444c5bL),
-tole(0x3b1d495fL), tole(0x72213478L), tole(0xa965b311L), tole(0xe059ce36L),
-tole(0x583bcfe8L), tole(0x1107b2cfL), tole(0xca4335a6L), tole(0x837f4881L),
-tole(0x79264d85L), tole(0x301a30a2L), tole(0xeb5eb7cbL), tole(0xa262caecL),
-tole(0x9e76c286L), tole(0xd74abfa1L), tole(0x0c0e38c8L), tole(0x453245efL),
-tole(0xbf6b40ebL), tole(0xf6573dccL), tole(0x2d13baa5L), tole(0x642fc782L),
-tole(0xdc4dc65cL), tole(0x9571bb7bL), tole(0x4e353c12L), tole(0x07094135L),
-tole(0xfd504431L), tole(0xb46c3916L), tole(0x6f28be7fL), tole(0x2614c358L),
-tole(0x1700aeabL), tole(0x5e3cd38cL), tole(0x857854e5L), tole(0xcc4429c2L),
-tole(0x361d2cc6L), tole(0x7f2151e1L), tole(0xa465d688L), tole(0xed59abafL),
-tole(0x553baa71L), tole(0x1c07d756L), tole(0xc743503fL), tole(0x8e7f2d18L),
-tole(0x7426281cL), tole(0x3d1a553bL), tole(0xe65ed252L), tole(0xaf62af75L),
-tole(0x9376a71fL), tole(0xda4ada38L), tole(0x010e5d51L), tole(0x48322076L),
-tole(0xb26b2572L), tole(0xfb575855L), tole(0x2013df3cL), tole(0x692fa21bL),
-tole(0xd14da3c5L), tole(0x9871dee2L), tole(0x4335598bL), tole(0x0a0924acL),
-tole(0xf05021a8L), tole(0xb96c5c8fL), tole(0x6228dbe6L), tole(0x2b14a6c1L),
-tole(0x34019664L), tole(0x7d3deb43L), tole(0xa6796c2aL), tole(0xef45110dL),
-tole(0x151c1409L), tole(0x5c20692eL), tole(0x8764ee47L), tole(0xce589360L),
-tole(0x763a92beL), tole(0x3f06ef99L), tole(0xe44268f0L), tole(0xad7e15d7L),
-tole(0x572710d3L), tole(0x1e1b6df4L), tole(0xc55fea9dL), tole(0x8c6397baL),
-tole(0xb0779fd0L), tole(0xf94be2f7L), tole(0x220f659eL), tole(0x6b3318b9L),
-tole(0x916a1dbdL), tole(0xd856609aL), tole(0x0312e7f3L), tole(0x4a2e9ad4L),
-tole(0xf24c9b0aL), tole(0xbb70e62dL), tole(0x60346144L), tole(0x29081c63L),
-tole(0xd3511967L), tole(0x9a6d6440L), tole(0x4129e329L), tole(0x08159e0eL),
-tole(0x3901f3fdL), tole(0x703d8edaL), tole(0xab7909b3L), tole(0xe2457494L),
-tole(0x181c7190L), tole(0x51200cb7L), tole(0x8a648bdeL), tole(0xc358f6f9L),
-tole(0x7b3af727L), tole(0x32068a00L), tole(0xe9420d69L), tole(0xa07e704eL),
-tole(0x5a27754aL), tole(0x131b086dL), tole(0xc85f8f04L), tole(0x8163f223L),
-tole(0xbd77fa49L), tole(0xf44b876eL), tole(0x2f0f0007L), tole(0x66337d20L),
-tole(0x9c6a7824L), tole(0xd5560503L), tole(0x0e12826aL), tole(0x472eff4dL),
-tole(0xff4cfe93L), tole(0xb67083b4L), tole(0x6d3404ddL), tole(0x240879faL),
-tole(0xde517cfeL), tole(0x976d01d9L), tole(0x4c2986b0L), tole(0x0515fb97L),
-tole(0x2e015d56L), tole(0x673d2071L), tole(0xbc79a718L), tole(0xf545da3fL),
-tole(0x0f1cdf3bL), tole(0x4620a21cL), tole(0x9d642575L), tole(0xd4585852L),
-tole(0x6c3a598cL), tole(0x250624abL), tole(0xfe42a3c2L), tole(0xb77edee5L),
-tole(0x4d27dbe1L), tole(0x041ba6c6L), tole(0xdf5f21afL), tole(0x96635c88L),
-tole(0xaa7754e2L), tole(0xe34b29c5L), tole(0x380faeacL), tole(0x7133d38bL),
-tole(0x8b6ad68fL), tole(0xc256aba8L), tole(0x19122cc1L), tole(0x502e51e6L),
-tole(0xe84c5038L), tole(0xa1702d1fL), tole(0x7a34aa76L), tole(0x3308d751L),
-tole(0xc951d255L), tole(0x806daf72L), tole(0x5b29281bL), tole(0x1215553cL),
-tole(0x230138cfL), tole(0x6a3d45e8L), tole(0xb179c281L), tole(0xf845bfa6L),
-tole(0x021cbaa2L), tole(0x4b20c785L), tole(0x906440ecL), tole(0xd9583dcbL),
-tole(0x613a3c15L), tole(0x28064132L), tole(0xf342c65bL), tole(0xba7ebb7cL),
-tole(0x4027be78L), tole(0x091bc35fL), tole(0xd25f4436L), tole(0x9b633911L),
-tole(0xa777317bL), tole(0xee4b4c5cL), tole(0x350fcb35L), tole(0x7c33b612L),
-tole(0x866ab316L), tole(0xcf56ce31L), tole(0x14124958L), tole(0x5d2e347fL),
-tole(0xe54c35a1L), tole(0xac704886L), tole(0x7734cfefL), tole(0x3e08b2c8L),
-tole(0xc451b7ccL), tole(0x8d6dcaebL), tole(0x56294d82L), tole(0x1f1530a5L)},
-};
diff --git a/repos/dde_linux/src/lib/legacy/wifi/include/firmware_list.h b/repos/dde_linux/src/lib/legacy/wifi/include/firmware_list.h
deleted file mode 100644
index 50e960ad58..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/include/firmware_list.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * \brief List for firmware images and their sizes
- * \author Josef Soentgen
- * \date 2014-03-26
- */
-
-/*
- * Copyright (C) 2014-2017 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-#ifndef _FIRMWARE_LIST_H_
-#define _FIRMWARE_LIST_H_
-
-typedef __SIZE_TYPE__ size_t;
-
-struct Firmware_list
-{
- char const *requested_name;
- size_t size;
- char const *available_name;
-};
-
-#endif /* _FIRMWARE_LIST_H_ */
diff --git a/repos/dde_linux/src/lib/legacy/wifi/include/linux/gen_stats.h b/repos/dde_linux/src/lib/legacy/wifi/include/linux/gen_stats.h
deleted file mode 100644
index be44e8e9bf..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/include/linux/gen_stats.h
+++ /dev/null
@@ -1 +0,0 @@
-#include
diff --git a/repos/dde_linux/src/lib/legacy/wifi/include/linux/hdlc/ioctl.h b/repos/dde_linux/src/lib/legacy/wifi/include/linux/hdlc/ioctl.h
deleted file mode 100644
index 603ac24ce5..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/include/linux/hdlc/ioctl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include
diff --git a/repos/dde_linux/src/lib/legacy/wifi/include/linux/if_bridge.h b/repos/dde_linux/src/lib/legacy/wifi/include/linux/if_bridge.h
deleted file mode 100644
index 21d91fb35b..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/include/linux/if_bridge.h
+++ /dev/null
@@ -1 +0,0 @@
-#include
diff --git a/repos/dde_linux/src/lib/legacy/wifi/include/linux/if_packet.h b/repos/dde_linux/src/lib/legacy/wifi/include/linux/if_packet.h
deleted file mode 100644
index 606f289425..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/include/linux/if_packet.h
+++ /dev/null
@@ -1 +0,0 @@
-#include
diff --git a/repos/dde_linux/src/lib/legacy/wifi/include/linux/neighbour.h b/repos/dde_linux/src/lib/legacy/wifi/include/linux/neighbour.h
deleted file mode 100644
index d7656ab19f..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/include/linux/neighbour.h
+++ /dev/null
@@ -1 +0,0 @@
-#include
diff --git a/repos/dde_linux/src/lib/legacy/wifi/include/linux/nl80211.h b/repos/dde_linux/src/lib/legacy/wifi/include/linux/nl80211.h
deleted file mode 100644
index b7340e6268..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/include/linux/nl80211.h
+++ /dev/null
@@ -1 +0,0 @@
-#include
diff --git a/repos/dde_linux/src/lib/legacy/wifi/include/linux/sockios.h b/repos/dde_linux/src/lib/legacy/wifi/include/linux/sockios.h
deleted file mode 100644
index b459fcf57f..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/include/linux/sockios.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#include
-#include
diff --git a/repos/dde_linux/src/lib/legacy/wifi/include/lx_emul.h b/repos/dde_linux/src/lib/legacy/wifi/include/lx_emul.h
deleted file mode 100644
index 21add70372..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/include/lx_emul.h
+++ /dev/null
@@ -1,5648 +0,0 @@
-/*
- * \brief Emulation of the Linux kernel API
- * \author Josef Soentgen
- * \date 2014-03-03
- *
- * The content of this file, in particular data structures, is partially
- * derived from Linux-internal headers.
- */
-
-/*
- * Copyright (C) 2014-2017 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-#ifndef _LX_EMUL_H_
-#define _LX_EMUL_H_
-
-#include
-#include
-
-#include
-
-#define KBUILD_MODNAME "mod-noname"
-
-/*****************
- ** asm/param.h **
- *****************/
-
-enum { HZ = 100 };
-
-#define DEBUG_LINUX_PRINTK 1
-
-#include
-
-
-/***************
- ** asm/bug.h **
- ***************/
-
-#include
-
-
-/*********************
- ** asm/processor.h **
- *********************/
-
-void cpu_relax(void);
-
-
-/******************
- ** asm/atomic.h **
- ******************/
-
-#include
-
-// static inline int atomic_dec_if_positive(atomic_t *v)
-// {
-// int c, old, dec;
-// c = atomic_read(v);
-// for (;;) {
-// dec = c - 1;
-// if (dec < 0) break;
-// old = atomic_cmpxchg((v), c, dec);
-// if (old == c) break;
-// c = old;
-// }
-// return dec;
-// }
-
-static inline void atomic_long_set(atomic_long_t *l, long i)
-{
- l->counter = i;
-}
-
-
-static inline int atomic_long_cmpxchg(atomic_long_t *v, long old, long n)
-{
- return cmpxchg(&v->counter, old, n);
-}
-
-
-
-
-/*******************
- ** linux/types.h **
- *******************/
-
-#include
-
-typedef int clockid_t;
-
-typedef size_t __kernel_size_t;
-typedef long __kernel_time_t;
-typedef long __kernel_suseconds_t;
-
-#define __aligned_u64 __u64 __attribute__((aligned(8)))
-
-#define DECLARE_BITMAP(name,bits) \
- unsigned long name[BITS_TO_LONGS(bits)]
-
-typedef unsigned __poll_t;
-
-
-/******************
- ** linux/init.h **
- ******************/
-
-#define fs_initcall(fn) void fs_##fn(void) { fn(); }
-#define late_initcall(fn) void late_##fn(void) { fn(); }
-
-
-/*********************
- ** linux/cpumask.h **
- *********************/
-
-#define NR_CPUS 1U
-#define cpu_online_mask (NULL)
-#define num_online_cpus() NR_CPUS
-typedef struct cpumask { unsigned long bits[1]; } cpumask_t;
-
-static inline void cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
-{
- dstp->bits[0] = 1U << cpu;
-}
-
-static inline unsigned int cpumask_next(int n, const struct cpumask *srcp)
-{
- return n+1;
-}
-
-
-/************************
- ** uapi/linux/types.h **
- ************************/
-
-#define __bitwise__
-
-typedef __u16 __le16;
-typedef __u32 __le32;
-typedef __u64 __le64;
-typedef __u16 __be16;
-typedef __u32 __be32;
-typedef __u64 __be64;
-
-typedef __u16 __sum16;
-typedef __u32 __wsum;
-
-/*
- * needed by include/net/cfg80211.h
- */
-struct callback_head {
- struct callback_head *next;
- void (*func)(struct callback_head *head);
-};
-#define rcu_head callback_head
-
-
-/*******************
- ** asm/barrier.h **
- *******************/
-
-#include
-
-#define smp_load_acquire(p) *(p)
-#define smp_store_release(p, v) *(p) = v;
-#define smp_mb__before_atomic() mb()
-
-
-/**********************
- ** asm-generic/io.h **
- **********************/
-
-#include
-
-#define mmiowb() barrier()
-struct device;
-
-void *ioremap(resource_size_t offset, unsigned long size);
-void iounmap(volatile void *addr);
-void *devm_ioremap(struct device *dev, resource_size_t offset,
- unsigned long size);
-void *devm_ioremap_nocache(struct device *dev, resource_size_t offset,
- unsigned long size);
-
-void *ioremap_wc(resource_size_t phys_addr, unsigned long size);
-
-#define ioremap_nocache ioremap
-
-void *phys_to_virt(unsigned long address);
-
-
-/**********************
- ** linux/compiler.h **
- **********************/
-
-#include
-
-#define __cond_lock(x,c) (c)
-
-#define noinline_for_stack noinline
-
-static inline void __write_once_size(volatile void *p, void *res, int size)
-{
- switch (size) {
- case 1: *(volatile __u8 *)p = *(__u8 *)res; break;
- case 2: *(volatile __u16 *)p = *(__u16 *)res; break;
- case 4: *(volatile __u32 *)p = *(__u32 *)res; break;
- case 8: *(volatile __u64 *)p = *(__u64 *)res; break;
- default:
- barrier();
- __builtin_memcpy((void *)p, (const void *)res, size);
- barrier();
- }
-}
-
-static inline void __read_once_size(const volatile void *p, void *res, int size)
-{
- switch (size) {
- case 1: *(__u8 *)res = *(volatile __u8 *)p; break;
- case 2: *(__u16 *)res = *(volatile __u16 *)p; break;
- case 4: *(__u32 *)res = *(volatile __u32 *)p; break;
- case 8: *(__u64 *)res = *(volatile __u64 *)p; break;
- default:
- barrier();
- __builtin_memcpy((void *)res, (const void *)p, size);
- barrier();
- }
-}
-
-#ifdef __cplusplus
-#define READ_ONCE(x) \
-({ \
- barrier(); \
- x; \
-})
-#else
-#define READ_ONCE(x) \
-({ \
- union { typeof(x) __val; char __c[1]; } __u; \
- __read_once_size(&(x), __u.__c, sizeof(x)); \
- __u.__val; \
-})
-#endif /* __cplusplus */
-
-#define __randomize_layout
-
-
-/**************************
- ** linux/compiler-gcc.h **
- **************************/
-
-#ifdef __aligned
-#undef __aligned
-#endif
-#define __aligned(x) __attribute__((aligned(x)))
-#define __visible __attribute__((externally_visible))
-
-#define OPTIMIZER_HIDE_VAR(var) __asm__ ("" : "=r" (var) : "0" (var))
-
-#define __pure __attribute__((pure))
-#define __weak __attribute__((weak))
-#define __aligned_largest __attribute__((aligned))
-
-
-/**********************
- ** linux/refcount.h **
- **********************/
-
-typedef struct
-{
- atomic_t refs;
-} refcount_t;
-
-
-void refcount_add(unsigned int i, refcount_t *r);
-void refcount_inc(refcount_t *r);
-bool refcount_inc_not_zero(refcount_t *r);
-void refcount_dec(refcount_t *r);
-unsigned int refcount_read(const refcount_t *r);
-bool refcount_dec_and_test(refcount_t *r);
-void refcount_set(refcount_t *r, unsigned int n);
-bool refcount_dec_and_test(refcount_t *r);
-bool refcount_sub_and_test(unsigned int i, refcount_t *r);
-
-
-/********************
- ** linux/module.h **
- ********************/
-
-#include
-
-static inline bool module_sig_ok(struct module *module) { return true; }
-
-#define module_name(mod) "foobar"
-
-
-/*************************
- ** linux/moduleparam.h **
- *************************/
-
-#define __MODULE_INFO(tag, name, info)
-
-static inline void kernel_param_lock(struct module *mod) { }
-static inline void kernel_param_unlock(struct module *mod) { }
-
-
-/*******************
- ** linux/errno.h **
- *******************/
-
-#include
-
-
-/*****************
- ** linux/err.h **
- *****************/
-
-static inline int PTR_ERR_OR_ZERO(const void *ptr)
-{
- if (IS_ERR(ptr)) return PTR_ERR(ptr);
- else return 0;
-}
-
-
-/********************
- ** linux/poison.h **
- ********************/
-
-#include
-
-
-/****************
- ** asm/page.h **
- ****************/
-
-/*
- * For now, hardcoded
- */
-#define PAGE_SIZE 4096UL
-#define PAGE_MASK (~(PAGE_SIZE-1))
-
-enum {
- PAGE_SHIFT = 12,
-};
-
-struct page
-{
- unsigned long flags;
- int pfmemalloc;
- int mapping;
- atomic_t _count;
- void *addr;
- unsigned long private;
-};
-
-
-/**********************
- ** linux/page_ref.h **
- **********************/
-
-static inline void page_ref_inc(struct page *page)
-{
- atomic_inc(&page->_count);
-}
-
-static inline int page_ref_count(struct page *page)
-{
- return atomic_read(&page->_count);
-}
-
-
-/************************
- ** linux/page-flags.h **
- ************************/
-
-enum pageflags
-{
- PG_slab = 0x1,
-};
-
-#define PageSlab(page) test_bit(PG_slab, &(page)->flags)
-#define PageHighMem(__p) 0
-
-
-/**********************
- ** asm/cacheflush.h **
- **********************/
-
-void flush_dcache_page(struct page *page);
-enum { ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE = 1 }; /* XXX */
-
-
-/**********************
- ** linux/mm-types.h **
- **********************/
-
-struct vm_operations_struct;
-
-struct vm_area_struct
-{
- unsigned long vm_start;
- unsigned long vm_end;
-
- const struct vm_operations_struct *vm_ops;
-
- unsigned long vm_pgoff;
-
- struct file * vm_file;
-};
-
-struct page_frag
-{
- struct page *page;
- __u16 offset;
- __u16 size;
-};
-
-struct page_frag_cache
-{
- bool pfmemalloc;
-};
-
-
-/*****************
- ** linux/gfp.h **
- *****************/
-
-#include
-
-struct page *alloc_pages_node(int nid, gfp_t gfp_mask, unsigned int order);
-
-struct page *alloc_pages(gfp_t gfp_mask, unsigned int order);
-
-#define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0)
-
-unsigned long get_zeroed_page(gfp_t gfp_mask);
-#define free_page(p) kfree((void *)p)
-
-bool gfp_pfmemalloc_allowed(gfp_t);
-unsigned long __get_free_page(gfp_t);
-unsigned long __get_free_pages(gfp_t, unsigned int);
-void free_pages(unsigned long, unsigned int);
-void __free_pages(struct page *page, unsigned int order);
-void __free_page_frag(void *addr);
-
-#define __free_page(page) __free_pages((page), 0)
-
-bool gfpflags_allow_blocking(const gfp_t gfp_flags);
-
-void *__alloc_page_frag(struct page_frag_cache *nc,
- unsigned int fragsz, gfp_t gfp_mask);
-
-void page_frag_free(void *addr);
-void *page_frag_alloc(struct page_frag_cache *nc, unsigned int fragsz, gfp_t gfp_mask);
-
-/********************
- ** linux/string.h **
- ********************/
-
-#include
-
-void memzero_explicit(void *s, size_t count);
-
-bool sysfs_streq(const char *s1, const char *s2);
-
-
-/**********************
- ** linux/spinlock.h **
- **********************/
-
-#include
-
-int spin_is_locked(spinlock_t *lock);
-void free_bucket_spinlocks(spinlock_t *locks);
-int alloc_bucket_spinlocks(spinlock_t **locks, unsigned int *locks_mask,
- size_t max_size, unsigned int cpu_mult, gfp_t gfp);
-
-
-/*******************
- ** linux/mutex.h **
- *******************/
-
-#include
-
-LX_MUTEX_INIT_DECLARE(crypto_default_rng_lock);
-LX_MUTEX_INIT_DECLARE(fanout_mutex);
-LX_MUTEX_INIT_DECLARE(genl_mutex);
-LX_MUTEX_INIT_DECLARE(proto_list_mutex);
-LX_MUTEX_INIT_DECLARE(rate_ctrl_mutex);
-LX_MUTEX_INIT_DECLARE(reg_regdb_apply_mutex);
-LX_MUTEX_INIT_DECLARE(rfkill_global_mutex);
-LX_MUTEX_INIT_DECLARE(rtnl_mutex);
-
-#define crypto_default_rng_lock LX_MUTEX(crypto_default_rng_lock)
-#define fanout_mutex LX_MUTEX(fanout_mutex)
-#define genl_mutex LX_MUTEX(genl_mutex)
-#define proto_list_mutex LX_MUTEX(proto_list_mutex)
-#define rate_ctrl_mutex LX_MUTEX(rate_ctrl_mutex)
-#define reg_regdb_apply_mutex LX_MUTEX(reg_regdb_apply_mutex)
-#define rfkill_global_mutex LX_MUTEX(rfkill_global_mutex)
-#define rtnl_mutex LX_MUTEX(rtnl_mutex)
-
-
-/*******************
- ** linux/rwsem.h **
- *******************/
-
-#include
-
-
-/********************
- ** linux/kernel.h **
- ********************/
-
-#include
-
-#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
-
-char *kasprintf(gfp_t gfp, const char *fmt, ...);
-int kstrtouint(const char *s, unsigned int base, unsigned int *res);
-
-#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a)))
-
-static inline u32 reciprocal_scale(u32 val, u32 ep_ro)
-{
- return (u32)(((u64) val * ep_ro) >> 32);
-}
-
-int kstrtoul(const char *s, unsigned int base, unsigned long *res);
-
-int strict_strtoul(const char *s, unsigned int base, unsigned long *res);
-long simple_strtoul(const char *cp, char **endp, unsigned int base);
-long simple_strtol(const char *,char **,unsigned int);
-
-int hex_to_bin(char ch);
-
-/* needed by drivers/net/wireless/iwlwifi/iwl-drv.c */
-int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) __attribute__((format(printf, 3, 0)));
-int sprintf(char *buf, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
-int scnprintf(char *buf, size_t size, const char *fmt, ...) __attribute__((format(printf, 3, 4)));
-
-int sscanf(const char *, const char *, ...);
-
-/* XXX */
-#define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE)
-#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
-
-#define SIZE_MAX (~(size_t)0)
-
-#define U8_MAX ((u8)~0U)
-#define S8_MAX ((s8)(U8_MAX>>1))
-#define S8_MIN ((s8)(-S8_MAX - 1))
-#define U16_MAX ((u16)~0U)
-#define U32_MAX ((u32)~0U)
-#define S32_MAX ((s32)(U32_MAX>>1))
-#define S32_MIN ((s32)(-S32_MAX - 1))
-
-#define sched_annotate_sleep() do { } while (0)
-
-
-/*********************
- ** linux/jiffies.h **
- *********************/
-
-#include
-
-static inline unsigned int jiffies_to_usecs(const unsigned long j) { return j * JIFFIES_TICK_US; }
-
-#define time_is_before_jiffies(a) time_after(jiffies, a)
-
-
-/******************
- ** linux/time.h **
- ******************/
-
-#include
-
-enum {
- MSEC_PER_SEC = 1000L,
- USEC_PER_SEC = MSEC_PER_SEC * 1000L,
- USEC_PER_MSEC = 1000L,
-};
-
-unsigned long get_seconds(void);
-void getnstimeofday(struct timespec *);
-#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts)
-
-#define ktime_to_ns(kt) ((kt)
-
-struct timespec ktime_to_timespec(const ktime_t kt);
-bool ktime_to_timespec_cond(const ktime_t kt, struct timespec *ts);
-
-int ktime_equal(const ktime_t, const ktime_t);
-s64 ktime_us_delta(const ktime_t, const ktime_t);
-
-static inline s64 ktime_to_ms(const ktime_t kt)
-{
- return kt / NSEC_PER_MSEC;
-}
-
-static inline void ktime_get_ts(struct timespec *ts)
-{
- ts->tv_sec = jiffies * (1000/HZ);
- ts->tv_nsec = 0;
-}
-
-
-/*******************
- ** linux/timer.h **
- *******************/
-
-#include
-
-#define from_timer(var, callback_timer, timer_fieldname) \
- container_of(callback_timer, typeof(*var), timer_fieldname)
-
-enum {
- TIMER_DEFERRABLE = 0x00080000,
-};
-
-
-/*********************
- ** linux/kconfig.h **
- *********************/
-
-#define config_enabled(cfg) 0
-
-
-/*******************************
- ** linux/byteorder/generic.h **
- *******************************/
-
-#include
-
-#define cpu_to_be64 __cpu_to_be64
-#define be64_to_cpup __be64_to_cpup
-
-#define htonl(x) __cpu_to_be32(x)
-#define htons(x) __cpu_to_be16(x)
-#define ntohl(x) __be32_to_cpu(x)
-#define ntohs(x) __be16_to_cpu(x)
-
-
-/*************************************
- ** linux/unaligned/packed_struct.h **
- *************************************/
-
-struct __una_u16 { u16 x; } __attribute__((packed));
-struct __una_u32 { u32 x; } __attribute__((packed));
-struct __una_u64 { u64 x; } __attribute__((packed));
-
-
-/*******************************
- ** linux/unaligned/generic.h **
- *******************************/
-
-static inline void put_unaligned_le16(u16 val, void *p) {
- *((__le16 *)p) = cpu_to_le16(val); }
-
-static inline void put_unaligned_be16(u16 val, void *p) {
- *((__be16 *)p) = cpu_to_be16(val); }
-
-static inline void put_unaligned_le32(u32 val, void *p) {
- *((__le32 *)p) = cpu_to_le32(val); }
-
-static inline void put_unaligned_be64(u64 val, void *p) {
- *((__be64 *)p) = cpu_to_be64(val); }
-
-static inline u16 get_unaligned_le16(const void *p)
-{
- const struct __una_u16 *ptr = (const struct __una_u16 *)p;
- return ptr->x;
-}
-
-static inline u32 get_unaligned_le32(const void *p)
-{
- const struct __una_u32 *ptr = (const struct __una_u32 *)p;
- return ptr->x;
-}
-
-static inline u16 get_unaligned_be16(const void *p)
-{
- const __u8 *be = (__u8*)p;
- return (be[1]<<0)|(be[0]<<8);
-}
-
-static inline u64 get_unaligned_be64(const void *p)
-{
- const __u64 *be = (__u64*)p;
- return ((((u64)(be[3]<<0)|(be[2]<<8)|(be[1]<<16)|(be[0]<<24))<<32)|
- (((u32)(be[7]<<0)|(be[6]<<8)|(be[5]<<16)|(be[4]<<24))));
-}
-
-void put_unaligned_le64(u64 val, void *p);
-
-#define put_unaligned(val, ptr) ({ \
- void *__gu_p = (ptr); \
- switch (sizeof(*(ptr))) { \
- case 1: \
- *(u8 *)__gu_p = (u8)(val); \
- break; \
- case 2: \
- put_unaligned_le16((u16)(val), __gu_p); \
- break; \
- case 4: \
- put_unaligned_le32((u32)(val), __gu_p); \
- break; \
- case 8: \
- put_unaligned_le64((u64)(val), __gu_p); \
- break; \
- } \
- (void)0; })
-
-static inline void le16_add_cpu(__le16 *var, u16 val) {
- *var = cpu_to_le16(le16_to_cpu(*var) + val); }
-
-static inline void le32_add_cpu(__le32 *var, u32 val) {
- *var = cpu_to_le32(le32_to_cpu(*var) + val); }
-
-static inline u32 __get_unaligned_cpu32(const void *p)
-{
- const struct __una_u32 *ptr = (const struct __una_u32 *)p;
- return ptr->x;
-}
-
-
-/****************************************
- ** asm-generic/bitops/const_hweight.h **
- ****************************************/
-
-#define __const_hweight8(w) \
- ( (!!((w) & (1ULL << 0))) + \
- (!!((w) & (1ULL << 1))) + \
- (!!((w) & (1ULL << 2))) + \
- (!!((w) & (1ULL << 3))) + \
- (!!((w) & (1ULL << 4))) + \
- (!!((w) & (1ULL << 5))) + \
- (!!((w) & (1ULL << 6))) + \
- (!!((w) & (1ULL << 7))) )
-
-#define hweight8(w) (__const_hweight8(w))
-
-unsigned int hweight16(unsigned int w);
-unsigned int hweight32(unsigned int w);
-unsigned int hweight64(__u64 w);
-
-
-/**********************************
- ** linux/bitops.h, asm/bitops.h **
- **********************************/
-
-#include
-
-static inline unsigned long hweight_long(unsigned long w) {
- return sizeof(w) == 4 ? hweight32(w) : hweight64(w); }
-
-#define GENMASK(h, l) \
- (((~0UL) - (1UL << (l)) + 1) & (~0UL >> (BITS_PER_LONG - 1 - (h))))
-
-
-/*************************************
- ** asm-generic/bitops/non-atomic.h **
- *************************************/
-
-static inline int test_bit(int nr, const volatile unsigned long *addr);
-
-
-/*******************************
- ** asm-generic/bitops/find.h **
- *******************************/
-
-unsigned long find_next_bit(const unsigned long *addr, unsigned long size, unsigned long offset);
-unsigned long find_next_zero_bit(const unsigned long *addr, unsigned long size, unsigned long offset);
-unsigned long find_last_bit(const unsigned long *addr, unsigned long size);
-
-#define find_first_bit(addr, size) find_next_bit((addr), (size), 0)
-#define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0)
-
-
-/****************
- ** linux/mm.h **
- ****************/
-
-int is_vmalloc_addr(const void *x);
-
-extern unsigned long totalram_pages;
-extern unsigned long num_physpages;
-
-static inline struct page *compound_head(struct page *page) { return page; }
-static inline void *page_address(struct page *page) { return page->addr; };
-
-void get_page(struct page *page);
-void put_page(struct page *page);
-
-#define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK)
-
-struct page *virt_to_head_page(const void *x);
-struct page *virt_to_page(const void *x);
-struct page *vmalloc_to_page(const void *addr);
-
-struct sysinfo;
-void si_meminfo(struct sysinfo *);
-
-#define page_private(page) ((page)->private)
-#define set_page_private(page, v) ((page)->private = (v))
-
-struct vm_operations_struct {
- void (*open)(struct vm_area_struct * area);
- void (*close)(struct vm_area_struct * area);
-};
-
-int get_user_pages_fast(unsigned long start, int nr_pages, int write, struct page **pages);
-int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *);
-
-bool page_is_pfmemalloc(struct page *page);
-
-#define PAGE_ALIGNED(addr) IS_ALIGNED((unsigned long)addr, PAGE_SIZE)
-
-
-/**********************
- ** linux/sched/mm.h **
- **********************/
-
-void memalloc_noreclaim_restore(unsigned int flags);
-unsigned int memalloc_noreclaim_save(void);
-
-
-/*********************
- ** linux/kobject.h **
- *********************/
-
-#include
-
-enum kobject_action
-{
- KOBJ_ADD,
- KOBJ_REMOVE,
- KOBJ_CHANGE,
-};
-
-int kobject_uevent(struct kobject *, enum kobject_action);
-int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, char *envp[]);
-
-
-/*********************
- ** linux/vmalloc.h **
- *********************/
-
-void *vmalloc(unsigned long size);
-void *vzalloc(unsigned long size);
-void vfree(const void *addr);
-
-
-/**********************
- ** linux/highmem.h **
- **********************/
-
-static inline void *kmap(struct page *page) { return page_address(page); }
-static inline void *kmap_atomic(struct page *page) { return kmap(page); }
-static inline void kunmap(struct page *page) { }
-static inline void kunmap_atomic(void *addr) { }
-
-
-/******************
- ** linux/slab.h **
- ******************/
-
-#define ARCH_KMALLOC_MINALIGN __alignof__(unsigned long long)
-
-enum {
- SLAB_HWCACHE_ALIGN = 0x00002000ul,
- SLAB_CACHE_DMA = 0x00004000ul,
- SLAB_PANIC = 0x00040000ul,
-
- SLAB_LX_DMA = 0x80000000ul,
-};
-
-void *kzalloc(size_t size, gfp_t flags);
-void *kvzalloc(size_t size, gfp_t flags);
-void kfree(const void *);
-void kzfree(const void *);
-void *kmalloc(size_t size, gfp_t flags);
-void *kcalloc(size_t n, size_t size, gfp_t flags);
-void *kmalloc_array(size_t n, size_t size, gfp_t flags);
-void *kvmalloc(size_t size, gfp_t flags);
-void kvfree(const void *);
-
-struct kmem_cache;
-struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, unsigned long, void (*)(void *));
-struct kmem_cache *kmem_cache_create_usercopy(const char *name,
- size_t size, size_t align, slab_flags_t flags,
- size_t useroffset, size_t usersize,
- void (*ctor)(void *));
-void kmem_cache_destroy(struct kmem_cache *);
-void *kmem_cache_alloc(struct kmem_cache *, gfp_t);
-void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags);
-void kmem_cache_free(struct kmem_cache *, void *);
-void *kmalloc_node_track_caller(size_t size, gfp_t flags, int node);
-
-static inline void *kmem_cache_alloc_node(struct kmem_cache *s, gfp_t flags, int node)
-{
- return kmem_cache_alloc(s, flags);
-}
-
-void kmem_cache_free_bulk(struct kmem_cache *, size_t, void **);
-
-/*************************
- ** linux/irq_cpustat.h **
- *************************/
-
-int local_softirq_pending(void);
-
-
-/**********************
- ** linux/irqflags.h **
- **********************/
-
-#define local_irq_enable(a ) do { } while (0)
-#define local_irq_disable() do { } while (0)
-#define local_irq_save(flags) do { (void)flags; } while (0)
-#define local_irq_restore(flags) do { (void)flags; } while (0)
-
-
-/********************
- ** linux/printk.h **
- ********************/
-
-static inline int _printk(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
-
-static inline int no_printk(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
-static inline int no_printk(const char *fmt, ...) { return 0; }
-
-#define printk_ratelimit(x) (0)
-
-#define printk_ratelimited(fmt, ...) printk(fmt, ##__VA_ARGS__)
-
-#define pr_emerg(fmt, ...) printk(KERN_EMERG fmt, ##__VA_ARGS__)
-#define pr_alert(fmt, ...) printk(KERN_ALERT fmt, ##__VA_ARGS__)
-#define pr_crit(fmt, ...) printk(KERN_CRIT fmt, ##__VA_ARGS__)
-#define pr_err(fmt, ...) printk(KERN_ERR fmt, ##__VA_ARGS__)
-#define pr_err_once(fmt, ...) printk(KERN_ERR fmt, ##__VA_ARGS__)
-#define pr_warning(fmt, ...) printk(KERN_WARN fmt, ##__VA_ARGS__)
-#define pr_warn(fmt, ...) printk(KERN_WARN fmt, ##__VA_ARGS__)
-#define pr_warn_once pr_warn
-#define pr_notice(fmt, ...) printk(KERN_NOTICE fmt, ##__VA_ARGS__)
-#define pr_info(fmt, ...) no_printk(KERN_INFO fmt, ##__VA_ARGS__)
-#define pr_cont(fmt, ...) printk(KERN_CONT fmt, ##__VA_ARGS__)
-/* pr_devel() should produce zero code unless DEBUG is defined */
-#ifdef DEBUG
-#define pr_devel(fmt, ...) printk(KERN_DEBUG fmt, ##__VA_ARGS__)
-#define pr_debug(fmt, ...) printk(KERN_DEBUG fmt, ##__VA_ARGS__)
-#else
-#define pr_devel(fmt, ...) no_printk(KERN_DEBUG fmt, ##__VA_ARGS__)
-#define pr_debug(fmt, ...) no_printk(KERN_DEBUG fmt, ##__VA_ARGS__)
-#endif
-
-#define pr_warn_ratelimited(fmt, ...) printk(KERN_WARNING fmt, ##__VA_ARGS__)
-
-enum {
- DUMP_PREFIX_OFFSET
-};
-
-int snprintf(char *str, size_t size, const char *format, ...) __attribute__((format(printf, 3, 4)));
-
-static inline void print_hex_dump(const char *level, const char *prefix_str,
- int prefix_type, int rowsize, int groupsize,
- const void *buf, size_t len, bool ascii)
-{
- _printk("hex_dump: ");
- size_t i;
- for (i = 0; i < len; i++) {
- _printk("%x ", ((char*)buf)[i]);
- }
- _printk("\n");
-}
-
-void hex_dump_to_buffer(const void *buf, size_t len, int rowsize, int groupsize,
- char *linebuf, size_t linebuflen, bool ascii);
-void dump_stack(void);
-
-unsigned long int_sqrt(unsigned long);
-
-
-/***********************
- ** linux/workqueue.h **
- ***********************/
-
-#include
-
-extern struct workqueue_struct *system_power_efficient_wq;
-
-
-/******************
- ** linux/wait.h **
- ******************/
-
-#define key_to_poll(m) ((__force __poll_t)(uintptr_t)(void *)(m))
-
-long wait_woken(wait_queue_entry_t *wait, unsigned mode, long timeout);
-
-bool wq_has_sleeper(struct wait_queue_head *wq_head);
-
-
-/******************
- ** linux/poll.h **
- ******************/
-
-typedef struct poll_table_struct { int dummy; } poll_table;
-
-
-/*******************
- ** linux/sysfs.h **
- *******************/
-
-struct attribute {
- const char *name;
- mode_t mode;
-};
-
-struct attribute_group {
- const char *name;
- mode_t (*is_visible)(struct kobject *, struct attribute *, int);
- struct attribute **attrs;
-};
-
-#define __ATTRIBUTE_GROUPS(_name) \
- static const struct attribute_group *_name##_groups[] = { \
- &_name##_group, \
- NULL, \
- }
-
-#define ATTRIBUTE_GROUPS(_name) \
- static const struct attribute_group _name##_group = { \
- .attrs = _name##_attrs, \
- }; \
-__ATTRIBUTE_GROUPS(_name)
-
-struct file;
-struct bin_attribute {
- struct attribute attr;
- size_t size;
- ssize_t (*read)(struct file *, struct kobject *,
- struct bin_attribute *, char *, loff_t, size_t);
-};
-
-#define __ATTR(_name,_mode,_show,_store) { \
- .attr = {.name = #_name, .mode = _mode }, \
- .show = _show, \
- .store = _store, \
-}
-
-#define __ATTR_NULL { .attr = { .name = NULL } }
-#define __ATTR_RO(name) __ATTR_NULL
-#define __ATTR_RW(name) __ATTR_NULL
-
-
-int sysfs_create_group(struct kobject *kobj,
- const struct attribute_group *grp);
-void sysfs_remove_group(struct kobject *kobj,
- const struct attribute_group *grp);
-int sysfs_create_link(struct kobject *kobj, struct kobject *target,
- const char *name);
-void sysfs_remove_link(struct kobject *kobj, const char *name);
-
-
-/****************
- ** linux/pm.h **
- ****************/
-
-#include
-
-#define PM_EVENT_HIBERNATE 0x0004
-#define PM_EVENT_SLEEP (PM_EVENT_SUSPEND | PM_EVENT_HIBERNATE)
-
-#ifdef CONFIG_PM_SLEEP
-#define SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \
- .suspend = suspend_fn, \
- .resume = resume_fn, \
- .freeze = suspend_fn, \
- .thaw = resume_fn, \
- .poweroff = suspend_fn, \
- .restore = resume_fn,
-#else
-#define SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn)
-#endif
-
-
-/* needed by drivers/net/wireless/iwlwifi/pcie/drv.c */
-#define SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \
- const struct dev_pm_ops name = { \
- SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \
- }
-
-
-/************************
- ** linux/pm_runtime.h **
- ************************/
-
-int pm_runtime_set_active(struct device *dev);
-void pm_suspend_ignore_children(struct device *dev, bool enable);
-void pm_runtime_enable(struct device *dev);
-void pm_runtime_disable(struct device *dev);
-void pm_runtime_allow(struct device *dev);
-void pm_runtime_forbid(struct device *dev);
-void pm_runtime_set_suspended(struct device *dev);
-void pm_runtime_get_noresume(struct device *dev);
-void pm_runtime_put_noidle(struct device *dev);
-void pm_runtime_use_autosuspend(struct device *dev);
-int pm_runtime_put_sync_autosuspend(struct device *dev);
-void pm_runtime_no_callbacks(struct device *dev);
-void pm_runtime_set_autosuspend_delay(struct device *dev, int delay);
-int pm_runtime_get_sync(struct device *dev);
-int pm_runtime_put_sync(struct device *dev);
-int pm_runtime_put(struct device *dev);
-bool pm_runtime_suspended(struct device *dev);
-bool pm_runtime_active(struct device *dev);
-int pm_runtime_resume(struct device *dev);
-int pm_runtime_get(struct device *dev);
-void pm_runtime_mark_last_busy(struct device *dev);
-int pm_runtime_put_autosuspend(struct device *dev);
-
-
-/***********************
- ** linux/pm_wakeup.h **
- ***********************/
-
-int device_init_wakeup(struct device *dev, bool val);
-int device_wakeup_enable(struct device *dev);
-bool device_may_wakeup(struct device *dev);
-int device_set_wakeup_enable(struct device *dev, bool enable);
-bool device_can_wakeup(struct device *dev);
-
-void pm_wakeup_event(struct device *dev, unsigned int msec);
-
-
-/********************
- ** linux/pm_qos.h **
- ********************/
-
-struct pm_qos_request { unsigned unused; };
-
-enum { PM_QOS_FLAG_NO_POWER_OFF = 1 };
-
-enum { PM_QOS_NETWORK_LATENCY = 2 };
-
-int pm_qos_request(int pm_qos_class);
-struct notifier_block;
-int pm_qos_add_notifier(int pm_qos_class, struct notifier_block *notifier);
-int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier);
-
-int dev_pm_qos_expose_flags(struct device *dev, s32 value);
-
-
-/**********************
- ** linux/notifier.h **
- **********************/
-
-enum {
- NOTIFY_DONE = 0x0000,
- NOTIFY_OK = 0x0001,
- NOTIFY_STOP_MASK = 0x8000,
- NOTIFY_BAD = (NOTIFY_STOP_MASK | 0x0002),
- NOTIFY_STOP = (NOTIFY_OK|NOTIFY_STOP_MASK),
-
- NETLINK_URELEASE = 0x1,
-};
-
-struct notifier_block;
-
-typedef int (*notifier_fn_t)(struct notifier_block *nb, unsigned long action,
- void *data);
-
-
-struct notifier_block
-{
- notifier_fn_t notifier_call;
- struct notifier_block *next;
- int priority;
-};
-
-struct raw_notifier_head
-{
- struct notifier_block *head;
-};
-
-#define RAW_NOTIFIER_HEAD(name) \
- struct raw_notifier_head name;
-
-struct atomic_notifier_head {
- spinlock_t lock;
- struct notifier_block *head;
-};
-
-struct blocking_notifier_head {
- struct rw_semaphore rwsem;
- struct notifier_block *head;
-};
-
-#define BLOCKING_NOTIFIER_INIT(name) { \
- .rwsem = __RWSEM_INITIALIZER((name).rwsem), .head = NULL }
-#define BLOCKING_NOTIFIER_HEAD(name) \
- struct blocking_notifier_head name = BLOCKING_NOTIFIER_INIT(name)
-
-int blocking_notifier_chain_register(struct blocking_notifier_head *nh, struct notifier_block *nb);
-int blocking_notifier_chain_unregister(struct blocking_notifier_head *nh, struct notifier_block *nb);
-int blocking_notifier_call_chain(struct blocking_notifier_head *nh, unsigned long val, void *v);
-int atomic_notifier_chain_register(struct atomic_notifier_head *nh, struct notifier_block *nb);
-int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh, struct notifier_block *nb);
-int atomic_notifier_call_chain(struct atomic_notifier_head *nh, unsigned long val, void *v);
-int raw_notifier_chain_register(struct raw_notifier_head *nh, struct notifier_block *n);
-int raw_notifier_chain_unregister(struct raw_notifier_head *nh, struct notifier_block *nb);
-int blocking_notifier_call_chain(struct blocking_notifier_head *nh, unsigned long val, void *v);
-
-static inline int notifier_to_errno(int ret)
-{
- return ret > 0 ? ret : 0;
-}
-
-static inline int notifier_from_errno(int err)
-{
- return err ? (NOTIFY_STOP_MASK | (NOTIFY_OK - err)) : NOTIFY_OK;
-}
-
-#define ATOMIC_NOTIFIER_INIT(name) { \
- .head = NULL }
-
-#define ATOMIC_NOTIFIER_HEAD(name) \
- struct atomic_notifier_head name = ATOMIC_NOTIFIER_INIT(name)
-
-
-/********************
- ** linux/device.h **
- ********************/
-
-#define dev_info(dev, format, arg...) lx_printf("dev_info: " format , ## arg)
-#define dev_warn(dev, format, arg...) lx_printf("dev_warn: " format , ## arg)
-#define dev_WARN(dev, format, arg...) lx_printf("dev_WARN: " format , ## arg)
-#define dev_err( dev, format, arg...) lx_printf("dev_error: " format , ## arg)
-#define dev_notice(dev, format, arg...) lx_printf("dev_notice: " format , ## arg)
-#define dev_crit(dev, format, arg...) lx_printf("dev_crit: " format , ## arg)
-
-#ifndef DEBUG_DEV_DBG
-#define DEBUG_DEV_DBG 1
-#endif
-#if DEBUG_DEV_DBG
-#define dev_dbg(dev, format, arg...) lx_printf("dev_dbg: " format , ## arg)
-#else
-#define dev_dbg( dev, format, arg...)
-#endif
-
-#define dev_printk(level, dev, format, arg...) \
- lx_printf("dev_printk: " format , ## arg)
-
-#define dev_warn_ratelimited(dev, format, arg...) \
- lx_printf("dev_warn_ratelimited: " format , ## arg)
-
-enum {
- BUS_NOTIFY_ADD_DEVICE = 0x00000001,
- BUS_NOTIFY_DEL_DEVICE = 0x00000002,
-};
-
-struct device;
-struct device_driver;
-
-struct bus_type
-{
- const char *name;
- struct device_attribute *dev_attrs;
- int (*match)(struct device *dev, struct device_driver *drv);
- int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
- int (*probe)(struct device *dev);
- int (*remove)(struct device *dev);
-};
-
-struct device_driver
-{
- char const *name;
- struct bus_type *bus;
- struct module *owner;
- const char *mod_name;
- const struct of_device_id *of_match_table;
- const struct acpi_device_id *acpi_match_table;
- int (*probe) (struct device *dev);
- int (*remove) (struct device *dev);
-
- const struct dev_pm_ops *pm;
-};
-
-struct kobj_uevent_env;
-
-struct device_type
-{
- const char *name;
- const struct attribute_group **groups;
- void (*release)(struct device *dev);
- int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
- char *(*devnode)(struct device *dev, mode_t *mode);
- const struct dev_pm_ops *pm;
-};
-
-struct class
-{
- const char *name;
- struct module *owner;
-
- const struct attribute_group **dev_groups;
-
- int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env);
- char *(*devnode)(struct device *dev, mode_t *mode);
- void (*dev_release)(struct device *dev);
-
- int (*suspend)(struct device *dev, pm_message_t state);
- int (*resume)(struct device *dev);
-
- const struct kobj_ns_type_operations *ns_type;
- const void *(*namespace)(struct device *dev);
-
- const struct dev_pm_ops *pm;
-};
-
-struct dma_parms;
-
-/* DEVICE */
-struct device
-{
- const char *name;
- struct device *parent;
- struct kobject kobj;
- const struct device_type *type;
- struct device_driver *driver;
- void *platform_data;
- u64 _dma_mask_buf;
- u64 *dma_mask;
- u64 coherent_dma_mask;
- struct dev_pm_info power;
- dev_t devt;
- const struct attribute_group **groups;
- void (*release)(struct device *dev);
- struct bus_type *bus;
- struct class *class;
- void *driver_data;
- struct device_node *of_node;
- struct device_dma_parameters *dma_parms;
-
- /**
- * XXX this field is not in the original struct and is only
- * used by pci_{g,s}et_drvdata
- */
- void *__private__;
-};
-
-struct device_attribute {
- struct attribute attr;
- ssize_t (*show)(struct device *dev, struct device_attribute *attr,
- char *buf);
- ssize_t (*store)(struct device *dev, struct device_attribute *attr,
- const char *buf, size_t count);
-};
-
-struct driver_attribute {
- struct attribute attr;
- ssize_t (*show)(struct device_driver *driver, char *buf);
- ssize_t (*store)(struct device_driver *driver, const char *buf,
- size_t count);
-};
-
-#define DEVICE_ATTR(_name, _mode, _show, _store) \
- struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
-
-#define DEVICE_ATTR_RO(_name) \
- struct device_attribute dev_attr_##_name = __ATTR_RO(_name)
-
-#define DEVICE_ATTR_RW(_name) \
- struct device_attribute dev_attr_##_name = __ATTR_RW(_name)
-
-#define DRIVER_ATTR(_name, _mode, _show, _store) \
- struct driver_attribute driver_attr_##_name = \
-__ATTR(_name, _mode, _show, _store)
-
-void *dev_get_drvdata(const struct device *dev);
-int dev_set_drvdata(struct device *dev, void *data);
-int dev_set_name(struct device *dev, const char *name, ...);
-const char *dev_name(const struct device *dev);
-int dev_to_node(struct device *dev);
-void set_dev_node(struct device *dev, int node);
-
-struct device *device_create(struct class *cls, struct device *parent,
- dev_t devt, void *drvdata,
- const char *fmt, ...);
-struct device *device_create_with_groups(struct class *cls,
- struct device *parent, dev_t devt,
- void *drvdata,
- const struct attribute_group **groups,
- const char *fmt, ...);
-int device_add(struct device *dev);
-void device_destroy(struct class *cls, dev_t devt);
-int device_register(struct device *dev);
-void device_unregister(struct device *dev);
-void device_lock(struct device *dev);
-int device_trylock(struct device *dev);
-void device_unlock(struct device *dev);
-void device_del(struct device *dev);
-void device_initialize(struct device *dev);
-int device_attach(struct device *dev);
-int device_is_registered(struct device *dev);
-int device_bind_driver(struct device *dev);
-void device_release_driver(struct device *dev);
-void device_enable_async_suspend(struct device *dev);
-void device_set_wakeup_capable(struct device *dev, bool capable);
-int device_create_bin_file(struct device *dev, const struct bin_attribute *attr);
-void device_remove_bin_file(struct device *dev, const struct bin_attribute *attr);
-int device_create_file(struct device *device, const struct device_attribute *entry);
-void device_remove_file(struct device *dev, const struct device_attribute *attr);
-int device_reprobe(struct device *dev);
-int device_rename(struct device *dev, const char *new_name);
-
-void put_device(struct device *dev);
-struct device *get_device(struct device *dev);
-
-int driver_register(struct device_driver *drv);
-void driver_unregister(struct device_driver *drv);
-int driver_attach(struct device_driver *drv);
-int driver_create_file(struct device_driver *driver,
- const struct driver_attribute *attr);
-void driver_remove_file(struct device_driver *driver,
- const struct driver_attribute *attr);
-
-struct device_driver *get_driver(struct device_driver *drv);
-void put_driver(struct device_driver *drv);
-
-struct device *bus_find_device(struct bus_type *bus, struct device *start,
- void *data,
- int (*match)(struct device *dev, void *data));
-int bus_register(struct bus_type *bus);
-void bus_unregister(struct bus_type *bus);
-int bus_register_notifier(struct bus_type *bus,
- struct notifier_block *nb);
-int bus_unregister_notifier(struct bus_type *bus,
- struct notifier_block *nb);
-
-struct lock_class_key;
-struct class *__class_create(struct module *owner,
- const char *name,
- struct lock_class_key *key);
-#define class_create(owner, name) \
- ({ \
- static struct lock_class_key __key; \
- __class_create(owner, name, &__key); \
- })
-int class_register(struct class *cls);
-void class_unregister(struct class *cls);
-void class_destroy(struct class *cls);
-struct device *class_find_device(struct class *cls, struct device *start,
- const void *data,
- int (*match)(struct device *, const void *));
-
-typedef void (*dr_release_t)(struct device *dev, void *res);
-typedef int (*dr_match_t)(struct device *dev, void *res, void *match_data);
-
-void *devres_alloc(dr_release_t release, size_t size, gfp_t gfp);
-void devres_add(struct device *dev, void *res);
-int devres_destroy(struct device *dev, dr_release_t release,
- dr_match_t match, void *match_data);
-void devres_free(void *res);
-int devres_release(struct device *dev, dr_release_t release,
- dr_match_t match, void *match_data);
-
-void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp);
-
-#define devm_kasprintf(device, ftp, fmt, ...) kasprintf(ftp, "wifi_drv" # fmt, __VA_ARGS__)
-
-static inline const char *dev_driver_string(const struct device *dev)
-{
- struct device_driver *drv = dev->driver;
-
- return drv ? drv->name : (dev->bus ? dev->bus->name : (dev->class ? dev->class->name : ""));
-}
-
-int dev_printk_emit(int, const struct device *, const char *, ...);
-
-
-/************************
- ** linux/miscdevice.h **
- ************************/
-
-#define MISC_DYNAMIC_MINOR 255
-
-struct miscdevice {
- int minor;
- const char *name;
- const struct file_operations *fops;
- struct list_head list;
- struct device *parent;
- struct device *this_device;
- const char *nodename;
- umode_t mode;
-};
-
-int misc_register(struct miscdevice * misc);
-int misc_deregister(struct miscdevice *misc);
-
-
-/*********************
- ** linux/uapi/if.h **
- *********************/
-
-enum {
- IFF_UP = 0x1,
- IFF_BROADCAST = 0x2,
- IFF_LOOPBACK = 0x8,
- IFF_NOARP = 0x80, /* no ARP protocol */
- IFF_PROMISC = 0x100, /* receive all packets */
- IFF_ALLMULTI = 0x200, /* receive all multicast packets */
- IFF_MULTICAST = 0x1000, /* supports multicast */
- IFF_DONT_BRIDGE = 0x800,
- IFF_BRIDGE_PORT = 0x4000,
- IFF_TX_SKB_SHARING = 0x10000,
- IFF_LIVE_ADDR_CHANGE = 0x100000,
-
- IFNAMSIZ = 16,
- IFALIASZ = 256,
-};
-
-enum {
- IF_OPER_UNKNOWN,
- IF_OPER_NOTPRESENT,
- IF_OPER_DOWN,
- IF_OPER_LOWERLAYERDOWN,
- IF_OPER_TESTING,
- IF_OPER_DORMANT,
- IF_OPER_UP,
-};
-
-struct ifmap {
- unsigned long mem_start;
- unsigned long mem_end;
- unsigned short base_addr;
- unsigned char irq;
- unsigned char dma;
- unsigned char port;
- /* 3 bytes spare */
-};
-
-
-/*************************
- ** linux/uapi/if_arp.h **
- *************************/
-
-enum {
- ARPHRD_ETHER = 1,
- ARPHRD_INFINIBAND = 32,
- ARPHRD_IEEE80211_RADIOTAP = 803,
- ARPHRD_NETLINK = 824,
-};
-
-
-/**********************
- ** linux/if_ether.h **
- **********************/
-
-enum {
- ETH_ALEN = 6, /* octets in one ethernet addr */
- ETH_HLEN = 14, /* total octets in header */
- ETH_TLEN = 2,
- ETH_DATA_LEN = 1500, /* Max. octets in payload */
- ETH_P_8021Q = 0x8100, /* 802.1Q VLAN Extended Header */
- ETH_P_8021AD = 0x88A8, /* 802.1ad Service VLAN */
- ETH_P_PAE = 0x888E, /* Port Access Entity (IEEE 802.1X) */
-
- ETH_P_802_3_MIN = 0x0600,
-
- ETH_FRAME_LEN = 1514,
-};
-
-#define ETH_P_TDLS 0x890D /* TDLS */
-
-
-/***************************
- ** linux/uapi/if_ether.h **
- ***************************/
-
-enum {
- ETH_P_IP = 0x0800,
- ETH_P_IPV6 = 0x86DD,
-};
-
-
-/****************************
- ** uapi/linux/if_packet.h **
- ****************************/
-
-enum {
- PACKET_HOST = 0,
- PACKET_BROADCAST = 1,
- PACKET_MULTICAST = 2,
- PACKET_OTHERHOST = 3,
- PACKET_USER = 6,
- PACKET_KERNEL = 7,
-};
-
-
-/*****************************
- ** uapi/linux/virtio_net.h **
- *****************************/
-
-struct virtio_net_hdr
-{
-#define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 // Use csum_start, csum_offset
-#define VIRTIO_NET_HDR_F_DATA_VALID 2 // Csum is valid
- __u8 flags;
-#define VIRTIO_NET_HDR_GSO_NONE 0 // Not a GSO frame
-#define VIRTIO_NET_HDR_GSO_TCPV4 1 // GSO frame, IPv4 TCP (TSO)
-#define VIRTIO_NET_HDR_GSO_UDP 3 // GSO frame, IPv4 UDP (UFO)
-#define VIRTIO_NET_HDR_GSO_TCPV6 4 // GSO frame, IPv6 TCP
-#define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set
- __u8 gso_type;
- __u16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */
- __u16 gso_size; /* Bytes to append to hdr_len per frame */
- __u16 csum_start; /* Position to start checksumming from */
- __u16 csum_offset; /* Offset after that to place checksum */
-};
-
-
-/************************
- ** linux/virtio_net.h **
- ************************/
-
-struct sk_buff;
-
-int virtio_net_hdr_from_skb(const struct sk_buff *skb,
- struct virtio_net_hdr *hdr, bool little_endian,
- bool has_data_valid);
-int virtio_net_hdr_to_skb(struct sk_buff *skb,
- const struct virtio_net_hdr *hdr, bool little_endian);
-
-
-/**************************
- ** uapi/linux/ethtool.h **
- **************************/
-
-struct ethtool_link_settings
-{
- __u32 speed;
-};
-
-
-/*********************
- ** linux/ethtool.h **
- *********************/
-
-enum {
- DUPLEX_HALF = 0x0,
- DUPLEX_FULL = 0x1,
- ETHTOOL_GSET = 0x1,
- ETHTOOL_FWVERS_LEN = 32,
- ETHTOOL_BUSINFO_LEN = 32,
-
- WAKE_PHY = 0,
- WAKE_UCAST = (1 << 1),
- WAKE_MCAST = (1 << 2),
- WAKE_BCAST = (1 << 3),
- WAKE_ARP = (1 << 4),
- WAKE_MAGIC = (1 << 5),
-
- SPEED_100 = 100,
- SPEED_1000 = 1000,
-};
-
-#define ETH_GSTRING_LEN 32
-enum ethtool_stringset {
- ETH_SS_TEST = 0,
- ETH_SS_STATS,
- ETH_SS_PRIV_FLAGS,
- ETH_SS_NTUPLE_FILTERS,
- ETH_SS_FEATURES,
-};
-
-struct ethtool_cmd
-{
- u32 cmd;
- u8 duplex;
-};
-
-struct ethtool_regs
-{
- u32 version;
- u32 len;
-};
-
-struct ethtool_eeprom
-{
- u32 magic;
- u32 offset;
- u32 len;
-};
-
-struct ethtool_drvinfo
-{
- char driver[32]; /* driver short name, "tulip", "eepro100" */
- char version[32]; /* driver version string */
- char fw_version[ETHTOOL_FWVERS_LEN]; /* firmware version string */
- char bus_info[ETHTOOL_BUSINFO_LEN]; /* Bus info for this IF. */
- /* For PCI devices, use pci_name(pci_de
- * v). */
- u32 eedump_len;
-};
-
-struct ethtool_wolinfo {
- u32 supported;
- u32 wolopts;
-};
-
-
-struct ethtool_link_ksettings
-{
- struct ethtool_link_settings base;
-};
-
-struct ethtool_ts_info;
-
-struct net_device;
-struct ethtool_ringparam;
-struct ethtool_stats;
-
-struct ethtool_ops
-{
- int (*get_settings)(struct net_device *, struct ethtool_cmd *);
- int (*set_settings)(struct net_device *, struct ethtool_cmd *);
- void (*get_drvinfo)(struct net_device *, struct ethtool_drvinfo *);
- int (*get_regs_len)(struct net_device *);
- void (*get_regs)(struct net_device *, struct ethtool_regs *, void *);
- int (*nway_reset)(struct net_device *);
- u32 (*get_link)(struct net_device *);
- int (*get_eeprom_len)(struct net_device *);
- int (*get_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *);
- int (*set_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *);
- void (*get_ringparam)(struct net_device *, struct ethtool_ringparam *);
- int (*set_ringparam)(struct net_device *, struct ethtool_ringparam *);
- void (*get_strings)(struct net_device *, u32 stringset, u8 *);
- void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *);
- int (*get_sset_count)(struct net_device *, int);
- u32 (*get_msglevel)(struct net_device *);
- void (*set_msglevel)(struct net_device *, u32);
- void (*get_wol)(struct net_device *, struct ethtool_wolinfo *);
- int (*set_wol)(struct net_device *, struct ethtool_wolinfo *);
- int (*get_ts_info)(struct net_device *, struct ethtool_ts_info *);
-
-};
-
-__u32 ethtool_cmd_speed(const struct ethtool_cmd *);
-int __ethtool_get_settings(struct net_device *dev, struct ethtool_cmd *cmd);
-u32 ethtool_op_get_link(struct net_device *);
-int ethtool_op_get_ts_info(struct net_device *, struct ethtool_ts_info *);
-
-int __ethtool_get_link_ksettings(struct net_device *dev,
- struct ethtool_link_ksettings *link_ksettings);
-
-
-/**************************
- ** uapi/linux/ethtool.h **
- **************************/
-
-enum {
- SPEED_UNKNOWN = -1,
-};
-
-struct ethtool_stats {
- __u32 cmd; /* ETHTOOL_GSTATS */
- __u32 n_stats; /* number of u64's being returned */
- __u64 data[0];
-};
-
-
-struct ethtool_ringparam {
- u32 rx_max_pending;
- u32 tx_max_pending;
- u32 rx_pending;
- u32 rx_mini_pending;
- u32 rx_jumbo_pending;
- u32 tx_pending;
-};
-
-/*********************
- ** linux/average.h **
- *********************/
-
-struct ewma {
- unsigned long internal;
- unsigned long factor;
- unsigned long weight;
-};
-
-extern void ewma_init(struct ewma *avg, unsigned long factor,
- unsigned long weight);
-
-extern struct ewma *ewma_add(struct ewma *avg, unsigned long val);
-
-static inline unsigned long ewma_read(const struct ewma *avg)
-{
- return avg->internal >> avg->factor;
-}
-
-
-/**************************
- ** linux/preempt_mask.h **
- **************************/
-
-int in_interrupt(void);
-int in_softirq(void);
-int in_irq(void);
-
-int softirq_count(void);
-
-
-/*********************
- ** linux/preempt.h **
- *********************/
-
-#define preempt_disable() barrier()
-#define preempt_enable() barrier()
-
-#define in_task() (1)
-
-
-/***********************
- ** linux/interrupt.h **
- ***********************/
-
-struct tasklet_struct
-{
- void (*func)(unsigned long);
- unsigned long data;
-};
-
-void tasklet_schedule(struct tasklet_struct *t);
-void tasklet_hi_schedule(struct tasklet_struct *t);
-void tasklet_kill(struct tasklet_struct *);
-void tasklet_init(struct tasklet_struct *t, void (*)(unsigned long), unsigned long);
-
-
-/*****************
- ** linux/idr.h **
- *****************/
-
-#define IDR_BITS 8
-#define IDR_SIZE (1 << IDR_BITS)
-#define IDR_MASK ((1 << IDR_BITS)-1)
-
-struct idr_layer {
- int prefix; /* the ID prefix of this idr_layer */
- DECLARE_BITMAP(bitmap, IDR_SIZE); /* A zero bit means "space here" */
- struct idr_layer __rcu *ary[1<next)))
-
-#define list_for_each_entry_rcu(pos, head, member) \
-list_for_each_entry(pos, head, member)
-
-#define list_first_or_null_rcu(ptr, type, member) ({ \
-struct list_head *__ptr = (ptr); \
-struct list_head __rcu *__next = list_next_rcu(__ptr); \
-__ptr != __next ? container_of(__next, type, member) : NULL; \
-})
-
-#define list_add_rcu list_add
-#define list_add_tail_rcu list_add_tail
-#define hlist_add_head_rcu hlist_add_head
-
-#define list_del_rcu list_del
-#define hlist_del_rcu hlist_del
-
-#define hlist_del_init_rcu hlist_del_init
-#define free_percpu(pdata) kfree(pdata)
-
-void hlist_add_after_rcu(struct hlist_node *, struct hlist_node *);
-void hlist_add_before_rcu(struct hlist_node *,struct hlist_node *);
-
-void list_replace_rcu(struct list_head *, struct list_head *);
-
-void hlist_add_tail_rcu(struct hlist_node *n, struct hlist_head *h);
-
-#include
-
-
-/***********************
- ** linux/kmemcheck.h **
- ***********************/
-
-#define kmemcheck_bitfield_begin(name)
-#define kmemcheck_bitfield_end(name)
-#define kmemcheck_annotate_bitfield(ptr, name)
-#define kmemcheck_annotate_variable(var)
-
-
-/******************
- ** linux/numa.h **
- ******************/
-
-enum { NUMA_NO_NODE = -1 };
-
-
-/*************************
- ** asm-generic/cache.h **
- *************************/
-
-#define L1_CACHE_BYTES 32
-#define SMP_CACHE_BYTES L1_CACHE_BYTES
-
-#define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
-#define ____cacheline_aligned_in_smp ____cacheline_aligned
-#define __cacheline_aligned ____cacheline_aligned
-
-
-/*********************
- ** linux/seqlock.h **
- *********************/
-
-typedef unsigned seqlock_t;
-
-void seqlock_init (seqlock_t *);
-
-#define __SEQLOCK_UNLOCKED(x) 0
-
-
-/***********************************
- ** linux/rwlock_types.h/rwlock.h **
- ***********************************/
-
-typedef unsigned rwlock_t;
-
-#define DEFINE_RWLOCK(x) rwlock_t x;
-#define __RW_LOCK_UNLOCKED(x) 0
-
-void rwlock_init(rwlock_t *);
-
-void write_lock_bh(rwlock_t *);
-void write_unlock_bh(rwlock_t *);
-void write_lock(rwlock_t *);
-void write_unlock(rwlock_t *);
-void write_lock_irq(rwlock_t *);
-void write_unlock_irq(rwlock_t *);
-void write_lock_irqsave(rwlock_t *, unsigned long);
-void write_unlock_irqrestore(rwlock_t *, unsigned long);
-
-void read_lock(rwlock_t *);
-void read_unlock(rwlock_t *);
-void read_lock_bh(rwlock_t *);
-void read_unlock_bh(rwlock_t *);
-
-
-/*********************
- ** linux/seqlock.h **
- *********************/
-
-typedef struct seqcount {
- unsigned sequence;
-} seqcount_t;
-
-unsigned read_seqbegin(const seqlock_t *sl);
-unsigned read_seqretry(const seqlock_t *sl, unsigned start);
-void write_seqlock_bh(seqlock_t *);
-void write_sequnlock_bh(seqlock_t *);
-void write_seqlock(seqlock_t *);
-void write_sequnlock(seqlock_t *);
-void write_seqcount_begin(seqcount_t *);
-void write_seqcount_end(seqcount_t *);
-
-
-/****************************
- ** linux/percpu_counter.h **
- ****************************/
-
-struct percpu_counter
-{
- s64 count;
-};
-
-static inline int percpu_counter_init(struct percpu_counter *fbc, s64 amount, gfp_t gfp)
-{
- fbc->count = amount;
- return 0;
-}
-
-static inline s64 percpu_counter_read(struct percpu_counter *fbc)
-{
- return fbc->count;
-}
-
-static inline
-void percpu_counter_add(struct percpu_counter *fbc, s64 amount)
-{
- fbc->count += amount;
-}
-
-static inline
-void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch)
-{
- percpu_counter_add(fbc, amount);
-}
-
-s64 percpu_counter_sum_positive(struct percpu_counter *fbc);
-
-static inline void percpu_counter_inc(struct percpu_counter *fbc)
-{
- percpu_counter_add(fbc, 1);
-}
-
-static inline void percpu_counter_dec(struct percpu_counter *fbc)
-{
- percpu_counter_add(fbc, -1);
-}
-
-static inline
-s64 percpu_counter_read_positive(struct percpu_counter *fbc)
-{
- return fbc->count;
-}
-
-void percpu_counter_destroy(struct percpu_counter *fbc);
-
-
-/****************************
- ** linux/u64_stats_sync.h **
- ****************************/
-
-struct u64_stats_sync { unsigned unused; };
-
-unsigned int u64_stats_fetch_begin_irq(const struct u64_stats_sync *syncp);
-bool u64_stats_fetch_retry_irq(const struct u64_stats_sync *syncp, unsigned int start);
-void u64_stats_init(struct u64_stats_sync *syncp);
-
-
-/********************
- ** linux/uidgid.h **
- ********************/
-
-typedef unsigned kuid_t;
-typedef unsigned kgid_t;
-
-#define GLOBAL_ROOT_UID (kuid_t)0
-
-struct user_namespace;
-extern kuid_t make_kuid(struct user_namespace *from, uid_t uid);
-
-extern uid_t from_kuid_munged(struct user_namespace *to, kuid_t uid);
-extern gid_t from_kgid_munged(struct user_namespace *to, kgid_t gid);
-
- /*************************
- ** linux/bottom_half.h **
- *************************/
-
-void local_bh_disable(void);
-void local_bh_enable(void);
-
-
-/***************
- ** net/scm.h **
- ***************/
-
-struct scm_creds { unsigned unused; };
-
-struct scm_cookie
-{
- struct scm_creds creds;
-};
-
-void scm_destroy(struct scm_cookie *scm);
-struct socket;
-struct msghdr;
-void scm_recv(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm, int flags);
-int scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm, bool forcecreds);
-
-
-/*************************
- ** linux/etherdevice.h **
- *************************/
-
-struct sk_buff;
-
-int eth_mac_addr(struct net_device *, void *);
-int eth_validate_addr(struct net_device *);
-__be16 eth_type_trans(struct sk_buff *, struct net_device *);
-int is_valid_ether_addr(const u8 *);
-
-void random_ether_addr(u8 *addr);
-
-struct net_device *alloc_etherdev(int);
-
-void eth_hw_addr_random(struct net_device *dev);
-void eth_random_addr(u8 *addr);
-
-static inline void eth_broadcast_addr(u8 *addr) {
- memset(addr, 0xff, ETH_ALEN); }
-
-static inline void eth_zero_addr(u8 *addr) {
- memset(addr, 0x00, ETH_ALEN); }
-
-static inline void ether_addr_copy(u8 *dst, const u8 *src)
-{
- *(u32 *)dst = *(const u32 *)src;
- *(u16 *)(dst+ 4) = *(const u16 *)(src + 4);
-}
-
-static inline bool is_broadcast_ether_addr(const u8 *addr)
-{
- return (*(const u16 *)(addr + 0) &
- *(const u16 *)(addr + 2) &
- *(const u16 *)(addr + 4)) == 0xffff;
-}
-
-static inline bool ether_addr_equal(const u8 *addr1, const u8 *addr2)
-{
- const u16 *a = (const u16 *)addr1;
- const u16 *b = (const u16 *)addr2;
-
- return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) == 0;
-}
-
-static inline bool is_multicast_ether_addr(const u8 *addr)
-{
- return 0x01 & addr[0];
-}
-
-static inline bool is_multicast_ether_addr_64bits(const u8 addr[6+2])
-{
- return is_multicast_ether_addr(addr);
-}
-
-static inline bool ether_addr_equal_64bits(const u8 addr1[6+2], const u8 addr2[6+2])
-{
- u64 fold = (*(const u64 *)addr1) ^ (*(const u64 *)addr2);
-
- return (fold << 16) == 0;
-}
-
-static inline bool is_unicast_ether_addr(const u8 *addr) {
- return !(0x01 & addr[0]); }
-
-static inline bool is_zero_ether_addr(const u8 *addr)
-{
- return !(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]);
-}
-
-/* Reserved Ethernet Addresses per IEEE 802.1Q */
-static const u8 eth_reserved_addr_base[ETH_ALEN] __aligned(2) =
-{ 0x01, 0x80, 0xc2, 0x00, 0x00, 0x00 };
-
-static inline bool is_link_local_ether_addr(const u8 *addr)
-{
- __be16 *a = (__be16 *)addr;
- static const __be16 *b = (const __be16 *)eth_reserved_addr_base;
- static const __be16 m = cpu_to_be16(0xfff0);
-
- return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | ((a[2] ^ b[2]) & m)) == 0;
-}
-
-static inline bool eth_proto_is_802_3(__be16 proto)
-{
- proto &= htons(0xFF00);
- return (u16)proto >= (u16)htons(ETH_P_802_3_MIN);
-}
-
-static inline unsigned long compare_ether_header(const void *a, const void *b)
-{
- u32 *a32 = (u32 *)((u8 *)a + 2);
- u32 *b32 = (u32 *)((u8 *)b + 2);
-
- return (*(u16 *)a ^ *(u16 *)b) | (a32[0] ^ b32[0]) |
- (a32[1] ^ b32[1]) | (a32[2] ^ b32[2]);
-
-}
-
-unsigned char *arch_get_platform_mac_address(void);
-
-
-/************************
- ** net/netns/packet.h **
- ************************/
-
-struct netns_packet {
- struct mutex sklist_lock;
- struct hlist_head sklist;
-};
-
-
-/******************************
- ** uapi/net/net_namespace.h **
- ******************************/
-
-enum {
- NETNSA_NSID_NOT_ASSIGNED = -1,
-};
-
-
-/*************************
- ** net/net_namespace.h **
- *************************/
-
-#include
-#include
-#include
-
-enum {
- LOOPBACK_IFINDEX = 1,
- NETDEV_HASHBITS = 8,
- NETDEV_HASHENTRIES = 1 << NETDEV_HASHBITS,
-};
-
-struct user_namespace;
-struct proc_net;
-
-extern struct net init_net;
-
-struct net
-{
- atomic_t passive;
- atomic_t count;
- struct list_head list;
- struct list_head cleanup_list;
- struct list_head exit_list;
- struct proc_dir_entry *proc_net;
- struct list_head dev_base_head;
- struct hlist_head *dev_name_head;
- struct hlist_head *dev_index_head;
- unsigned int dev_base_seq;
- int ifindex;
- unsigned int dev_unreg_count;
- struct net_device *loopback_dev;
- struct user_namespace *user_ns;
- unsigned int proc_inum;
- struct proc_dir_entry *proc_net_stat;
- struct sock *rtnl;
- struct sock *genl_sock;
- struct netns_mib mib;
- struct netns_packet packet;
- struct netns_ipv4 ipv4;
- struct net_generic __rcu *gen;
- atomic_t rt_genid;
-};
-
-
-struct pernet_operations
-{
- struct list_head list;
- int (*init)(struct net *net);
- void (*exit)(struct net *net);
- void (*exit_batch)(struct list_head *net_exit_list);
- int *id;
- size_t size;
-};
-
-
-extern struct list_head net_namespace_list;
-extern struct net init_net;
-
-#define __net_initdata
-#define __net_init
-#define __net_exit
-
-#define for_each_net(VAR) \
- for(VAR = &init_net; VAR; VAR = 0)
-
-#define for_each_net_rcu(VAR) \
- list_for_each_entry_rcu(VAR, &net_namespace_list, list)
-
-
-#define read_pnet(pnet) (&init_net)
-#define write_pnet(pnet, net) do { (void)(net);} while (0)
-
-static inline struct net *hold_net(struct net *net) { return net; }
-static inline struct net *get_net(struct net *net) { return net; }
-static inline void put_net(struct net *net) { }
-/* always return true because there is only the init_net namespace */
-static inline int net_eq(const struct net *net1, const struct net *net2) {
- return 1; }
-
-typedef struct { unsigned dummy; } possible_net_t;
-
-struct net *get_net_ns_by_pid(pid_t pid);
-struct net *get_net_ns_by_fd(int pid);
-
-int register_pernet_subsys(struct pernet_operations *);
-void unregister_pernet_subsys(struct pernet_operations *);
-int register_pernet_device(struct pernet_operations *);
-void unregister_pernet_device(struct pernet_operations *);
-void release_net(struct net *net);
-
-int rt_genid(struct net *);
-void rt_genid_bump(struct net *);
-
-int peernet2id(struct net *net, struct net *peer);
-int peernet2id_alloc(struct net *net, struct net *peer);
-struct net *get_net_ns_by_id(struct net *net, int id);
-bool peernet_has_id(struct net *net, struct net *peer);
-
-
-/*************************
- ** net/netns/generic.h **
- *************************/
-
-enum { MAX_NET_GENERIC_PTR = 16, };
-
-struct net_generic
-{
- unsigned int len;
- void *ptr[0];
-};
-
-void *net_generic(const struct net *net, unsigned int id);
-
-
-/********************
- ** linux/socket.h **
- ********************/
-
-struct sockaddr;
-
-
-/****************************
- ** uapi/linux/netdevice.h **
- ****************************/
-
-#define MAX_ADDR_LEN 32
-
-static inline struct net *dev_net(const struct net_device *dev) {
- return &init_net; }
-
-
-/***********************
- ** linux/netdevice.h **
- ***********************/
-
-enum {
- NETDEV_ALIGN = 32,
-
- NETDEV_UP = 0x0001,
- NETDEV_DOWN = 0x0002,
- NETDEV_REBOOT = 0x0003,
- NETDEV_CHANGE = 0x0004,
- NETDEV_REGISTER = 0x0005,
- NETDEV_UNREGISTER = 0x0006,
- NETDEV_CHANGEMTU = 0x0007,
- NETDEV_CHANGEADDR = 0x0008,
- NETDEV_GOING_DOWN = 0x0009,
- NETDEV_CHANGENAME = 0x000A,
- NETDEV_FEAT_CHANGE = 0x000B,
- NETDEV_BONDING_FAILOVER = 0x000C,
- NETDEV_PRE_UP = 0x000D,
- NETDEV_PRE_TYPE_CHANGE = 0x000E,
- NETDEV_POST_TYPE_CHANGE = 0x000F,
- NETDEV_POST_INIT = 0x0010,
- NETDEV_UNREGISTER_FINAL = 0x0011,
- NETDEV_RELEASE = 0x0012,
- NETDEV_NOTIFY_PEERS = 0x0013,
- NETDEV_JOIN = 0x0014,
- NETDEV_CHANGEUPPER = 0x0015,
- NETDEV_RESEND_IGMP = 0x0016,
- NETDEV_CHANGEINFODATA = 0x0018,
- NETDEV_BONDING_INFO = 0x0019,
- NETDEV_CHANGELOWERSTATE = 0x001B,
- NETDEV_CHANGE_TX_QUEUE_LEN = 0x001E,
-};
-
-enum {
- NET_NAME_UNKNOWN = 0,
- NET_NAME_ENUM = 1,
- NET_NAME_USER = 3,
-};
-
-enum netdev_priv_flags
-{
- IFF_EBRIDGE = 1<<1,
- IFF_NO_QUEUE = 1<<21,
-
-};
-
-
-#include
-
-#define netif_err(priv, type, dev, fmt, args...) lx_printf("netif_err: " fmt, ## args);
-#define netif_info(priv, type, dev, fmt, args...) lx_printf("netif_info: " fmt, ## args);
-
-#define netdev_err(dev, fmt, args...) lx_printf("nedev_err: " fmt, ##args)
-#define netdev_warn(dev, fmt, args...) lx_printf("nedev_warn: " fmt, ##args)
-#define netdev_info(dev, fmt, args...) lx_printf("nedev_info: " fmt, ##args)
-
-#define netdev_for_each_mc_addr(a, b) if (0)
-
-#if DEBUG_LINUX_PRINTK
-#define netif_dbg(priv, type, dev, fmt, args...) lx_printf("netif_dbg: " fmt, ## args)
-#define netdev_dbg(dev, fmt, args...) lx_printf("netdev_dbg: " fmt, ##args)
-#else
-#define netif_dbg(priv, type, dev, fmt, args...)
-#define netdev_dbg(dev, fmt, args...)
-#endif
-
-#define SET_NETDEV_DEV(net, pdev) ((net)->dev.parent = (pdev))
-#define SET_NETDEV_DEVTYPE(net, devtype) ((net)->dev.type = (devtype))
-
-enum netdev_tx {
- NETDEV_TX_OK = 0,
- NETDEV_TX_BUSY = 0x10,
-};
-typedef enum netdev_tx netdev_tx_t;
-
-enum {
- NET_RX_SUCCESS = 0,
- NET_ADDR_RANDOM = 1,
- NET_ADDR_SET = 3,
-
- NET_XMIT_DROP = 0x01,
- NET_XMIT_CN = 0x02,
-
- NETIF_MSG_DRV = 0x1,
- NETIF_MSG_PROBE = 0x2,
- NETIF_MSG_LINK = 0x4,
-
-};
-
-#define net_xmit_errno(e) ((e) != NET_XMIT_CN ? -ENOBUFS : 0)
-
-struct ifreq;
-typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
- struct sk_buff *skb);
-
-struct ifla_vf_info;
-struct ifla_vf_stats;
-struct nlattr;
-struct ndmsg;
-struct netlink_callback;
-struct nlmsghdr;
-
-struct netdev_phys_item_id;
-
-struct netlink_ext_ack;
-
-struct netdev_bpf
-{
- struct {
- u8 prog_attached;
- u32 prog_id;
- /* flags with which program was installed */
- // u32 prog_flags;
- };
-};
-
-struct rtnl_link_stats64;
-
-struct net_device_ops
-{
- int (*ndo_init)(struct net_device *dev);
- void (*ndo_uninit)(struct net_device *dev);
- int (*ndo_open)(struct net_device *dev);
- int (*ndo_stop)(struct net_device *dev);
- netdev_tx_t (*ndo_start_xmit) (struct sk_buff *skb, struct net_device *dev);
- u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb,
- void *accel_priv,
- select_queue_fallback_t fallback);
- void (*ndo_set_rx_mode)(struct net_device *dev);
- int (*ndo_set_mac_address)(struct net_device *dev, void *addr);
- int (*ndo_validate_addr)(struct net_device *dev);
- int (*ndo_do_ioctl)(struct net_device *dev, struct ifreq *ifr, int cmd);
- int (*ndo_set_config)(struct net_device *dev,
- struct ifmap *map);
- void (*ndo_tx_timeout) (struct net_device *dev);
- int (*ndo_change_mtu)(struct net_device *dev, int new_mtu);
- void (*ndo_get_stats64)(struct net_device *dev,
- struct rtnl_link_stats64 *storage);
- bool (*ndo_has_offload_stats)(const struct net_device *dev, int attr_id);
- int (*ndo_get_offload_stats)(int attr_id,
- const struct net_device *dev,
- void *attr_data);
- int (*ndo_set_features)(struct net_device *dev, netdev_features_t features);
- int (*ndo_set_vf_mac)(struct net_device *dev,
- int queue, u8 *mac);
- int (*ndo_set_vf_vlan)(struct net_device *dev,
- int queue, u16 vlan, u8 qos, __be16 proto);
- int (*ndo_set_vf_rate)(struct net_device *dev,
- int vf, int min_tx_rate,
- int max_tx_rate);
- int (*ndo_set_vf_tx_rate)(struct net_device *dev,
- int vf, int rate);
- int (*ndo_set_vf_spoofchk)(struct net_device *dev,
- int vf, bool setting);
- int (*ndo_set_vf_trust)(struct net_device *dev,
- int vf, bool setting);
- int (*ndo_get_vf_config)(struct net_device *dev,
- int vf,
- struct ifla_vf_info *ivf);
- int (*ndo_set_vf_link_state)(struct net_device *dev,
- int vf, int link_state);
- int (*ndo_get_vf_stats)(struct net_device *dev,
- int vf, struct ifla_vf_stats *vf_stats);
- int (*ndo_set_vf_port)(struct net_device *dev, int vf,
- struct nlattr *port[]);
- int (*ndo_get_vf_port)(struct net_device *dev,
- int vf, struct sk_buff *skb);
- int (*ndo_set_vf_guid)(struct net_device *dev, int vf, u64 guid, int guid_type);
- int (*ndo_set_vf_rss_query_en)(struct net_device *dev,
- int vf, bool setting);
- int (*ndo_del_slave)(struct net_device *dev,
- struct net_device *slave_dev);
- int (*ndo_add_slave)(struct net_device *dev,
- struct net_device *slave_dev,
- struct netlink_ext_ack *extack);
- int (*ndo_fdb_add)(struct ndmsg *ndm,
- struct nlattr *tb[],
- struct net_device *dev,
- const unsigned char *addr,
- u16 vid,
- u16 flags);
- int (*ndo_fdb_del)(struct ndmsg *ndm,
- struct nlattr *tb[],
- struct net_device *dev,
- const unsigned char *addr,
- u16 vid);
- int (*ndo_fdb_dump)(struct sk_buff *skb,
- struct netlink_callback *cb,
- struct net_device *dev,
- struct net_device *filter_dev,
- int *idx);
- int (*ndo_bridge_setlink)(struct net_device *dev,
- struct nlmsghdr *nlh,
- u16 flags);
- int (*ndo_bridge_getlink)(struct sk_buff *skb,
- u32 pid, u32 seq,
- struct net_device *dev,
- u32 filter_mask,
- int nlflags);
- int (*ndo_bridge_dellink)(struct net_device *dev,
- struct nlmsghdr *nlh,
- u16 flags);
- int (*ndo_get_iflink)(const struct net_device *dev);
- // int (*ndo_change_proto_down)(struct net_device *dev,
- // bool proto_down);
- int (*ndo_bpf)(struct net_device *dev, struct netdev_bpf *bpf);
-};
-
-struct net_device_stats
-{
- unsigned long rx_packets;
- unsigned long tx_packets;
- unsigned long rx_bytes;
- unsigned long tx_bytes;
- unsigned long rx_errors;
- unsigned long tx_errors;
- unsigned long rx_dropped;
- unsigned long tx_dropped;
- unsigned long rx_length_errors;
- unsigned long rx_over_errors;
- unsigned long rx_crc_errors;
- unsigned long rx_frame_errors;
-};
-
-struct netdev_hw_addr_list {
- struct list_head list;
- int count;
-};
-
-#define netdev_hw_addr_list_count(l) ((l)->count)
-#define netdev_hw_addr_list_empty(l) (netdev_hw_addr_list_count(l) == 0)
-#define netdev_hw_addr_list_for_each(ha, l) \
- list_for_each_entry(ha, &(l)->list, list)
-
-
-enum {
- GSO_MAX_SIZE = 65536,
- GSO_MAX_SEGS = 65535,
-};
-
-struct Qdisc;
-
-struct netdev_queue
-{
- struct net_device *dev;
- int numa_node;
-
- unsigned long state;
-};
-
-enum {
- NETDEV_QUEUE_START = 1<<1,
-};
-
-struct pcpu_sw_netstats {
- u64 rx_packets;
- u64 rx_bytes;
- u64 tx_packets;
- u64 tx_bytes;
- struct u64_stats_sync syncp;
-};
-
-#define netdev_alloc_pcpu_stats(type) alloc_percpu(type)
-
-/* NET_DEVICE */
-struct net_device
-{
- char name[IFNAMSIZ];
- char *ifalias;
-
- unsigned long mem_end; /* shared mem end */
- unsigned long mem_start; /* shared mem start */
- unsigned long base_addr; /* device I/O address */
- int irq; /* device IRQ number */
-
- atomic_t carrier_changes;
-
- u32 features;
- u32 hw_features;
-
- struct net_device_stats stats;
- atomic_long_t tx_dropped;
-
- atomic_t carrier_up_count;
- atomic_t carrier_down_count;
-
- const struct net_device_ops *netdev_ops;
- const struct ethtool_ops *ethtool_ops;
-
- unsigned long state;
- struct list_head dev_list;
- int iflink;
- int ifindex;
-
- const struct header_ops *header_ops;
-
- unsigned int flags;
- unsigned int priv_flags;
- unsigned short gflags;
- unsigned char operstate;
- unsigned char link_mode;
-
- unsigned char if_port; /* Selectable AUI, TP,..*/
- unsigned char dma; /* DMA channel */
- unsigned short hard_header_len; /* hardware hdr length */
- unsigned char min_header_len;
- unsigned int mtu;
- unsigned int min_mtu;
- unsigned int max_mtu;
- unsigned short type;
- unsigned short needed_headroom;
- unsigned short needed_tailroom;
- unsigned char perm_addr[MAX_ADDR_LEN];
- unsigned char addr_assign_type;
- unsigned char addr_len;
- struct netdev_hw_addr_list uc; /* Unicast mac addresses */
- struct netdev_hw_addr_list mc;
-
- unsigned int promiscuity;
- struct wireless_dev *ieee80211_ptr;
-
- unsigned char *dev_addr;
- unsigned char _dev_addr[ETH_ALEN];
-
- struct bpf_prog *xdp_prog;
-
- unsigned int real_num_tx_queues;
- struct netdev_queue *_tx;
-
- struct netdev_queue __rcu *ingress_queue;
- unsigned char broadcast[MAX_ADDR_LEN];
-
- unsigned int num_tx_queues;
-
- struct Qdisc *qdisc;
-
- unsigned long tx_queue_len;
- unsigned long trans_start; /* Time (in jiffies) of last Tx */
-
- int watchdog_timeo; /* used by dev_watchdog() */
- struct hlist_node index_hlist;
-
- enum {
- NETREG_UNINITIALIZED=0,
- NETREG_REGISTERED,
- // NETREG_UNREGISTERING,
- // NETREG_UNREGISTERED,
- // NETREG_RELEASED,
- NETREG_DUMMY,
- } reg_state;
-
- union {
- struct pcpu_sw_netstats *tstats;
- };
-
- enum {
- RTNL_LINK_INITIALIZED,
- RTNL_LINK_INITIALIZING,
- } rtnl_link_state:16;
-
- bool needs_free_netdev;
-
- void (*priv_destructor)(struct net_device *dev);
- const struct rtnl_link_ops *rtnl_link_ops;
-
- unsigned int gso_max_size;
- u16 gso_max_segs;
-
- struct device dev;
- void *priv;
- unsigned net_ip_align;
-
- struct phy_device *phydev;
-
- int group;
-
- void *lx_nic_device; /* our own Nic_device */
-
- bool proto_down;
-};
-
-
-struct netdev_hw_addr
-{
- struct list_head list;
- unsigned char addr[MAX_ADDR_LEN];
-};
-
-enum netdev_state_t {
- __LINK_STATE_START,
- __LINK_STATE_PRESENT,
- __LINK_STATE_NOCARRIER,
- __LINK_STATE_LINKWATCH_PENDING,
- __LINK_STATE_DORMANT,
-};
-
-#define netif_msg_tx_err(p) ({ printk("netif_msg_tx_err called not implemented\n"); 0; })
-#define netif_msg_rx_err(p) ({ printk("netif_msg_rx_err called not implemented\n"); 0; })
-#define netif_msg_tx_queued(p) ({ printk("netif_msg_tx_queued called not implemented\n"); 0; })
-
-u32 netif_msg_init(int, int);
-
-static inline void *netdev_priv(const struct net_device *dev) { return dev->priv; }
-
-int netif_running(const struct net_device *);
-int netif_carrier_ok(const struct net_device *dev);
-int netif_device_present(struct net_device *);
-
-void netif_carrier_on(struct net_device *dev);
-void netif_carrier_off(struct net_device *dev);
-
-void netif_device_detach(struct net_device *);
-void netif_start_queue(struct net_device *);
-void netif_stop_queue(struct net_device *);
-void netif_wake_queue(struct net_device *);
-void netif_device_attach(struct net_device *);
-int dev_addr_init(struct net_device *dev);
-void dev_uc_init(struct net_device *dev);
-void dev_mc_init(struct net_device *dev);
-void free_netdev(struct net_device *);
-int netif_rx(struct sk_buff *);
-int netif_rx_ni(struct sk_buff *skb);
-int netif_receive_skb(struct sk_buff *skb);
-void netif_tx_start_queue(struct netdev_queue *dev_queue);
-void netif_tx_stop_queue(struct netdev_queue *dev_queue);
-void netif_tx_start_all_queues(struct net_device *dev);
-void netif_tx_stop_all_queues(struct net_device *dev);
-void netif_tx_wake_all_queues(struct net_device *);
-void __netif_tx_lock_bh(struct netdev_queue *txq);
-void __netif_tx_unlock_bh(struct netdev_queue *txq);
-void netif_start_subqueue(struct net_device *dev, u16 queue_index);
-void netif_stop_subqueue(struct net_device *dev, u16 queue_index);
-void netif_wake_subqueue(struct net_device *dev, u16 queue_index);
-bool netif_dormant(const struct net_device *dev);
-netdev_features_t netif_skb_features(struct sk_buff *skb);
-bool netif_supports_nofcs(struct net_device *dev);
-bool netif_xmit_frozen_or_stopped(const struct netdev_queue *dev_queue);
-bool netif_xmit_frozen_or_drv_stopped(const struct netdev_queue *dev_queue);
-
-void netif_set_gso_max_size(struct net_device *dev, unsigned int size);
-
-static inline void netif_addr_lock_bh(struct net_device *dev) { }
-static inline void netif_addr_unlock_bh(struct net_device *dev) { }
-
-static inline void netdev_set_default_ethtool_ops(struct net_device *dev,
- const struct ethtool_ops *ops)
-{
- dev->ethtool_ops = ops;
-}
-int netdev_mc_empty(struct net_device *);
-unsigned netdev_mc_count(struct net_device * dev);
-int register_netdev(struct net_device *);
-void unregister_netdev(struct net_device *);
-void netdev_rx_csum_fault(struct net_device *dev);
-void netdev_run_todo(void);
-int register_netdevice(struct net_device *dev);
-void unregister_netdevice_many(struct list_head *head);
-void unregister_netdevice_queue(struct net_device *dev, struct list_head *head);
-static inline void unregister_netdevice(struct net_device *dev)
-{
- unregister_netdevice_queue(dev, NULL);
-}
-struct net_device *netdev_master_upper_dev_get(struct net_device *dev);
-void netdev_state_change(struct net_device *dev);
-int call_netdevice_notifiers(unsigned long val, struct net_device *dev);
-struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, unsigned char name_assign_type,
- void (*setup)(struct net_device *), unsigned int txqs, unsigned int rxqs);
-struct netdev_notifier_info;
-struct net_device * netdev_notifier_info_to_dev(struct netdev_notifier_info *info);
-int register_netdevice_notifier(struct notifier_block *nb);
-int unregister_netdevice_notifier(struct notifier_block *nb);
-struct netdev_queue *netdev_get_tx_queue(const struct net_device *dev, unsigned int index);
-u16 netdev_cap_txqueue(struct net_device *dev, u16 queue_index);
-
-static inline bool netdev_uses_dsa_tags(struct net_device *dev) { return false; }
-static inline bool netdev_uses_trailer_tags(struct net_device *dev) { return false; }
-int __init netdev_boot_setup(char *str);
-
-void synchronize_net(void);
-
-void ether_setup(struct net_device *dev);
-
-void dev_put(struct net_device *dev);
-void dev_hold(struct net_device *dev);
-struct net_device *__dev_get_by_index(struct net *net, int ifindex);
-struct net_device *__dev_get_by_name(struct net *net, const char *name);
-struct net_device *dev_get_by_index(struct net *net, int ifindex);
-struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);
-struct net_device *dev_get_by_name(struct net *net, const char *name);
-struct net_device *dev_get_by_name_rcu(struct net *net, const char *name);
-int dev_queue_xmit(struct sk_buff *skb);
-struct netdev_phys_port_id;
-int dev_get_phys_port_id(struct net_device *dev, struct netdev_phys_item_id *ppid);
-unsigned int dev_get_flags(const struct net_device *);
-struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, struct rtnl_link_stats64 *storage);
-int dev_change_net_namespace(struct net_device *, struct net *, const char *);
-int dev_alloc_name(struct net_device *dev, const char *name);
-void dev_close(struct net_device *dev);
-int dev_set_mac_address(struct net_device *, struct sockaddr *);
-int dev_set_mtu(struct net_device *, int);
-int dev_set_promiscuity(struct net_device *dev, int inc);
-int dev_set_allmulti(struct net_device *dev, int inc);
-void dev_set_group(struct net_device *, int);
-int dev_change_name(struct net_device *, const char *);
-int dev_set_alias(struct net_device *, const char *, size_t);
-int dev_get_alias(const struct net_device *, char *, size_t);
-int __dev_change_flags(struct net_device *, unsigned int flags);
-void __dev_notify_flags(struct net_device *, unsigned int old_flags, unsigned int gchanges);
-int dev_change_flags(struct net_device *, unsigned int);
-int dev_change_carrier(struct net_device *, bool new_carrier);
-void dev_net_set(struct net_device *dev, struct net *net);
-struct packet_type;
-void dev_add_pack(struct packet_type *pt);
-void __dev_remove_pack(struct packet_type *pt);
-void dev_remove_pack(struct packet_type *pt);
-bool dev_xmit_complete(int rc);
-int dev_hard_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, const void *daddr, const void *saddr, unsigned int len);
-int dev_parse_header(const struct sk_buff *skb, unsigned char *haddr);
-void dev_set_uevent_suppress(struct device *dev, int val);
-
-int dev_uc_add(struct net_device *dev, const unsigned char *addr);
-int dev_uc_add_excl(struct net_device *dev, const unsigned char *addr);
-int dev_uc_del(struct net_device *dev, const unsigned char *addr);
-int dev_mc_add(struct net_device *dev, const unsigned char *addr);
-int dev_mc_add_excl(struct net_device *dev, const unsigned char *addr);
-int dev_mc_del(struct net_device *dev, const unsigned char *addr);
-
-int dev_change_proto_down(struct net_device *dev, bool proto_down);
-int dev_get_iflink(const struct net_device *dev);
-int dev_get_phys_port_name(struct net_device *dev, char *name, size_t len);
-
-typedef int (*bpf_op_t)(struct net_device *dev, struct netdev_bpf *bpf);
-int dev_change_xdp_fd(struct net_device *dev, struct netlink_ext_ack *extack, int fd, u32 flags);
-void __dev_xdp_query(struct net_device *dev, bpf_op_t xdp_op, struct netdev_bpf *xdp);
-
-int dev_change_tx_queue_len(struct net_device *, unsigned long);
-bool dev_validate_header(const struct net_device *dev, char *ll_header, int len);
-
-void dev_consume_skb_any(struct sk_buff *skb);
-
-enum {
- LL_MAX_HEADER = 96, /* XXX check CONFIG_WLAN_MESH */
-};
-
-struct hh_cache
-{
- u16 hh_len;
- u16 __pad;
- seqlock_t hh_lock;
-
- /* cached hardware header; allow for machine alignment needs. */
-#define HH_DATA_MOD 16
-#define HH_DATA_OFF(__len) \
- (HH_DATA_MOD - (((__len - 1) & (HH_DATA_MOD - 1)) + 1))
-#define HH_DATA_ALIGN(__len) \
- (((__len)+(HH_DATA_MOD-1))&~(HH_DATA_MOD - 1))
- unsigned long hh_data[HH_DATA_ALIGN(LL_MAX_HEADER) / sizeof(long)];
-
-};
-
-extern rwlock_t dev_base_lock;
-
-#define for_each_netdev(net, d) \
- list_for_each_entry(d, &(net)->dev_base_head, dev_list)
-#define for_each_netdev_safe(net, d, n) \
- list_for_each_entry_safe(d, n, &(net)->dev_base_head, dev_list)
-#define for_each_netdev_rcu(net, d) \
- list_for_each_entry_rcu(d, &(net)->dev_base_head, dev_list)
-
-#define net_device_entry(lh) list_entry(lh, struct net_device, dev_list)
-
-static inline struct net_device *first_net_device(struct net *net)
-{
- return list_empty(&net->dev_base_head) ? NULL :
- net_device_entry(net->dev_base_head.next);
-}
-
-#define NAPI_GRO_CB(skb) ((struct napi_gro_cb *)(skb)->cb)
-
-enum {
- NAPI_GRO_FREE = 1,
- NAPI_GRO_FREE_STOLEN_HEAD = 2,
-};
-
-struct napi_gro_cb
-{
- u16 flush;
- u16 count;
- u8 same_flow;
- u8 free;
- struct sk_buff *last;
-};
-
-struct neighbour;
-
-struct header_ops {
- int (*create) (struct sk_buff *skb, struct net_device *dev,
- unsigned short type, const void *daddr,
- const void *saddr, unsigned int len);
- int (*parse)(const struct sk_buff *skb, unsigned char *haddr);
- int (*rebuild)(struct sk_buff *skb);
- int (*cache)(const struct neighbour *neigh, struct hh_cache *hh, __be16 type);
- void (*cache_update)(struct hh_cache *hh,
- const struct net_device *dev,
- const unsigned char *haddr);
-};
-
-extern struct kobj_ns_type_operations net_ns_type_operations;
-
-enum skb_free_reason {
- SKB_REASON_CONSUMED,
- SKB_REASON_DROPPED,
-};
-
-void consume_skb(struct sk_buff *skb);
-unsigned int skb_gro_offset(const struct sk_buff *skb);
-unsigned int skb_gro_len(const struct sk_buff *skb);
-__be16 skb_network_protocol(struct sk_buff *skb, int *depth);
-bool can_checksum_protocol(netdev_features_t features, __be16 protocol);
-
-struct sk_buff *validate_xmit_skb_list(struct sk_buff *skb, struct net_device *dev, bool *again);
-
-static inline void dev_kfree_skb_any(struct sk_buff *skb)
-{
- consume_skb(skb);
-}
-
-struct packet_type
-{
- __be16 type; /* This is really htons(ether_type). */
- struct net_device *dev; /* NULL is wildcarded here */
- int (*func) (struct sk_buff *,
- struct net_device *,
- struct packet_type *,
- struct net_device *);
- bool (*id_match)(struct packet_type *ptype,
- struct sock *sk);
- void *af_packet_priv;
- struct list_head list;
-};
-
-enum {
- MAX_PHYS_PORT_ID_LEN = 32,
-};
-
-struct netdev_phys_port_id {
- unsigned char id[MAX_PHYS_PORT_ID_LEN];
- unsigned char id_len;
-};
-
-/* XXX */ size_t LL_RESERVED_SPACE(struct net_device*);
-
-bool net_gso_ok(netdev_features_t features, int gso_type);
-void net_enable_timestamp(void);
-void net_disable_timestamp(void);
-void txq_trans_update(struct netdev_queue *txq);
-int __hw_addr_sync(struct netdev_hw_addr_list *to_list, struct netdev_hw_addr_list *from_list, int addr_len);
-void __hw_addr_unsync(struct netdev_hw_addr_list *to_list, struct netdev_hw_addr_list *from_list, int addr_len);
-void __hw_addr_init(struct netdev_hw_addr_list *list);
-
-struct napi_struct
-{
- int (*poll)(struct napi_struct *, int);
- struct net_device *dev;
-};
-
-enum { MAX_PHYS_ITEM_ID_LEN = 32 };
-
-struct netdev_phys_item_id {
- unsigned char id[MAX_PHYS_ITEM_ID_LEN];
- unsigned char id_len;
-};
-
-struct offload_callbacks {
- struct sk_buff *(*gso_segment)(struct sk_buff *skb, netdev_features_t features);
- struct sk_buff **(*gro_receive)(struct sk_buff **head, struct sk_buff *skb);
- int (*gro_complete)(struct sk_buff *skb, int nhoff);
-};
-
-struct packet_offload
-{
- __be16 type;
- u16 priority;
- struct offload_callbacks callbacks;
- struct list_head list;
-};
-
-/* XXX */
-#define HARD_TX_LOCK(dev, txq, cpu)
-#define HARD_TX_UNLOCK(dev, txq)
-
-void netif_napi_add(struct net_device *dev, struct napi_struct *napi,
- int (*poll)(struct napi_struct *, int), int weight);
-void netif_napi_del(struct napi_struct *napi);
-
-typedef int gro_result_t;
-
-gro_result_t napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb);
-void napi_gro_flush(struct napi_struct *napi, bool flush_old);
-
-int init_dummy_netdev(struct net_device *dev);
-
-void dev_add_offload(struct packet_offload *po);
-
-struct net_device *netdev_master_upper_dev_get_rcu(struct net_device *dev);
-
-void netdev_rss_key_fill(void *buffer, size_t len);
-
-struct packet_offload *gro_find_complete_by_type(__be16 type);
-struct packet_offload *gro_find_receive_by_type(__be16 type);
-void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff **pp, int flush);
-void *skb_gro_header_fast(struct sk_buff *skb, unsigned int offset);
-int skb_gro_header_hard(struct sk_buff *skb, unsigned int hlen);
-void *skb_gro_header_slow(struct sk_buff *skb, unsigned int hlen, unsigned int offset);
-
-void skb_gro_pull(struct sk_buff *skb, unsigned int len);
-void skb_gro_postpull_rcsum(struct sk_buff *skb, const void *start, unsigned int len);
-typedef struct sk_buff **(*gro_receive_t)(struct sk_buff **, struct sk_buff *);
-struct sk_buff **call_gro_receive(gro_receive_t cb, struct sk_buff **head, struct sk_buff *skb);
-int dev_recursion_level(void);
-
-struct sk_buff *skb_gso_segment(struct sk_buff *skb, netdev_features_t features);
-int skb_checksum_help(struct sk_buff *skb);
-
-struct netdev_queue *skb_get_tx_queue(const struct net_device *dev, const struct sk_buff *skb);
-
-netdev_tx_t netdev_start_xmit(struct sk_buff *skb, struct net_device *dev, struct netdev_queue *txq, bool more);
-
-
-/*************************
- ** linux/percpu-defs.h **
- *************************/
-
-#define DECLARE_PER_CPU_ALIGNED(type, name) \
- extern typeof(type) name
-
-#define DEFINE_PER_CPU_ALIGNED(type, name) \
- typeof(type) name
-
-#define DEFINE_PER_CPU(type, name) \
- typeof(type) name
-
-#define EXPORT_PER_CPU_SYMBOL(x)
-
-
-/*********************
- ** linux/lockdep.h **
- *********************/
-
-#include
-
-
-/*****************************
- ** uapi/linux/capability.h **
- *****************************/
-
-enum {
- CAP_NET_BROADCAST = 11,
- CAP_NET_ADMIN = 12,
- CAP_NET_RAW = 13,
- CAP_IPC_LOCK = 14,
- CAP_SYS_ADMIN = 21,
-};
-
-bool capable(int cap);
-bool ns_capable(struct user_namespace *ns, int cap);
-
-
-/************************
- ** linux/capability.h **
- ************************/
-
-bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap);
-
-
-/******************
- ** linux/stat.h **
- ******************/
-
-#define S_IFMT 00170000
-#define S_IFSOCK 0140000
-
-#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
-
-#define S_IRUGO 00444
-#define S_IWUSR 00200
-#define S_IRUSR 00400
-
-
-/****************
- ** linux/fs.h **
- ****************/
-
-struct fown_struct { unsigned unused; };
-
-struct file {
- unsigned int f_flags;
- const struct cred *f_cred;
- struct fown_struct f_owner;
- void *private_data;
-};
-
-typedef unsigned fl_owner_t;
-
-struct inode;
-
-struct inode *file_inode(struct file *f);
-
-struct file_operations {
- struct module *owner;
- int (*open) (struct inode *, struct file *);
- ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
- loff_t (*llseek) (struct file *, loff_t, int);
- unsigned int (*poll) (struct file *, struct poll_table_struct *);
- long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
- int (*flush) (struct file *, fl_owner_t id);
- int (*release) (struct inode *, struct file *);
- ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
- int (*fasync) (int, struct file *, int);
- long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
-};
-
-static inline loff_t no_llseek(struct file *file, loff_t offset, int origin) {
- return -ESPIPE; }
-int nonseekable_open(struct inode * inode, struct file * filp);
-
-struct inode
-{
- umode_t i_mode;
- kuid_t i_uid;
- unsigned long i_ino;
-};
-
-int send_sigurg(struct fown_struct *fown);
-
-typedef struct
-{
-} read_descriptor_t;
-
-
-/*************************
- ** asm-generic/fcntl.h **
- *************************/
-
-enum { O_NONBLOCK = 0x4000 };
-
-
-/*****************************
- ** linux/platform_device.h **
- *****************************/
-
-struct platform_device {
- char * name;
- int id;
-
- struct device dev;
-
- u32 num_resources;
- struct resource * resource;
-
-};
-
-void *platform_get_drvdata(const struct platform_device *pdev);
-void platform_set_drvdata(struct platform_device *pdev, void *data);
-struct platform_device *platform_device_register_simple( const char *name, int id, const struct resource *res, unsigned int num);
-void platform_device_unregister(struct platform_device *);
-
-#define module_platform_driver(x)
-
-
-/************************
- ** linux/tracepoint.h **
- ************************/
-
-#define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print)
-#define DEFINE_EVENT(template, name, proto, args) \
- static inline void trace_##name(proto) { }
-#define TRACE_EVENT(name, proto, args, struct, assign, print) \
- static inline void trace_##name(proto) { }
-
-/* needed by drivers/net/wireless/iwlwifi/iwl-devtrace.h */
-#define TP_PROTO(args...) args
-
-#define TRACE_DEFINE_ENUM(x)
-#define TRACE_DEFINE_SIZEOF(x)
-
-
-/********************
- ** linux/dcache.h **
- ********************/
-
-struct qstr {
- const unsigned char *name;
-};
-
-struct dentry {
- struct inode *d_inode;
- struct qstr d_name;
- struct list_head d_subdirs;
- spinlock_t d_lock;
- struct dentry *d_parent;
- union { struct list_head d_child; } d_u;
-};
-
-
-/*********************
- ** linux/utsname.h **
- *********************/
-
-#define __NEW_UTS_LEN 64
-
-struct new_utsname {
- char sysname[__NEW_UTS_LEN + 1];
- char release[__NEW_UTS_LEN + 1];
-};
-
-struct new_utsname *init_utsname(void);
-struct new_utsname *utsname(void);
-
-
-/***************************
- ** linux/dma-direction.h **
- ***************************/
-
-enum dma_data_direction
-{
- DMA_BIDIRECTIONAL = 0,
- DMA_TO_DEVICE = 1,
- DMA_FROM_DEVICE = 2
-};
-
-
-/**************************************
- ** asm-generic/dma-mapping-common.h **
- **************************************/
-
-dma_addr_t dma_map_page(struct device *dev, struct page *page, size_t offset, size_t size, enum dma_data_direction dir);
-void dma_unmap_page(struct device *dev, dma_addr_t addr, size_t size, enum dma_data_direction dir);
-dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, enum dma_data_direction dir);
-void dma_unmap_single(struct device *dev, dma_addr_t addr, size_t size, enum dma_data_direction dir);
-
-struct scatterlist;
-int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir);
-void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir);
-void dma_sync_single_for_cpu(struct device *dev, dma_addr_t addr, size_t size, enum dma_data_direction dir);
-void dma_sync_single_for_device(struct device *dev, dma_addr_t addr, size_t size, enum dma_data_direction dir);
-void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, enum dma_data_direction dir);
-void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, enum dma_data_direction dir);
-
-
-/***********************
- ** asm/dma-mapping.h **
- ***********************/
-
-int dma_supported(struct device *hwdev, u64 mask);
-int dma_set_mask(struct device *dev, u64 mask);
-int dma_mapping_error(struct device *dev, dma_addr_t dma_addr);
-void *dma_alloc_coherent(struct device *, size_t size, dma_addr_t *dma, gfp_t);
-void dma_free_coherent(struct device *, size_t size, void *vaddr, dma_addr_t bus);
-
-
-/*************************
- ** linux/dma-mapping.h **
- *************************/
-
-#define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME
-#define DEFINE_DMA_UNMAP_LEN(LEN_NAME) u32 LEN_NAME
-#define dma_unmap_addr(PTR, ADDR_NAME) ((PTR)->ADDR_NAME)
-#define dma_unmap_addr_set(PTR, ADDR_NAME, VAL) (((PTR)->ADDR_NAME) = (VAL))
-#define dma_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME)
-#define dma_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL))
-
-#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
-
-int dma_set_coherent_mask(struct device *dev, u64 mask);
-void *dma_zalloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag);
-static inline int is_device_dma_capable(struct device *dev) { return *dev->dma_mask; }
-
-
-/************************
- ** linux/completion.h **
- ************************/
-
-struct completion
-{
- unsigned done;
- void *task;
-};
-
-long __wait_completion(struct completion *work, unsigned long timeout);
-void complete(struct completion *);
-void complete_all(struct completion *);
-void init_completion(struct completion *x);
-int wait_for_completion_killable(struct completion *x);
-unsigned long wait_for_completion_timeout(struct completion *x, unsigned long timeout);
-void wait_for_completion(struct completion *x);
-int wait_for_completion_interruptible(struct completion *x);
-long wait_for_completion_interruptible_timeout(struct completion *x, unsigned long timeout);
-long wait_for_completion_killable_timeout(struct completion *x, unsigned long timeout);
-void reinit_completion(struct completion *x);
-
-
-
-/**********************
- ** linux/firmware.h **
- **********************/
-
-struct firmware {
- size_t size;
- const u8 *data;
- struct page **pages;
-
- void *priv;
-};
-
-int request_firmware(const struct firmware **fw, const char *name, struct device *device);
-void release_firmware(const struct firmware *fw);
-int request_firmware_nowait( struct module *module, bool uevent, const char *name, struct device *device, gfp_t gfp, void *context, void (*cont)(const struct firmware *fw, void *context));
-
-
-/********************
- ** linux/ioport.h **
- ********************/
-
-#include
-
-
-/***********************
- ** linux/irqreturn.h **
- ***********************/
-
-#include
-
-/***********************
- ** linux/interrupt.h **
- ***********************/
-
-enum {
- NET_TX_SOFTIRQ,
- NET_RX_SOFTIRQ,
- NET_SOFTIRQS,
-};
-
-#define IRQF_SHARED 0x00000080
-
-int request_irq(unsigned int irq, irq_handler_t handler, unsigned long flags, const char *name, void *dev);
-void free_irq(unsigned int, void *);
-int request_threaded_irq(unsigned int irq, irq_handler_t handler, irq_handler_t thread_fn, unsigned long flags, const char *name, void *dev);
-
-#define devm_request_threaded_irq(__device__, ...) request_threaded_irq(__VA_ARGS__)
-
-void tasklet_disable(struct tasklet_struct *t);
-void tasklet_enable(struct tasklet_struct *t);
-
-int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m);
-
-
-/***********************
- ** uapi/linux/uuid.h **
- ***********************/
-
-typedef struct uuid_le uuid_le;
-struct uuid_le
-{
- __u8 b[16];
-};
-
-
-/*****************
- ** linux/pci.h **
- *****************/
-
-struct pci_dev;
-
-struct pci_bus
-{
- struct pci_dev *self;
-};
-
-enum { DEVICE_COUNT_RESOURCE = 6 };
-
-struct pci_dev {
- unsigned int devfn;
- unsigned int irq;
- struct resource resource[DEVICE_COUNT_RESOURCE];
- struct pci_bus *bus;
- unsigned short vendor;
- unsigned short device;
- unsigned short subsystem_device;
- unsigned int class;
- struct device dev;
- u8 revision;
- u8 pcie_cap;
- u16 pcie_flags_reg;
-};
-
-#include
-
-void pci_set_drvdata(struct pci_dev *pdev, void *data);
-
-/* XXX needed for iwl device table, maybe remove later? */
-#include
-
-//#include
-
-struct msix_entry {
- u32 vector;
- u16 entry;
-};
-
-void * const *pcim_iomap_table(struct pci_dev *pdev);
-int pcim_enable_device(struct pci_dev *pdev);
-int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask, const char *name);
-
-
-int pci_enable_msix_range(struct pci_dev *dev, struct msix_entry *entries, int minvec, int maxvec);
-int pci_find_ext_capability(struct pci_dev *dev, int cap);
-int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask);
-int pci_set_dma_mask(struct pci_dev *dev, u64 mask);
-struct pci_dev *pcie_find_root_port(struct pci_dev *dev);
-
-struct device_node * pci_device_to_OF_node(const struct pci_dev *pdev);
-
-
- /******************
- ** linux/kmod.h **
- ******************/
-
-int __request_module(bool wait, const char *name, ...);
-int request_module(const char *name, ...);
-#define try_then_request_module(x, mod...) \
- ((x) ?: (__request_module(true, mod), (x)))
-
-
-/*****************
-** linux/uio.h **
-*****************/
-
-enum { UIO_MAXIOV = 1024 };
-
-struct iovec
-{
- void *iov_base;
- __kernel_size_t iov_len;
-};
-
-struct kvec
-{
- void *iov_base;
- size_t iov_len;
-};
-
-struct iov_iter {
- int type;
- size_t iov_offset;
- size_t count;
- union {
- const struct iovec *iov;
- const struct kvec *kvec;
- const struct bio_vec *bvec;
- };
- unsigned long nr_segs;
-};
-
-static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs)
-{
- unsigned long seg;
- size_t ret = 0;
-
- for (seg = 0; seg < nr_segs; seg++)
- ret += iov[seg].iov_len;
- return ret;
-}
-
-static inline size_t iov_iter_count(struct iov_iter *i) {
- return i->count; }
-
-int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len);
-int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len);
-
-void iov_iter_advance(struct iov_iter *i, size_t bytes);
-
-size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes, struct iov_iter *i);
-size_t copy_page_from_iter(struct page *page, size_t offset, size_t bytes, struct iov_iter *i);
-size_t copy_to_iter(void *addr, size_t bytes, struct iov_iter *i);
-size_t copy_from_iter(void *addr, size_t bytes, struct iov_iter *i);
-size_t copy_from_iter_nocache(void *addr, size_t bytes, struct iov_iter *i);
-
-ssize_t iov_iter_get_pages(struct iov_iter *i, struct page **pages,
- size_t maxsize, unsigned maxpages, size_t *start);
-
-size_t csum_and_copy_to_iter(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i);
-size_t csum_and_copy_from_iter(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i);
-
-bool csum_and_copy_from_iter_full(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i);
-bool copy_from_iter_full(void *addr, size_t bytes, struct iov_iter *i);
-bool copy_from_iter_full_nocache(void *addr, size_t bytes, struct iov_iter *i);
-
-void iov_iter_revert(struct iov_iter *i, size_t bytes);
-
-/***********************
- ** linux/if_bridge.h **
- ***********************/
-
-enum {
- BR_HAIRPIN_MODE = BIT(0),
- BR_BPDU_GUARD = BIT(1),
- BR_ROOT_BLOCK = BIT(2),
- BR_MULTICAST_FAST_LEAVE = BIT(3),
- BR_LEARNING = BIT(5),
- BR_FLOOD = BIT(6),
- BR_PROXYARP = BIT(8),
- BR_LEARNING_SYNC = BIT(9),
- BR_PROXYARP_WIFI = BIT(10),
-};
-
-/*********************
- ** linux/if_vlan.h **
- *********************/
-
-enum {
- VLAN_HLEN = 4,
- VLAN_ETH_HLEN = 18,
- VLAN_PRIO_SHIFT = 13,
- VLAN_PRIO_MASK = 0xe000,
- VLAN_VID_MASK = 0x0fff,
-};
-
-struct vlan_hdr
-{
- __be16 h_vlan_TCI;
- __be16 h_vlan_encapsulated_proto;
-};
-
- struct vlan_ethhdr
-{
- __be16 h_vlan_encapsulated_proto;
-};
-
-static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev) { return NULL; }
-
-#define vlan_tx_tag_get(__skb) 0
-struct sk_buff *__vlan_put_tag(struct sk_buff *, u16, u16);
-struct sk_buff *vlan_untag(struct sk_buff *);
-int is_vlan_dev(struct net_device *);
-u16 vlan_tx_tag_present(struct sk_buff *);
-bool vlan_do_receive(struct sk_buff **);
-bool vlan_tx_nonzero_tag_present(struct sk_buff *);
-
-#define skb_vlan_tag_present(__skb) (0)
-#define skb_vlan_tag_get(__skb) (0xffff)
-
-void __vlan_hwaccel_put_tag(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci);
-void vlan_set_encap_proto(struct sk_buff *skb, struct vlan_hdr *vhdr);
-
-static inline bool eth_type_vlan(__be16 ethertype)
-{
- return false;
-}
-
-
-static inline int __vlan_insert_tag(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci)
-{
- return 1;
-}
-
-
-/********************
- ** linux/percpu.h **
- ********************/
-
-void *__alloc_percpu(size_t size, size_t align);
-
-#define alloc_percpu_gfp(type, gfp) \
- (typeof(type) __percpu *)__alloc_percpu(sizeof(type), __alignof__(type))
-
-#define alloc_percpu(type) \
- (typeof(type) __percpu *)__alloc_percpu(sizeof(type), __alignof__(type))
-
-
-#define per_cpu(var, cpu) var
-#define per_cpu_ptr(ptr, cpu) ({ (void)(cpu);(typeof(*(ptr)) *)(ptr); })
-#define __get_cpu_var(var) var
-
-#define this_cpu_ptr(ptr) ptr
-#define this_cpu_inc(pcp) pcp += 1
-#define this_cpu_dec(pcp) pcp -= 1
-
-#define __this_cpu_inc(pcp) this_cpu_inc(pcp)
-#define __this_cpu_dec(pcp) this_cpu_dec(pcp)
-
-
-/*******************
- ** asm/current.h **
- *******************/
-
-extern struct task_struct *current;
-
-
-/*************************
- ** linux/res_counter.h **
- *************************/
-
-enum { RES_USAGE };
-
-struct res_counter { unsigned unused; };
-
-int res_counter_charge_nofail(struct res_counter *counter, unsigned long val, struct res_counter **limit_fail_at);
-u64 res_counter_uncharge(struct res_counter *counter, unsigned long val);
-u64 res_counter_read_u64(struct res_counter *counter, int member);
-
-
-/**************************
- ** linux/page_counter.h **
- **************************/
-
-struct page_counter
-{
- atomic_long_t count;
- unsigned long limit;
-};
-
-static inline unsigned long page_counter_read(struct page_counter *counter) {
- return atomic_long_read(&counter->count); }
-
-void page_counter_charge(struct page_counter *counter, unsigned long nr_pages);
-void page_counter_uncharge(struct page_counter *counter, unsigned long nr_pages);
-
-
-/************************
- ** linux/memcontrol.h **
- ************************/
-
-struct mem_cgroup;
-
-enum { UNDER_LIMIT, SOFT_LIMIT, OVER_LIMIT };
-
-void sock_update_memcg(struct sock *sk);
-
-struct cg_proto
-{
- struct page_counter memory_allocated;
- struct percpu_counter sockets_allocated;
- int memory_pressure;
- long sysctl_mem[3];
-};
-
-#define mem_cgroup_sockets_enabled 0
-
-static inline bool mem_cgroup_under_socket_pressure(struct mem_cgroup *memcg)
-{
- return false;
-}
-
-static inline void mem_cgroup_sk_alloc(struct sock *sk) { };
-static inline void mem_cgroup_sk_free(struct sock *sk) { };
-
-bool mem_cgroup_charge_skmem(struct mem_cgroup *memcg, unsigned int nr_pages);
-void mem_cgroup_uncharge_skmem(struct mem_cgroup *memcg, unsigned int nr_pages);
-
-
-/*******************
- ** linux/sched.h **
- *******************/
-
-enum {
- PF_MEMALLOC = 0x800,
-
- MAX_SCHEDULE_TIMEOUT = 1000,
-};
-
-enum {
- TASK_RUNNING = 0,
- TASK_INTERRUPTIBLE = 1,
- TASK_UNINTERRUPTIBLE = 2,
- TASK_COMM_LEN = 16,
-};
-
-struct task_struct
-{
- unsigned int flags;
- struct page_frag task_frag;
- char comm[TASK_COMM_LEN];
- struct audit_context *audit_context;
-};
-
-void tsk_restore_flags(struct task_struct *task, unsigned long orig_flags, unsigned long flags);
-pid_t task_pid_nr(struct task_struct *tsk);
-pid_t task_tgid_vnr(struct task_struct *tsk);
-
-void set_current_state(int);
-void __set_current_state(int);
-
-void schedule(void);
-void yield(void);
-int signal_pending(struct task_struct *p);
-signed long schedule_timeout(signed long timeout);
-bool need_resched(void);
-int cond_resched(void);
-int cond_resched_softirq(void);
-
-u64 local_clock(void);
-
-int fatal_signal_pending(struct task_struct *p);
-
-
-/************************
- ** linux/sched/user.h **
- ************************/
-
-struct user_struct
-{
- atomic_long_t locked_vm;
-};
-
-void free_uid(struct user_struct *);
-struct user_struct *get_uid(struct user_struct *u);
-
-
-/************************
- ** uapi/linux/sched.h **
- ************************/
-
-enum {
- CLONE_NEWNET = 0x40000000,
-};
-
-
-/*********************************
- ** (uapi|linux|kernel)/audit.h **
- *********************************/
-
-enum {
- AUDIT_ANOM_PROMISCUOUS = 1700,
-};
-
-extern int audit_enabled;
-
-
-/******************
- ** linux/cred.h **
- ******************/
-
-struct group_info
-{
- int ngroups;
- kgid_t gid[0];
-};
-
-struct cred
-{
- struct user_namespace *user_ns;
- kuid_t euid;
- kgid_t egid;
-
- struct group_info *group_info;
-};
-
-static inline void current_uid_gid(kuid_t *u, kgid_t *g)
-{
- *u = 0;
- *g = 0;
-}
-
-
-extern struct user_namespace init_user_ns;
-#define current_user_ns() (&init_user_ns)
-
-struct user_struct *current_user();
-
-void put_cred(const struct cred *_cred);
-
-
-/********************
- ** net/if_inet6.h **
- ********************/
-
-struct inet6_dev;
-
-
-/*********************
- ** uapi/linux/in.h **
- *********************/
-
-enum {
- IPPROTO_IP = 0,
- IPPROTO_TCP = 6,
- IPPROTO_UDP = 17,
- IPPROTO_AH = 51,
-};
-
-
-/**********************
- ** uapi/linux/in6.h **
- **********************/
-
-enum {
- IPPROTO_HOPOPTS = 0,
- IPPROTO_ROUTING = 43,
- IPPROTO_FRAGMENT = 44,
- IPPROTO_DSTOPTS = 60,
-};
-
-struct in6_addr
-{
-};
-
-
-/****************
- ** net/ipv6.h **
- ****************/
-
-enum {
- IP6_MF = 0x0001,
- IP6_OFFSET = 0xfff8,
-};
-
-
-/*********************
- ** uapi/linux/ip.h **
- *********************/
-
-enum {
- IP_OFFSET = 0x1FFF,
- IP_MF = 0x2000,
-};
-
-struct iphdr {
- __u8 ihl:4,
- version:4;
- __u8 tos;
- __be16 tot_len;
- __be16 frag_off;
- __u8 ttl;
- __u8 protocol;
- __sum16 check;
- __be32 saddr;
- __be32 daddr;
-};
-
-struct iphdr *ip_hdr(const struct sk_buff *skb);
-
-struct ip_auth_hdr
-{
- __u8 nexthdr;
- __u8 hdrlen;
-};
-
-
-/***********************
- ** uapi/linux/ipv6.h **
- ***********************/
-
-struct ipv6hdr
-{
- __be16 payload_len;
- __u8 nexthdr;
- struct in6_addr saddr;
- struct in6_addr daddr;
-
-};
-
-struct ipv6hdr *ipv6_hdr(const struct sk_buff *skb);
-
-struct ipv6_opt_hdr
-{
- __u8 nexthdr;
- __u8 hdrlen;
-} __attribute__((packed));
-
-struct frag_hdr
-{
- __u8 nexthdr;
- /* __u8 reserved; */
- __be16 frag_off;
- /* __be32 identification; */
-};
-
-
-/******************
- ** linux/ipv6.h **
- ******************/
-
-#define ipv6_optlen(p) (((p)->hdrlen+1) << 3)
-#define ipv6_authlen(p) (((p)->hdrlen+2) << 2)
-
-
-/***************
- ** net/tcp.h **
- ***************/
-
-__sum16 tcp_v4_check(int len, __be32 saddr, __be32 daddr, __wsum base);
-unsigned int inner_tcp_hdrlen(const struct sk_buff *skb);
-bool skb_is_tcp_pure_ack(const struct sk_buff *skb);
-
-
-
-/**********************
- ** uapi/linux/tcp.h **
- **********************/
-
-enum { TCP_CA_NAME_MAX = 16 };
-
-struct tcphdr
-{
- __be16 source;
- __be16 dest;
- __be32 seq;
- __be32 ack_seq;
- __u16 res1:4,
- doff:4,
- fin:1,
- syn:1,
- rst:1,
- psh:1,
- ack:1,
- urg:1,
- ece:1,
- cwr:1;
-
- __be16 window;
- __sum16 check;
-};
-
-struct tcphdr *tcp_hdr(const struct sk_buff *skb);
-
-char *tcp_ca_get_name_by_key(u32 key, char *buffer);
-
-
-/*****************
- ** linux/tcp.h **
- *****************/
-
-struct tcp_sock
-{
- u32 snd_una;
-};
-
-unsigned int tcp_hdrlen(const struct sk_buff *skb);
-static inline struct tcp_sock *tcp_sk(const struct sock *sk) {
- return (struct tcp_sock *)sk; }
-
-
-/**********************
- ** uapi/linux/udp.h **
- **********************/
-
-struct udphdr
-{
- __sum16 check;
-};
-
-struct udphdr *udp_hdr(const struct sk_buff *skb);
-
-
-/*****************
- ** linux/cpu.h **
- *****************/
-
-enum {
- CPU_DEAD = 0x7,
- CPU_TASKS_FROZEN = 0x10,
- CPU_DEAD_FROZEN = CPU_DEAD | CPU_TASKS_FROZEN,
-};
-
-
-/*********************
- ** linux/cpumask.h **
- *********************/
-
-extern const struct cpumask *const cpu_possible_mask;
-
-#define nr_cpu_ids 1
-
-#define for_each_cpu(cpu, mask) \
-for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
-
-#define for_each_possible_cpu(cpu) for_each_cpu((cpu), cpu_possible_mask)
-#define hotcpu_notifier(fn, pri)
-
-#define num_possible_cpus() 1U
-
-
-/************************
- ** linux/jump_label.h **
- ************************/
-
-struct static_key { unsigned unused; };
-
-#define STATIC_KEY_INIT_FALSE ((struct static_key) {})
-
-bool static_key_false(struct static_key *key);
-void static_key_slow_inc(struct static_key *key);
-void static_key_slow_dec(struct static_key *key);
-
-
-/***********************
- ** linux/pipe_fs_i.h **
- ***********************/
-
-struct pipe_buffer
-{
- struct page *page;
-};
-
-struct pipe_inode_info;
-
-struct pipe_buf_operations
-{
- int can_merge;
- void * (*map)(struct pipe_inode_info *, struct pipe_buffer *, int);
- void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *, void *);
- int (*confirm)(struct pipe_inode_info *, struct pipe_buffer *);
- void (*release)(struct pipe_inode_info *, struct pipe_buffer *);
- int (*steal)(struct pipe_inode_info *, struct pipe_buffer *);
- void (*get)(struct pipe_inode_info *, struct pipe_buffer *);
-};
-
-void *generic_pipe_buf_map(struct pipe_inode_info *, struct pipe_buffer *, int);
-void generic_pipe_buf_unmap(struct pipe_inode_info *, struct pipe_buffer *, void *);
-int generic_pipe_buf_confirm(struct pipe_inode_info *, struct pipe_buffer *);
-
-
-/********************
- ** linux/splice.h **
- ********************/
-
-struct partial_page
-{
-unsigned int offset;
-unsigned int len;
-};
-
-struct splice_pipe_desc
-{
- struct page **pages;
- struct partial_page *partial;
- int nr_pages;
- unsigned int nr_pages_max;
- unsigned int flags;
- const struct pipe_buf_operations *ops;
- void (*spd_release)(struct splice_pipe_desc *, unsigned int);
-};
-
-ssize_t splice_to_pipe(struct pipe_inode_info *, struct splice_pipe_desc *);
-
-
-/************************
- ** linux/textsearch.h **
- ************************/
-
-struct ts_state
-{
- char cb[40];
-};
-
-struct ts_config
-{
- unsigned int (*get_next_block)(unsigned int consumed,
- const u8 **dst,
- struct ts_config *conf,
- struct ts_state *state);
- void (*finish)(struct ts_config *conf,
- struct ts_state *state);
-};
-
-unsigned int textsearch_find(struct ts_config *, struct ts_state *);
-
-
-/*****************
- ** linux/aio.h **
- *****************/
-
-struct kiocb
-{
- void *private;
-};
-
-
-/*************************
- ** uapi/linux/filter.h **
- *************************/
-
-struct sock_filter { /* Filter block */
- __u16 code; /* Actual filter code */
- __u8 jt; /* Jump true */
- __u8 jf; /* Jump false */
- __u32 k; /* Generic multiuse field */
-};
-
-
-/**********************
- ** uapi/linux/bpf.h **
- **********************/
-
-enum bpf_prog_type {
- BPF_PROG_TYPE_SOCKET_FILTER,
-};
-
-
-/********************
- ** linux/filter.h **
- ********************/
-
-struct sk_buff;
-struct sock_filter;
-struct sock_fprog;
-struct bpf_prog_aux;
-
-struct bpf_prog
-{
- u32 len;
- enum bpf_prog_type type;
-
- struct bpf_prog_aux *aux;
-
- union {
- struct sock_filter insns[0];
- };
-};
-
-struct sk_filter
-{
- atomic_t refcnt;
- struct rcu_head rcu;
- struct bpf_prog *prog;
-};
-
-unsigned int sk_filter_size(unsigned int proglen);
-int sk_filter(struct sock *, struct sk_buff *);
-unsigned int sk_run_filter(const struct sk_buff *skb,
- const struct sock_filter *filter);
-int sk_attach_filter(struct sock_fprog *, struct sock *);
-int sk_detach_filter(struct sock *);
-int sk_get_filter(struct sock *, struct sock_filter *, unsigned);
-int sk_filter_trim_cap(struct sock *sk, struct sk_buff *skb, unsigned int cap);
-void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp);
-bool sk_filter_charge(struct sock *sk, struct sk_filter *fp);
-
-#define SK_RUN_FILTER(FILTER, SKB) sk_run_filter(SKB, FILTER->insns)
-
-int bpf_tell_extensions(void);
-
-typedef int (*bpf_aux_classic_check_t)(struct sock_filter *filter,
- unsigned int flen);
-
-int bpf_prog_create_from_user(struct bpf_prog **pfp, struct sock_fprog *fprog,
- bpf_aux_classic_check_t trans, bool save_orig);
-void bpf_prog_destroy(struct bpf_prog *fp);
-u32 bpf_prog_run_clear_cb(const struct bpf_prog *prog, struct sk_buff *skb);
-
-int sk_reuseport_attach_bpf(u32 ufd, struct sock *sk);
-int sk_reuseport_attach_filter(struct sock_fprog *fprog, struct sock *sk);
-int sk_attach_bpf(u32 ufd, struct sock *sk);
-
-
-/*****************
- ** linux/bpf.h **
- *****************/
-
-struct bpf_prog_aux
-{
- u32 id;
-};
-
-static inline struct bpf_prog *bpf_prog_get(u32 ufd) {
- return (struct bpf_prog*)ERR_PTR(-EOPNOTSUPP); }
-
-static inline void bpf_prog_put(struct bpf_prog *prog) { }
-static inline struct bpf_prog *bpf_prog_get_type(u32 ufd, enum bpf_prog_type type) {
- return (struct bpf_prog*)ERR_PTR(-EOPNOTSUPP); }
-
-
-/**************************
- ** linux/seq_file_net.h **
- **************************/
-
-struct seq_net_private {
- struct net *net;
-};
-
-struct seq_operations { unsigned unused; };
-
-
-/**************************
- ** linux/seq_file.h **
- **************************/
-
-struct seq_file { unsigned unused; };
-
-int seq_printf(struct seq_file *, const char *, ...);
-
-
-/********************
- ** linux/sysctl.h **
- ********************/
-
-struct ctl_table;
-
-typedef int proc_handler (struct ctl_table *ctl, int write,
- void __user *buffer, size_t *lenp, loff_t *ppos);
-
-
-/*****************
- ** linux/pid.h **
- *****************/
-
-struct pid;
-
-pid_t pid_vnr(struct pid *pid);
-void put_pid(struct pid *pid);
-
-
-/***************************
- ** asm-generic/uaccess.h **
- ***************************/
-
-enum { VERIFY_READ = 0 };
-
-#define get_user(x, ptr) ({ x = *(ptr); 0; })
-#define put_user(x, ptr) ({ *(ptr) = x; 0; })
-
-static inline long copy_from_user(void *to, const void *from, unsigned long n)
-{
- memcpy(to, from, n);
- return 0;
-}
-
-static inline long copy_to_user(void *to, const void *from, unsigned long n)
-{
- memcpy(to, from, n);
- return 0;
-}
-
-#define access_ok(type, addr, size) __access_ok((unsigned long)(addr),(size))
-
-int __access_ok(unsigned long addr, unsigned long size);
-
-
-/*********************
- ** linux/uaccess.h **
- *********************/
-
-static inline unsigned long __copy_from_user_nocache(void *to, const void __user *from, unsigned long n)
-{
- return copy_from_user(to, from, n);
-}
-
-
-/*******************************
- ** asm-generic/scatterlist.h **
- *******************************/
-
-/*
- * XXX cannot use emul header, see comment below.
- */
-// #include
-
-struct scatterlist
-{
- /*
- * We use a dummy struct page member because there is
- * none for abitrary addresses that were not allocated
- * with alloc_page() and save the buf pointer given in
- * sg_set_buf directly to page_dummy.addr and hope for
- * the best. This dummy is then stored in page_link.
- * The offset is always 0.
- */
- struct page page_dummy;
- unsigned int page_flags;
-
- unsigned long page_link;
- unsigned int offset;
- unsigned int length;
-};
-
-void sg_set_page(struct scatterlist *sg, struct page *page, unsigned int len, unsigned int offset);
-void sg_set_buf(struct scatterlist *sg, const void *buf, unsigned int buflen);
-void sg_mark_end(struct scatterlist *sg);
-struct scatterlist *sg_next(struct scatterlist *);
-void sg_init_table(struct scatterlist *, unsigned int);
-void sg_init_one(struct scatterlist *, const void *, unsigned int);
-
-#define sg_is_chain(sg) ((sg)->page_flags & 0x01)
-#define sg_is_last(sg) ((sg)->page_flags & 0x02)
-#define sg_chain_ptr(sg) ((struct scatterlist *) ((sg)->page_link))
-
-static inline struct page *sg_page(struct scatterlist *sg) {
- return (struct page *)((sg)->page_link); }
-
-void sg_chain(struct scatterlist *prv, unsigned int prv_nents, struct scatterlist *sgl);
-
-int sg_nents(struct scatterlist *sg);
-
-struct scatterlist *sg_next(struct scatterlist *);
-
-#define for_each_sg(sglist, sg, nr, __i) \
- for (__i = 0, sg = (sglist); __i < (nr); __i++, sg = sg_next(sg))
-
-size_t sg_pcopy_from_buffer(struct scatterlist *sgl, unsigned int nents, const void *buf, size_t buflen, off_t skip);
-
-
-/**************
- ** net/ip.h **
- **************/
-
-enum { IP_DEFRAG_AF_PACKET = 42, };
-
-struct inet_skb_parm
-{
- int iif;
-};
-
-unsigned int ip_hdrlen(const struct sk_buff *skb);
-struct sk_buff *ip_check_defrag(struct net *net, struct sk_buff *skb, u32 user);
-
-
-/********************
- ** linux/dcache.h **
- ********************/
-
-unsigned int full_name_hash(const unsigned char *, unsigned int);
-
-
-/******************
- ** linux/hash.h **
- ******************/
-
-u32 hash_32(u32 val, unsigned int);
-
-
-/********************
- ** net/checksum.h **
- ********************/
-
-#define CSUM_MANGLED_0 ((__sum16)0xffff)
-
-__wsum csum_and_copy_from_user(const void __user *src, void *dst,
- int len, __wsum sum, int *err_ptr);
-__wsum csum_add(__wsum csum, __wsum addend);
-__wsum csum_block_add(__wsum csum, __wsum csum2, int offset);
-__wsum csum_block_sub(__wsum, __wsum, int);
-__wsum csum_sub(__wsum csum, __wsum addend);
-__wsum csum_unfold(__sum16 n);
-
-__wsum csum_partial_ext(const void *buff, int len, __wsum sum);
-__wsum csum_block_add_ext(__wsum csum, __wsum csum2, int offset, int len);
-
-void csum_replace2(__sum16 *, __be16, __be16);
-
-__wsum remcsum_adjust(void *ptr, __wsum csum, int start, int offset);
-
-
-/************************
- ** net/ip6_checksum.h **
- ************************/
-
-__sum16 csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __u32 len, unsigned short proto, __wsum csum);
-
-
-/****************************
- ** asm-generic/checksum.h **
- ****************************/
-
-__sum16 csum_fold(__wsum csum);
-__sum16 ip_fast_csum(const void *iph, unsigned int ihl);
-
-__wsum csum_partial(const void *buff, int len, __wsum sum);
-__wsum csum_partial_copy(const void *src, void *dst, int len, __wsum sum);
-__wsum csum_partial_copy_from_user(const void __user *src, void *dst, int len,
- __wsum sum, int *csum_err);
-
-#define csum_partial_copy_nocheck(src, dst, len, sum) \
- csum_partial_copy((src), (dst), (len), (sum))
-
-#define csum_and_copy_from_user csum_partial_copy_from_user
-
-__wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
- unsigned short proto, __wsum sum);
-static inline
-__sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len,
- unsigned short proto, __wsum sum)
-{
- return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));
-}
-
-static inline
-__wsum csum_and_copy_to_user(const void *src, void __user *dst, int len,
- __wsum sum, int *err_ptr)
-{
- sum = csum_partial(src, len, sum);
-
- memcpy(dst, src, len);
- return sum;
-}
-
-
-/*******************
- ** linux/delay.h **
- *******************/
-
-void msleep(unsigned int);
-void ssleep(unsigned int);
-void usleep_range(unsigned long min, unsigned long max);
-
-
-/*****************
- ** linux/smp.h **
- *****************/
-
-#define smp_processor_id() 0
-#define raw_smp_processor_id() smp_processor_id()
-#define put_cpu()
-
-typedef void (*smp_call_func_t)(void *info);
-
-int on_each_cpu(smp_call_func_t, void *, int);
-
-
-/**************************
- ** uapi/linux/netlink.h **
- **************************/
-
-#define NLA_ALIGNTO 4
-#define NLA_ALIGN(len) (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1))
-
-
-/***********************
- ** linux/genetlink.h **
- ***********************/
-
-#define MODULE_ALIAS_GENL_FAMILY(family) \
- MODULE_ALIAS_NET_PF_PROTO_NAME(PF_NETLINK, NETLINK_GENERIC, "-family-" family)
-
-
-/*****************************
- ** uapi/linux/net_tstamp.h **
- *****************************/
-
-enum {
- SOF_TIMESTAMPING_TX_HARDWARE = 1 << 0,
- SOF_TIMESTAMPING_TX_SOFTWARE = 1 << 1,
- SOF_TIMESTAMPING_RX_HARDWARE = 1 << 2,
- SOF_TIMESTAMPING_RX_SOFTWARE = 1 << 3,
- SOF_TIMESTAMPING_SOFTWARE = 1 << 4,
- SOF_TIMESTAMPING_SYS_HARDWARE = 1 << 5,
- SOF_TIMESTAMPING_RAW_HARDWARE = 1 << 6,
- SOF_TIMESTAMPING_OPT_ID = 1 << 7,
- SOF_TIMESTAMPING_TX_SCHED = 1 << 8,
- SOF_TIMESTAMPING_TX_ACK = 1 << 9,
- SOF_TIMESTAMPING_OPT_TSONLY = 1 << 11,
- SOF_TIMESTAMPING_OPT_STATS = 1 << 12,
- SOF_TIMESTAMPING_OPT_TX_SWHW = 1 << 14,
- SOF_TIMESTAMPING_MASK = (SOF_TIMESTAMPING_RAW_HARDWARE - 1) |
- SOF_TIMESTAMPING_RAW_HARDWARE,
-};
-
-#define SOF_TIMESTAMPING_TX_RECORD_MASK (SOF_TIMESTAMPING_TX_HARDWARE | \
- SOF_TIMESTAMPING_TX_SOFTWARE | \
- SOF_TIMESTAMPING_TX_SCHED | \
- SOF_TIMESTAMPING_TX_ACK)
-
-
-/*************************
- ** uapi/linux/filter.h **
- *************************/
-
-struct sock_fprog { unsigned unused; };
-
-
-/* short-cut for net/core/sock.c */
-#include
-
-
-/*****************************
- ** uapi/asm-generic/poll.h **
- *****************************/
-
-enum {
- POLLIN = 0x1,
- POLLPRI = 0x2,
- POLLOUT = 0x4,
- POLLERR = 0x8,
- POLLHUP = 0x10,
- POLLRDNORM = 0x40,
- POLLRDBAND = 0x80,
- POLLWRNORM = 0x100,
- POLLWRBAND = 0x200,
- POLLRDHUP = 0x2000,
-};
-
-void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p);
-bool poll_does_not_wait(const poll_table *p);
-
-
-/*********************************
- ** uapi/asm-generic/siginfo..h **
- *********************************/
-
-enum
-{
- POLL_IN = 1,
- POLL_OUT = 2,
- POLL_ERR = 4,
- POLL_PRI = 5,
- POLL_HUP = 6,
-};
-
-
-size_t ksize(void *);
-void * krealloc(void *, size_t, gfp_t);
-
-
-/*********************
- ** net/flow_keys.h **
- *********************/
-
-struct flow_dissector_key_control
-{
- u16 thoff;
- u16 addr_type;
- u32 flags;
-};
-
-struct flow_keys
-{
- /* (src,dst) must be grouped, in the same way than in IP header */
- __be32 src;
- __be32 dst;
- union {
- __be32 ports;
- __be16 port16[2];
- };
- u16 thoff;
- u8 ip_proto;
-
- struct flow_dissector_key_control control;
-};
-
-struct flow_dissector_key
-{
- unsigned dummy;
-};
-
-struct flow_dissector
-{
- unsigned dummy;
-};
-
-extern struct flow_dissector flow_keys_dissector;
-extern struct flow_dissector flow_keys_buf_dissector;
-
-bool flow_keys_have_l4(struct flow_keys *keys);
-
-
-/****************
- ** net/flow.h **
- ****************/
-
-enum {
- FLOWI_FLAG_ANYSRC = 0x01,
-};
-
-struct flowi4
-{
- unsigned dummy;
-};
-
-struct flowi6
-{
- unsigned dummy;
-};
-
-struct flowi
-{
- union {
- struct flowi4 ip4;
- struct flowi6 ip6;
- } u;
-};
-
-__u32 __get_hash_from_flowi4(const struct flowi4 *fl4, struct flow_keys *keys);
-__u32 __get_hash_from_flowi6(const struct flowi6 *fl6, struct flow_keys *keys);
-
-
-/**************************
- ** net/flow_dissector.h **
- **************************/
-
-#define FLOW_DISSECTOR_F_PARSE_1ST_FRAG BIT(0)
-
-
-/***********************
- ** linux/pipe_fs_i.h **
- ***********************/
-
-extern const struct pipe_buf_operations nosteal_pipe_buf_ops;
-
-
-/******************
- ** linux/acpi.h **
- ******************/
-
-#define ACPI_PTR(_ptr) (NULL)
-#define ACPI_HANDLE(dev) (NULL)
-
-struct acpi_device;
-
-const struct acpi_device_id *acpi_match_device(const struct acpi_device_id *ids, const struct device *dev);
-
-struct acpi_gpio_params {
- unsigned int crs_entry_index;
- unsigned int line_index;
- bool active_low;
-};
-
-struct acpi_gpio_mapping {
- const char *name;
- const struct acpi_gpio_params *data;
- unsigned int size;
-};
-
-static inline int acpi_dev_add_driver_gpios(struct acpi_device *adev,
- const struct acpi_gpio_mapping *gpios)
-{
- return -ENXIO;
-}
-
-static inline void acpi_dev_remove_driver_gpios(struct acpi_device *adev) {}
-
-static inline int devm_acpi_dev_add_driver_gpios(struct device *dev, const struct acpi_gpio_mapping *gpios)
-{
- return -ENXIO;
-}
-
-
-/********************
- ** linux/random.h **
- ********************/
-
-u32 prandom_u32(void);
-void get_random_bytes(void *buf, int nbytes);
-
-static inline int get_random_bytes_wait(void *buf, int nbytes)
-{
- get_random_bytes(buf, nbytes);
- return 0;
-}
-
-static inline u32 get_random_u32(void)
-{
- return prandom_u32();
-}
-
-static inline u32 prandom_u32_max(u32 ep_ro) { return (u32)(((u64) prandom_u32() * ep_ro) >> 32); }
-
-static inline void prandom_bytes(void *buf, size_t nbytes)
-{
- get_random_bytes(buf, nbytes);
-}
-
-
-/*********************
- ** linux/proc_fs.h **
- *********************/
-
-#define remove_proc_entry(name, parent) do { } while (0)
-
-
-/*********************
- ** linux/proc_ns.h **
- *********************/
-
-struct nsproxy;
-
-struct proc_ns_operations
-{
- const char *name;
- int type;
- void *(*get)(struct task_struct *task);
- void (*put)(void *ns);
- int (*install)(struct nsproxy *nsproxy, void *ns);
- unsigned int (*inum)(void *ns);
-};
-
-
-struct proc_ns
-{
- void *ns;
- const struct proc_ns_operations *ns_ops;
-};
-
-extern const struct proc_ns_operations netns_operations;
-
-
-/*********************
- ** linux/nsproxy.h **
- *********************/
-
-struct nsproxy
-{
- struct net *net_ns;
-};
-
-
-/********************
- ** linux/bitmap.h **
- ********************/
-
-static inline void bitmap_zero(unsigned long *dst, int nbits)
-{
- if (nbits <= BITS_PER_LONG)
- *dst = 0UL;
- else {
- int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long);
- memset(dst, 0, len);
- }
-}
-
-void bitmap_fill(unsigned long *dst, int nbits);
-int bitmap_empty(const unsigned long *src, int nbits);
-
-#define BITMAP_LAST_WORD_MASK(nbits) (~0UL >> (-(nbits) & (BITS_PER_LONG - 1)))
-
-
-/*******************************
- ** uapi/asm-generic/ioctls.h **
- *******************************/
-
-enum {
- TIOCOUTQ = 0x5411,
- FIONREAD = 0x541B,
-};
-
-
-/********************************
- ** uapi/asm-generic/sockios.h **
- ********************************/
-
-enum {
- SIOCGSTAMP = 0x8906,
- SIOCGSTAMPNS = 0x8907,
-};
-
-
-/*********************************
- ** uapi/asm-generic/resource.h **
- *********************************/
-
-#define RLIMIT_MEMLOCK 8
-
-
-/*************************
- ** linux/sch_generic.h **
- *************************/
-
-struct Qdisc_ops
-{
- char id[IFNAMSIZ];
-};
-
-struct Qdisc
-{
- const struct Qdisc_ops *ops;
-};
-
-bool qdisc_all_tx_empty(const struct net_device *dev);
-
-
-/*********************
- ** linux/hardirq.h **
- *********************/
-
-void synchronize_irq(unsigned int irq);
-
-
-/**************************
- ** asm-generic/udelay.h **
- **************************/
-
-void udelay(unsigned long usecs);
-void mdelay(unsigned long msecs);
-
-
-/****************************
- ** asm-generic/getorder.h **
- ****************************/
-
-int get_order(unsigned long size);
-
-
-/*************************
- ** asm-generic/div64.h **
- *************************/
-
-#define do_div(n,base) ({ \
- unsigned long __base = (base); \
- unsigned long __rem; \
- __rem = ((uint64_t)(n)) % __base; \
- (n) = ((uint64_t)(n)) / __base; \
- __rem; \
-})
-
-
-/***************************
- ** linux/rculist_nulls.h **
- ***************************/
-
-struct hlist_nulls_node;
-struct hlist_nulls_head;
-
-void hlist_nulls_add_head_rcu(struct hlist_nulls_node *n, struct hlist_nulls_head *h);
-void hlist_nulls_del_init_rcu(struct hlist_nulls_node *n);
-
-
-/**********************
- ** linux/security.h **
- **********************/
-
-struct socket;
-
-void security_sock_graft(struct sock* sk, struct socket *parent);
-int security_socket_getpeersec_stream(struct socket *sock, char __user *optval, int __user *optlen, unsigned len);
-int security_sk_alloc(struct sock *sk, int family, gfp_t priority);
-void security_sk_free(struct sock *sk);
-int security_netlink_send(struct sock *sk, struct sk_buff *skb);
-
-
-/*********************
- ** linux/pagemap.h **
- *********************/
-
-void release_pages(struct page **pages, int nr, int cold);
-
-
-/*********************
- ** net/busy_poll.h **
- *********************/
-
-bool sk_can_busy_loop(struct sock *sk);
-bool sk_busy_loop(struct sock *sk, int nonblock);
-
-
-/**********************
- ** linux/prefetch.h **
- **********************/
-
-#define prefetch(x) __builtin_prefetch(x)
-#define prefetchw(x) __builtin_prefetch(x,1)
-
-
-/****************
- ** net/xfrm.h **
- ****************/
-
-static inline void secpath_reset(struct sk_buff *skb) { }
-int __xfrm_sk_clone_policy(struct sock *sk);
-void xfrm_sk_free_policy(struct sock *sk);
-int xfrm_sk_clone_policy(struct sock *sk, const struct sock *osk);
-
-struct dst_entry;
-bool xfrm_dst_offload_ok(struct dst_entry *dst);
-
-
-/*************************
- ** linux/debug_locks.h **
- *************************/
-
-static inline void debug_check_no_locks_freed(const void *from, unsigned long len) { }
-
-
-/**********************
- ** net/cls_cgroup.h **
- **********************/
-
-struct sock_cgroup_data;
-
-void sock_update_classid(struct sock_cgroup_data *skcd);
-
-
-/**************************
- ** net/netprio_cgroup.h **
- **************************/
-
-void sock_update_netprioidx(struct sock_cgroup_data *skcd);
-
-
-/*******************
- ** linux/crc32.h **
- *******************/
-
-#define CONFIG_CRC32_SLICEBY8 /* the default from lib/Kconfig */
-
-extern u32 crc32_le(u32 crc, unsigned char const *p, size_t len);
-extern u32 crc32_be(u32 crc, unsigned char const *p, size_t len);
-
-
-/********************************
- ** linux/regulator/consumer.h **
- ********************************/
-
-struct regulator;
-
-int regulator_enable(struct regulator *regulator);
-int regulator_disable(struct regulator *regulator);
-int regulator_is_enabled(struct regulator *regulator);
-struct regulator * regulator_get_exclusive(struct device *dev, const char *id);
-void regulator_put(struct regulator *regulator);
-
-
-/***************************
- ** linux/gpio/consumer.h **
- ***************************/
-
-struct gpio_desc;
-
-enum gpiod_flags {
- GPIOD_FLAGS_BIT_DIR_SET = 1 << 0,
- GPIOD_FLAGS_BIT_DIR_OUT = 1 << 1,
- GPIOD_OUT_LOW = GPIOD_FLAGS_BIT_DIR_SET | GPIOD_FLAGS_BIT_DIR_OUT,
-};
-
-
-struct gpio_desc * devm_gpiod_get_index(struct device *dev, const char *con_id, unsigned int idx);
-int gpiod_direction_output(struct gpio_desc *desc, int value);
-void gpiod_set_value(struct gpio_desc *desc, int value);
-void gpiod_set_value_cansleep(struct gpio_desc *desc, int value);
-struct gpio_desc *devm_gpiod_get_optional(struct device *dev, const char *con_id, enum gpiod_flags flags);
-
-
-/*****************
- ** linux/clk.h **
- *****************/
-
-struct clk;
-
-struct clk *devm_clk_get(struct device *dev, const char *id);
-int clk_enable(struct clk *clk);
-void clk_disable(struct clk *clk);
-
-
-/***************************
- ** uapi/linux/wireless.h **
- ***************************/
-
-struct iw_freq;
-struct iw_point;
-
-
-/**********************
- ** net/iw_handler.h **
- **********************/
-
-struct iw_request_info;
-
-void wireless_nlevent_flush(void);
-
-
-/*********************
- ** linux/debugfs.h **
- *********************/
-
-struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, struct dentry *new_dir, const char *new_name);
-struct dentry *debugfs_create_dir(const char *name, struct dentry *parent);
-void debugfs_remove(struct dentry *dentry);
-void debugfs_remove_recursive(struct dentry *dentry);
-
-
-/*********************
- ** linux/kthread.h **
- *********************/
-
-void *kthread_run(int (*threadfn)(void *), void *data, char const *name);
-
-
-/*****************
- ** crypto test **
- *****************/
-
-int alg_test(const char *driver, const char *alg, u32 type, u32 mask);
-
-enum { fips_enabled = 0 };
-
-
-/*********************
- ** net/switchdev.h **
- *********************/
-
-enum switchdev_attr_id {
- SWITCHDEV_ATTR_ID_UNDEFINED,
- SWITCHDEV_ATTR_ID_PORT_PARENT_ID,
-};
-
-struct switchdev_attr
-{
- struct net_device *orig_dev;
- enum switchdev_attr_id id;
- u32 flags;
- union {
- struct netdev_phys_item_id ppid; /* PORT_PARENT_ID */
- u8 stp_state; /* PORT_STP_STATE */
- unsigned long brport_flags; /* PORT_BRIDGE_FLAGS */
- u32 ageing_time; /* BRIDGE_AGEING_TIME */
- } u;
-
-};
-
-int switchdev_port_attr_get(struct net_device *dev, struct switchdev_attr *attr);
-
-#define SWITCHDEV_F_NO_RECURSE BIT(0)
-
-
-/************************************
- ** uapi/linux/input-event-codes.h **
- ************************************/
-
-enum {
- EV_KEY = 0x01,
- EV_SW = 0x05,
-
- SW_RFKILL_ALL = 0x03,
-
- KEY_BLUETOOTH = 237,
- KEY_WLAN = 238,
- KEY_UWB = 239,
- KEY_WIMAX = 246,
- KEY_RFKILL = 247,
-};
-
-
-/*******************
- ** linux/input.h **
- *******************/
-
-struct input_dev
-{
- unsigned long evbit[1];//[BITS_TO_LONGS(EV_CNT)];
- unsigned long swbit[1];//[BITS_TO_LONGS(SW_CNT)];
- unsigned long sw[1];//[BITS_TO_LONGS(SW_CNT)];
-
- spinlock_t event_lock;
-};
-
-struct input_handle;
-struct input_device_id;
-
-struct input_handler
-{
- void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
- int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id);
- void (*disconnect)(struct input_handle *handle);
- void (*start)(struct input_handle *handle);
-
- const char *name;
- const struct input_device_id *id_table;
-};
-
-struct input_handle
-{
- const char *name;
-
- struct input_dev *dev;
- struct input_handler *handler;
-};
-
-int input_register_handle(struct input_handle *);
-int input_open_device(struct input_handle *);
-void input_unregister_handle(struct input_handle *);
-void input_close_device(struct input_handle *);
-int input_register_handler(struct input_handler *);
-void input_unregister_handler(struct input_handler *);
-
-
-/***********************
- ** uapi/linux/mlps.h **
- ***********************/
-
-enum {
- MPLS_LS_TC_MASK = 0x00000E00,
- MPLS_LS_TC_SHIFT = 9u,
-};
-
-struct mpls_label
-{
- __be32 entry;
-};
-
-
-/*************************
- ** linux/devcoredump.h **
- *************************/
-
-static inline void dev_coredumpm(struct device *dev, struct module *owner,
- const void *data, size_t datalen, gfp_t gfp,
- ssize_t (*read)(char *buffer, loff_t offset,
- size_t count, const void *data, size_t datalen),
- void (*free)(const void *data))
-{
- free(data);
-}
-
-static inline void dev_coredumpsg(struct device *dev, struct scatterlist *table,
- size_t datalen, gfp_t gfp)
-{
- // _devcd_free_sgtable(table);
- lx_printf("%s:%d: WARNING: leaking memory for table: %p\n",
- __func__, __LINE__, table);
-}
-
-
-/*************************
- ** linux/timekeeping.h **
- *************************/
-
-typedef __s64 time64_t;
-
-time64_t ktime_get_seconds(void);
-
-u64 ktime_get_ns(void);
-u64 ktime_get_boot_ns(void);
-
-
-/***********************************
- ** uapi/linux/virtio_types.h:42: **
- ***********************************/
-
-typedef __u16 __virtio16;
-
-
-/*******************************
- ** linux/virtio_byteorder.h **
- *******************************/
-
-static inline bool virtio_legacy_is_little_endian(void) { return true; }
-
-static inline u16 __virtio16_to_cpu(bool little_endian, __virtio16 val)
-{
- if (little_endian) return le16_to_cpu((__le16)val);
- else return be16_to_cpu((__be16)val);
-}
-
-static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val)
-{
- if (little_endian) return (__virtio16)cpu_to_le16(val);
- else return (__virtio16)cpu_to_be16(val);
-}
-
-
-/********************
- ** linux/mmzone.h **
- ********************/
-
-enum { PAGE_ALLOC_COSTLY_ORDER = 3u };
-
-
-/****************************
- ** linux/u64_stats_sync.h **
- ****************************/
-
-struct u64_stats_sync;
-
-static inline void u64_stats_update_begin(struct u64_stats_sync *p) { }
-
-static inline void u64_stats_update_end(struct u64_stats_sync *p) { }
-
-unsigned int u64_stats_fetch_begin(const struct u64_stats_sync *syncp);
-unsigned int u64_stats_fetch_begin_irq(const struct u64_stats_sync *p);
-bool u64_stats_fetch_retry(const struct u64_stats_sync *syncp, unsigned int start);
-bool u64_stats_fetch_retry_irq(const struct u64_stats_sync *p, unsigned int s);
-
-
-/************************
- ** uapi/linux/uleds.h **
- ************************/
-
-#define LED_MAX_NAME_SIZE 64
-
-
-/*************************
- ** linux/cgroup-defs.h **
- *************************/
-
-struct sock_cgroup_data
-{
- union {
- u64 val;
- };
-};
-
-struct cgroup
-{
- unsigned long foo;
-};
-
-
-/*********************
- ** net/pkg_sched.h **
- *********************/
-
-#define DEFAULT_TX_QUEUE_LEN 1000
-
-
-/****************************
- ** uapi/linux/eventpoll.h **
- ****************************/
-
-#define EPOLLIN 0x00000001
-#define EPOLLPRI 0x00000002
-#define EPOLLOUT 0x00000004
-#define EPOLLERR 0x00000008
-#define EPOLLHUP 0x00000010
-// #define EPOLLNVAL 0x00000020
-#define EPOLLRDNORM 0x00000040
-#define EPOLLRDBAND 0x00000080
-#define EPOLLWRNORM 0x00000100
-#define EPOLLWRBAND 0x00000200
-// #define EPOLLMSG 0x00000400
-#define EPOLLRDHUP 0x00002000
-
-
-/******************
- ** linux/sctp.h **
- ******************/
-
-struct sctphdr
-{
- unsigned unused;
-};
-
-struct sctp_header
-{
- unsigned unused;
-};
-
-
-/****************************
- ** uapi/linux/sock_diag.h **
- ****************************/
-
-enum {
- SK_MEMINFO_RMEM_ALLOC,
- SK_MEMINFO_RCVBUF,
- SK_MEMINFO_WMEM_ALLOC,
- SK_MEMINFO_SNDBUF,
- SK_MEMINFO_FWD_ALLOC,
- SK_MEMINFO_WMEM_QUEUED,
- SK_MEMINFO_OPTMEM,
- SK_MEMINFO_BACKLOG,
- SK_MEMINFO_DROPS,
-
- SK_MEMINFO_VARS,
-};
-
-
-/***********************
- ** linux/sock_diag.h **
- ***********************/
-
-u64 sock_gen_cookie(struct sock *sk);
-bool sock_diag_has_destroy_listeners(const struct sock *sk);
-void sock_diag_broadcast_destroy(struct sock *sk);
-
-
-/**************************
- ** net/timewait_sock.h **
- **************************/
-
-struct timewait_sock_ops
-{
- struct kmem_cache *twsk_slab;
- char *twsk_slab_name;
- unsigned int twsk_obj_size;
-};
-
-
-/********************
- ** linux/stddef.h **
- ********************/
-
-#define sizeof_field(TYPE, MEMBER) sizeof((((TYPE *)0)->MEMBER))
-#define offsetofend(TYPE, MEMBER) \
- (offsetof(TYPE, MEMBER) + sizeof_field(TYPE, MEMBER))
-
-
-
-/*****************
- ** net/codel.h **
- *****************/
-
-#define CODEL_SHIFT 10
-#define MS2TIME(a) ((a * NSEC_PER_MSEC) >> CODEL_SHIFT)
-
-#define CODEL_DISABLED_THRESHOLD INT_MAX
-
-typedef u32 codel_time_t;
-
-struct codel_params
-{
- codel_time_t target;
- codel_time_t ce_threshold;
- codel_time_t interval;
- u32 mtu;
- bool ecn;
-};
-
-struct codel_vars
-{
- unsigned unused;
-};
-
-struct codel_stats
-{
- unsigned unused;
-};
-
-codel_time_t codel_get_time(void);
-
-typedef u32 (*codel_skb_len_t)(const struct sk_buff *skb);
-typedef codel_time_t (*codel_skb_time_t)(const struct sk_buff *skb);
-typedef void (*codel_skb_drop_t)(struct sk_buff *skb, void *ctx);
-typedef struct sk_buff * (*codel_skb_dequeue_t)(struct codel_vars *vars, void *ctx);
-
-
-/**********************
- ** net/codel_impl.h **
- **********************/
-
-void codel_params_init(struct codel_params *params);
-void codel_vars_init(struct codel_vars *vars);
-void codel_stats_init(struct codel_stats *stats);
-
-struct sk_buff *codel_dequeue(void *ctx, u32 *backlog, struct codel_params *params,
- struct codel_vars *vars, struct codel_stats *stats,
- codel_skb_len_t skb_len_func, codel_skb_time_t skb_time_func,
- codel_skb_drop_t drop_func, codel_skb_dequeue_t dequeue_func);
-
-
-/**************
- ** net/fq.h **
- **************/
-
-struct fq_tin;
-
-#include
-
-struct fq_flow
-{
- struct sk_buff_head queue;
- u32 backlog;
-};
-
-struct fq_tin
-{
- u32 backlog_bytes;
- u32 backlog_packets;
-};
-
-struct fq
-{
- struct fq_flow *flows;
- spinlock_t lock;
- u32 flows_cnt;
- u32 memory_limit;
- u32 backlog;
-};
-
-
-typedef struct sk_buff *fq_tin_dequeue_t(struct fq *, struct fq_tin *, struct fq_flow *flow);
-typedef void fq_skb_free_t(struct fq *, struct fq_tin *, struct fq_flow *, struct sk_buff *);
-typedef bool fq_skb_filter_t(struct fq *, struct fq_tin *, struct fq_flow *, struct sk_buff *, void *);
-typedef struct fq_flow *fq_flow_get_default_t(struct fq *, struct fq_tin *, int idx, struct sk_buff *);
-
-
-/*******************
- ** net/fq_impl.h **
- *******************/
-
-struct sk_buff *fq_flow_dequeue(struct fq *fq, struct fq_flow *flow);
-void fq_tin_enqueue(struct fq *fq, struct fq_tin *tin, struct sk_buff *skb,
- fq_skb_free_t free_func, fq_flow_get_default_t get_default_func);
-void fq_tin_filter(struct fq *fq, struct fq_tin *tin, fq_skb_filter_t filter_func,
- void *filter_data, fq_skb_free_t free_func);
-void fq_tin_init(struct fq_tin *tin);
-void fq_flow_init(struct fq_flow *flow);
-void fq_tin_reset(struct fq *fq, struct fq_tin *tin, fq_skb_free_t free_func);
-int fq_init(struct fq *fq, int flows_cnt);
-void fq_reset(struct fq *fq, fq_skb_free_t free_func);
-struct fq_flow *fq_flow_classify(struct fq *fq, struct fq_tin *tin, struct sk_buff *skb, fq_flow_get_default_t get_default_func);
-void fq_recalc_backlog(struct fq *fq, struct fq_tin *tin, struct fq_flow *flow);
-struct sk_buff *fq_tin_dequeue(struct fq *fq, struct fq_tin *tin, fq_tin_dequeue_t dequeue_func);
-
-
-/*******************************
- ** XXX needed by af_packet.c **
- *******************************/
-
-#include
-
-
-/*******************
- ** linux/cache.h **
- *******************/
-
-#define __ro_after_init
-
-
-/******************
- ** net/l3mdev.h **
- ******************/
-
-int l3mdev_master_ifindex_by_index(struct net *net, int ifindex);
-
-
-/********************
- ** linux/cgroup.h **
- ********************/
-
-static inline void cgroup_sk_alloc(struct sock_cgroup_data *skcd) { }
-static inline void cgroup_sk_free(struct sock_cgroup_data *skcd) { }
-
-
-/*******************
- ** acpi/actype.h **
- *******************/
-
-typedef char *acpi_string;
-
-
-/**********************
- ** linux/bitfield.h **
- **********************/
-
-#define __bf_shf(x) (__builtin_ffsll(x) - 1)
-#define FIELD_PREP(_mask, _val) \
- ({ ((typeof(_mask))(_val) << __bf_shf(_mask)) & (_mask); })
-#define FIELD_GET(_mask, _reg) \
- ({ (typeof(_mask))(((_reg) & (_mask)) >> __bf_shf(_mask)); })
-
-/********************
- ** linux/nospec.h **
- ********************/
-
-static inline unsigned long array_index_mask_nospec(unsigned long index,
- unsigned long size)
-{
- (void)index;
- return ~(long)(index | (size - 1UL - index)) >> (BITS_PER_LONG - 1);
-}
-
-
-#define array_index_nospec(index, size) \
- ({ \
- typeof(index) _i = (index); \
- typeof(size) _s = (size); \
- unsigned long _mask = array_index_mask_nospec(_i, _s); \
- \
- BUILD_BUG_ON(sizeof(_i) > sizeof(long)); \
- BUILD_BUG_ON(sizeof(_s) > sizeof(long)); \
- \
- (typeof(_i)) (_i & _mask); \
- })
-
-
-/****************************
- ** linux/sock_reuseport.h **
- ****************************/
-
-void reuseport_detach_sock(struct sock *sk);
-
-/* XXX figure out why we need to include this header */
-#include
-
-
-/***************
- ** net/dsa.h **
- ***************/
-
-bool netdev_uses_dsa(struct net_device *dev);
-
-
-/********************
- ** linux/of_net.h **
- ********************/
-
-const void *of_get_mac_address(struct device_node *np);
-
-
-/**************************
- ** linux/sched/signal.h **
- **************************/
-
-unsigned long rlimit(unsigned int limit);
-
-
-/**********************
- ** linux/property.h **
- **********************/
-
-int device_property_read_string(struct device *dev, const char *propname, const char **val);
-
-#include
-
-
-/******************************
- ** uapi/asm-generic/ioctl.h **
- ******************************/
-
-#define _IOC_NR(nr) (nr)
-#define _IOC_TYPE(nr) (nr)
-
-#endif /* _LX_EMUL_H_ */
diff --git a/repos/dde_linux/src/lib/legacy/wifi/include/net/protocol.h b/repos/dde_linux/src/lib/legacy/wifi/include/net/protocol.h
deleted file mode 100644
index 919fe79b24..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/include/net/protocol.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * net/core/sock.c needs but it does not
- * include this header directly. is normally
- * provided by lx_emul.h and is included by sock.c.
- */
-#include
diff --git a/repos/dde_linux/src/lib/legacy/wifi/include/spec/x86_32/platform/platform.h b/repos/dde_linux/src/lib/legacy/wifi/include/spec/x86_32/platform/platform.h
deleted file mode 100644
index 27ec49d58f..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/include/spec/x86_32/platform/platform.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * \brief Platform specific code
- * \author Sebastian Sumpf
- * \date 2012-06-10
- */
-
-/*
- * Copyright (C) 2012-2017 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-#ifndef _X86_32__PLATFORM_H_
-#define _X86_32__PLATFORM_H_
-
-static inline
-void platform_execute(void *sp, void *func, void *arg)
-{
- asm volatile ("movl %2, 0(%0);"
- "movl %1, -0x4(%0);"
- "movl %0, %%esp;"
- "call *-4(%%esp);"
- : : "r" (sp), "r" (func), "r" (arg));
-}
-
-#endif /* _X86_32__PLATFORM_H_ */
diff --git a/repos/dde_linux/src/lib/legacy/wifi/include/spec/x86_64/platform/platform.h b/repos/dde_linux/src/lib/legacy/wifi/include/spec/x86_64/platform/platform.h
deleted file mode 100644
index 32a7d1fc8b..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/include/spec/x86_64/platform/platform.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * \brief Platform specific code
- * \author Sebastian Sumpf
- * \author Alexander Boettcher
- * \date 2012-06-10
- */
-
-/*
- * Copyright (C) 2012-2017 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-#ifndef _X86_64__PLATFORM_H_
-#define _X86_64__PLATFORM_H_
-
-
-static inline
-void platform_execute(void *sp, void *func, void *arg)
-{
- asm volatile ("movq %0, %%rsp;" /* load stack pointer */
- "movq %%rsp, %%rbp;" /* caller stack frame (for GDB debugging) */
- "movq %0, -8(%%rbp);"
- "movq %1, -16(%%rbp);"
- "movq %2, -24(%%rbp);"
- "sub $24, %%rsp;" /* adjust to next stack frame */
- "movq %2, %%rdi;" /* 1st argument */
- "call *-16(%%rbp);" /* call func */
- : : "r" (sp), "r" (func), "r" (arg));
-}
-
-#endif /* _X86_64__PLATFORM_H_ */
diff --git a/repos/dde_linux/src/lib/legacy/wifi/init.cc b/repos/dde_linux/src/lib/legacy/wifi/init.cc
deleted file mode 100644
index 391f240963..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/init.cc
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * \brief Linux wireless stack
- * \author Josef Soentgen
- * \date 2014-03-03
- */
-
-/*
- * Copyright (C) 2014-2017 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-/* Genode includes */
-#include
-#include
-
-/* local includes */
-#include
-#include
-
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-
-/*********************
- ** RFKILL handling **
- *********************/
-
-#include
-
-extern "C" void rfkill_switch_all(enum rfkill_type type, bool blocked);
-extern "C" bool rfkill_get_any(enum rfkill_type type);
-
-#include
-
-bool wifi_get_rfkill(void)
-{
- return rfkill_get_any(RFKILL_TYPE_WLAN);
-}
-
-
-static Lx::Task *_lx_task = nullptr;
-static bool _lx_init_done = false;
-static bool _switch_rfkill = false;
-static bool _new_blocked = false;
-static Genode::Signal_context_capability _rfkill_sig_ctx;
-
-
-void wifi_set_rfkill(bool blocked)
-{
- bool const cur = wifi_get_rfkill();
-
- _switch_rfkill = blocked != cur;
- if (_lx_init_done && _switch_rfkill) {
- _new_blocked = blocked;
-
- _lx_task->unblock();
- Lx::scheduler().schedule();
- }
-}
-
-
-extern "C" unsigned int wifi_ifindex(void)
-{
- return 1;
-}
-
-
-extern "C" char const wifi_ifname(void)
-{
- return "wlan0";
-}
-
-
-/**************************
- ** socketcall poll hack **
- **************************/
-
-void wifi_kick_socketcall()
-{
- /*
- * Kicking is going to unblock the socketcall task that
- * probably is waiting in poll_all().
- */
- Lx::socket_kick();
-}
-
-
-/*****************************
- ** Initialization handling **
- *****************************/
-
-extern "C" void core_netlink_proto_init(void);
-extern "C" void core_sock_init(void);
-extern "C" void module_packet_init(void);
-extern "C" void subsys_genl_init(void);
-extern "C" void subsys_rfkill_init(void);
-extern "C" void fs_cfg80211_init(void);
-extern "C" void subsys_ieee80211_init(void);
-extern "C" int module_iwl_drv_init(void);
-extern "C" void subsys_cryptomgr_init(void);
-extern "C" void module_crypto_ccm_module_init(void);
-extern "C" void module_crypto_ctr_module_init(void);
-extern "C" void module_aes_init(void);
-extern "C" void module_arc4_init(void);
-// extern "C" void module_chainiv_module_init(void);
-extern "C" void module_krng_mod_init(void);
-extern "C" void subsys_leds_init(void);
-
-extern "C" unsigned int *module_param_11n_disable;
-
-struct workqueue_struct *system_power_efficient_wq;
-struct workqueue_struct *system_wq;
-
-struct pernet_operations loopback_net_ops;
-
-struct net init_net;
-LIST_HEAD(net_namespace_list);
-
-
-static Genode::Blockade *_wpa_blockade;
-
-
-static void run_linux(void *args)
-{
- system_power_efficient_wq = alloc_workqueue("system_power_efficient_wq", 0, 0);
- system_wq = alloc_workqueue("system_wq", 0, 0);
-
- core_sock_init();
- core_netlink_proto_init();
- module_packet_init();
- subsys_genl_init();
- subsys_rfkill_init();
- subsys_leds_init();
- fs_cfg80211_init();
- subsys_ieee80211_init();
-
- subsys_cryptomgr_init();
- module_crypto_ccm_module_init();
- module_crypto_ctr_module_init();
- module_aes_init();
- module_arc4_init();
-
- try {
- int const err = module_iwl_drv_init();
- if (err) { throw -1; }
- } catch (...) {
- Genode::Env &env = *(Genode::Env*)args;
-
- env.parent().exit(1);
- Genode::sleep_forever();
- }
-
- _wpa_blockade->wakeup();
-
- _lx_init_done = true;
-
- while (1) {
- Lx::scheduler().current()->block_and_schedule();
-
- if (!_switch_rfkill) { continue; }
-
- Genode::log("RFKILL: ", _new_blocked ? "BLOCKED" : "UNBLOCKED");
- rfkill_switch_all(RFKILL_TYPE_WLAN, _new_blocked);
-
- if (!_new_blocked) {
- try {
- bool const ok = Lx::open_device();
- if (!ok) { throw -1; }
-
- } catch (...) {
- Genode::Env &env = *(Genode::Env*)args;
-
- env.parent().exit(1);
- Genode::sleep_forever();
- }
- }
-
- /* notify front end */
- Genode::Signal_transmitter(_rfkill_sig_ctx).submit();
- }
-}
-
-
-unsigned long jiffies;
-
-
-void wifi_init(Genode::Env &env,
- Genode::Blockade &blockade,
- bool disable_11n,
- Genode::Signal_context_capability rfkill)
-{
- Lx_kit::construct_env(env);
-
- LX_MUTEX_INIT(crypto_default_rng_lock);
- LX_MUTEX_INIT(fanout_mutex);
- LX_MUTEX_INIT(genl_mutex);
- LX_MUTEX_INIT(proto_list_mutex);
- LX_MUTEX_INIT(rate_ctrl_mutex);
- LX_MUTEX_INIT(reg_regdb_apply_mutex);
- LX_MUTEX_INIT(rfkill_global_mutex);
- LX_MUTEX_INIT(rtnl_mutex);
-
- _wpa_blockade = &blockade;
-
- INIT_LIST_HEAD(&init_net.dev_base_head);
- /* add init_net namespace to namespace list */
- list_add_tail_rcu(&init_net.list, &net_namespace_list);
-
- Lx::scheduler(&env);
-
- Lx::timer(&env, &env.ep(), &Lx_kit::env().heap(), &jiffies);
-
- Lx::Irq::irq(&env.ep(), &Lx_kit::env().heap());
- Lx::Work::work_queue(&Lx_kit::env().heap());
-
- Lx::socket_init(env.ep(), Lx_kit::env().heap());
- Lx::nic_init(env, Lx_kit::env().heap());
-
- Lx::pci_init(env, env.ram(), Lx_kit::env().heap());
- Lx::malloc_init(env, Lx_kit::env().heap());
-
- /* set IWL_DISABLE_HT_ALL if disable 11n is requested */
- if (disable_11n) {
- Genode::log("Disable 11n mode");
- *module_param_11n_disable = 1;
- }
-
- _rfkill_sig_ctx = rfkill;
-
- /* Linux task (handles the initialization only currently) */
- static Lx::Task linux(run_linux, &env, "linux",
- Lx::Task::PRIORITY_0, Lx::scheduler());
-
- _lx_task = &linux;
-
- /* give all task a first kick before returning */
- Lx::scheduler().schedule();
-}
diff --git a/repos/dde_linux/src/lib/legacy/wifi/lx.h b/repos/dde_linux/src/lib/legacy/wifi/lx.h
deleted file mode 100644
index b86a92106b..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/lx.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * \brief Lx env
- * \author Josef Soentgen
- * \date 2014-10-17
- */
-
-/*
- * Copyright (C) 2014-2017 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-#ifndef _LX_H_
-#define _LX_H_
-
-/* Genode includes */
-#include
-
-/* local includes */
-#include
-
-
-#define DEBUG_PRINTK 1
-#define DEBUG_DEV_DBG 1
-#define DEBUG_SCHEDULING 0
-
-
-namespace Lx
-{
- void emul_init(Genode::Env&, Genode::Allocator&);
-
- void socket_init(Genode::Entrypoint&, Genode::Allocator&);
- void socket_kick();
-
- void nic_init(Genode::Env&, Genode::Allocator&);
-
- Genode::Ram_dataspace_capability backend_alloc(Genode::addr_t, Genode::Cache);
- void backend_free(Genode::Ram_dataspace_capability);
-
- void get_mac_address(unsigned char *);
-
- bool open_device();
-}
-
-#endif /* _LX_H_ */
diff --git a/repos/dde_linux/src/lib/legacy/wifi/lxc.h b/repos/dde_linux/src/lib/legacy/wifi/lxc.h
deleted file mode 100644
index 0bdad76ab7..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/lxc.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * \brief Lx C env
- * \author Josef Soentgen
- * \date 2016-03-04
- */
-
-/*
- * Copyright (C) 2016-2017 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-#ifndef _LXC_H_
-#define _LXC_H_
-
-/*
- * The sk_buff struct contains empty array members whose
- * size differs between C and C++. Since we want to access
- * certain members of the sk_buff from C++ we have to use
- * a uniform format useable from both languages.W
- *
- * Note: we pull struct skb_buff as well as size_t from
- * headers included before this one.
- */
-struct Skb
-{
- void *packet;
- size_t packet_size;
- void *frag;
- size_t frag_size;
-};
-
-struct Skb skb_helper(struct sk_buff *skb);
-bool is_eapol(struct sk_buff *skb);
-
-struct sk_buff *lxc_alloc_skb(size_t len, size_t headroom);
-unsigned char *lxc_skb_put(struct sk_buff *skb, size_t len);
-
-#endif /* _LXC_H_ */
diff --git a/repos/dde_linux/src/lib/legacy/wifi/lxc_emul.c b/repos/dde_linux/src/lib/legacy/wifi/lxc_emul.c
deleted file mode 100644
index d050f903a5..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/lxc_emul.c
+++ /dev/null
@@ -1,519 +0,0 @@
-/*
- * \brief Linux emulation code
- * \author Josef Soentgen
- * \date 2014-03-07
- */
-
-/*
- * Copyright (C) 2014-2017 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-/* linux includes */
-#include
-#include
-#include
-#include
-
-/* local includes */
-#include
-
-
-/*************************************
- ** private Lx C env implementation **
- *************************************/
-
-bool is_eapol(struct sk_buff *skb)
-{
- return ntohs(skb->protocol) == ETH_P_PAE;
-}
-
-
-struct Skb skb_helper(struct sk_buff *skb)
-{
- struct Skb helper;
-
- skb_push(skb, ETH_HLEN);
-
- helper.packet = skb->data;
- helper.packet_size = skb->len;
- helper.frag = 0;
- helper.frag_size = 0;
-
- /**
- * If received packets are too large (as of now 128 bytes) the actually
- * payload is put into a fragment. Otherwise the payload is stored directly
- * in the sk_buff.
- */
- if (skb_shinfo(skb)->nr_frags) {
- if (skb_shinfo(skb)->nr_frags > 1)
- printk("more than 1 fragment in skb: %p nr_frags: %d", skb,
- skb_shinfo(skb)->nr_frags);
-
- skb_frag_t *f = &skb_shinfo(skb)->frags[0];
- helper.frag = skb_frag_address(f);
- helper.frag_size = skb_frag_size(f);
- /* fragment contains payload but header is still found in packet */
- helper.packet_size = ETH_HLEN;
- }
-
- return helper;
-}
-
-
-extern int verbose_alloc;
-
-
-struct sk_buff *lxc_alloc_skb(size_t len, size_t headroom)
-{
- struct sk_buff *skb = alloc_skb(len + headroom, GFP_KERNEL);
- skb_reserve(skb, headroom);
- return skb;
-}
-
-
-unsigned char *lxc_skb_put(struct sk_buff *skb, size_t len)
-{
- return skb_put(skb, len);
-}
-
-
-/****************************
- ** asm-generic/atomic64.h **
- ****************************/
-
-/**
- * This is not atomic on 32bit systems but this is not a problem
- * because we will not be preempted.
- */
-long long atomic64_add_return(long long i, atomic64_t *p)
-{
- p->counter += i;
- return p->counter;
-}
-
-
-/**********************
- ** linux/refcount.h **
- **********************/
-
-void refcount_add(unsigned int i, refcount_t *r)
-{
- atomic_add(i, &r->refs);
-}
-
-
-void refcount_dec(refcount_t *r)
-{
- atomic_dec(&r->refs);
-}
-
-
-bool refcount_dec_and_test(refcount_t *r)
-{
- return atomic_dec_and_test(&r->refs);
-}
-
-
-void refcount_inc(refcount_t *r)
-{
- atomic_inc(&r->refs);
-}
-
-
-bool refcount_inc_not_zero(refcount_t *r)
-{
- return atomic_add_unless(&r->refs, 1, 0);
-}
-
-
-unsigned int refcount_read(const refcount_t *r)
-{
- return atomic_read(&r->refs);
-}
-
-
-void refcount_set(refcount_t *r, unsigned int n)
-{
- atomic_set(&r->refs, n);
-}
-
-bool refcount_sub_and_test(unsigned int i, refcount_t *r)
-{
- return atomic_sub_and_test(i, &r->refs);
-}
-
-
-/**********************************
- ** linux/bitops.h, asm/bitops.h **
- **********************************/
-
-unsigned int hweight32(unsigned int w)
-{
- w -= (w >> 1) & 0x55555555;
- w = (w & 0x33333333) + ((w >> 2) & 0x33333333);
- w = (w + (w >> 4)) & 0x0f0f0f0f;
- return (w * 0x01010101) >> 24;
-}
-
-
-unsigned long find_last_bit(const unsigned long *addr, unsigned long size)
-{
- if (size) {
- unsigned long val = BITMAP_LAST_WORD_MASK(size);
- unsigned long idx = (size-1) / BITS_PER_LONG;
-
- do {
- val &= addr[idx];
- if (val)
- return idx * BITS_PER_LONG + __fls(val);
-
- val = ~0ul;
- } while (idx--);
- }
- return size;
-}
-
-
-/*****************************
- ** linux/platform_device.h **
- *****************************/
-
-int platform_device_add_resources(struct platform_device *pdev,
- const struct resource *res, unsigned int num)
-{
- if (!res || !num) {
- pdev->resource = NULL;
- pdev->num_resources = 0;
- }
-
- struct resource *r = NULL;
-
- if (res) {
- r = kmemdup(res, sizeof(struct resource) * num, GFP_KERNEL);
- if (!r)
- return -ENOMEM;
- }
-
- kfree(pdev->resource);
- pdev->resource = r;
- pdev->num_resources = num;
- return 0;
-}
-
-
-struct bus_type platform_bus_type = {
- .name = "platform"
-};
-
-
-struct platform_device *platform_device_register_simple(const char *name, int id,
- const struct resource *res,
- unsigned int num)
-{
- struct platform_device *pdev = kzalloc(sizeof (struct platform_device), GFP_KERNEL);
- if (!pdev)
- return 0;
-
- pdev->dev.bus = &platform_bus_type;
-
- size_t len = strlen(name);
- pdev->name = kzalloc(len + 1, GFP_KERNEL);
- if (!pdev->name)
- goto pdev_out;
-
- memcpy(pdev->name, name, len);
- pdev->name[len] = 0;
- pdev->id = id;
-
- int err = platform_device_add_resources(pdev, res, num);
- if (err)
- goto pdev_name_out;
-
- return pdev;
-
-pdev_name_out:
- kfree(pdev->name);
-pdev_out:
- kfree(pdev);
-
- return 0;
-}
-
-
-/***********************
- ** linux/netdevice.h **
- ***********************/
-
-void netdev_run_todo() {
- __rtnl_unlock();
-}
-
-
-void netif_set_gso_max_size(struct net_device *dev, unsigned int size)
-{
- dev->gso_max_size = size;
-}
-
-
-/********************
- ** linux/kernel.h **
- ********************/
-
-unsigned long int_sqrt(unsigned long x)
-{
- unsigned long b, m, y = 0;
-
- if (x <= 1) return x;
-
- m = 1UL << (BITS_PER_LONG - 2);
- while (m != 0) {
- b = y + m;
- y >>= 1;
-
- if (x >= b) {
- x -= b;
- y += m;
- }
- m >>= 2;
- }
-
- return y;
-}
-
-
-/*************************
- ** linux/scatterlist.h **
- *************************/
-
-void sg_chain(struct scatterlist *prv, unsigned int prv_nents,
- struct scatterlist *sgl)
-{
- prv[prv_nents - 1].offset = 0;
- prv[prv_nents - 1].length = 0;
- prv[prv_nents - 1].page_link = (unsigned long)sgl;
-
- prv[prv_nents - 1].page_flags |= 0x01;
- prv[prv_nents - 1].page_flags &= ~0x02;
-}
-
-
-void sg_init_table(struct scatterlist *sgl, unsigned int nents)
-{
- memset(sgl, 0, sizeof(*sgl) * nents);
- sg_mark_end(&sgl[nents -1]);
-}
-
-
-void sg_mark_end(struct scatterlist *sg)
-{
- sg->page_flags |= 0x02;
- sg->page_flags &= ~0x01;
-}
-
-
-struct scatterlist *sg_next(struct scatterlist *sg)
-{
- if (sg_is_last(sg))
- return NULL;
-
- sg++;
-
- if (sg_is_chain(sg))
- sg = sg_chain_ptr(sg);
-
- return sg;
-}
-
-
-void sg_set_buf(struct scatterlist *sg, const void *buf, unsigned int buflen)
-{
- struct page *page = &sg->page_dummy;
- sg->page_dummy.addr = (void*)buf;
- sg_set_page(sg, page, buflen, 0);
-}
-
-
-void sg_set_page(struct scatterlist *sg, struct page *page, unsigned int len, unsigned int offset)
-{
- sg->page_link = (unsigned long) page;
- sg->offset = offset;
- sg->length = len;
-}
-
-
-/****************
- ** net/sock.h **
- ****************/
-
-static const struct net_proto_family *net_families[NPROTO];
-
-int sock_register(const struct net_proto_family *ops)
-{
- if (ops->family >= NPROTO) {
- printk("protocol %d >= NPROTO (%d)\n", ops->family, NPROTO);
- return -ENOBUFS;
- }
-
- net_families[ops->family] = ops;
- pr_info("NET: Registered protocol family %d\n", ops->family);
- return 0;
-}
-
-
-struct socket *sock_alloc(void)
-{
- return (struct socket *)kmalloc(sizeof(struct socket), 0);
-}
-
-
-int sock_create_lite(int family, int type, int protocol, struct socket **res)
-
-{
- struct socket *sock = sock_alloc();
-
- if (!sock) return -ENOMEM;
-
- sock->type = type;
- *res = sock;
- return 0;
-}
-
-
-int sock_create_kern(struct net *net, int family, int type, int proto,
- struct socket **res)
-{
- struct socket *sock;
- const struct net_proto_family *pf;
- int err;
-
- if (family < 0 || family > NPROTO)
- return -EAFNOSUPPORT;
-
- if (type < 0 || type > SOCK_MAX)
- return -EINVAL;
-
- pf = net_families[family];
-
- if (!pf) {
- printk("No protocol found for family %d\n", family);
- return -ENOPROTOOPT;
- }
-
- if (!(sock = (struct socket *)kzalloc(sizeof(struct socket), 0))) {
- printk("Could not allocate socket\n");
- return -ENFILE;
- }
-
- sock->type = type;
-
- err = pf->create(&init_net, sock, proto, 1);
- if (err) {
- kfree(sock);
- return err;
- }
-
- *res = sock;
-
- return 0;
-}
-
-
-void log_sock(struct socket *socket)
-{
- printk("\nNEW socket %p sk %p fsk %lx &sk %p &fsk %p\n\n",
- socket, socket->sk, socket->flags, &socket->sk, &socket->flags);
-}
-
-
-static void sock_init(void)
-{
- skb_init();
-}
-
-
-core_initcall(sock_init);
-
-
-/*****************
- ** net/codel.h **
- *****************/
-
-codel_time_t codel_get_time(void)
-{
- u64 ns = ktime_get();
- return ns >> CODEL_SHIFT;
-}
-
-
-/**********************
- ** net/codel_impl.h **
- **********************/
-
-void codel_params_init(struct codel_params *params)
-{
- params->interval = MS2TIME(100);
- params->target = MS2TIME(5);
- params->ce_threshold = CODEL_DISABLED_THRESHOLD;
- params->ecn = false;
-}
-
-void codel_vars_init(struct codel_vars *vars)
-{
- memset(vars, 0, sizeof(*vars));
-}
-
-void codel_stats_init(struct codel_stats *stats)
-{
- // stats->maxpacket = 0;
-}
-
-
-/*************************
- ** linux/timekeeping.h **
- *************************/
-
-u64 ktime_get_boot_ns(void)
-{
- return (u64)ktime_get();
-}
-
-
-/********************
- ** linux/device.h **
- ********************/
-
-struct device *device_create_with_groups(struct class *class,
- struct device *parent, dev_t devt,
- void *drvdata,
- const struct attribute_group **groups,
- const char *fmt, ...)
-{
- long ret = -ENODEV;
- if (class == NULL || IS_ERR(class)) { goto err; }
-
- struct device *dev = kzalloc(sizeof(*dev), GFP_KERNEL);
- if (!dev) {
- ret = -ENOMEM;
- goto err;
- }
-
- return dev;
-
-err:
- return (void*)ret;
-}
-
-
-struct class *__class_create(struct module *owner,
- const char *name,
- struct lock_class_key *key)
-{
- struct class *cls = kzalloc(sizeof(*cls), GFP_KERNEL);
- if (!cls) { return (void*)-ENOMEM; }
-
- cls->name = name;
- return cls;
-}
diff --git a/repos/dde_linux/src/lib/legacy/wifi/lxcc_emul.cc b/repos/dde_linux/src/lib/legacy/wifi/lxcc_emul.cc
deleted file mode 100644
index 4e9eca46c2..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/lxcc_emul.cc
+++ /dev/null
@@ -1,1663 +0,0 @@
-/*
- * \brief Linux emulation code
- * \author Josef Soentgen
- * \date 2014-03-07
- */
-
-/*
- * Copyright (C) 2014-2017 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-/* Genode includes */
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-/* local includes */
-#include
-#include
-
-#include
-#include
-#include
-
-
-typedef ::size_t size_t;
-typedef Genode::addr_t addr_t;
-
-
-
-/********************
- ** linux/string.h **
- ********************/
-
-size_t strlen(const char *s)
-{
- return Genode::strlen(s);
-}
-
-
-int strcmp(const char* s1, const char *s2)
-{
- return Genode::strcmp(s1, s2);
-}
-
-
-int strncmp(const char *s1, const char *s2, size_t len)
-{
- return Genode::strcmp(s1, s2, len);
-}
-
-
-char *strchr(const char *p, int ch)
-{
- char c;
- c = ch;
- for (;; ++p) {
- if (*p == c)
- return ((char *)p);
- if (*p == '\0')
- break;
- }
-
- return 0;
-}
-
-
-void *memchr(const void *s, int c, size_t n)
-{
- const unsigned char *p = (unsigned char *)s;
- while (n-- != 0) {
- if ((unsigned char)c == *p++) {
- return (void *)(p - 1);
- }
- }
- return NULL;
-}
-
-
-char *strnchr(const char *p, size_t count, int ch)
-{
- char c;
- c = ch;
- for (; count; ++p, count--) {
- if (*p == c)
- return ((char *)p);
- if (*p == '\0')
- break;
- }
-
- return 0;
-}
-
-
-char *strcpy(char *dst, const char *src)
-{
- char *p = dst;
-
- while ((*dst = *src)) {
- ++src;
- ++dst;
- }
-
- return p;
-}
-
-
-size_t strlcpy(char *dest, const char *src, size_t size)
-{
- size_t ret = strlen(src);
-
- if (size) {
- size_t len = (ret >= size) ? size - 1 : ret;
- Genode::memcpy(dest, src, len);
- dest[len] = '\0';
- }
- return ret;
-}
-
-
-int sprintf(char *str, const char *format, ...)
-{
- enum { BUFFER_LEN = 128 };
- va_list list;
-
- va_start(list, format);
- Genode::String_console sc(str, BUFFER_LEN);
- sc.vprintf(format, list);
- va_end(list);
-
- return sc.len();
-}
-
-
-int snprintf(char *str, size_t size, const char *format, ...)
-{
- va_list list;
-
- va_start(list, format);
- Genode::String_console sc(str, size);
- sc.vprintf(format, list);
- va_end(list);
-
- return sc.len();
-}
-
-
-int vsnprintf(char *str, size_t size, const char *format, va_list args)
-{
- Genode::String_console sc(str, size);
- sc.vprintf(format, args);
-
- return sc.len();
-}
-
-
-int scnprintf(char *buf, size_t size, const char *fmt, ...)
-{
- va_list args;
-
- va_start(args, fmt);
- Genode::String_console sc(buf, size);
- sc.vprintf(fmt, args);
- va_end(args);
-
- return sc.len();
-}
-
-
-size_t strnlen(const char *s, size_t maxlen)
-{
- size_t c;
- for (c = 0; c 0) {
- if (iov->iov_len) {
- size_t copy_len = (size_t)len < iov->iov_len ? len : iov->iov_len;
- Genode::memcpy(kdata, iov->iov_base, copy_len);
-
- len -= copy_len;
- kdata += copy_len;
- iov->iov_base = (unsigned char *)iov->iov_base + copy_len;
- iov->iov_len -= copy_len;
- }
- iov++;
- }
-
- return 0;
-}
-
-
-int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len)
-{
- while (len > 0) {
- if (iov->iov_len) {
- size_t copy_len = (size_t)len < iov->iov_len ? len : iov->iov_len;
- Genode::memcpy(iov->iov_base, kdata, copy_len);
-
- len -= copy_len;
- kdata += copy_len;
- iov->iov_base = (unsigned char *)iov->iov_base + copy_len;
- iov->iov_len -= copy_len;
- }
- iov++;
- }
-
- return 0;
-}
-
-
-size_t copy_from_iter(void *addr, size_t bytes, struct iov_iter *i)
-{
- if (bytes > i->count)
- bytes = i->count;
-
- if (bytes == 0)
- return 0;
-
- char *kdata = reinterpret_cast(addr);
- struct iovec const *iov = i->iov;
-
- size_t len = bytes;
- while (len > 0) {
- if (iov->iov_len) {
- size_t copy_len = (size_t)len < iov->iov_len ? len : iov->iov_len;
- Genode::memcpy(kdata, iov->iov_base, copy_len);
-
- len -= copy_len;
- kdata += copy_len;
- }
- iov++;
- }
-
- return bytes;
-}
-
-
-bool copy_from_iter_full(void *addr, size_t bytes, struct iov_iter *i)
-{
- /* XXX at some point check if i->count > bytes could be a problem */
- if (bytes > i->count)
- bytes = i->count;
-
- if (bytes == 0)
- return true;
-
- size_t const copied = copy_from_iter(addr, bytes, i);
- if (copied != bytes) {
- Genode::error(__func__, ":", __LINE__, " could not copy all bytes");
- return false;
- }
-
- return true;
-}
-
-
-size_t copy_to_iter(void *addr, size_t bytes, struct iov_iter *i)
-{
- if (bytes > i->count)
- bytes = i->count;
-
- if (bytes == 0)
- return 0;
-
- char *kdata = reinterpret_cast(addr);
- struct iovec const *iov = i->iov;
-
- size_t len = bytes;
- while (len > 0) {
- if (iov->iov_len) {
- size_t copy_len = (size_t)len < iov->iov_len ? len : iov->iov_len;
- Genode::memcpy(iov->iov_base, kdata, copy_len);
-
- len -= copy_len;
- kdata += copy_len;
- }
- iov++;
- }
-
- return bytes;
-}
-
-
-size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes,
- struct iov_iter *i)
-{
- return copy_to_iter(reinterpret_cast(page->addr) + offset, bytes, i);
-}
-
-
-size_t copy_page_from_iter(struct page *page, size_t offset, size_t bytes,
- struct iov_iter *i)
-{
- return copy_from_iter(reinterpret_cast(page->addr) + offset, bytes, i);
-}
-
-
-/********************
- ** linux/socket.h **
- ********************/
-
-extern "C" int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov,
- int offset, int len)
-{
- while (offset >= (int)iov->iov_len) {
- offset -= iov->iov_len;
- iov++;
- }
-
- while (len > 0) {
- u8 *base = ((u8*) iov->iov_base) + offset;
- size_t copy_len = len < (int)iov->iov_len - offset ? len : iov->iov_len - offset;
-
- offset = 0;
- Genode::memcpy(kdata, base, copy_len);
-
- len -= copy_len;
- kdata += copy_len;
- iov++;
- }
-
- return 0;
-}
-
-
-/**********************
- ** Memory allocation *
- **********************/
-
-#include
-
-void *kvmalloc(size_t size, gfp_t flags)
-{
- return kmalloc(size, flags);
-}
-
-
-void *kmalloc_array(size_t n, size_t size, gfp_t flags)
-{
- if (size != 0 && n > SIZE_MAX / size) return NULL;
- return kmalloc(n * size, flags);
-}
-
-
-void kvfree(const void *p)
-{
- kfree(p);
-}
-
-
-void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp)
-{
- return kzalloc(size, gfp | GFP_LX_DMA);
-}
-
-
-/*********************
- ** linux/vmalloc.h **
- *********************/
-
-void *vmalloc(unsigned long size)
-{
- size_t real_size = size + sizeof(size_t);
-
- return Lx_kit::env().heap().try_alloc(real_size).convert(
-
- [&] (void *ptr) -> void * {
- size_t * const base = (size_t)ptr;
- *base = real_size;
- return base + 1;
- },
-
- [&] (Genode::Allocator::Alloc_error) -> void * {
- return nullptr; });
-}
-
-
-void *vzalloc(unsigned long size)
-{
- void *addr = vmalloc(size);
-
- if (addr)
- memset(addr, 0, size);
-
- return addr;
-}
-
-
-void vfree(const void *addr)
-{
- if (!addr) return;
-
- size_t size = *(((size_t *)addr) - 1);
- Lx_kit::env().heap().free(const_cast(addr), size);
-}
-
-
-/********************
- ** linux/string.h **
- ********************/
-
-int memcmp(const void *p0, const void *p1, size_t size) {
- return Genode::memcmp(p0, p1, size); }
-
-
-/********************
- ** linux/device.h **
- ********************/
-
-/**
- * Simple driver management class
- */
-class Driver : public Genode::List::Element
-{
- private:
-
- struct device_driver *_drv; /* Linux driver */
-
- public:
-
- Driver(struct device_driver *drv) : _drv(drv)
- {
- list()->insert(this);
- }
-
- /**
- * List of all currently registered drivers
- */
- static Genode::List *list()
- {
- static Genode::List _list;
- return &_list;
- }
-
- /**
- * Match device and drivers
- */
- bool match(struct device *dev)
- {
- /*
- * Don't try if buses don't match, since drivers often use 'container_of'
- * which might cast the device to non-matching type
- */
- if (_drv->bus != dev->bus)
- return false;
-
- bool ret = _drv->bus->match ? _drv->bus->match(dev, _drv) : true;
- return ret;
- }
-
- /**
- * Probe device with driver
- */
- int probe(struct device *dev)
- {
- dev->driver = _drv;
-
- if (dev->bus->probe) {
- return dev->bus->probe(dev);
- } else if (_drv->probe) {
- return _drv->probe(dev);
- }
-
- return 0;
- }
-};
-
-
-int driver_register(struct device_driver *drv)
-{
- new (&Lx_kit::env().heap()) Driver(drv);
- return 0;
-}
-
-int device_add(struct device *dev)
-{
- if (dev->driver)
- return 0;
-
- /* foreach driver match and probe device */
- for (Driver *driver = Driver::list()->first(); driver; driver = driver->next())
- if (driver->match(dev)) {
- int ret = driver->probe(dev);
-
- if (!ret)
- return 0;
- }
-
- return 0;
-}
-
-
-int device_register(struct device *dev)
-{
- //XXX: initialize DMA pools (see device_initialize)
- return device_add(dev);
-}
-
-
-void *dev_get_drvdata(const struct device *dev)
-{
- return dev->driver_data;
-}
-
-
-int dev_set_drvdata(struct device *dev, void *data)
-{
- dev->driver_data = data;
- return 0;
-}
-
-
-const char *dev_name(const struct device *dev) { return dev->name; }
-
-
-int dev_set_name(struct device *dev, const char *fmt, ...)
-{
- enum { MAX_DEV_LEN = 64 };
- /* XXX needs to be freed */
- char *name = (char*)kmalloc(MAX_DEV_LEN, 0);
- if (!name)
- return 1;
-
- va_list list;
- va_start(list, fmt);
- Genode::String_console sc(name, MAX_DEV_LEN);
- sc.vprintf(fmt, list);
-
- va_end(list);
-
- dev->name = name;
- return 0;
-}
-
-
-/********************
- ** linux/kernel.h **
- ********************/
-
-int strict_strtoul(const char *s, unsigned int base, unsigned long *res)
-{
- unsigned long r = -EINVAL;
- Genode::ascii_to_unsigned(s, r, base);
- *res = r;
-
- return r;
-}
-
-
-/*******************
- ** linux/delay.h **
- *******************/
-
-#include
-
-
-void usleep_range(unsigned long min, unsigned long max)
-{
- udelay(min);
-}
-
-
-/*******************
- ** linux/timer.h **
- *******************/
-
-static unsigned long round_jiffies(unsigned long j, bool force_up)
-{
- unsigned remainder = j % HZ;
-
- /*
- * from timer.c
- *
- * If the target jiffie is just after a whole second (which can happen
- * due to delays of the timer irq, long irq off times etc etc) then
- * we should round down to the whole second, not up. Use 1/4th second
- * as cutoff for this rounding as an extreme upper bound for this.
- * But never round down if @force_up is set.
- */
-
- /* per default round down */
- j = j - remainder;
-
- /* round up if remainder more than 1/4 second (or if we're forced to) */
- if (remainder >= HZ/4 || force_up)
- j += HZ;
-
- return j;
-}
-
-unsigned long round_jiffies(unsigned long j)
-{
- return round_jiffies(j, false);
-}
-
-
-unsigned long round_jiffies_up(unsigned long j)
-{
- return round_jiffies(j, true);
-}
-
-
-unsigned long round_jiffies_relative(unsigned long j)
-{
- return round_jiffies(j + jiffies, false) - jiffies;
-}
-
-
-/*******************
- ** linux/ktime.h **
- *******************/
-
-ktime_t ktime_get_real(void)
-{
- return (ktime_t) (s64)(jiffies * (1000 / HZ) * NSEC_PER_MSEC);
-}
-
-
-ktime_t ktime_sub(ktime_t const lhs, ktime_t const rhs)
-{
- return lhs - rhs;
-}
-
-
-struct timespec ktime_to_timespec(ktime_t const nsec)
-{
- struct timespec ts;
- if (!nsec) { return (struct timespec) {0, 0}; }
-
- /* XXX check nsec < NSEC_PER_SEC */
- ts.tv_sec = nsec / NSEC_PER_SEC;
- ts.tv_nsec = (nsec % NSEC_PER_SEC) * (1000*1000);
-
- return ts;
-}
-
-
-bool ktime_to_timespec_cond(ktime_t const kt, struct timespec *ts)
-{
- if (kt) {
- *ts = ktime_to_timespec(kt);
- return true;
- }
-
- return false;
-}
-
-
-struct timeval ns_to_timeval(ktime_t const nsec)
-{
- struct timespec ts = ktime_to_timespec(nsec);
- struct timeval tv;
-
- tv.tv_sec = ts.tv_sec;
- tv.tv_usec = ts.tv_nsec / 1000;
-
- return tv;
-}
-
-
-/*************************
- ** linux/timekeeping.h **
- *************************/
-
-time64_t ktime_get_seconds(void)
-{
- return jiffies_to_msecs(jiffies) / 1000;
-}
-
-
-/*************************
- ** linux/dma-mapping.h **
- *************************/
-
-/* use a smaller limit then possible to cover potential overhead */
-enum { DMA_LARGE_ALLOC_SIZE = 60u << 10, };
-
-void *dma_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t flag)
-{
- bool const large_alloc = size >= DMA_LARGE_ALLOC_SIZE;
- dma_addr_t dma_addr = 0;
- void *addr = large_alloc ? Lx::Malloc::dma().alloc_large(size)
- : Lx::Malloc::dma().malloc(size, 12, &dma_addr);
-
- if (addr) {
- *dma_handle = large_alloc ? Lx::Malloc::dma().phys_addr(addr)
- : dma_addr;
- }
- return addr;
-}
-
-
-void *dma_zalloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t flag)
-{
- void *addr = dma_alloc_coherent(dev, size, dma_handle, flag);
-
- if (addr)
- Genode::memset(addr, 0, size);
-
- return addr;
-}
-
-
-void dma_free_coherent(struct device *dev, size_t size,
- void *vaddr, dma_addr_t dma_handle)
-{
- if (size >= DMA_LARGE_ALLOC_SIZE) {
- Lx::Malloc::dma().free_large(vaddr);
- return;
- }
-
- if (Lx::Malloc::dma().inside((Genode::addr_t)vaddr)) {
- Lx::Malloc::dma().free(vaddr);
- } else {
- Genode::error("vaddr: ", vaddr, " is not DMA memory");
- }
-}
-
-
-dma_addr_t dma_map_page(struct device *dev, struct page *page,
- size_t offset, size_t size,
- enum dma_data_direction direction)
-{
- if (!Lx::Malloc::dma().inside((Genode::addr_t)page->addr)) {
- Genode::error(__func__, ": virtual address ", (void*)page->addr, " not an DMA address");
- }
-
- dma_addr_t dma_addr = (dma_addr_t) Lx::Malloc::dma().phys_addr(page->addr);
-
- if (dma_addr == ~0UL) {
- Genode::error(__func__, ": virtual address ", (void*)page->addr,
- " not registered for DMA");
- }
-
- return dma_addr;
-}
-
-dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, size_t size,
- enum dma_data_direction direction)
-{
- dma_addr_t dma_addr = (dma_addr_t) Lx::Malloc::dma().phys_addr(cpu_addr);
-
- if (dma_addr == ~0UL) {
- Genode::error(__func__, ": virtual address ", cpu_addr,
- " not registered for DMA ", __builtin_return_address(0));
- BUG();
- }
-
- return dma_addr;
-}
-
-
-int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
-{
- return (dma_addr == ~0UL) ? 1 : 0;
-}
-
-
-/********************
- ** linux/dcache.h **
- ********************/
-
-unsigned int full_name_hash(const unsigned char *name, unsigned int len)
-{
- unsigned hash = 0, i;
- for (i = 0; i < len; i++)
- hash += name[i];
-
- return hash;
-}
-
-
-/******************
- ** linux/hash.h **
- ******************/
-
-u32 hash_32(u32 val, unsigned int bits)
-{
- enum { GOLDEN_RATIO_PRIME_32 = 0x9e370001UL };
- u32 hash = val * GOLDEN_RATIO_PRIME_32;
-
- hash = hash >> (32 - bits);
- return hash;
-}
-
-
-/*****************
- ** linux/gfp.h **
- *****************/
-
-class Addr_to_page_mapping : public Genode::List::Element
-{
- private:
-
- unsigned long _addr { 0 };
- struct page *_page { 0 };
-
- static Genode::List *_list()
- {
- static Genode::List _l;
- return &_l;
- }
-
- public:
-
- Addr_to_page_mapping(unsigned long addr, struct page *page)
- : _addr(addr), _page(page) { }
-
- static void insert(struct page *page)
- {
- Addr_to_page_mapping *m = (Addr_to_page_mapping*)
- Lx::Malloc::mem().alloc(sizeof (Addr_to_page_mapping));
-
- m->_addr = (unsigned long)page->addr;
- m->_page = page;
-
- _list()->insert(m);
- }
-
- static void remove(struct page *page)
- {
- Addr_to_page_mapping *mp = 0;
- for (Addr_to_page_mapping *m = _list()->first(); m; m = m->next())
- if (m->_page == page)
- mp = m;
-
- if (mp) {
- _list()->remove(mp);
- Lx::Malloc::mem().free(mp);
- }
- }
-
- static struct page* find_page(unsigned long addr)
- {
- for (Addr_to_page_mapping *m = _list()->first(); m; m = m->next())
- if (m->_addr == addr)
- return m->_page;
-
- return 0;
- }
-};
-
-
-unsigned long get_zeroed_page(gfp_t gfp_mask)
-{
- struct page *p = alloc_pages(gfp_mask, 0);
- if (!p)
- return 0UL;
-
- Genode::memset(p->addr, 0, PAGE_SIZE);
-
- return (unsigned long)p->addr;
-}
-
-
-struct page *alloc_pages(gfp_t gfp_mask, unsigned int order)
-{
- struct page *page = (struct page *)kzalloc(sizeof(struct page), 0);
-
- size_t size = PAGE_SIZE << order;
-
- page->addr = Lx::Malloc::dma().malloc(size, 12);
-
- if (!page->addr) {
- Genode::error("alloc_pages: ", size, " failed");
- kfree(page);
- return 0;
- }
-
- Addr_to_page_mapping::insert(page);
-
- atomic_set(&page->_count, 1);
-
- return page;
-}
-
-
-void *__alloc_page_frag(struct page_frag_cache *nc,
- unsigned int fragsz, gfp_t gfp_mask)
-{
- struct page *page = alloc_pages(gfp_mask, fragsz / PAGE_SIZE);
- if (!page) return nullptr;
-
- return page->addr;
-}
-
-
-void *page_frag_alloc(struct page_frag_cache *nc, unsigned int fragsz, gfp_t gfp_mask)
-{
- return __alloc_page_frag(nc, fragsz, gfp_mask);
-}
-
-
-void page_frag_free(void *addr)
-{
- __free_page_frag(addr);
-}
-
-
-void __free_page_frag(void *addr)
-{
- struct page *page = virt_to_head_page(addr);
- __free_pages(page, 0xdeadbeef);
-}
-
-
-void __free_pages(struct page *page, unsigned int order)
-{
- if (!atomic_dec_and_test(&page->_count))
- /* reference counter did not drop to zero - do not free yet */
- return;
-
- Addr_to_page_mapping::remove(page);
-
- Lx::Malloc::dma().free(page->addr);
- kfree(page);
-}
-
-
-void free_pages(unsigned long page, unsigned int order)
-{
- struct page *p = Addr_to_page_mapping::find_page(page);
- __free_pages(p, order);
-}
-
-
-/****************
- ** linux/mm.h **
- ****************/
-
-struct page *virt_to_head_page(const void *addr)
-{
- struct page *page = Addr_to_page_mapping::find_page((unsigned long)addr);
- if (!page) {
- /**
- * Linux uses alloc_pages() to allocate memory but passes addr + offset
- * to the caller (e.g. __netdev_alloc_frag()). Therefore, we also try to
- * find the aligned addr in our page mapping list.
- */
- unsigned long aligned_addr = (unsigned long)addr & ~0xfff;
- page = Addr_to_page_mapping::find_page(aligned_addr);
- if (!page) {
- Genode::error("BUG: addr: ", addr, " and aligned addr: ",
- (void*)aligned_addr, " have no page mapping, ");
- Genode::sleep_forever();
- }
- }
-
- return page;
-}
-
-
-void get_page(struct page *page)
-{
- atomic_inc(&page->_count);
-}
-
-
-void put_page(struct page *page)
-{
- if (!page) {
- Genode::warning(__func__, ": page is zero");
- return;
- }
-
- if (!atomic_dec_and_test(&page->_count))
- return;
-
- Lx::Malloc::dma().free(page->addr);
- kfree(page);
-}
-
-
-/*******************************
- ** asm-generic/bitops/find.h **
- *******************************/
-
-unsigned long find_next_bit(const unsigned long *addr, unsigned long size,
- unsigned long offset)
-{
- unsigned long i = offset / BITS_PER_LONG;
- offset -= (i * BITS_PER_LONG);
-
- for (; offset < size; offset++)
- if (addr[i] & (1UL << offset))
- return offset;
-
- return size;
-}
-
-
-unsigned long find_next_zero_bit(unsigned long const *addr, unsigned long size,
- unsigned long offset)
-{
- unsigned long i, j;
-
- for (i = offset; i < (size / BITS_PER_LONG); i++)
- if (addr[i] != ~0UL)
- break;
-
- if (i == size)
- return size;
-
- for (j = 0; j < BITS_PER_LONG; j++)
- if ((~addr[i]) & (1UL << j))
- break;
-
- return (i * BITS_PER_LONG) + j;
-}
-
-
-/**********************
- ** linux/notifier.h **
- **********************/
-
-int raw_notifier_chain_register(struct raw_notifier_head *nh,
- struct notifier_block *n)
-{
- struct notifier_block *nl = nh->head;
- struct notifier_block *pr = 0;
- while (nl) {
- if (n->priority > nl->priority)
- break;
- pr = nl;
- nl = nl->next;
- }
-
- n->next = nl;
- if (pr)
- pr->next = n;
- else
- nh->head = n;
-
- return 0;
-}
-
-
-int raw_notifier_call_chain(struct raw_notifier_head *nh,
- unsigned long val, void *v)
-{
- int ret = NOTIFY_DONE;
- struct notifier_block *nb = nh->head;
-
- while (nb) {
-
- ret = nb->notifier_call(nb, val, v);
- if ((ret & NOTIFY_STOP_MASK) == NOTIFY_STOP_MASK)
- break;
-
- nb = nb->next;
- }
-
- return ret;
-}
-
-
-/********************
- ** linux/percpu.h **
- ********************/
-
-void *__alloc_percpu(size_t size, size_t align)
-{
- return kmalloc(size, 0);
-}
-
-
-/**********************
- ** net/ns/generic.h **
- **********************/
-
-void *net_generic(const struct net *net, unsigned int id)
-{
- if (id >= MAX_NET_GENERIC_PTR) {
- Genode::error(__func__, ":", " id ", id, " invalid");
- return NULL;
- }
-
- struct net_generic *ng = net->gen;
- void *ptr = ng->ptr[id];
- if (!ptr) {
- Genode::error(__func__, ":", " cannot get ptr");
- BUG();
- }
-
- return ptr;
-}
-
-
-/*******************************
- ** net/core/net/namespace.h **
- *******************************/
-
-int register_pernet_subsys(struct pernet_operations *ops)
-{
- if (!init_net.gen) {
- init_net.gen = (struct net_generic*)kzalloc(
- offsetof(struct net_generic, ptr[MAX_NET_GENERIC_PTR]), 0);
- if (!init_net.gen) {
- Genode::error("could not allocate net_generic memory");
- return -1;
- }
- }
-
- if (ops->id && ops->size) {
- /* XXX AFAICS there is only netlink_tap_net_ops that requires it */
- unsigned int id = *ops->id;
- if (id >= MAX_NET_GENERIC_PTR) {
- Genode::error(__func__, ":", " id ", id, " invalid");
- return -1;
- }
-
- void *data = kzalloc(ops->size, 0);
- init_net.gen->ptr[id] = data;
- }
-
- if (ops->init)
- ops->init(&init_net);
-
- return 0;
-}
-
-
-int register_pernet_device(struct pernet_operations *ops)
-{
- return register_pernet_subsys(ops);
-}
-
-
-/**************************
- ** core/net_namespace.c **
- **************************/
-
-DEFINE_MUTEX(net_mutex);
-
-
-/*******************
- ** kernel/kmod.c **
- *******************/
-
-extern "C" void module_iwl_init(void);
-extern "C" void module_iwl_mvm_init(void);
-
-
-int __request_module(bool wait, char const *format, ...)
-{
- va_list list;
- char buf[128];
-
- va_start(list, format);
- Genode::String_console sc(buf, sizeof(buf));
- sc.vprintf(format, list);
- va_end(list);
-
- return 0;
-}
-
-
-/* XXX request_module() should not hardcode module names */
-int request_module(char const* format, ...)
-{
- va_list list;
- char buf[128];
-
- va_start(list, format);
- Genode::String_console sc(buf, sizeof(buf));
- sc.vprintf(format, list);
- va_end(list);
-
- if (Genode::strcmp(buf, "iwldvm", 6) == 0) {
- module_iwl_init();
- return 0;
- }
- else if (Genode::strcmp(buf, "iwlmvm", 6) == 0) {
- module_iwl_mvm_init();
- return 0;
- }
- else if (Genode::strcmp(buf, "ccm(aes)", 7) == 0) {
- return 0;
- }
- else if (Genode::strcmp(buf, "cryptomgr", 9) == 0) {
- return 0;
- }
-
- return -1;
-}
-
-
-/****************************
- ** kernel/locking/mutex.c **
- ****************************/
-
-#include
-
-
-/******************
- ** linux/poll.h **
- ******************/
-
-bool poll_does_not_wait(const poll_table *p)
-{
- return p == nullptr;
-}
-
-
-/*********************
- ** linux/kthread.h **
- *********************/
-
-void *kthread_run(int (*threadfn)(void *), void *data, char const *name)
-{
- threadfn(data);
-
- return (void*)42;
-}
-
-
-/*****************
- ** linux/pci.h **
- *****************/
-
-#include
-
-
-void *pci_get_drvdata(struct pci_dev *pdev)
-{
- return dev_get_drvdata(&pdev->dev);
-}
-
-
-void pci_set_drvdata(struct pci_dev *pdev, void *data)
-{
- dev_set_drvdata(&pdev->dev, data);
-}
-
-
-static struct pcim_iomap_devres {
- void *table[6];
-} _devres_table;
-
-
-int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask, const char *name)
-{
- /* XXX iwlwifi just want to map the first BAR */
- void *addr = pci_ioremap_bar(pdev, 0);
- if (!addr) { return -1; }
-
- printk("%s:%d from: %p addr: %p\n", __func__, __LINE__, __builtin_return_address(0), addr);
-
- _devres_table.table[0] = addr;
- return 0;
-}
-
-
-void * const *pcim_iomap_table(struct pci_dev *pdev)
-{
- return _devres_table.table;
-}
-
-
-/***********************
- ** linux/interrupt.h **
- ***********************/
-
-#include
-
-
-int request_irq(unsigned int irq, irq_handler_t handler,
- unsigned long flags, const char *name, void *dev)
-{
- Lx::Pci_dev *pci_dev = Lx::pci_dev_registry()->first();
- Lx::Irq::irq().request_irq(pci_dev->client().irq(0), irq, handler, dev);
- return 0;
-}
-
-
-int request_threaded_irq(unsigned int irq, irq_handler_t handler,
- irq_handler_t thread_fn,
- unsigned long flags, const char *name,
- void *dev)
-{
- Lx::Pci_dev *pci_dev = Lx::pci_dev_registry()->first();
- Lx::Irq::irq().request_irq(pci_dev->client().irq(0), irq, handler, dev, thread_fn);
- return 0;
-}
-
-
-void pci_dev_put(struct pci_dev *pci_dev)
-{
- Genode::destroy(Lx_kit::env().heap(), pci_dev);
-}
-
-
-/***********************
- ** linux/workqueue.h **
- ***********************/
-
-#include
-
-
-bool mod_delayed_work(struct workqueue_struct *wq, struct delayed_work *dwork,
- unsigned long delay)
-{
- queue_delayed_work(wq, dwork, delay);
- return true;
-}
-
-
-struct workqueue_struct *alloc_ordered_workqueue(char const *fmt , unsigned int flags, ...)
-{
- return alloc_workqueue(fmt, flags, 1);
-}
-
-
-struct workqueue_struct *alloc_workqueue(const char *fmt, unsigned int flags,
- int max_active, ...)
-{
- workqueue_struct *wq = (workqueue_struct *)kzalloc(sizeof(workqueue_struct), 0);
- Lx::Work *work = Lx::Work::alloc_work_queue(&Lx::Malloc::mem(), fmt);
- wq->task = (void *)work;
-
- return wq;
-}
-
-
-void flush_workqueue(struct workqueue_struct *wq)
-{
- Lx::Task *current = Lx::scheduler().current();
- if (!current) {
- Genode::error("BUG: flush_workqueue executed without task");
- Genode::sleep_forever();
- }
-
- Lx::Work *lx_work = (wq && wq->task) ? (Lx::Work*) wq->task
- : &Lx::Work::work_queue();
-
- lx_work->flush(*current);
- Lx::scheduler().current()->block_and_schedule();
-}
-
-
-static inline bool work_queued(struct workqueue_struct *wq, void *work)
-{
- Lx::Work *lx_work = (wq && wq->task) ? (Lx::Work*) wq->task
- : &Lx::Work::work_queue();
- return lx_work->work_queued(work);
-}
-
-
-bool flush_work(struct work_struct *work)
-{
- /* XXX AFAIU if the work was not queued it is already 'idle' and
- * we just return false
- */
- bool const queued = work_queued(work->wq, work);
- if (queued) {
-
- struct workqueue_struct *wq = work->wq;
-
- Lx::Work *lx_work = (wq && wq->task) ? (Lx::Work*) wq->task
- : &Lx::Work::work_queue();
-
- Lx::Task *current = Lx::scheduler().current();
- lx_work->wakeup_for(work, *current);
-
- Lx::scheduler().current()->block_and_schedule();
- return true;
- }
-
- return false;
-}
-
-
-bool flush_delayed_work(struct delayed_work *dwork)
-{
- /* XXX AFAIU if the work was not queued it is already 'idle' and
- * we just return false
- */
- bool const queued = work_queued(dwork->wq, dwork);
- if (queued) {
- Genode::error(__func__, " dwork: ", dwork, " (", dwork->work.func, ") queued");
- Genode::sleep_forever();
- return true;
- }
-
- return false;
-}
-
-
-/***********************
- ** linux/interrupt.h **
- ***********************/
-
-void tasklet_init(struct tasklet_struct *t, void (*f)(unsigned long), unsigned long d)
-{
- t->func = f;
- t->data = d;
-}
-
-
-void tasklet_schedule(struct tasklet_struct *tasklet)
-{
- Lx::Work::work_queue().schedule_tasklet(tasklet);
- Lx::Work::work_queue().unblock();
-}
-
-
-/************************
- ** linux/completion.h **
- ************************/
-
-#include
-
-
-long __wait_completion(struct completion *work, unsigned long timeout) {
- return timeout ? 1 : 0; }
-
-
-int wait_for_completion_killable(struct completion *work)
-{
- __wait_completion(work, 0);
- return 0;
-}
-
-
-long wait_for_completion_killable_timeout(struct completion *work,
- unsigned long timeout)
-{
- __wait_completion(work, 0);
- return 1;
-}
-
-
-/******************
- ** linux/wait.h **
- ******************/
-
-#include
-
-
-/*******************
- ** linux/timer.h **
- *******************/
-
-#include
-
-
-void init_timer_deferrable(struct timer_list *timer) { /* XXX */ }
-
-
-signed long schedule_timeout_uninterruptible(signed long timeout) { return 0; }
-
-
-int wake_up_process(struct task_struct *tsk) { return 0; }
-
-
-/*******************
- ** linux/sched.h **
- *******************/
-
-#include
-
-
-/*****************
- ** linux/idr.h **
- *****************/
-
-struct Idr
-{
- enum { INVALID_ENTRY = ~0ul, };
- enum { MAX_ENTRIES = 1024, };
-
- Genode::Bit_array _barray { };
- addr_t _ptr[MAX_ENTRIES] { };
- void *_idp { nullptr };
-
- bool _check(addr_t index) { return index < MAX_ENTRIES ? true : false; }
-
- Idr(struct idr *idp) : _idp(idp) { }
-
- virtual ~Idr() { }
-
- bool handles(void *ptr) { return _idp == ptr; }
-
- bool set_id(addr_t index, void *ptr)
- {
- if (_barray.get(index, 1)) { return false; }
-
- _barray.set(index, 1);
- _ptr[index] = (addr_t)ptr;
- return true;
- }
-
- addr_t alloc(addr_t start, void *ptr)
- {
- addr_t index = INVALID_ENTRY;
- for (addr_t i = start; i < MAX_ENTRIES; i++) {
- if (_barray.get(i, 1)) { continue; }
- index = i;
- break;
- }
-
- if (index == INVALID_ENTRY) { return INVALID_ENTRY; }
-
- _barray.set(index, 1);
- _ptr[index] = (addr_t) ptr;
- return index;
- }
-
- void clear(addr_t index)
- {
- if (!_check(index)) { return; }
-
- _barray.clear(index, 1);
- _ptr[index] = 0;
- }
-
- addr_t next(addr_t index)
- {
- for (addr_t i = index; i < MAX_ENTRIES; i++) {
- if (_barray.get(i, 1)) { return i; }
- }
- return INVALID_ENTRY;
- }
-
- void *get_ptr(addr_t index)
- {
- if (!_check(index)) { return NULL; }
- return (void*)_ptr[index];
- }
-};
-
-
-static Genode::Registry> _idr_registry;
-
-
-static Idr &idp_to_idr(struct idr *idp)
-{
- Idr *idr = nullptr;
- auto lookup = [&](Idr &i) {
- if (i.handles(idp)) { idr = &i; }
- };
- _idr_registry.for_each(lookup);
-
- if (!idr) {
- Genode::Registered *i = new (&Lx_kit::env().heap())
- Genode::Registered(_idr_registry, idp);
- idr = &*i;
- }
-
- return *idr;
-}
-
-
-int idr_alloc(struct idr *idp, void *ptr, int start, int end, gfp_t gfp_mask)
-{
- Idr &idr = idp_to_idr(idp);
-
- if ((end - start) > 1) {
- addr_t const id = idr.alloc(start, ptr);
- return id != Idr::INVALID_ENTRY ? id : -1;
- } else {
- if (idr.set_id(start, ptr)) { return start; }
- }
-
- return -1;
-}
-
-
-void *idr_find(struct idr *idp, int id)
-{
- Idr &idr = idp_to_idr(idp);
- return idr.get_ptr(id);
-}
-
-
-void *idr_get_next(struct idr *idp, int *nextid)
-{
- Idr &idr = idp_to_idr(idp);
- addr_t i = idr.next(*nextid);
- if (i == Idr::INVALID_ENTRY) { return NULL; }
-
- *nextid = i;
- return idr.get_ptr(i);
-}
-
-
-/****************************
- ** asm-generic/getorder.h **
- ****************************/
-
-int get_order(unsigned long size)
-{
- if (size < PAGE_SIZE) { return 0; }
- return Genode::log2(size) - PAGE_SHIFT;
-}
diff --git a/repos/dde_linux/src/lib/legacy/wifi/nic.cc b/repos/dde_linux/src/lib/legacy/wifi/nic.cc
deleted file mode 100644
index 21ad5d7092..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/nic.cc
+++ /dev/null
@@ -1,849 +0,0 @@
-/*
- * \brief Glue code for Linux network drivers
- * \author Sebastian Sumpf
- * \author Josef Soentgen
- * \date 2012-07-05
- */
-
-/*
- * Copyright (C) 2012-2017 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-/* Genode includes */
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-/* NIC driver includes */
-#include
-
-/* local includes */
-#include
-#include
-
-#include
-
-#include
-# include
-# include
-# include
-#include
-
-
-enum {
- HEAD_ROOM = 128, /* XXX guessed value but works */
-};
-
-
-struct Tx_data
-{
- net_device *ndev;
- struct sk_buff *skb;
- Lx::Task *task;
- int err;
-};
-
-static Lx::Task *_tx_task;
-static Tx_data _tx_data;
-
-
-static void _run_tx_task(void *args)
-{
- Tx_data *data = static_cast(args);
-
- while (1) {
- Lx::scheduler().current()->block_and_schedule();
-
- net_device *ndev = data->ndev;
- struct sk_buff *skb = data->skb;
-
- data->err = ndev->netdev_ops->ndo_start_xmit(skb, ndev);
- if (data->err) {
- Genode::warning("xmit failed: ", data->err, " skb: ", skb);
- }
-
- data->skb = nullptr;
-
- if (data->task) {
- data->task->unblock();
- data->task = nullptr;
- }
- }
-}
-
-
-bool tx_task_send(struct sk_buff *skb)
-{
- if (_tx_data.skb) {
- Genode::error("skb: ", skb, " already queued");
- return false;
- }
-
- if (!_tx_task) {
- Genode::error("no TX task available");
- return false;
- }
-
- _tx_data.ndev = skb->dev;
- _tx_data.skb = skb;
- _tx_data.task = Lx::scheduler().current();
-
- _tx_task->unblock();
- Lx::scheduler().current()->block_and_schedule();
-
- return true;
-}
-
-
-namespace Genode { class Wifi_uplink; }
-
-
-class Genode::Wifi_uplink
-{
- private:
-
- net_device *_device { nullptr };
-
- Constructible _reporter { };
-
- static Wifi_uplink *_instance;
-
- class Uplink_client : public Uplink_client_base
- {
- private:
-
- net_device &_ndev;
-
- Net::Mac_address _init_drv_mac_addr(net_device &ndev)
- {
- Net::Mac_address mac_addr { };
- memcpy(&mac_addr, ndev.perm_addr, ETH_ALEN);
- return mac_addr;
- }
-
-
- /************************
- ** Uplink_client_base **
- ************************/
-
- Transmit_result
- _drv_transmit_pkt(const char *conn_rx_pkt_base,
- size_t conn_rx_pkt_size) override
- {
- /*
- * We must not be called from another task, just from the
- * packet stream dispatcher.
- */
- if (Lx::scheduler().active()) {
- warning("scheduler active");
- return Transmit_result::RETRY;
- }
-
- struct sk_buff *skb {
- lxc_alloc_skb(conn_rx_pkt_size +
- HEAD_ROOM, HEAD_ROOM) };
-
- skb->dev = &_ndev;
-
- unsigned char *data = lxc_skb_put(skb, conn_rx_pkt_size);
- memcpy(data, conn_rx_pkt_base, conn_rx_pkt_size);
-
- _tx_data.ndev = &_ndev;
- _tx_data.skb = skb;
-
- _tx_task->unblock();
- Lx::scheduler().schedule();
- return Transmit_result::ACCEPTED;
- }
-
- public:
-
- Uplink_client(Env &env,
- Allocator &alloc,
- net_device &ndev)
- :
- Uplink_client_base { env, alloc,
- _init_drv_mac_addr(ndev) },
- _ndev { ndev }
- {
- _drv_handle_link_state(
- !(_ndev.state & 1UL << __LINK_STATE_NOCARRIER));
- }
-
- Net::Mac_address mac_address() const { return _drv_mac_addr; }
-
- void handle_driver_link_state(bool state)
- {
- _drv_handle_link_state(state);
- }
-
- void handle_driver_rx_packet(struct sk_buff *skb)
- {
- Skb skbh { skb_helper(skb) };
- _drv_rx_handle_pkt(
- skbh.packet_size + skbh.frag_size,
- [&] (void *conn_tx_pkt_base,
- size_t &)
- {
- memcpy(
- conn_tx_pkt_base,
- skbh.packet,
- skbh.packet_size);
-
- if (skbh.frag_size) {
-
- memcpy(
- (char *)conn_tx_pkt_base + skbh.packet_size,
- skbh.frag,
- skbh.frag_size);
- }
- return Write_result::WRITE_SUCCEEDED;
- });
- }
- };
-
- Env &_env;
- Allocator &_alloc;
- Constructible _client { };
-
- public:
-
- Wifi_uplink(Env &env,
- Allocator &alloc)
- :
- _env { env },
- _alloc { alloc }
- { }
-
- void device(net_device &device)
- {
- _device = &device;
- }
-
- bool device_set() const
- {
- return _device != nullptr;
- }
-
- net_device &device()
- {
- if (_device == nullptr) {
-
- class Invalid { };
- throw Invalid { };
- }
- return *_device;
- }
-
- void activate()
- {
- _client.construct(_env, _alloc, device());
-
- Lx_kit::env().config_rom().xml().with_sub_node("report", [&] (Xml_node const &xml) {
- bool const report_mac_address =
- xml.attribute_value("mac_address", false);
-
- if (!report_mac_address)
- return;
-
- _reporter.construct(_env, "devices");
- _reporter->enabled(true);
-
- Reporter::Xml_generator report(*_reporter, [&] () {
- report.node("nic", [&] () {
- report.attribute("mac_address", String<32>(_client->mac_address()));
- });
- });
- });
- }
-
- void handle_driver_rx_packet(struct sk_buff *skb)
- {
- if (_client.constructed()) {
- _client->handle_driver_rx_packet(skb);
- }
- }
-
- void handle_driver_link_state(bool state)
- {
- if (_client.constructed()) {
- _client->handle_driver_link_state(state);
- }
- }
-
- static void instance(Wifi_uplink &instance)
- {
- _instance = &instance;
- }
-
- static Wifi_uplink &instance()
- {
- if (!_instance) {
-
- class Invalid { };
- throw Invalid { };
- }
- return *_instance;
- }
-};
-
-
-using Genode::Wifi_uplink;
-
-Wifi_uplink *Wifi_uplink::_instance;
-
-
-void Lx::nic_init(Genode::Env &env, Genode::Allocator &alloc)
-{
- Wifi_uplink::instance(*new (alloc) Genode::Wifi_uplink(env, alloc));
-}
-
-
-void Lx::get_mac_address(unsigned char *addr)
-{
- memcpy(addr, Wifi_uplink::instance().device().perm_addr, ETH_ALEN);
-}
-
-
-namespace Lx {
- class Notifier;
-}
-
-
-class Lx::Notifier
-{
- private:
-
- struct Block : public Genode::List::Element
- {
- struct notifier_block *nb;
-
- Block(struct notifier_block *nb) : nb(nb) { }
- };
-
- Lx_kit::List _list;
- Genode::Tslab _block_alloc;
-
- void *_ptr;
-
- public:
-
- Notifier(Genode::Allocator &alloc, void *ptr)
- : _block_alloc(&alloc), _ptr(ptr) { }
-
- virtual ~Notifier() { };
-
- bool handles(void *ptr)
- {
- return _ptr == ptr;
- }
-
- void register_block(struct notifier_block *nb)
- {
- Block *b = new (&_block_alloc) Block(nb);
- _list.insert(b);
- }
-
- void unregister_block(struct notifier_block *nb)
- {
- for (Block *b = _list.first(); b; b = b->next())
- if (b->nb == nb) {
- _list.remove(b);
- destroy(&_block_alloc, b);
- break;
- }
- }
-
- int call_all_blocks(unsigned long val, void *v)
- {
- int rv = NOTIFY_DONE;
- for (Block *b = _list.first(); b; b = b->next()) {
- rv = b->nb->notifier_call(b->nb, val, v);
- if (rv & NOTIFY_STOP_MASK)
- break;
- }
- return rv;
- }
-};
-
-
-static Genode::Registry> _blocking_notifier_registry;
-
-
-/* XXX move blocking_notifier_call to proper location */
-/**********************
- ** linux/notifier.h **
- **********************/
-
-static Lx::Notifier &blocking_notifier(struct blocking_notifier_head *nh)
-{
- Lx::Notifier *notifier = nullptr;
- auto lookup = [&](Lx::Notifier &n) {
- if (!n.handles(nh)) { return; }
-
- notifier = &n;
- };
- _blocking_notifier_registry.for_each(lookup);
-
- if (!notifier) {
- Genode::Registered *n = new (&Lx_kit::env().heap())
- Genode::Registered(_blocking_notifier_registry,
- Lx_kit::env().heap(), nh);
- notifier = &*n;
- }
-
- return *notifier;
-}
-
-
-int blocking_notifier_chain_register(struct blocking_notifier_head *nh,
- struct notifier_block *nb)
-{
- blocking_notifier(nh).register_block(nb);
- return 0;
-}
-
-int blocking_notifier_chain_unregister(struct blocking_notifier_head *nh,
- struct notifier_block *nb)
-{
- blocking_notifier(nh).unregister_block(nb);
- return 0;
-}
-
-
-int blocking_notifier_call_chain(struct blocking_notifier_head *nh,
- unsigned long val, void *v)
-{
- return blocking_notifier(nh).call_all_blocks(val, v);
-}
-
-
-/***********************
- ** linux/netdevice.h **
- ***********************/
-
-static Lx::Notifier &net_notifier()
-{
- static Lx::Notifier inst(Lx_kit::env().heap(), NULL);
- return inst;
-}
-
-
-extern "C" int register_netdevice_notifier(struct notifier_block *nb)
-{
- /**
- * In Linux the nb is actually called upon on registration. We do not
- * that semantic because we add a net_device only after all notifiers
- * were registered.
- */
- net_notifier().register_block(nb);
-
- return 0;
-}
-
-
-extern "C" int unregster_netdevice_notifier(struct notifier_block *nb)
-{
- net_notifier().unregister_block(nb);
-
- return 0;
-}
-
-
-extern "C" struct net_device * netdev_notifier_info_to_dev(struct netdev_notifier_info *info)
-{
- /* we always pass a net_device pointer to this function */
- return reinterpret_cast(info);
-}
-
-
-struct Proto_hook : public Lx_kit::List::Element
-{
- struct packet_type &pt;
-
- Proto_hook(struct packet_type *pt) : pt(*pt) { }
-};
-
-
-class Proto_hook_list
-{
- private:
-
- Lx_kit::List _list;
- Genode::Allocator &_alloc;
-
- public:
-
- Proto_hook_list(Genode::Allocator &alloc) : _alloc(alloc) { }
-
- void insert(struct packet_type *pt) {
- _list.insert(new (&_alloc) Proto_hook(pt)); }
-
- void remove(struct packet_type *pt)
- {
- for (Proto_hook *ph = _list.first(); ph; ph = ph->next())
- if (&ph->pt == pt) {
- _list.remove(ph);
- destroy(&_alloc, ph);
- break;
- }
- }
-
- Proto_hook* first() { return _list.first(); }
-};
-
-
-static Proto_hook_list& proto_hook_list()
-{
- static Proto_hook_list inst(Lx_kit::env().heap());
- return inst;
-}
-
-
-extern "C" void dev_add_pack(struct packet_type *pt)
-{
- proto_hook_list().insert(pt);
-}
-
-
-extern "C" void __dev_remove_pack(struct packet_type *pt)
-{
- proto_hook_list().remove(pt);
-}
-
-
-extern "C" struct net_device *__dev_get_by_index(struct net *net, int ifindex)
-{
- if (!Wifi_uplink::instance().device_set()) {
- Genode::error("no net device registered!");
- return 0;
- }
-
- return &Wifi_uplink::instance().device();
-}
-
-
-extern "C" struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex)
-{
- return __dev_get_by_index(net, ifindex);
-}
-
-
-extern "C" struct net_device *dev_get_by_index(struct net *net, int ifindex)
-{
- return __dev_get_by_index(net, ifindex);
-}
-
-
-extern "C" int dev_hard_header(struct sk_buff *skb, struct net_device *dev,
- unsigned short type, const void *daddr,
- const void *saddr, unsigned int len)
-{
- if (!dev->header_ops || !dev->header_ops->create)
- return 0;
-
- return dev->header_ops->create(skb, dev, type, daddr, saddr, len);
-}
-
-
-extern "C" int dev_parse_header(const struct sk_buff *skb, unsigned char *haddr)
-{
- struct net_device const *dev = skb->dev;
-
- if (!dev->header_ops || dev->header_ops->parse)
- return 0;
-
- return dev->header_ops->parse(skb, haddr);
-}
-
-
-extern "C" int dev_queue_xmit(struct sk_buff *skb)
-{
- if (skb->next) {
- Genode::warning("more skb's queued");
- }
-
- return tx_task_send(skb) ? NETDEV_TX_OK : -1;
-}
-
-
-extern "C" size_t LL_RESERVED_SPACE(struct net_device *dev)
-{
- return dev->hard_header_len ?
- (dev->hard_header_len + (HH_DATA_MOD - 1)) & ~(HH_DATA_MOD - 1) : 0;
-}
-
-
-extern "C" void dev_close(struct net_device *ndev)
-{
- /*
- * First instruct cfg80211 to leave the associated network
- * and then shutdown the interface.
- */
- net_notifier().call_all_blocks(NETDEV_GOING_DOWN, ndev);
- net_notifier().call_all_blocks(NETDEV_DOWN, ndev);
-
- ndev->state &= ~(1UL << __LINK_STATE_START);
- netif_carrier_off(ndev);
-
- const struct net_device_ops *ops = ndev->netdev_ops;
- if (ops->ndo_stop) { ops->ndo_stop(ndev); }
-
- ndev->flags &= ~IFF_UP;
-}
-
-
-bool Lx::open_device()
-{
- if (!Wifi_uplink::instance().device_set()) {
- Genode::error("no net_device available");
- return false;
- }
-
- struct net_device * const ndev = &Wifi_uplink::instance().device();
-
- int err = ndev->netdev_ops->ndo_open(ndev);
- if (err) {
- Genode::error("Open device failed");
- throw -1;
- return err;
- }
-
- /*
- * Important, otherwise netif_running checks fail and AF_PACKET
- * will not bind and EAPOL will cease to work.
- */
- ndev->flags |= IFF_UP;
- ndev->state |= (1UL << __LINK_STATE_START);
-
- if (ndev->netdev_ops->ndo_set_rx_mode)
- ndev->netdev_ops->ndo_set_rx_mode(ndev);
-
- net_notifier().call_all_blocks(NETDEV_UP, ndev);
-
- return true;
-}
-
-
-extern "C" int register_netdevice(struct net_device *ndev)
-{
- static bool already_registered = false;
-
- if (already_registered) {
- Genode::error("We don't support multiple network devices in one driver instance");
- return -ENODEV;
- }
-
- already_registered = true;
-
- if (ndev == nullptr) {
- class Invalid_net_device { };
- throw Invalid_net_device { };
- }
- Wifi_uplink::instance().device(*ndev);
-
- ndev->state |= 1UL << __LINK_STATE_START;
- netif_carrier_off(ndev);
-
- /* execute all notifier blocks */
- net_notifier().call_all_blocks(NETDEV_REGISTER, ndev);
- net_notifier().call_all_blocks(NETDEV_UP, ndev);
- ndev->ifindex = 1;
-
- /* set mac adress */
- Genode::memcpy(ndev->perm_addr, ndev->ieee80211_ptr->wiphy->perm_addr, ETH_ALEN);
-
- int err = ndev->netdev_ops->ndo_open(ndev);
- if (err) {
- Genode::error("Initializing device failed");
- throw -1;
- return err;
- }
-
- static Lx::Task tx_task { _run_tx_task, &_tx_data, "tx_task",
- Lx::Task::PRIORITY_1, Lx::scheduler() };
- _tx_task = &tx_task;
-
- if (ndev->netdev_ops->ndo_set_rx_mode)
- ndev->netdev_ops->ndo_set_rx_mode(ndev);
-
- Wifi_uplink::instance().activate();
-
- list_add_tail_rcu(&ndev->dev_list, &init_net.dev_base_head);
-
- return 0;
-}
-
-
-extern "C" int netif_running(const struct net_device *dev)
-{
- return dev->state & (1UL << __LINK_STATE_START);
-}
-
-
-extern "C" int netif_device_present(struct net_device *dev) { return 1; }
-
-
-extern "C" int netif_carrier_ok(const struct net_device *dev)
-{
- return !(dev->state & (1UL << __LINK_STATE_NOCARRIER));
-}
-
-
-extern "C" void netif_carrier_on(struct net_device *dev)
-{
- dev->state &= ~(1UL << __LINK_STATE_NOCARRIER);
- Wifi_uplink::instance().handle_driver_link_state(true);
-}
-
-
-extern "C" void netif_carrier_off(struct net_device *dev)
-{
- dev->state |= 1UL << __LINK_STATE_NOCARRIER;
- Wifi_uplink::instance().handle_driver_link_state(false);
-}
-
-
-extern "C" int netif_receive_skb(struct sk_buff *skb)
-{
- /**
- * XXX check original linux implementation if it is really
- * necessary to free the skb if it was not handled.
- */
-
- /* send EAPOL related frames only to the wpa_supplicant */
- if (is_eapol(skb)) {
- /* XXX call only AF_PACKET hook */
- for (Proto_hook* ph = proto_hook_list().first(); ph; ph = ph->next()) {
- ph->pt.func(skb, &Wifi_uplink::instance().device(), &ph->pt, &Wifi_uplink::instance().device());
- }
- return NET_RX_SUCCESS;
- }
-
- Wifi_uplink::instance().handle_driver_rx_packet(skb);
- dev_kfree_skb(skb);
- return NET_RX_SUCCESS;
-}
-
-
-gro_result_t napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
-{
- return netif_receive_skb(skb);
-}
-
-
-extern "C" void netif_start_subqueue(struct net_device *dev, u16 queue_index)
-{
- dev->_tx[queue_index].state = NETDEV_QUEUE_START;
-}
-
-
-extern "C" void netif_stop_subqueue(struct net_device *dev, u16 queue_index)
-{
- dev->_tx[queue_index].state = 0;
-}
-
-
-extern "C" void netif_wake_subqueue(struct net_device *dev, u16 queue_index)
-{
- dev->_tx[queue_index].state = NETDEV_QUEUE_START;
-}
-
-
-extern "C" u16 netdev_cap_txqueue(struct net_device *dev, u16 queue_index)
-{
- if (queue_index > dev-> real_num_tx_queues) {
- Genode::error("queue_index ", queue_index, " out of range (",
- dev->real_num_tx_queues, " max)");
- return 0;
- }
-
- return queue_index;
-}
-
-
-extern "C" struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
- unsigned char name_assign_type,
- void (*setup)(struct net_device *),
- unsigned int txqs, unsigned int rxqs)
-{
- struct net_device *dev;
- size_t alloc_size;
- struct net_device *p;
-
- alloc_size = ALIGN(sizeof(struct net_device), NETDEV_ALIGN);
- /* ensure 32-byte alignment of whole construct */
- alloc_size += NETDEV_ALIGN - 1;
-
- p = (net_device *)kzalloc(alloc_size, GFP_KERNEL);
- if (!p)
- return NULL;
-
- dev = PTR_ALIGN(p, NETDEV_ALIGN);
-
- dev->gso_max_size = GSO_MAX_SIZE;
- dev->gso_max_segs = GSO_MAX_SEGS;
-
- setup(dev);
-
- /* actually set by dev_open() */
- dev->flags |= IFF_UP;
-
-
- /* XXX our dev is always called wlan0 */
- strcpy(dev->name, "wlan0");
-
- dev->dev_addr = (unsigned char *)kzalloc(ETH_ALEN, GFP_KERNEL);
- if (!dev->dev_addr)
- return 0;
-
- if (sizeof_priv) {
- /* ensure 32-byte alignment of private area */
- dev->priv = kzalloc(sizeof_priv, GFP_KERNEL);
- if (!dev->priv)
- return 0;
- }
-
- dev->num_tx_queues = txqs;
- dev->real_num_tx_queues = txqs;
- struct netdev_queue *tx = (struct netdev_queue*)
- kcalloc(txqs, sizeof(struct netdev_queue),
- GFP_KERNEL | GFP_LX_DMA);
- if (!tx) {
- Genode::error("could not allocate ndev_queues");
- }
-
- dev->_tx = tx;
- for (unsigned i = 0; i < txqs; i++) {
- tx[i].dev = dev;
- tx[i].numa_node = NUMA_NO_NODE;
- }
-
- return dev;
-}
-
-
-/*************************
- ** linux/etherdevice.h **
- *************************/
-
-int is_valid_ether_addr(const u8 *addr)
-{
- /* is multicast */
- if ((addr[0] & 0x1))
- return 0;
-
- /* zero */
- if (!(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]))
- return 0;
-
- return 1;
-}
diff --git a/repos/dde_linux/src/lib/legacy/wifi/random.cc b/repos/dde_linux/src/lib/legacy/wifi/random.cc
deleted file mode 100644
index e8038cc1ee..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/random.cc
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * \brief Linux random emulation code
- * \author Josef Soentgen
- * \date 2016-10-19
- */
-
-/*
- * Copyright (C) 2016-2017 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-/* Genode includes */
-#include
-#include
-
-
-using Genode::uint64_t;
-
-/*
- * Xoroshiro128+ written in 2014-2016 by Sebastiano Vigna (vigna@acm.org)
- *
- * (see http://xoroshiro.di.unimi.it/xorshift128plus.c and
- * http://xoroshiro.di.unimi.it/splitmix64.c)
- */
-
-struct Xoroshiro
-{
- uint64_t seed;
-
- uint64_t splitmix64()
- {
- uint64_t z = (seed += __UINT64_C(0x9E3779B97F4A7C15));
- z = (z ^ (z >> 30)) * __UINT64_C(0xBF58476D1CE4E5B9);
- z = (z ^ (z >> 27)) * __UINT64_C(0x94D049BB133111EB);
- return z ^ (z >> 31);
- }
-
- Xoroshiro(uint64_t seed) : seed(seed)
- {
- s[0] = splitmix64();
- s[1] = splitmix64();
- }
-
- uint64_t s[2];
-
- static uint64_t rotl(uint64_t const x, int k) {
- return (x << k) | (x >> (64 - k));
- }
-
- uint64_t get()
- {
- uint64_t const s0 = s[0];
- uint64_t s1 = s[1];
- uint64_t const result = s0 + s1;
-
- s1 ^= s0;
-
- s[0] = rotl(s0, 55) ^ s1 ^ (s1 << 14);
- s[1] = rotl(s1, 36);
-
- return result;
- }
-};
-
-
-static Xoroshiro xoroshiro(0x636864324d766931);
-
-
-/********************
- ** linux/random.h **
- ********************/
-
-extern "C" void get_random_bytes(void *buf, int nbytes)
-{
- if (nbytes <= 0) {
- return;
- }
-
- char *p = reinterpret_cast(buf);
-
- int const rounds = nbytes / 8;
- for (int i = 0; i < rounds; i++) {
- uint64_t const v = xoroshiro.get();
-
- Genode::memcpy(p, &v, 8);
- p += 8;
- }
-
- int const remain = nbytes - rounds * 8;
- if (!remain) {
- return;
- }
-
- uint64_t const v = xoroshiro.get();
- Genode::memcpy(p, &v, remain);
-}
-
-
-extern "C" unsigned int prandom_u32(void)
-{
- return xoroshiro.get();
-}
diff --git a/repos/dde_linux/src/lib/legacy/wifi/socket_call.cc b/repos/dde_linux/src/lib/legacy/wifi/socket_call.cc
deleted file mode 100644
index e2589ac91e..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/socket_call.cc
+++ /dev/null
@@ -1,648 +0,0 @@
-/*
- * \brief Linux emulation code
- * \author Josef Soentgen
- * \date 2014-08-04
- */
-
-/*
- * Copyright (C) 2014-2017 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-/* Genode includes */
-#include
-#include
-
-/* local includes */
-#include
-#include
-
-#include
-# include
-# include
-# include
-#include
-
-#include
-
-
-static void run_socketcall(void *);
-
-
-/* XXX move Wifi::Socket definition to better location */
-struct Wifi::Socket
-{
- void *socket = nullptr;
- bool non_block = false;
-
- Socket() { }
-
- explicit Socket(void *s) : socket(s) { }
-};
-
-
-struct Call
-{
- enum Opcode {
- NONE, SOCKET, CLOSE,
- BIND, GETSOCKNAME, RECVMSG, SENDMSG, SENDTO, SETSOCKOPT,
- GET_MAC_ADDRESS, POLL_ALL, NON_BLOCK,
- };
-
- Opcode opcode = NONE;
- Wifi::Socket *handle = nullptr;
-
- union {
- struct
- {
- int domain;
- int type;
- int protocol;
- void *result;
- } socket;
- struct { /* no args */ } close;
- struct
- {
- sockaddr const *addr;
- int addrlen;
- } bind;
- struct
- {
- sockaddr *addr;
- int *addrlen;
- } getsockname;
- struct
- {
- msghdr msg;
- int flags;
- iovec iov[Wifi::Msghdr::MAX_IOV_LEN];
- } recvmsg;
- struct
- {
- msghdr msg;
- int flags;
- iovec iov[Wifi::Msghdr::MAX_IOV_LEN];
- } sendmsg;
- struct {
- int level;
- int optname;
- void const *optval;
- uint32_t optlen;
- } setsockopt;
- struct
- {
- unsigned char *addr;
- } get_mac_address;
- struct
- {
- Wifi::Poll_socket_fd *sockets;
- unsigned num;
- int timeout;
- } poll_all;
- struct
- {
- bool value;
- } non_block;
- };
-
- int err = 0;
-};
-
-static Call _call;
-static Genode::Semaphore _block;
-
-
-namespace Lx {
- class Socket;
-}
-
-
-/**
- * Context for socket calls
- */
-class Lx::Socket
-{
- private:
-
-
- Genode::Signal_transmitter _sender;
- Genode::Signal_handler _dispatcher;
- Lx::Task _task;
-
- struct socket *_call_socket()
- {
- struct socket *sock = static_cast(_call.handle->socket);
- if (!sock)
- Genode::error("BUG: sock is zero");
-
- return sock;
- }
-
- void _do_socket()
- {
- struct socket *s;
- int res = sock_create_kern(nullptr, _call.socket.domain, _call.socket.type,
- _call.socket.protocol, &s);
- if (!res) {
- _call.socket.result = s;
- _call.err = 0;
- return;
- }
-
- Genode::error("sock_create_kern failed, res: ", res);
- _call.socket.result = nullptr;
- _call.err = res;
- }
-
- void _do_close()
- {
- struct socket *sock = _call_socket();
-
- _call.err = sock->ops->release(sock);
- }
-
- void _do_bind()
- {
- struct socket *sock = _call_socket();
-
- _call.err = sock->ops->bind(sock,
- const_cast(_call.bind.addr),
- _call.bind.addrlen);
- }
-
- void _do_getsockname()
- {
- struct socket *sock = _call_socket();
- int addrlen = *_call.getsockname.addrlen;
-
- _call.err = sock->ops->getname(sock, _call.getsockname.addr, &addrlen, 0);
-
- *_call.getsockname.addrlen = addrlen;
- }
-
- void _do_recvmsg()
- {
- struct socket *sock = _call_socket();
- struct msghdr *msg = &_call.recvmsg.msg;
-
- if (_call.handle->non_block)
- msg->msg_flags |= MSG_DONTWAIT;
-
- size_t iovlen = 0;
- for (size_t i = 0; i < msg->msg_iter.nr_segs; i++)
- iovlen += msg->msg_iter.iov[i].iov_len;
-
- _call.err = sock->ops->recvmsg(sock, msg, iovlen, _call.recvmsg.flags);
- }
-
- void _do_sendmsg()
- {
- struct socket *sock = _call_socket();
- struct msghdr *msg = const_cast(&_call.sendmsg.msg);
-
- if (_call.handle->non_block)
- msg->msg_flags |= MSG_DONTWAIT;
-
- size_t iovlen = 0;
- for (size_t i = 0; i < msg->msg_iter.nr_segs; i++)
- iovlen += msg->msg_iter.iov[i].iov_len;
-
- _call.err = sock->ops->sendmsg(sock, msg, iovlen);
- }
-
- void _do_setsockopt()
- {
- struct socket *sock = _call_socket();
-
- /* taken from kernel_setsockopt() in net/socket.c */
- if (_call.setsockopt.level == SOL_SOCKET)
- _call.err = sock_setsockopt(sock,
- _call.setsockopt.level,
- _call.setsockopt.optname,
- (char *)_call.setsockopt.optval,
- _call.setsockopt.optlen);
- else
- _call.err = sock->ops->setsockopt(sock,
- _call.setsockopt.level,
- _call.setsockopt.optname,
- (char *)_call.setsockopt.optval,
- _call.setsockopt.optlen);
- }
-
- void _do_get_mac_address()
- {
- Lx::get_mac_address(_call.get_mac_address.addr);
- }
-
- void _do_poll_all()
- {
- Wifi::Poll_socket_fd *sockets = _call.poll_all.sockets;
- unsigned num = _call.poll_all.num;
- int timeout = _call.poll_all.timeout;
-
- enum {
- POLLIN_SET = (POLLRDNORM | POLLRDBAND | POLLIN | POLLHUP | POLLERR),
- POLLOUT_SET = (POLLWRBAND | POLLWRNORM | POLLOUT | POLLERR),
- POLLEX_SET = (POLLPRI)
- };
-
- int nready = 0;
- bool timeout_triggered = false;
- bool woken_up = false;
- do {
- /**
- * Timeout was triggered, exit early.
- */
- if (timeout_triggered)
- break;
-
- /**
- * Poll each socket and check if there is something of interest.
- */
- for (unsigned i = 0; i < num; i++) {
- struct socket *sock = static_cast(sockets[i].s->socket);
-
- int mask = sock->ops->poll(0, sock, 0);
-
- sockets[i].revents = 0;
- if (mask & POLLIN_SET)
- sockets[i].revents |= sockets[i].events & Wifi::WIFI_POLLIN ? Wifi::WIFI_POLLIN : 0;
- if (mask & POLLOUT_SET)
- sockets[i].revents |= sockets[i].events & Wifi::WIFI_POLLOUT ? Wifi::WIFI_POLLOUT : 0;
- if (mask & POLLEX_SET)
- sockets[i].revents |= sockets[i].events & Wifi::WIFI_POLLEX ? Wifi::WIFI_POLLEX : 0;
-
- if (sockets[i].revents)
- nready++;
- }
-
- /**
- * We were woken up but there is still nothing of interest.
- */
- if (woken_up)
- break;
-
- /**
- * Exit the loop if either a socket is ready or there is
- * no timeout given.
- */
- if (nready || !timeout)
- break;
-
- /**
- * In case of a timeout add all sockets to an artificial wait list
- * so at least one is woken up an sk_data_ready() call.
- */
- Lx::Task *task = Lx::scheduler().current();
- struct socket_wq wq[num];
- Lx::Task::List wait_list;
-
- task->wait_enqueue(&wait_list);
- for (unsigned i = 0; i < num; i++) {
- struct socket *sock = static_cast(sockets[i].s->socket);
- wq[i].wait.list = &wait_list;
- sock->sk->sk_wq = &wq[i];
- }
-
- long t = msecs_to_jiffies(timeout);
- timeout_triggered = !schedule_timeout(t);
-
- task->wait_dequeue(&wait_list);
- for (unsigned i = 0; i < num; i++) {
- struct socket *sock = static_cast(sockets[i].s->socket);
- sock->sk->sk_wq = 0;
- }
-
- woken_up = true;
- } while (1);
-
- _call.err = nready;
- }
-
- void _do_non_block()
- {
- _call.handle->non_block = _call.non_block.value;
- }
-
- void _handle()
- {
- _task.unblock();
- Lx::scheduler().schedule();
- }
-
- public:
-
- Socket(Genode::Entrypoint &ep)
- :
- _dispatcher(ep, *this, &Lx::Socket::_handle),
- _task(run_socketcall, nullptr, "socketcall",
- Lx::Task::PRIORITY_0, Lx::scheduler())
- {
- _sender.context(_dispatcher);
- }
-
- void exec_call()
- {
- switch (_call.opcode) {
- case Call::BIND: _do_bind(); break;
- case Call::CLOSE: _do_close(); break;
- case Call::GETSOCKNAME: _do_getsockname(); break;
- case Call::POLL_ALL: _do_poll_all(); break;
- case Call::RECVMSG: _do_recvmsg(); break;
- case Call::SENDMSG: _do_sendmsg(); break;
- case Call::SETSOCKOPT: _do_setsockopt(); break;
- case Call::SOCKET: _do_socket(); break;
- case Call::GET_MAC_ADDRESS: _do_get_mac_address(); break;
- case Call::NON_BLOCK: _do_non_block(); break;
-
- default:
- Genode::warning("unknown opcode: ", (int)_call.opcode);
- case Call::NONE: /* ignore silently */
- _call.err = -EINVAL;
- break;
- }
-
- /*
- * Save old call opcode as we may only release the blocker
- * when actually did something useful, i.e., were called by
- * some socket operation and not by kicking the socket.
- */
- Call::Opcode old = _call.opcode;
-
- _call.opcode = Call::NONE;
-
- if (old != Call::NONE) { _block.up(); }
- }
-
- void submit_and_block()
- {
- _sender.submit();
- _block.down();
- }
-
- void unblock_task()
- {
- _task.unblock();
- }
-};
-
-
-static Lx::Socket *_socket;
-static Genode::Allocator *_alloc;
-
-
-void Lx::socket_init(Genode::Entrypoint &ep, Genode::Allocator &alloc)
-{
- static Lx::Socket socket_ctx(ep);
- _socket = &socket_ctx;
- _alloc = &alloc;
-}
-
-
-void Lx::socket_kick()
-{
- /* ignore silently, the function might be called to before init */
- if (!_socket) { return; }
-
- _socket->unblock_task();
- Lx::scheduler().schedule();
-}
-
-
-static void run_socketcall(void *)
-{
- while (1) {
- Lx::scheduler().current()->block_and_schedule();
-
- _socket->exec_call();
- }
-}
-
-
-/**************************
- ** Socket_call instance **
- **************************/
-
-Wifi::Socket_call socket_call;
-
-
-/***************************
- ** Socket_call interface **
- ***************************/
-
-using namespace Wifi;
-
-
-Wifi::Socket *Socket_call::socket(int domain, int type, int protocol)
-{
- /* FIXME domain, type, protocol values */
- _call.opcode = Call::SOCKET;
- _call.socket.domain = domain;
- _call.socket.type = type & 0xff;
- _call.socket.protocol = protocol;
-
- _socket->submit_and_block();
-
- if (_call.socket.result == 0)
- return 0;
-
- Wifi::Socket *s = new (_alloc) Wifi::Socket(_call.socket.result);
-
- return s;
-}
-
-
-int Socket_call::close(Socket *s)
-{
- _call.opcode = Call::CLOSE;
- _call.handle = s;
-
- _socket->submit_and_block();
-
- if (_call.err) {
- Genode::error("closing socket failed: ", _call.err);
- }
-
- destroy(_alloc, s);
- return 0;
-}
-
-
-int Socket_call::bind(Socket *s, Wifi::Sockaddr const *addr, unsigned addrlen)
-{
- /* FIXME convert to/from Sockaddr */
- _call.opcode = Call::BIND;
- _call.handle = s;
- _call.bind.addr = (sockaddr const *)addr;
- _call.bind.addrlen = addrlen;
-
- _socket->submit_and_block();
-
- return _call.err;
-}
-
-
-int Socket_call::getsockname(Socket *s, Wifi::Sockaddr *addr, unsigned *addrlen)
-{
- /* FIXME convert to/from Sockaddr */
- /* FIXME unsigned * -> int * */
- _call.opcode = Call::GETSOCKNAME;
- _call.handle = s;
- _call.getsockname.addr = (sockaddr *)addr;
- _call.getsockname.addrlen = (int *)addrlen;
-
- _socket->submit_and_block();
-
- return _call.err;
-}
-
-
-int Socket_call::poll_all(Poll_socket_fd *s, unsigned num, int timeout)
-{
- _call.opcode = Call::POLL_ALL;
- _call.handle = 0;
- _call.poll_all.sockets = s;
- _call.poll_all.num = num;
- _call.poll_all.timeout = timeout;
-
- _socket->submit_and_block();
-
- return _call.err;
-}
-
-
-static int msg_flags(Wifi::Flags in)
-{
- int out = Wifi::WIFI_F_NONE;
- if (in & Wifi::WIFI_F_MSG_ERRQUEUE)
- out |= MSG_ERRQUEUE;
-
- return out;
-};
-
-
-Wifi::ssize_t Socket_call::recvmsg(Socket *s, Wifi::Msghdr *msg, Wifi::Flags flags)
-{
- _call.opcode = Call::RECVMSG;
- _call.handle = s;
- _call.recvmsg.msg.msg_name = msg->msg_name;
- _call.recvmsg.msg.msg_namelen = msg->msg_namelen;
- _call.recvmsg.msg.msg_iter.iov = _call.recvmsg.iov;
- _call.recvmsg.msg.msg_iter.nr_segs = msg->msg_iovlen;
- _call.recvmsg.msg.msg_iter.count = msg->msg_count;
- _call.recvmsg.msg.msg_control = msg->msg_control;
- _call.recvmsg.msg.msg_controllen = msg->msg_controllen;
- _call.recvmsg.flags = msg_flags(flags);
-
- for (unsigned i = 0; i < msg->msg_iovlen; ++i) {
- _call.recvmsg.iov[i].iov_base = msg->msg_iov[i].iov_base;
- _call.recvmsg.iov[i].iov_len = msg->msg_iov[i].iov_len;
- }
-
- _socket->submit_and_block();
-
- msg->msg_namelen = _call.recvmsg.msg.msg_namelen;
-
- return _call.err;
-}
-
-
-Wifi::ssize_t Socket_call::sendmsg(Socket *s, Wifi::Msghdr const *msg, Wifi::Flags flags)
-{
- _call.opcode = Call::SENDMSG;
- _call.handle = s;
- _call.sendmsg.msg.msg_name = msg->msg_name;
- _call.sendmsg.msg.msg_namelen = msg->msg_namelen;
- _call.sendmsg.msg.msg_iter.iov = _call.sendmsg.iov;
- _call.sendmsg.msg.msg_iter.nr_segs = msg->msg_iovlen;
- _call.sendmsg.msg.msg_iter.count = msg->msg_count;
- _call.sendmsg.msg.msg_control = 0;
- _call.sendmsg.msg.msg_controllen = 0;
- _call.sendmsg.flags = msg_flags(flags);
-
- for (unsigned i = 0; i < msg->msg_iovlen; ++i) {
- _call.sendmsg.iov[i].iov_base = msg->msg_iov[i].iov_base;
- _call.sendmsg.iov[i].iov_len = msg->msg_iov[i].iov_len;
- }
-
- _socket->submit_and_block();
-
- return _call.err;
-}
-
-
-static int sockopt_level(Sockopt_level const in)
-{
- switch (in) {
- case Wifi::WIFI_SOL_SOCKET: return SOL_SOCKET;
- case Wifi::WIFI_SOL_NETLINK: return SOL_NETLINK;
- }
-
- return -1;
-}
-
-
-static int sockopt_name(Sockopt_level const level, Sockopt_name const in)
-{
- switch (level) {
- case Wifi::WIFI_SOL_SOCKET:
- switch (in) {
- case Wifi::WIFI_SO_SNDBUF: return SO_SNDBUF;
- case Wifi::WIFI_SO_RCVBUF: return SO_RCVBUF;
- case Wifi::WIFI_SO_PASSCRED: return SO_PASSCRED;
- case Wifi::WIFI_SO_WIFI_STATUS: return SO_WIFI_STATUS;
-
- default: return -1;
- }
- case Wifi::WIFI_SOL_NETLINK:
- switch (in) {
- case Wifi::WIFI_NETLINK_ADD_MEMBERSHIP: return NETLINK_ADD_MEMBERSHIP;
- case Wifi::WIFI_NETLINK_DROP_MEMBERSHIP: return NETLINK_DROP_MEMBERSHIP;
- case Wifi::WIFI_NETLINK_PKTINFO: return NETLINK_PKTINFO;
-
- default: return -1;
- }
- }
-
- return -1;
-}
-
-
-int Socket_call::setsockopt(Socket *s,
- Wifi::Sockopt_level level, Wifi::Sockopt_name optname,
- const void *optval, uint32_t optlen)
-{
- /* FIXME optval values */
- _call.opcode = Call::SETSOCKOPT;
- _call.handle = s;
- _call.setsockopt.level = sockopt_level(level);
- _call.setsockopt.optname = sockopt_name(level, optname);
- _call.setsockopt.optval = optval;
- _call.setsockopt.optlen = optlen;
-
- _socket->submit_and_block();
-
- return _call.err;
-}
-
-
-void Socket_call::non_block(Socket *s, bool value)
-{
- _call.opcode = Call::NON_BLOCK;
- _call.handle = s;
- _call.non_block.value = value;
-
- _socket->submit_and_block();
-}
-
-
-void Socket_call::get_mac_address(unsigned char *addr)
-{
- _call.opcode = Call::GET_MAC_ADDRESS;
- _call.handle = 0;
- _call.get_mac_address.addr = addr;
-
- _socket->submit_and_block();
-}
diff --git a/repos/dde_linux/src/lib/legacy/wifi/symbol.map b/repos/dde_linux/src/lib/legacy/wifi/symbol.map
deleted file mode 100644
index 765e7b3952..0000000000
--- a/repos/dde_linux/src/lib/legacy/wifi/symbol.map
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- *
- */
-{
- global:
-
- /* initialize function */
- _*wifi_init*;
- /* Wifi::Socket_call interface */
- *Socket_call*;
- /* Wifi::Socket_call instance */
- socket_call;
- /* rfkill interface */
- _*wifi_*_rfkill*;
- _*wifi_kick_*;
-
- /* interface libnl/wpa_driver_nl80211*/
- wifi_if*;
-
- /* used by libnl's time() */
- jiffies;
-
- lx_printf*;
-
- local:
-
- *;
-};
diff --git a/repos/dde_linux/wifi.list b/repos/dde_linux/wifi.list
deleted file mode 100644
index c36173b633..0000000000
--- a/repos/dde_linux/wifi.list
+++ /dev/null
@@ -1,385 +0,0 @@
-linux-x.x.x/crypto/ablkcipher.c
-linux-x.x.x/crypto/aead.c
-linux-x.x.x/crypto/aes_generic.c
-linux-x.x.x/crypto/ahash.c
-linux-x.x.x/crypto/algapi.c
-linux-x.x.x/crypto/algboss.c
-linux-x.x.x/crypto/api.c
-linux-x.x.x/crypto/arc4.c
-linux-x.x.x/crypto/blkcipher.c
-linux-x.x.x/crypto/ccm.c
-linux-x.x.x/crypto/cipher.c
-linux-x.x.x/crypto/compress.c
-linux-x.x.x/crypto/crypto_wq.c
-linux-x.x.x/crypto/ctr.c
-linux-x.x.x/crypto/internal.h
-linux-x.x.x/crypto/memneq.c
-linux-x.x.x/crypto/rng.c
-linux-x.x.x/crypto/scatterwalk.c
-linux-x.x.x/crypto/shash.c
-linux-x.x.x/crypto/skcipher.c
-linux-x.x.x/drivers/leds/led-class.c
-linux-x.x.x/drivers/leds/led-core.c
-linux-x.x.x/drivers/leds/led-triggers.c
-linux-x.x.x/drivers/leds/leds.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/cfg/1000.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/cfg/2000.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/cfg/22000.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/cfg/5000.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/cfg/6000.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/cfg/7000.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/cfg/8000.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/cfg/9000.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/agn.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/calib.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/calib.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/commands.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/dev.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/devices.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/led.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/led.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/lib.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/main.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/power.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/power.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/rs.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/rs.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/rx.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/rxon.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/scan.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/sta.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/tt.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/tt.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/tx.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/dvm/ucode.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/acpi.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/alive.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/binding.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/cmdhdr.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/coex.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/commands.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/config.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/context.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/d3.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/datapath.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/debug.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/filter.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/led.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/mac-cfg.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/mac.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/offload.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/paging.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/phy-ctxt.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/phy.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/power.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/rs.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/scan.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/sf.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/sta.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/stats.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/tdls.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/time-event.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/tof.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/tx.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/common_rx.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/debugfs.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/error-dump.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/file.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/img.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/init.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/notif-wait.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/notif-wait.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/nvm.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/paging.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/runtime.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/fw/smem.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-agn-hw.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-config.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-context-info.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-csr.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-debug.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-debug.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-devtrace-data.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-devtrace-io.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-devtrace-iwlwifi.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-devtrace-msg.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-devtrace-ucode.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-drv.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-fh.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-io.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-io.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-phy-db.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-prph.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-scd.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-trans.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/binding.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/coex.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/constants.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/led.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/offloading.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/power.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/quota.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/rs.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/sf.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/sta.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/tdls.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/testmode.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/time-event.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/tof.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/tof.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
-linux-x.x.x/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c
-linux-x.x.x/include/asm-generic/atomic64.h
-linux-x.x.x/include/asm-generic/bitops/__ffs.h
-linux-x.x.x/include/asm-generic/bitops/__fls.h
-linux-x.x.x/include/asm-generic/bitops/ffs.h
-linux-x.x.x/include/asm-generic/bitops/fls.h
-linux-x.x.x/include/asm-generic/bitops/fls64.h
-linux-x.x.x/include/asm-generic/bitops/non-atomic.h
-linux-x.x.x/include/crypto/aead.h
-linux-x.x.x/include/crypto/aes.h
-linux-x.x.x/include/crypto/algapi.h
-linux-x.x.x/include/crypto/crypto_wq.h
-linux-x.x.x/include/crypto/ctr.h
-linux-x.x.x/include/crypto/hash.h
-linux-x.x.x/include/crypto/internal/aead.h
-linux-x.x.x/include/crypto/internal/geniv.h
-linux-x.x.x/include/crypto/internal/hash.h
-linux-x.x.x/include/crypto/internal/rng.h
-linux-x.x.x/include/crypto/internal/skcipher.h
-linux-x.x.x/include/crypto/null.h
-linux-x.x.x/include/crypto/rng.h
-linux-x.x.x/include/crypto/scatterwalk.h
-linux-x.x.x/include/crypto/skcipher.h
-linux-x.x.x/include/linux/average.h
-linux-x.x.x/include/linux/bsearch.h
-linux-x.x.x/include/linux/crypto.h
-linux-x.x.x/include/linux/ctype.h
-linux-x.x.x/include/linux/errqueue.h
-linux-x.x.x/include/linux/ethtool.h
-linux-x.x.x/include/linux/gcd.h
-linux-x.x.x/include/linux/genetlink.h
-linux-x.x.x/include/linux/hashtable.h
-linux-x.x.x/include/linux/ieee80211.h
-linux-x.x.x/include/linux/if_ether.h
-linux-x.x.x/include/linux/if_link.h
-linux-x.x.x/include/linux/jhash.h
-linux-x.x.x/include/linux/leds.h
-linux-x.x.x/include/linux/list.h
-linux-x.x.x/include/linux/list_nulls.h
-linux-x.x.x/include/linux/lockdep.h
-linux-x.x.x/include/linux/log2.h
-linux-x.x.x/include/linux/mod_devicetable.h
-linux-x.x.x/include/linux/net.h
-linux-x.x.x/include/linux/netdev_features.h
-linux-x.x.x/include/linux/netlink.h
-linux-x.x.x/include/linux/pci_ids.h
-linux-x.x.x/include/linux/rbtree.h
-linux-x.x.x/include/linux/rbtree_augmented.h
-linux-x.x.x/include/linux/rfkill.h
-linux-x.x.x/include/linux/rhashtable.h
-linux-x.x.x/include/linux/rtnetlink.h
-linux-x.x.x/include/linux/skbuff.h
-linux-x.x.x/include/linux/socket.h
-linux-x.x.x/include/linux/swab.h
-linux-x.x.x/include/net/cfg80211.h
-linux-x.x.x/include/net/dsfield.h
-linux-x.x.x/include/net/dst.h
-linux-x.x.x/include/net/dst_ops.h
-linux-x.x.x/include/net/genetlink.h
-linux-x.x.x/include/net/ieee80211_radiotap.h
-linux-x.x.x/include/net/inet_frag.h
-linux-x.x.x/include/net/inet_sock.h
-linux-x.x.x/include/net/mac80211.h
-linux-x.x.x/include/net/neighbour.h
-linux-x.x.x/include/net/netlink.h
-linux-x.x.x/include/net/netns/ipv4.h
-linux-x.x.x/include/net/netns/mib.h
-linux-x.x.x/include/net/regulatory.h
-linux-x.x.x/include/net/request_sock.h
-linux-x.x.x/include/net/rtnetlink.h
-linux-x.x.x/include/net/snmp.h
-linux-x.x.x/include/net/sock.h
-linux-x.x.x/include/net/tcp_states.h
-linux-x.x.x/include/net/timewait_sock.h
-linux-x.x.x/include/trace/events/skb.h
-linux-x.x.x/include/trace/events/sock.h
-linux-x.x.x/include/uapi/asm-generic/socket.h
-linux-x.x.x/include/uapi/linux/byteorder/little_endian.h
-linux-x.x.x/include/uapi/linux/cryptouser.h
-linux-x.x.x/include/uapi/linux/errqueue.h
-linux-x.x.x/include/uapi/linux/genetlink.h
-linux-x.x.x/include/uapi/linux/if_bridge.h
-linux-x.x.x/include/uapi/linux/if_ether.h
-linux-x.x.x/include/uapi/linux/if_link.h
-linux-x.x.x/include/uapi/linux/if_packet.h
-linux-x.x.x/include/uapi/linux/neighbour.h
-linux-x.x.x/include/uapi/linux/net.h
-linux-x.x.x/include/uapi/linux/netlink.h
-linux-x.x.x/include/uapi/linux/nl80211.h
-linux-x.x.x/include/uapi/linux/pci_regs.h
-linux-x.x.x/include/uapi/linux/rfkill.h
-linux-x.x.x/include/uapi/linux/rtnetlink.h
-linux-x.x.x/include/uapi/linux/snmp.h
-linux-x.x.x/include/uapi/linux/socket.h
-linux-x.x.x/include/uapi/linux/sockios.h
-linux-x.x.x/include/uapi/linux/swab.h
-linux-x.x.x/lib/bsearch.c
-linux-x.x.x/lib/bucket_locks.c
-linux-x.x.x/lib/crc32.c
-linux-x.x.x/lib/crc32defs.h
-linux-x.x.x/lib/ctype.c
-linux-x.x.x/lib/gcd.c
-linux-x.x.x/lib/nlattr.c
-linux-x.x.x/lib/rbtree.c
-linux-x.x.x/lib/rhashtable.c
-linux-x.x.x/net/core/datagram.c
-linux-x.x.x/net/core/rtnetlink.c
-linux-x.x.x/net/core/skbuff.c
-linux-x.x.x/net/core/sock.c
-linux-x.x.x/net/ethernet/eth.c
-linux-x.x.x/net/mac80211/aead_api.c
-linux-x.x.x/net/mac80211/aead_api.h
-linux-x.x.x/net/mac80211/aes_ccm.h
-linux-x.x.x/net/mac80211/aes_cmac.c
-linux-x.x.x/net/mac80211/aes_cmac.h
-linux-x.x.x/net/mac80211/aes_gcm.h
-linux-x.x.x/net/mac80211/aes_gmac.c
-linux-x.x.x/net/mac80211/aes_gmac.h
-linux-x.x.x/net/mac80211/agg-rx.c
-linux-x.x.x/net/mac80211/agg-tx.c
-linux-x.x.x/net/mac80211/cfg.c
-linux-x.x.x/net/mac80211/chan.c
-linux-x.x.x/net/mac80211/debug.h
-linux-x.x.x/net/mac80211/debugfs.h
-linux-x.x.x/net/mac80211/debugfs_key.h
-linux-x.x.x/net/mac80211/debugfs_netdev.h
-linux-x.x.x/net/mac80211/debugfs_sta.h
-linux-x.x.x/net/mac80211/driver-ops.c
-linux-x.x.x/net/mac80211/driver-ops.h
-linux-x.x.x/net/mac80211/ethtool.c
-linux-x.x.x/net/mac80211/fils_aead.c
-linux-x.x.x/net/mac80211/fils_aead.h
-linux-x.x.x/net/mac80211/ht.c
-linux-x.x.x/net/mac80211/ibss.c
-linux-x.x.x/net/mac80211/ieee80211_i.h
-linux-x.x.x/net/mac80211/iface.c
-linux-x.x.x/net/mac80211/key.c
-linux-x.x.x/net/mac80211/key.h
-linux-x.x.x/net/mac80211/led.c
-linux-x.x.x/net/mac80211/led.h
-linux-x.x.x/net/mac80211/main.c
-linux-x.x.x/net/mac80211/mesh.c
-linux-x.x.x/net/mac80211/mesh.h
-linux-x.x.x/net/mac80211/mesh_hwmp.c
-linux-x.x.x/net/mac80211/mesh_pathtbl.c
-linux-x.x.x/net/mac80211/mesh_plink.c
-linux-x.x.x/net/mac80211/mesh_ps.c
-linux-x.x.x/net/mac80211/mesh_sync.c
-linux-x.x.x/net/mac80211/michael.c
-linux-x.x.x/net/mac80211/michael.h
-linux-x.x.x/net/mac80211/mlme.c
-linux-x.x.x/net/mac80211/ocb.c
-linux-x.x.x/net/mac80211/offchannel.c
-linux-x.x.x/net/mac80211/pm.c
-linux-x.x.x/net/mac80211/rate.c
-linux-x.x.x/net/mac80211/rate.h
-linux-x.x.x/net/mac80211/rc80211_minstrel.c
-linux-x.x.x/net/mac80211/rc80211_minstrel.h
-linux-x.x.x/net/mac80211/rc80211_minstrel_ht.c
-linux-x.x.x/net/mac80211/rc80211_minstrel_ht.h
-linux-x.x.x/net/mac80211/rx.c
-linux-x.x.x/net/mac80211/scan.c
-linux-x.x.x/net/mac80211/spectmgmt.c
-linux-x.x.x/net/mac80211/sta_info.c
-linux-x.x.x/net/mac80211/sta_info.h
-linux-x.x.x/net/mac80211/status.c
-linux-x.x.x/net/mac80211/tdls.c
-linux-x.x.x/net/mac80211/tkip.c
-linux-x.x.x/net/mac80211/tkip.h
-linux-x.x.x/net/mac80211/trace.c
-linux-x.x.x/net/mac80211/trace.h
-linux-x.x.x/net/mac80211/trace_msg.h
-linux-x.x.x/net/mac80211/tx.c
-linux-x.x.x/net/mac80211/util.c
-linux-x.x.x/net/mac80211/vht.c
-linux-x.x.x/net/mac80211/wep.c
-linux-x.x.x/net/mac80211/wep.h
-linux-x.x.x/net/mac80211/wme.c
-linux-x.x.x/net/mac80211/wme.h
-linux-x.x.x/net/mac80211/wpa.c
-linux-x.x.x/net/mac80211/wpa.h
-linux-x.x.x/net/netlink/af_netlink.c
-linux-x.x.x/net/netlink/af_netlink.h
-linux-x.x.x/net/netlink/genetlink.c
-linux-x.x.x/net/packet/af_packet.c
-linux-x.x.x/net/packet/internal.h
-linux-x.x.x/net/rfkill/core.c
-linux-x.x.x/net/rfkill/input.c
-linux-x.x.x/net/rfkill/rfkill.h
-linux-x.x.x/net/wireless/ap.c
-linux-x.x.x/net/wireless/chan.c
-linux-x.x.x/net/wireless/core.c
-linux-x.x.x/net/wireless/core.h
-linux-x.x.x/net/wireless/debugfs.h
-linux-x.x.x/net/wireless/ethtool.c
-linux-x.x.x/net/wireless/ibss.c
-linux-x.x.x/net/wireless/mesh.c
-linux-x.x.x/net/wireless/mlme.c
-linux-x.x.x/net/wireless/nl80211.c
-linux-x.x.x/net/wireless/nl80211.h
-linux-x.x.x/net/wireless/radiotap.c
-linux-x.x.x/net/wireless/rdev-ops.h
-linux-x.x.x/net/wireless/reg.c
-linux-x.x.x/net/wireless/reg.h
-linux-x.x.x/net/wireless/scan.c
-linux-x.x.x/net/wireless/sme.c
-linux-x.x.x/net/wireless/sysfs.c
-linux-x.x.x/net/wireless/sysfs.h
-linux-x.x.x/net/wireless/trace.c
-linux-x.x.x/net/wireless/trace.h
-linux-x.x.x/net/wireless/util.c
-linux-x.x.x/net/wireless/wext-compat.h