wifi_drv: Port of the Linux wireless stack

This commit is contained in:
Josef Söntgen 2014-11-22 15:13:43 +01:00 committed by Christian Helmuth
parent 2eaa55e6b1
commit 703e3622ff
77 changed files with 17685 additions and 4 deletions

View File

@ -82,3 +82,38 @@ LXIP is a port of the Linux TCP/IP stack to Genode. It is build as a shared
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.
Configuration snippet:
!<start name="wifi_drv">
! <resource name="RAM" quantum="32M"/>
! <provides><service name="Nic"/></provides>
! <config>
! <libc stdout="/dev/log" stderr="/dev/log" rtc="/dev/rtc">
! <vfs>
! <dir name="dev"> <log/> <rtc/>
! <jitterentropy name="random"/>
! <jitterentropy name="urandom"/>
! </dir>
! <inline name="wpa_supplicant.conf">
!network={
! id_str="foobar"
! ssid="foobar"
! key_mgmt=WPA-PSK
! psk="foobarfoobar"
!}
! </inline>
! </vfs>
! </libc>
! </config>
! <route>
! <service name="Rtc"> <any-child /> </service>
! <any-service> <parent/> <any-child /> </any-service>
! </route>
!</start

View File

@ -0,0 +1,105 @@
/*
* \brief Socket interface for calling the Linux WIFI stack
* \author Josef Soentgen
* \date 2012-08-02
*/
/*
* Copyright (C) 2014 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _WIFI__SOCKET_CALL_H_
#define _WIFI__SOCKET_CALL_H_
namespace Wifi {
struct Socket;
struct Sockaddr;
struct Msghdr;
struct Socket_call;
struct Poll_socket_fd;
/*
* XXX We need the WIFI_ prefix because SOL_SOCKET and friends are
* preprocessor macros.
*/
enum Flags { WIFI_F_NONE, WIFI_F_MSG_ERRQUEUE };
enum Sockopt_level { WIFI_SOL_SOCKET, WIFI_SOL_NETLINK };
enum Sockopt_name {
/* SOL_SOCKET */
WIFI_SO_SNDBUF,
WIFI_SO_RCVBUF,
WIFI_SO_PASSCRED,
WIFI_SO_WIFI_STATUS,
/* SOL_NETLINK */
WIFI_NETLINK_ADD_MEMBERSHIP,
WIFI_NETLINK_DROP_MEMBERSHIP,
WIFI_NETLINK_PKTINFO,
};
enum Poll_mask {
WIFI_POLLIN = 0x1,
WIFI_POLLOUT = 0x2,
WIFI_POLLEX = 0x4,
};
enum { MAX_POLL_SOCKETS = 16, };
typedef __SIZE_TYPE__ size_t;
typedef __PTRDIFF_TYPE__ ssize_t;
}
struct Wifi::Sockaddr { };
struct Wifi::Msghdr
{
enum { MAX_IOV_LEN = 8 };
struct Iov {
void *iov_base;
size_t iov_len;
};
void *msg_name;
unsigned msg_namelen;
Iov msg_iov[MAX_IOV_LEN];
unsigned msg_iovlen;
/* XXX recvmsg msg_flags ? */
void *msg_control;
unsigned msg_controllen;
};
struct Wifi::Socket_call
{
Socket* socket(int domain, int type, int protocol);
int close(Socket *);
int bind(Socket *, Sockaddr const *addr, unsigned addrlen);
int getsockname(Socket *, Sockaddr *addr, unsigned *addrlen);
int poll_all(Poll_socket_fd *, unsigned, int);
ssize_t recvmsg(Socket*, Msghdr *, Flags flags);
ssize_t sendmsg(Socket*, Msghdr const *, Flags flags);
int setsockopt(Socket*, Sockopt_level level, Sockopt_name optname,
void const *optval, unsigned optlen);
void non_block(Socket *, bool);
/**
* Special ioctl related functions
*/
void get_mac_address(unsigned char *addr);
};
struct Wifi::Poll_socket_fd
{
Socket *s;
void *pfd;
int events;
int revents;
};
#endif /* _WIFI__SOCKET_CALL_H_ */

View File

@ -0,0 +1,11 @@
NL_CONTRIB_INC_DIR := $(call select_from_ports,dde_linux)/src/lib/libnl
INC_DIR += $(NL_CONTRIB_INC_DIR)/include
LIBNL_INC_DIR = $(REP_DIR)/src/lib/libnl/include
INC_DIR += $(LIBNL_INC_DIR)
ifneq ($(filter 32bit,$(SPECS)),)
INC_DIR += $(LIBNL_INC_DIR)/32bit
endif
ifneq ($(filter 64bit,$(SPECS)),)
INC_DIR += $(LIBNL_INC_DIR)/64bit
endif

View File

@ -0,0 +1,65 @@
LIB_DIR = $(REP_DIR)/src/lib/libnl
LIB_INC_DIR = $(LIB_DIR)/include
LIBS += libc
LIBNL_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/lib/libnl
INC_DIR += $(LIB_INC_DIR)
INC_DIR += $(LIBNL_CONTRIB_DIR)/include
SRC_CC += lxcc_emul.cc socket.cc if.cc
# libnl
SRC_C += $(addprefix lib/, attr.c cache.c cache_mngt.c data.c error.c handlers.c \
hashtable.c msg.c nl.c object.c socket.c utils.c)
# libnl-genl
SRC_C += $(addprefix lib/genl/, ctrl.c family.c genl.c mngt.c)
CC_OPT += -DSYSCONFDIR=\"/\"
CC_C_OPT += -include $(LIB_INC_DIR)/libnl_emul.h
# libnl-route
#SRC_C += $(wildcard lib/fib_lookup/*.c) \
# $(wildcard lib/route/act/*.c) \
# $(wildcard lib/route/cls/*.c) \
# $(wildcard lib/route/link/*.c) \
# $(wildcard lib/route/qdisc/*.c) \
# $(wildcard lib/route/*.c)
# libnl-netfilter
#SRC_C += $(wildcard lib/netfilter/*.c)
# libnl-diag
#SRC_C += $(wildcard lib/idiag/*.c)
#
# Generate links for emulated header files in build directory
#
EMUL_INC := $(shell pwd)/include
EMUL_INC_LIST := $(addprefix linux/, netdevice.h ethtool.h atm.h socket.h in_route.h) \
$(addprefix asm/, byteorder.h)
EMUL_INCLUDES := $(addprefix $(EMUL_INC)/,$(EMUL_INC_LIST))
INC_DIR += $(EMUL_INC)
#
# Eagerly create directory. Otherwise it will not be picked up from
# INC_DIR because $(wildcard ...) does not return non-existent dirs.
#
$(shell mkdir -p $(EMUL_INC))
#
# Make sure to create the header symlinks prior building
#
$(SRC_C:.c=.o) $(SRC_CC:.cc=.o): $(EMUL_INCLUDES)
$(EMUL_INCLUDES):
$(VERBOSE)mkdir -p $(dir $@)
$(VERBOSE)ln -s $(LIB_INC_DIR)/libnl_emul.h $@
vpath %.c $(LIBNL_CONTRIB_DIR)
vpath %.c $(LIB_DIR)
vpath %.cc $(LIB_DIR)
# vi: set ft=make :

View File

@ -0,0 +1,161 @@
LIB_DIR = $(REP_DIR)/src/lib/wifi
LIB_INC_DIR = $(LIB_DIR)/include
SHARED_LIB = yes
# FIXME should we *really* add dde_kit to this shared library?
LIBS += dde_kit libc-setjmp libc
LD_OPT += --version-script=$(LIB_DIR)/symbol.map
SRC_CC += dummies.cc init.cc lxcc_emul.cc pci_driver.cc timer.cc irq.cc \
work.cc nic.cc socket_call.cc scheduler.cc event.cc
SRC_C += lxc_emul.c socket.c
CC_WARN =
CC_OPT += -fno-builtin-toupper
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_CXX_OPT += -Wall -fpermissive
WIFI_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/lib/wifi
DRIVERS_DIR := $(WIFI_CONTRIB_DIR)/drivers
WIFI_DIR := $(WIFI_CONTRIB_DIR)/net
#
# 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 += $(LIB_INC_DIR)
INC_DIR += $(WIFI_CONTRIB_DIR)/include $(WIFI_CONTRIB_DIR)/include/uapi \
INC_DIR += $(LIB_DIR)
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
# 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
# choose default pid algorithm
CC_OPT += -DCONFIG_MAC80211_RC_PID -DCONFIG_MAC80211_RC_DEFAULT=\"pid\"
#
# Suffix of global 'module_init' function
#
MOD_SUFFIX =
CC_OPT += -DMOD_SUFFIX=$(MOD_SUFFIX)
SRC_C += lib/ctype.c
SRC_C += lib/crc32.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/average.c
SRC_C += lib/nlattr.c
SRC_C += lib/rbtree.c
# wifi mac80211
SRC_C += $(addprefix net/mac80211/, $(notdir $(wildcard $(WIFI_DIR)/mac80211/*.c)))
# 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
# 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/iwlwifi
SRC_C += $(addprefix $(DRV_DIR_IWLWIFI)/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/*.c)))
SRC_C += $(addprefix $(DRV_DIR_IWLWIFI)/dvm/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/dvm/*.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)
CC_OPT += -DCONFIG_IWLMVM -DCONFIG_IWLDVM
CC_OPT += -DCONFIG_IWLWIFI_DEBUG
# iwlegacy driver
DRV_DIR_IWLEGACY := drivers/net/wireless/iwlegacy
SRC_C += $(addprefix $(DRV_DIR_IWLEGACY)/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLEGACY)/*.c)))
INC_DIR += $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLEGACY)
CC_OPT += -DCONFIG_IWL3945 -DCONFIG_IWL4965
CC_OPT += -DCONFIG_IWLEGACY_DEBUG
#
# Determine the header files included by the contrib code. For each
# of these header files we create a symlink to 'lx_emul.h'.
#
GEN_INCLUDES := $(shell grep -rh "^\#include .*\/" $(WIFI_CONTRIB_DIR) |\
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
$(shell mkdir -p $(GEN_INC))
GEN_INCLUDES := $(addprefix $(GEN_INC)/,$(GEN_INCLUDES))
INC_DIR += $(GEN_INC)
#
# Make sure to create the header symlinks prior building
#
$(SRC_C:.c=.o) $(SRC_CC:.cc=.o): $(GEN_INCLUDES)
$(GEN_INCLUDES):
$(VERBOSE)mkdir -p $(dir $@)
$(VERBOSE)ln -s $(LIB_INC_DIR)/lx_emul.h $@
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 $(LIB_DIR)/signal
# vi: set ft=make :

View File

@ -0,0 +1,32 @@
LIB_DIR := $(REP_DIR)/src/lib/wpa_driver_nl80211
LIB_INC_DIR := $(LIB_DIR)/include
INC_DIR += $(LIB_INC_DIR)
LIBS += libc libnl
SHARED_LIB = yes
LD_OPT += --version-script=$(LIB_DIR)/symbol.map
SRC_CC += dummies.cc ioctl.cc
WS_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/app/wpa_supplicant
# l2_packet
SRC_C += src/l2_packet/l2_packet_linux.c
INC_DIR += $(WS_CONTRIB_DIR)/src/l2_packet
# nl80211 driver
SRC_C_drivers = drivers.c \
driver_nl80211.c \
netlink.c \
rfkill.c
SRC_C += $(addprefix src/drivers/, $(SRC_C_drivers))
INC_DIR += $(WS_CONTRIB_DIR)/src/drivers \
$(WS_CONTRIB_DIR)/src/utils \
$(WS_CONTRIB_DIR)/src
CC_OPT += -DCONFIG_DRIVER_NL80211
CC_OPT += -DCONFIG_LIBNL20
vpath %.c $(WS_CONTRIB_DIR)
vpath %.cc $(LIB_DIR)

View File

@ -0,0 +1,106 @@
WS_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/app/wpa_supplicant
WS_DIR := $(REP_DIR)/src/lib/wpa_supplicant
LIBS += libc libcrypto libssl wpa_driver_nl80211 vfs_jitterentropy
SHARED_LIB = yes
LD_OPT += --version-script=$(WS_DIR)/symbol.map
CC_OPT += -Wno-unused-function
CC_CXX_OPT += -fpermissive
SRC_C += main.c
# wpa_supplicant
SRC_C_wpa_supplicant = blacklist.c \
bss.c \
config.c \
config_file.c \
eap_register.c \
events.c \
notify.c \
scan.c \
sme.c \
wpa_supplicant.c \
wpas_glue.c
SRC_C += $(addprefix wpa_supplicant/, $(SRC_C_wpa_supplicant))
INC_DIR += $(WS_CONTRIB_DIR)/wpa_supplicant
CC_OPT += -DCONFIG_BACKEND_FILE -DCONFIG_NO_CONFIG_WRITE \
-DCONFIG_SME
INC_DIR += $(WS_CONTRIB_DIR)/src/
# common
SRC_C_common = ieee802_11_common.c wpa_common.c
SRC_C += $(addprefix src/common/, $(SRC_C_common))
INC_DIR += $(WS_CONTRIB_DIR)/src/common
# crypto
SRC_C_crypto = aes-unwrap.c \
crypto_openssl.c \
md5.c \
ms_funcs.c \
random.c \
sha1-prf.c \
sha1-tlsprf.c \
tls_openssl.c
SRC_C += $(addprefix src/crypto/, $(SRC_C_crypto))
INC_DIR += $(WS_CONTRIB_DIR)/src/crypto
SRC_C += src/drivers/driver_common.c
# eap_common
SRC_C_eap_common = chap.c \
eap_common.c \
eap_peap_common.c
SRC_C += $(addprefix src/eap_common/, $(SRC_C_eap_common))
INC_DIR += $(WS_CONTRIB_DIR)/src/eap_common
# eap_peer
SRC_C_eap_peer = eap.c \
eap_gtc.c \
eap_leap.c \
eap_md5.c \
eap_methods.c \
eap_mschapv2.c \
eap_otp.c \
eap_peap.c \
eap_tls.c \
eap_tls_common.c \
eap_ttls.c \
mschapv2.c
SRC_C += $(addprefix src/eap_peer/, $(SRC_C_eap_peer))
INC_DIR += $(WS_CONTRIB_DIR)/src/eap_peer
CC_OPT += -DEAP_TLS -DEAP_PEAP -DEAP_TTLS -DEAP_MD5 -DEAP_MSCHAPv2 \
-DEAP_OTP -DEAP_LEAP
# eapol_supp
SRC_C += src/eapol_supp/eapol_supp_sm.c
INC_DIR += $(WS_CONTRIB_DIR)/src/eapol_supp
CC_OPT += -DIEEE8021X_EAPOL
# rsn_supp
SRC_C_rsn_supp = peerkey.c \
pmksa_cache.c \
preauth.c \
wpa.c \
wpa_ie.c
SRC_C += $(addprefix src/rsn_supp/, $(SRC_C_rsn_supp))
INC_DIR += $(WS_CONTRIB_DIR)/src/rsn_supp
CC_OPT += -DCONFIG_PEERKEY
# utils
SRC_C_utils = base64.c \
common.c \
eloop.c \
os_unix.c \
radiotap.c \
wpa_debug.c \
wpabuf.c
SRC_C += $(addprefix src/utils/, $(SRC_C_utils))
INC_DIR += $(WS_CONTRIB_DIR)/src/utils
CC_OPT += -DCONFIG_ELOOP_POLL
vpath %.c $(WS_CONTRIB_DIR)
vpath %.c $(WS_DIR)

View File

@ -0,0 +1,3 @@
include $(REP_DIR)/lib/mk/libnl.inc
INC_DIR += $(LIB_INC_DIR)/32bit $(LIB_INC_DIR)/x86_32 $(LIB_INC_DIR)/x86

View File

@ -0,0 +1,3 @@
include $(REP_DIR)/lib/mk/wifi.inc
INC_DIR += $(LIB_INC_DIR)/32bit $(LIB_INC_DIR)/x86_32 $(LIB_INC_DIR)/x86

View File

@ -0,0 +1,3 @@
include $(REP_DIR)/lib/mk/libnl.inc
INC_DIR += $(LIB_INC_DIR)/64bit $(LIB_INC_DIR)/x86_64 $(LIB_INC_DIR)/x86

View File

@ -0,0 +1,3 @@
include $(REP_DIR)/lib/mk/wifi.inc
INC_DIR += $(LIB_INC_DIR)/64bit $(LIB_INC_DIR)/x86_64 $(LIB_INC_DIR)/x86

View File

@ -0,0 +1,52 @@
include/netlink-private/netlink.h | 1 +
lib/handlers.c | 4 ++--
lib/msg.c | 4 ++--
3 files changed, 5 insertions(+), 4 deletions(-)
--- a/include/netlink-private/netlink.h
+++ b/include/netlink-private/netlink.h
@@ -100,6 +100,7 @@ struct trans_list {
fprintf(stderr, "BUG at file position %s:%d:%s\n", \
__FILE__, __LINE__, __PRETTY_FUNCTION__); \
assert(0); \
+ while (7); \
} while (0)
#define BUG_ON(condition) \
--- a/lib/handlers.c
+++ b/lib/handlers.c
@@ -81,8 +81,8 @@ static int nl_error_handler_verbose(struct sockaddr_nl *who,
FILE *ofd = arg ? arg : stderr;
char buf[256];
- fprintf(ofd, "-- Error received: %s\n-- Original message: ",
- strerror_r(-e->error, buf, sizeof(buf)));
+ strerror_r(-e->error, buf, sizeof(buf));
+ fprintf(ofd, "-- Error received: %s\n-- Original message: ", buf);
print_header_content(ofd, &e->msg);
fprintf(ofd, "\n");
--- a/lib/msg.c
+++ b/lib/msg.c
@@ -916,8 +916,8 @@ static void dump_error_msg(struct nl_msg *msg, FILE *ofd)
char buf[256];
struct nl_msg *errmsg;
- fprintf(ofd, " .error = %d \"%s\"\n", err->error,
- strerror_r(-err->error, buf, sizeof(buf)));
+ strerror_r(-err->error, buf, sizeof(buf));
+ fprintf(ofd, " .error = %d \"%s\"\n", err->error, buf);
fprintf(ofd, " [ORIGINAL MESSAGE] %zu octets\n", sizeof(*hdr));
errmsg = nlmsg_inherit(&err->msg);
--- a/include/netlink/netlink-compat.h
+++ b/include/netlink/netlink-compat.h
@@ -13,7 +13,7 @@
#define NETLINK_COMPAT_H_
#if !defined _LINUX_SOCKET_H && !defined _BITS_SOCKADDR_H
-typedef unsigned short sa_family_t;
+//typedef unsigned short sa_family_t;
#endif
#ifndef IFNAMSIZ

View File

@ -0,0 +1,883 @@
drivers/net/wireless/iwlwifi/iwl-debug.c | 18 +-
drivers/net/wireless/iwlwifi/mvm/mvm.h | 2 +-
drivers/net/wireless/iwlwifi/pcie/drv.c | 628 ++++++++++++++++---------------
net/core/sock.c | 2 +
net/packet/af_packet.c | 6 +
net/wireless/core.h | 2 +-
net/wireless/sysfs.c | 2 +-
wifi/include/linux/ieee80211.h | 2 +-
wifi/include/net/cfg80211.h | 5 +-
wifi/include/net/netlink.h | 8 +-
wifi/include/net/sock.h | 4 +-
11 files changed, 349 insertions(+), 330 deletions(-)
--- a/drivers/net/wireless/iwlwifi/iwl-debug.c
+++ b/drivers/net/wireless/iwlwifi/iwl-debug.c
@@ -80,7 +80,9 @@ void __iwl_ ##fn(struct device *dev, const char *fmt, ...) \
\
va_start(args, fmt); \
vaf.va = &args; \
- dev_ ##fn(dev, "%pV", &vaf); \
+ char buf[256]; \
+ vsnprintf(buf, sizeof(buf), vaf.fmt, *vaf.va); \
+ dev_ ##fn(dev, "%s", buf); \
trace_iwlwifi_ ##fn(&vaf); \
va_end(args); \
}
@@ -103,10 +105,12 @@ void __iwl_err(struct device *dev, bool rfkill_prefix, bool trace_only,
va_start(args, fmt);
vaf.va = &args;
if (!trace_only) {
+ char buf[256];
+ vsnprintf(buf, sizeof(buf), vaf.fmt, *vaf.va);
if (rfkill_prefix)
- dev_err(dev, "(RFKILL) %pV", &vaf);
+ dev_err(dev, "(RFKILL) %s", buf);
else
- dev_err(dev, "%pV", &vaf);
+ dev_err(dev, "%s", buf);
}
trace_iwlwifi_err(&vaf);
va_end(args);
@@ -127,9 +131,11 @@ void __iwl_dbg(struct device *dev,
vaf.va = &args;
#ifdef CONFIG_IWLWIFI_DEBUG
if (iwl_have_debug_level(level) &&
- (!limit || net_ratelimit()))
- dev_dbg(dev, "%c %s %pV", in_interrupt() ? 'I' : 'U',
- function, &vaf);
+ (!limit || net_ratelimit())) {
+ char buf[256];
+ vsnprintf(buf, sizeof(buf), vaf.fmt, *vaf.va);
+ dev_dbg(dev, "%c %s %s", in_interrupt() ? 'I' : 'U', function, buf);
+ }
#endif
trace_iwlwifi_dbg(level, in_interrupt(), function, &vaf);
va_end(args);
--- a/drivers/net/wireless/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h
@@ -64,7 +64,7 @@
#ifndef __IWL_MVM_H__
#define __IWL_MVM_H__
-#include <linux/list.h>
+/* #include <linux/list.h> */
#include <linux/spinlock.h>
#include <linux/leds.h>
#include <linux/in6.h>
--- a/drivers/net/wireless/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/iwlwifi/pcie/drv.c
@@ -78,318 +78,322 @@
/* Hardware specific file defines the PCI IDs table for that hardware module */
static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
-#if IS_ENABLED(CONFIG_IWLDVM)
- {IWL_PCI_DEVICE(0x4232, 0x1201, iwl5100_agn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x4232, 0x1301, iwl5100_agn_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x4232, 0x1204, iwl5100_agn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x4232, 0x1304, iwl5100_agn_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x4232, 0x1205, iwl5100_bgn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x4232, 0x1305, iwl5100_bgn_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x4232, 0x1206, iwl5100_abg_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x4232, 0x1306, iwl5100_abg_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x4232, 0x1221, iwl5100_agn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x4232, 0x1321, iwl5100_agn_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x4232, 0x1224, iwl5100_agn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x4232, 0x1324, iwl5100_agn_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x4232, 0x1225, iwl5100_bgn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x4232, 0x1325, iwl5100_bgn_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x4232, 0x1226, iwl5100_abg_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x4232, 0x1326, iwl5100_abg_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x4237, 0x1211, iwl5100_agn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x4237, 0x1311, iwl5100_agn_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x4237, 0x1214, iwl5100_agn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x4237, 0x1314, iwl5100_agn_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x4237, 0x1215, iwl5100_bgn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x4237, 0x1315, iwl5100_bgn_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x4237, 0x1216, iwl5100_abg_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x4237, 0x1316, iwl5100_abg_cfg)}, /* Half Mini Card */
-
-/* 5300 Series WiFi */
- {IWL_PCI_DEVICE(0x4235, 0x1021, iwl5300_agn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x4235, 0x1121, iwl5300_agn_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x4235, 0x1024, iwl5300_agn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x4235, 0x1124, iwl5300_agn_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x4235, 0x1001, iwl5300_agn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x4235, 0x1101, iwl5300_agn_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x4235, 0x1004, iwl5300_agn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x4235, 0x1104, iwl5300_agn_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x4236, 0x1011, iwl5300_agn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x4236, 0x1111, iwl5300_agn_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x4236, 0x1014, iwl5300_agn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x4236, 0x1114, iwl5300_agn_cfg)}, /* Half Mini Card */
-
-/* 5350 Series WiFi/WiMax */
- {IWL_PCI_DEVICE(0x423A, 0x1001, iwl5350_agn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x423A, 0x1021, iwl5350_agn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x423B, 0x1011, iwl5350_agn_cfg)}, /* Mini Card */
-
-/* 5150 Series Wifi/WiMax */
- {IWL_PCI_DEVICE(0x423C, 0x1201, iwl5150_agn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x423C, 0x1301, iwl5150_agn_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x423C, 0x1206, iwl5150_abg_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x423C, 0x1306, iwl5150_abg_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x423C, 0x1221, iwl5150_agn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x423C, 0x1321, iwl5150_agn_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x423C, 0x1326, iwl5150_abg_cfg)}, /* Half Mini Card */
-
- {IWL_PCI_DEVICE(0x423D, 0x1211, iwl5150_agn_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x423D, 0x1311, iwl5150_agn_cfg)}, /* Half Mini Card */
- {IWL_PCI_DEVICE(0x423D, 0x1216, iwl5150_abg_cfg)}, /* Mini Card */
- {IWL_PCI_DEVICE(0x423D, 0x1316, iwl5150_abg_cfg)}, /* Half Mini Card */
-
-/* 6x00 Series */
- {IWL_PCI_DEVICE(0x422B, 0x1101, iwl6000_3agn_cfg)},
- {IWL_PCI_DEVICE(0x422B, 0x1108, iwl6000_3agn_cfg)},
- {IWL_PCI_DEVICE(0x422B, 0x1121, iwl6000_3agn_cfg)},
- {IWL_PCI_DEVICE(0x422B, 0x1128, iwl6000_3agn_cfg)},
- {IWL_PCI_DEVICE(0x422C, 0x1301, iwl6000i_2agn_cfg)},
- {IWL_PCI_DEVICE(0x422C, 0x1306, iwl6000i_2abg_cfg)},
- {IWL_PCI_DEVICE(0x422C, 0x1307, iwl6000i_2bg_cfg)},
- {IWL_PCI_DEVICE(0x422C, 0x1321, iwl6000i_2agn_cfg)},
- {IWL_PCI_DEVICE(0x422C, 0x1326, iwl6000i_2abg_cfg)},
- {IWL_PCI_DEVICE(0x4238, 0x1111, iwl6000_3agn_cfg)},
- {IWL_PCI_DEVICE(0x4238, 0x1118, iwl6000_3agn_cfg)},
- {IWL_PCI_DEVICE(0x4239, 0x1311, iwl6000i_2agn_cfg)},
- {IWL_PCI_DEVICE(0x4239, 0x1316, iwl6000i_2abg_cfg)},
-
-/* 6x05 Series */
- {IWL_PCI_DEVICE(0x0082, 0x1301, iwl6005_2agn_cfg)},
- {IWL_PCI_DEVICE(0x0082, 0x1306, iwl6005_2abg_cfg)},
- {IWL_PCI_DEVICE(0x0082, 0x1307, iwl6005_2bg_cfg)},
- {IWL_PCI_DEVICE(0x0082, 0x1308, iwl6005_2agn_cfg)},
- {IWL_PCI_DEVICE(0x0082, 0x1321, iwl6005_2agn_cfg)},
- {IWL_PCI_DEVICE(0x0082, 0x1326, iwl6005_2abg_cfg)},
- {IWL_PCI_DEVICE(0x0082, 0x1328, iwl6005_2agn_cfg)},
- {IWL_PCI_DEVICE(0x0085, 0x1311, iwl6005_2agn_cfg)},
- {IWL_PCI_DEVICE(0x0085, 0x1318, iwl6005_2agn_cfg)},
- {IWL_PCI_DEVICE(0x0085, 0x1316, iwl6005_2abg_cfg)},
- {IWL_PCI_DEVICE(0x0082, 0xC020, iwl6005_2agn_sff_cfg)},
- {IWL_PCI_DEVICE(0x0085, 0xC220, iwl6005_2agn_sff_cfg)},
- {IWL_PCI_DEVICE(0x0085, 0xC228, iwl6005_2agn_sff_cfg)},
- {IWL_PCI_DEVICE(0x0082, 0x4820, iwl6005_2agn_d_cfg)},
- {IWL_PCI_DEVICE(0x0082, 0x1304, iwl6005_2agn_mow1_cfg)},/* low 5GHz active */
- {IWL_PCI_DEVICE(0x0082, 0x1305, iwl6005_2agn_mow2_cfg)},/* high 5GHz active */
-
-/* 6x30 Series */
- {IWL_PCI_DEVICE(0x008A, 0x5305, iwl1030_bgn_cfg)},
- {IWL_PCI_DEVICE(0x008A, 0x5307, iwl1030_bg_cfg)},
- {IWL_PCI_DEVICE(0x008A, 0x5325, iwl1030_bgn_cfg)},
- {IWL_PCI_DEVICE(0x008A, 0x5327, iwl1030_bg_cfg)},
- {IWL_PCI_DEVICE(0x008B, 0x5315, iwl1030_bgn_cfg)},
- {IWL_PCI_DEVICE(0x008B, 0x5317, iwl1030_bg_cfg)},
- {IWL_PCI_DEVICE(0x0090, 0x5211, iwl6030_2agn_cfg)},
- {IWL_PCI_DEVICE(0x0090, 0x5215, iwl6030_2bgn_cfg)},
- {IWL_PCI_DEVICE(0x0090, 0x5216, iwl6030_2abg_cfg)},
- {IWL_PCI_DEVICE(0x0091, 0x5201, iwl6030_2agn_cfg)},
- {IWL_PCI_DEVICE(0x0091, 0x5205, iwl6030_2bgn_cfg)},
- {IWL_PCI_DEVICE(0x0091, 0x5206, iwl6030_2abg_cfg)},
- {IWL_PCI_DEVICE(0x0091, 0x5207, iwl6030_2bg_cfg)},
- {IWL_PCI_DEVICE(0x0091, 0x5221, iwl6030_2agn_cfg)},
- {IWL_PCI_DEVICE(0x0091, 0x5225, iwl6030_2bgn_cfg)},
- {IWL_PCI_DEVICE(0x0091, 0x5226, iwl6030_2abg_cfg)},
-
-/* 6x50 WiFi/WiMax Series */
- {IWL_PCI_DEVICE(0x0087, 0x1301, iwl6050_2agn_cfg)},
- {IWL_PCI_DEVICE(0x0087, 0x1306, iwl6050_2abg_cfg)},
- {IWL_PCI_DEVICE(0x0087, 0x1321, iwl6050_2agn_cfg)},
- {IWL_PCI_DEVICE(0x0087, 0x1326, iwl6050_2abg_cfg)},
- {IWL_PCI_DEVICE(0x0089, 0x1311, iwl6050_2agn_cfg)},
- {IWL_PCI_DEVICE(0x0089, 0x1316, iwl6050_2abg_cfg)},
-
-/* 6150 WiFi/WiMax Series */
- {IWL_PCI_DEVICE(0x0885, 0x1305, iwl6150_bgn_cfg)},
- {IWL_PCI_DEVICE(0x0885, 0x1307, iwl6150_bg_cfg)},
- {IWL_PCI_DEVICE(0x0885, 0x1325, iwl6150_bgn_cfg)},
- {IWL_PCI_DEVICE(0x0885, 0x1327, iwl6150_bg_cfg)},
- {IWL_PCI_DEVICE(0x0886, 0x1315, iwl6150_bgn_cfg)},
- {IWL_PCI_DEVICE(0x0886, 0x1317, iwl6150_bg_cfg)},
-
-/* 1000 Series WiFi */
- {IWL_PCI_DEVICE(0x0083, 0x1205, iwl1000_bgn_cfg)},
- {IWL_PCI_DEVICE(0x0083, 0x1305, iwl1000_bgn_cfg)},
- {IWL_PCI_DEVICE(0x0083, 0x1225, iwl1000_bgn_cfg)},
- {IWL_PCI_DEVICE(0x0083, 0x1325, iwl1000_bgn_cfg)},
- {IWL_PCI_DEVICE(0x0084, 0x1215, iwl1000_bgn_cfg)},
- {IWL_PCI_DEVICE(0x0084, 0x1315, iwl1000_bgn_cfg)},
- {IWL_PCI_DEVICE(0x0083, 0x1206, iwl1000_bg_cfg)},
- {IWL_PCI_DEVICE(0x0083, 0x1306, iwl1000_bg_cfg)},
- {IWL_PCI_DEVICE(0x0083, 0x1226, iwl1000_bg_cfg)},
- {IWL_PCI_DEVICE(0x0083, 0x1326, iwl1000_bg_cfg)},
- {IWL_PCI_DEVICE(0x0084, 0x1216, iwl1000_bg_cfg)},
- {IWL_PCI_DEVICE(0x0084, 0x1316, iwl1000_bg_cfg)},
-
-/* 100 Series WiFi */
- {IWL_PCI_DEVICE(0x08AE, 0x1005, iwl100_bgn_cfg)},
- {IWL_PCI_DEVICE(0x08AE, 0x1007, iwl100_bg_cfg)},
- {IWL_PCI_DEVICE(0x08AF, 0x1015, iwl100_bgn_cfg)},
- {IWL_PCI_DEVICE(0x08AF, 0x1017, iwl100_bg_cfg)},
- {IWL_PCI_DEVICE(0x08AE, 0x1025, iwl100_bgn_cfg)},
- {IWL_PCI_DEVICE(0x08AE, 0x1027, iwl100_bg_cfg)},
-
-/* 130 Series WiFi */
- {IWL_PCI_DEVICE(0x0896, 0x5005, iwl130_bgn_cfg)},
- {IWL_PCI_DEVICE(0x0896, 0x5007, iwl130_bg_cfg)},
- {IWL_PCI_DEVICE(0x0897, 0x5015, iwl130_bgn_cfg)},
- {IWL_PCI_DEVICE(0x0897, 0x5017, iwl130_bg_cfg)},
- {IWL_PCI_DEVICE(0x0896, 0x5025, iwl130_bgn_cfg)},
- {IWL_PCI_DEVICE(0x0896, 0x5027, iwl130_bg_cfg)},
-
-/* 2x00 Series */
- {IWL_PCI_DEVICE(0x0890, 0x4022, iwl2000_2bgn_cfg)},
- {IWL_PCI_DEVICE(0x0891, 0x4222, iwl2000_2bgn_cfg)},
- {IWL_PCI_DEVICE(0x0890, 0x4422, iwl2000_2bgn_cfg)},
- {IWL_PCI_DEVICE(0x0890, 0x4822, iwl2000_2bgn_d_cfg)},
-
-/* 2x30 Series */
- {IWL_PCI_DEVICE(0x0887, 0x4062, iwl2030_2bgn_cfg)},
- {IWL_PCI_DEVICE(0x0888, 0x4262, iwl2030_2bgn_cfg)},
- {IWL_PCI_DEVICE(0x0887, 0x4462, iwl2030_2bgn_cfg)},
-
-/* 6x35 Series */
- {IWL_PCI_DEVICE(0x088E, 0x4060, iwl6035_2agn_cfg)},
- {IWL_PCI_DEVICE(0x088E, 0x406A, iwl6035_2agn_sff_cfg)},
- {IWL_PCI_DEVICE(0x088F, 0x4260, iwl6035_2agn_cfg)},
- {IWL_PCI_DEVICE(0x088F, 0x426A, iwl6035_2agn_sff_cfg)},
- {IWL_PCI_DEVICE(0x088E, 0x4460, iwl6035_2agn_cfg)},
- {IWL_PCI_DEVICE(0x088E, 0x446A, iwl6035_2agn_sff_cfg)},
- {IWL_PCI_DEVICE(0x088E, 0x4860, iwl6035_2agn_cfg)},
- {IWL_PCI_DEVICE(0x088F, 0x5260, iwl6035_2agn_cfg)},
-
-/* 105 Series */
- {IWL_PCI_DEVICE(0x0894, 0x0022, iwl105_bgn_cfg)},
- {IWL_PCI_DEVICE(0x0895, 0x0222, iwl105_bgn_cfg)},
- {IWL_PCI_DEVICE(0x0894, 0x0422, iwl105_bgn_cfg)},
- {IWL_PCI_DEVICE(0x0894, 0x0822, iwl105_bgn_d_cfg)},
-
-/* 135 Series */
- {IWL_PCI_DEVICE(0x0892, 0x0062, iwl135_bgn_cfg)},
- {IWL_PCI_DEVICE(0x0893, 0x0262, iwl135_bgn_cfg)},
- {IWL_PCI_DEVICE(0x0892, 0x0462, iwl135_bgn_cfg)},
-#endif /* CONFIG_IWLDVM */
-
-#if IS_ENABLED(CONFIG_IWLMVM)
-/* 7260 Series */
- {IWL_PCI_DEVICE(0x08B1, 0x4070, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x4072, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x4170, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x4060, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x406A, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x4160, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x4062, iwl7260_n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x4162, iwl7260_n_cfg)},
- {IWL_PCI_DEVICE(0x08B2, 0x4270, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B2, 0x4272, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B2, 0x4260, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B2, 0x426A, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B2, 0x4262, iwl7260_n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x4470, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x4472, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x4460, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x446A, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x4462, iwl7260_n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x4870, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x486E, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x4A70, iwl7260_2ac_cfg_high_temp)},
- {IWL_PCI_DEVICE(0x08B1, 0x4A6E, iwl7260_2ac_cfg_high_temp)},
- {IWL_PCI_DEVICE(0x08B1, 0x4A6C, iwl7260_2ac_cfg_high_temp)},
- {IWL_PCI_DEVICE(0x08B1, 0x4570, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x4560, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B2, 0x4370, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B2, 0x4360, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x5070, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x5072, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x5170, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x5770, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x4020, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x402A, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B2, 0x4220, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0x4420, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC070, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC072, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC170, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC060, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC06A, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC160, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC062, iwl7260_n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC162, iwl7260_n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC770, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC760, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B2, 0xC270, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B2, 0xC272, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B2, 0xC260, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B2, 0xC26A, iwl7260_n_cfg)},
- {IWL_PCI_DEVICE(0x08B2, 0xC262, iwl7260_n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC470, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC472, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC460, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC462, iwl7260_n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC570, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC560, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B2, 0xC370, iwl7260_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC360, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC020, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC02A, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B2, 0xC220, iwl7260_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B1, 0xC420, iwl7260_2n_cfg)},
-
-/* 3160 Series */
- {IWL_PCI_DEVICE(0x08B3, 0x0070, iwl3160_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B3, 0x0072, iwl3160_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B3, 0x0170, iwl3160_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B3, 0x0172, iwl3160_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B3, 0x0060, iwl3160_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B3, 0x0062, iwl3160_n_cfg)},
- {IWL_PCI_DEVICE(0x08B4, 0x0270, iwl3160_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B4, 0x0272, iwl3160_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B3, 0x0470, iwl3160_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B3, 0x0472, iwl3160_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B4, 0x0370, iwl3160_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B3, 0x8070, iwl3160_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B3, 0x8072, iwl3160_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B3, 0x8170, iwl3160_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B3, 0x8172, iwl3160_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B3, 0x8060, iwl3160_2n_cfg)},
- {IWL_PCI_DEVICE(0x08B3, 0x8062, iwl3160_n_cfg)},
- {IWL_PCI_DEVICE(0x08B4, 0x8270, iwl3160_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B3, 0x8470, iwl3160_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B3, 0x8570, iwl3160_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B3, 0x1070, iwl3160_2ac_cfg)},
- {IWL_PCI_DEVICE(0x08B3, 0x1170, iwl3160_2ac_cfg)},
-
-/* 7265 Series */
- {IWL_PCI_DEVICE(0x095A, 0x5010, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x5110, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x5100, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095B, 0x5310, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095B, 0x5302, iwl7265_n_cfg)},
- {IWL_PCI_DEVICE(0x095B, 0x5210, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x5012, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x5412, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x5410, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x5400, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x1010, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x5000, iwl7265_2n_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x500A, iwl7265_2n_cfg)},
- {IWL_PCI_DEVICE(0x095B, 0x5200, iwl7265_2n_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x5002, iwl7265_n_cfg)},
- {IWL_PCI_DEVICE(0x095B, 0x5202, iwl7265_n_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x9010, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x9012, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x9110, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x9112, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x9210, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x9510, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x9310, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x9410, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x5020, iwl7265_2n_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x502A, iwl7265_2n_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x5420, iwl7265_2n_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x5090, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x5190, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x5590, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095B, 0x5290, iwl7265_2ac_cfg)},
- {IWL_PCI_DEVICE(0x095A, 0x5490, iwl7265_2ac_cfg)},
-#endif /* CONFIG_IWLMVM */
+ {IWL_PCI_DEVICE(0x4238, 0x1111, iwl6000_3agn_cfg)}, /* x201 */
+ {IWL_PCI_DEVICE(0x0085, 0x1311, iwl6005_2agn_cfg)}, /* x220 */
+ {IWL_PCI_DEVICE(0x088E, 0x4060, iwl6035_2agn_cfg)}, /* plumbum */
+
+//#if IS_ENABLED(CONFIG_IWLDVM)
+// {IWL_PCI_DEVICE(0x4232, 0x1201, iwl5100_agn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x4232, 0x1301, iwl5100_agn_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x4232, 0x1204, iwl5100_agn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x4232, 0x1304, iwl5100_agn_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x4232, 0x1205, iwl5100_bgn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x4232, 0x1305, iwl5100_bgn_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x4232, 0x1206, iwl5100_abg_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x4232, 0x1306, iwl5100_abg_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x4232, 0x1221, iwl5100_agn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x4232, 0x1321, iwl5100_agn_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x4232, 0x1224, iwl5100_agn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x4232, 0x1324, iwl5100_agn_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x4232, 0x1225, iwl5100_bgn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x4232, 0x1325, iwl5100_bgn_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x4232, 0x1226, iwl5100_abg_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x4232, 0x1326, iwl5100_abg_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x4237, 0x1211, iwl5100_agn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x4237, 0x1311, iwl5100_agn_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x4237, 0x1214, iwl5100_agn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x4237, 0x1314, iwl5100_agn_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x4237, 0x1215, iwl5100_bgn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x4237, 0x1315, iwl5100_bgn_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x4237, 0x1216, iwl5100_abg_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x4237, 0x1316, iwl5100_abg_cfg)}, /* Half Mini Card */
+//
+///* 5300 Series WiFi */
+// {IWL_PCI_DEVICE(0x4235, 0x1021, iwl5300_agn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x4235, 0x1121, iwl5300_agn_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x4235, 0x1024, iwl5300_agn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x4235, 0x1124, iwl5300_agn_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x4235, 0x1001, iwl5300_agn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x4235, 0x1101, iwl5300_agn_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x4235, 0x1004, iwl5300_agn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x4235, 0x1104, iwl5300_agn_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x4236, 0x1011, iwl5300_agn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x4236, 0x1111, iwl5300_agn_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x4236, 0x1014, iwl5300_agn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x4236, 0x1114, iwl5300_agn_cfg)}, /* Half Mini Card */
+//
+///* 5350 Series WiFi/WiMax */
+// {IWL_PCI_DEVICE(0x423A, 0x1001, iwl5350_agn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x423A, 0x1021, iwl5350_agn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x423B, 0x1011, iwl5350_agn_cfg)}, /* Mini Card */
+//
+///* 5150 Series Wifi/WiMax */
+// {IWL_PCI_DEVICE(0x423C, 0x1201, iwl5150_agn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x423C, 0x1301, iwl5150_agn_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x423C, 0x1206, iwl5150_abg_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x423C, 0x1306, iwl5150_abg_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x423C, 0x1221, iwl5150_agn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x423C, 0x1321, iwl5150_agn_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x423C, 0x1326, iwl5150_abg_cfg)}, /* Half Mini Card */
+//
+// {IWL_PCI_DEVICE(0x423D, 0x1211, iwl5150_agn_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x423D, 0x1311, iwl5150_agn_cfg)}, /* Half Mini Card */
+// {IWL_PCI_DEVICE(0x423D, 0x1216, iwl5150_abg_cfg)}, /* Mini Card */
+// {IWL_PCI_DEVICE(0x423D, 0x1316, iwl5150_abg_cfg)}, /* Half Mini Card */
+//
+///* 6x00 Series */
+// {IWL_PCI_DEVICE(0x422B, 0x1101, iwl6000_3agn_cfg)},
+// {IWL_PCI_DEVICE(0x422B, 0x1108, iwl6000_3agn_cfg)},
+// {IWL_PCI_DEVICE(0x422B, 0x1121, iwl6000_3agn_cfg)},
+// {IWL_PCI_DEVICE(0x422B, 0x1128, iwl6000_3agn_cfg)},
+// {IWL_PCI_DEVICE(0x422C, 0x1301, iwl6000i_2agn_cfg)},
+// {IWL_PCI_DEVICE(0x422C, 0x1306, iwl6000i_2abg_cfg)},
+// {IWL_PCI_DEVICE(0x422C, 0x1307, iwl6000i_2bg_cfg)},
+// {IWL_PCI_DEVICE(0x422C, 0x1321, iwl6000i_2agn_cfg)},
+// {IWL_PCI_DEVICE(0x422C, 0x1326, iwl6000i_2abg_cfg)},
+// {IWL_PCI_DEVICE(0x4238, 0x1111, iwl6000_3agn_cfg)},
+// {IWL_PCI_DEVICE(0x4238, 0x1118, iwl6000_3agn_cfg)},
+// {IWL_PCI_DEVICE(0x4239, 0x1311, iwl6000i_2agn_cfg)},
+// {IWL_PCI_DEVICE(0x4239, 0x1316, iwl6000i_2abg_cfg)},
+//
+///* 6x05 Series */
+// {IWL_PCI_DEVICE(0x0082, 0x1301, iwl6005_2agn_cfg)},
+// {IWL_PCI_DEVICE(0x0082, 0x1306, iwl6005_2abg_cfg)},
+// {IWL_PCI_DEVICE(0x0082, 0x1307, iwl6005_2bg_cfg)},
+// {IWL_PCI_DEVICE(0x0082, 0x1308, iwl6005_2agn_cfg)},
+// {IWL_PCI_DEVICE(0x0082, 0x1321, iwl6005_2agn_cfg)},
+// {IWL_PCI_DEVICE(0x0082, 0x1326, iwl6005_2abg_cfg)},
+// {IWL_PCI_DEVICE(0x0082, 0x1328, iwl6005_2agn_cfg)},
+// {IWL_PCI_DEVICE(0x0085, 0x1311, iwl6005_2agn_cfg)},
+// {IWL_PCI_DEVICE(0x0085, 0x1318, iwl6005_2agn_cfg)},
+// {IWL_PCI_DEVICE(0x0085, 0x1316, iwl6005_2abg_cfg)},
+// {IWL_PCI_DEVICE(0x0082, 0xC020, iwl6005_2agn_sff_cfg)},
+// {IWL_PCI_DEVICE(0x0085, 0xC220, iwl6005_2agn_sff_cfg)},
+// {IWL_PCI_DEVICE(0x0085, 0xC228, iwl6005_2agn_sff_cfg)},
+// {IWL_PCI_DEVICE(0x0082, 0x4820, iwl6005_2agn_d_cfg)},
+// {IWL_PCI_DEVICE(0x0082, 0x1304, iwl6005_2agn_mow1_cfg)},/* low 5GHz active */
+// {IWL_PCI_DEVICE(0x0082, 0x1305, iwl6005_2agn_mow2_cfg)},/* high 5GHz active */
+//
+///* 6x30 Series */
+// {IWL_PCI_DEVICE(0x008A, 0x5305, iwl1030_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x008A, 0x5307, iwl1030_bg_cfg)},
+// {IWL_PCI_DEVICE(0x008A, 0x5325, iwl1030_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x008A, 0x5327, iwl1030_bg_cfg)},
+// {IWL_PCI_DEVICE(0x008B, 0x5315, iwl1030_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x008B, 0x5317, iwl1030_bg_cfg)},
+// {IWL_PCI_DEVICE(0x0090, 0x5211, iwl6030_2agn_cfg)},
+// {IWL_PCI_DEVICE(0x0090, 0x5215, iwl6030_2bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0090, 0x5216, iwl6030_2abg_cfg)},
+// {IWL_PCI_DEVICE(0x0091, 0x5201, iwl6030_2agn_cfg)},
+// {IWL_PCI_DEVICE(0x0091, 0x5205, iwl6030_2bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0091, 0x5206, iwl6030_2abg_cfg)},
+// {IWL_PCI_DEVICE(0x0091, 0x5207, iwl6030_2bg_cfg)},
+// {IWL_PCI_DEVICE(0x0091, 0x5221, iwl6030_2agn_cfg)},
+// {IWL_PCI_DEVICE(0x0091, 0x5225, iwl6030_2bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0091, 0x5226, iwl6030_2abg_cfg)},
+//
+///* 6x50 WiFi/WiMax Series */
+// {IWL_PCI_DEVICE(0x0087, 0x1301, iwl6050_2agn_cfg)},
+// {IWL_PCI_DEVICE(0x0087, 0x1306, iwl6050_2abg_cfg)},
+// {IWL_PCI_DEVICE(0x0087, 0x1321, iwl6050_2agn_cfg)},
+// {IWL_PCI_DEVICE(0x0087, 0x1326, iwl6050_2abg_cfg)},
+// {IWL_PCI_DEVICE(0x0089, 0x1311, iwl6050_2agn_cfg)},
+// {IWL_PCI_DEVICE(0x0089, 0x1316, iwl6050_2abg_cfg)},
+//
+///* 6150 WiFi/WiMax Series */
+// {IWL_PCI_DEVICE(0x0885, 0x1305, iwl6150_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0885, 0x1307, iwl6150_bg_cfg)},
+// {IWL_PCI_DEVICE(0x0885, 0x1325, iwl6150_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0885, 0x1327, iwl6150_bg_cfg)},
+// {IWL_PCI_DEVICE(0x0886, 0x1315, iwl6150_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0886, 0x1317, iwl6150_bg_cfg)},
+//
+///* 1000 Series WiFi */
+// {IWL_PCI_DEVICE(0x0083, 0x1205, iwl1000_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0083, 0x1305, iwl1000_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0083, 0x1225, iwl1000_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0083, 0x1325, iwl1000_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0084, 0x1215, iwl1000_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0084, 0x1315, iwl1000_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0083, 0x1206, iwl1000_bg_cfg)},
+// {IWL_PCI_DEVICE(0x0083, 0x1306, iwl1000_bg_cfg)},
+// {IWL_PCI_DEVICE(0x0083, 0x1226, iwl1000_bg_cfg)},
+// {IWL_PCI_DEVICE(0x0083, 0x1326, iwl1000_bg_cfg)},
+// {IWL_PCI_DEVICE(0x0084, 0x1216, iwl1000_bg_cfg)},
+// {IWL_PCI_DEVICE(0x0084, 0x1316, iwl1000_bg_cfg)},
+//
+///* 100 Series WiFi */
+// {IWL_PCI_DEVICE(0x08AE, 0x1005, iwl100_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x08AE, 0x1007, iwl100_bg_cfg)},
+// {IWL_PCI_DEVICE(0x08AF, 0x1015, iwl100_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x08AF, 0x1017, iwl100_bg_cfg)},
+// {IWL_PCI_DEVICE(0x08AE, 0x1025, iwl100_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x08AE, 0x1027, iwl100_bg_cfg)},
+//
+///* 130 Series WiFi */
+// {IWL_PCI_DEVICE(0x0896, 0x5005, iwl130_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0896, 0x5007, iwl130_bg_cfg)},
+// {IWL_PCI_DEVICE(0x0897, 0x5015, iwl130_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0897, 0x5017, iwl130_bg_cfg)},
+// {IWL_PCI_DEVICE(0x0896, 0x5025, iwl130_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0896, 0x5027, iwl130_bg_cfg)},
+//
+///* 2x00 Series */
+// {IWL_PCI_DEVICE(0x0890, 0x4022, iwl2000_2bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0891, 0x4222, iwl2000_2bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0890, 0x4422, iwl2000_2bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0890, 0x4822, iwl2000_2bgn_d_cfg)},
+//
+///* 2x30 Series */
+// {IWL_PCI_DEVICE(0x0887, 0x4062, iwl2030_2bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0888, 0x4262, iwl2030_2bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0887, 0x4462, iwl2030_2bgn_cfg)},
+//
+///* 6x35 Series */
+// {IWL_PCI_DEVICE(0x088E, 0x4060, iwl6035_2agn_cfg)},
+// {IWL_PCI_DEVICE(0x088E, 0x406A, iwl6035_2agn_sff_cfg)},
+// {IWL_PCI_DEVICE(0x088F, 0x4260, iwl6035_2agn_cfg)},
+// {IWL_PCI_DEVICE(0x088F, 0x426A, iwl6035_2agn_sff_cfg)},
+// {IWL_PCI_DEVICE(0x088E, 0x4460, iwl6035_2agn_cfg)},
+// {IWL_PCI_DEVICE(0x088E, 0x446A, iwl6035_2agn_sff_cfg)},
+// {IWL_PCI_DEVICE(0x088E, 0x4860, iwl6035_2agn_cfg)},
+// {IWL_PCI_DEVICE(0x088F, 0x5260, iwl6035_2agn_cfg)},
+//
+///* 105 Series */
+// {IWL_PCI_DEVICE(0x0894, 0x0022, iwl105_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0895, 0x0222, iwl105_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0894, 0x0422, iwl105_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0894, 0x0822, iwl105_bgn_d_cfg)},
+//
+///* 135 Series */
+// {IWL_PCI_DEVICE(0x0892, 0x0062, iwl135_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0893, 0x0262, iwl135_bgn_cfg)},
+// {IWL_PCI_DEVICE(0x0892, 0x0462, iwl135_bgn_cfg)},
+//#endif /* CONFIG_IWLDVM */
+//
+//#if IS_ENABLED(CONFIG_IWLMVM)
+///* 7260 Series */
+// {IWL_PCI_DEVICE(0x08B1, 0x4070, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x4072, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x4170, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x4060, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x406A, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x4160, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x4062, iwl7260_n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x4162, iwl7260_n_cfg)},
+// {IWL_PCI_DEVICE(0x08B2, 0x4270, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B2, 0x4272, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B2, 0x4260, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B2, 0x426A, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B2, 0x4262, iwl7260_n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x4470, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x4472, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x4460, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x446A, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x4462, iwl7260_n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x4870, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x486E, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x4A70, iwl7260_2ac_cfg_high_temp)},
+// {IWL_PCI_DEVICE(0x08B1, 0x4A6E, iwl7260_2ac_cfg_high_temp)},
+// {IWL_PCI_DEVICE(0x08B1, 0x4A6C, iwl7260_2ac_cfg_high_temp)},
+// {IWL_PCI_DEVICE(0x08B1, 0x4570, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x4560, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B2, 0x4370, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B2, 0x4360, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x5070, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x5072, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x5170, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x5770, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x4020, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x402A, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B2, 0x4220, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0x4420, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC070, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC072, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC170, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC060, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC06A, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC160, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC062, iwl7260_n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC162, iwl7260_n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC770, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC760, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B2, 0xC270, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B2, 0xC272, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B2, 0xC260, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B2, 0xC26A, iwl7260_n_cfg)},
+// {IWL_PCI_DEVICE(0x08B2, 0xC262, iwl7260_n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC470, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC472, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC460, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC462, iwl7260_n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC570, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC560, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B2, 0xC370, iwl7260_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC360, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC020, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC02A, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B2, 0xC220, iwl7260_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B1, 0xC420, iwl7260_2n_cfg)},
+//
+///* 3160 Series */
+// {IWL_PCI_DEVICE(0x08B3, 0x0070, iwl3160_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B3, 0x0072, iwl3160_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B3, 0x0170, iwl3160_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B3, 0x0172, iwl3160_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B3, 0x0060, iwl3160_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B3, 0x0062, iwl3160_n_cfg)},
+// {IWL_PCI_DEVICE(0x08B4, 0x0270, iwl3160_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B4, 0x0272, iwl3160_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B3, 0x0470, iwl3160_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B3, 0x0472, iwl3160_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B4, 0x0370, iwl3160_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B3, 0x8070, iwl3160_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B3, 0x8072, iwl3160_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B3, 0x8170, iwl3160_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B3, 0x8172, iwl3160_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B3, 0x8060, iwl3160_2n_cfg)},
+// {IWL_PCI_DEVICE(0x08B3, 0x8062, iwl3160_n_cfg)},
+// {IWL_PCI_DEVICE(0x08B4, 0x8270, iwl3160_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B3, 0x8470, iwl3160_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B3, 0x8570, iwl3160_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B3, 0x1070, iwl3160_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x08B3, 0x1170, iwl3160_2ac_cfg)},
+//
+///* 7265 Series */
+// {IWL_PCI_DEVICE(0x095A, 0x5010, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x5110, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x5100, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095B, 0x5310, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095B, 0x5302, iwl7265_n_cfg)},
+// {IWL_PCI_DEVICE(0x095B, 0x5210, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x5012, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x5412, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x5410, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x5400, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x1010, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x5000, iwl7265_2n_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x500A, iwl7265_2n_cfg)},
+// {IWL_PCI_DEVICE(0x095B, 0x5200, iwl7265_2n_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x5002, iwl7265_n_cfg)},
+// {IWL_PCI_DEVICE(0x095B, 0x5202, iwl7265_n_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x9010, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x9012, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x9110, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x9112, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x9210, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x9510, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x9310, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x9410, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x5020, iwl7265_2n_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x502A, iwl7265_2n_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x5420, iwl7265_2n_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x5090, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x5190, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x5590, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095B, 0x5290, iwl7265_2ac_cfg)},
+// {IWL_PCI_DEVICE(0x095A, 0x5490, iwl7265_2ac_cfg)},
+//#endif /* CONFIG_IWLMVM */
{0}
};
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -142,6 +142,8 @@
#include <net/busy_poll.h>
+#include <net/timewait_sock.h>
+
static DEFINE_MUTEX(proto_list_mutex);
static LIST_HEAD(proto_list);
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -93,6 +93,8 @@
#include <net/inet_common.h>
#endif
+#include <linux/if_ether.h>
+
#include "internal.h"
/*
@@ -3508,6 +3510,7 @@ static int packet_notifier(struct notifier_block *this,
struct net_device *dev = netdev_notifier_info_to_dev(ptr);
struct net *net = dev_net(dev);
+#if 0
rcu_read_lock();
sk_for_each_rcu(sk, &net->packet.sklist) {
struct packet_sock *po = pkt_sk(sk);
@@ -3548,6 +3551,7 @@ static int packet_notifier(struct notifier_block *this,
}
}
rcu_read_unlock();
+#endif
return NOTIFY_DONE;
}
@@ -4062,8 +4066,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;
}
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -82,7 +82,7 @@ struct cfg80211_registered_device {
/* must be last because of the way we do wiphy_priv(),
* and it should at least be aligned to NETDEV_ALIGN */
- struct wiphy wiphy __aligned(NETDEV_ALIGN);
+ struct wiphy wiphy __attribute__((__aligned__(32)));
};
static inline
--- a/net/wireless/sysfs.c
+++ b/net/wireless/sysfs.c
@@ -156,7 +156,7 @@ struct class ieee80211_class = {
.resume = wiphy_resume,
#endif
.ns_type = &net_ns_type_operations,
- .namespace = wiphy_namespace,
+ ._namespace = wiphy_namespace,
};
int wiphy_sysfs_init(void)
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -2231,7 +2231,7 @@ static inline bool ieee80211_is_robust_mgmt_frame(struct ieee80211_hdr *hdr)
static inline bool ieee80211_is_public_action(struct ieee80211_hdr *hdr,
size_t len)
{
- struct ieee80211_mgmt *mgmt = (void *)hdr;
+ struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)hdr;
if (len < IEEE80211_MIN_ACTION_SIZE)
return false;
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -191,6 +191,7 @@ struct ieee80211_channel {
* @IEEE80211_RATE_SUPPORTS_10MHZ: Rate can be used in 10 MHz mode
*/
enum ieee80211_rate_flags {
+ IEEE80211_RATE_NULL = 0,
IEEE80211_RATE_SHORT_PREAMBLE = 1<<0,
IEEE80211_RATE_MANDATORY_A = 1<<1,
IEEE80211_RATE_MANDATORY_B = 1<<2,
@@ -465,7 +466,7 @@ ieee80211_chandef_rate_flags(struct cfg80211_chan_def *chandef)
default:
break;
}
- return 0;
+ return IEEE80211_RATE_NULL;
}
/**
@@ -2990,7 +2991,7 @@ struct wiphy {
const struct nl80211_vendor_cmd_info *vendor_events;
int n_vendor_commands, n_vendor_events;
- char priv[0] __aligned(NETDEV_ALIGN);
+ char priv[0] __attribute__ ((__aligned__(32)));//__aligned(NETDEV_ALIGN);
};
static inline struct net *wiphy_net(struct wiphy *wiphy)
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -308,7 +308,7 @@ static inline int nlmsg_len(const struct nlmsghdr *nlh)
static inline struct nlattr *nlmsg_attrdata(const struct nlmsghdr *nlh,
int hdrlen)
{
- unsigned char *data = nlmsg_data(nlh);
+ unsigned char *data = (unsigned char *)nlmsg_data(nlh);
return (struct nlattr *) (data + NLMSG_ALIGN(hdrlen));
}
@@ -717,7 +717,7 @@ static inline struct nlattr *nla_next(const struct nlattr *nla, int *remaining)
static inline struct nlattr *
nla_find_nested(const struct nlattr *nla, int attrtype)
{
- return nla_find(nla_data(nla), nla_len(nla), attrtype);
+ return nla_find((const struct nlattr *)nla_data(nla), nla_len(nla), attrtype);
}
/**
@@ -733,7 +733,7 @@ static inline int nla_parse_nested(struct nlattr *tb[], int maxtype,
const struct nlattr *nla,
const struct nla_policy *policy)
{
- return nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy);
+ return nla_parse(tb, maxtype, (const struct nlattr *)nla_data(nla), nla_len(nla), policy);
}
/**
@@ -1161,7 +1161,7 @@ static inline void nla_nest_cancel(struct sk_buff *skb, struct nlattr *start)
static inline int nla_validate_nested(const struct nlattr *start, int maxtype,
const struct nla_policy *policy)
{
- return nla_validate(nla_data(start), nla_len(start), maxtype, policy);
+ return nla_validate((const struct nlattr *)nla_data(start), nla_len(start), maxtype, policy);
}
/**
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1854,7 +1854,7 @@ static inline int skb_add_data_nocache(struct sock *sk, struct sk_buff *skb,
{
int err, offset = skb->len;
- err = skb_do_copy_data_nocache(sk, skb, from, skb_put(skb, copy),
+ err = skb_do_copy_data_nocache(sk, skb, from, (char *)skb_put(skb, copy),
copy, offset);
if (err)
__skb_trim(skb, offset);
@@ -1869,7 +1869,7 @@ static inline int skb_copy_to_page_nocache(struct sock *sk, char __user *from,
{
int err;
- err = skb_do_copy_data_nocache(sk, skb, from, page_address(page) + off,
+ err = skb_do_copy_data_nocache(sk, skb, from, (char *)(page_address(page) + off),
copy, skb->len);
if (err)
return err;
--- a/drivers/net/wireless/iwlwifi/dvm/rs.c
+++ b/drivers/net/wireless/iwlwifi/dvm/rs.c
@@ -2309,7 +2309,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
rate_scale_index_msk = rate_mask;
if (!((1 << index) & rate_scale_index_msk)) {
- IWL_ERR(priv, "Current Rate is not valid\n");
+ // IWL_ERR(priv, "Current Rate is not valid\n");
if (lq_sta->search_better_tbl) {
/* revert to active table if search table is not valid*/
tbl->lq_type = LQ_NONE;

View File

@ -0,0 +1,101 @@
diff --git a/crypto/ccm.c b/crypto/ccm.c
index 1df8421..a5ee033 100644
--- a/crypto/ccm.c
+++ b/crypto/ccm.c
@@ -52,7 +52,8 @@ static inline struct crypto_ccm_req_priv_ctx *crypto_ccm_reqctx(
{
unsigned long align = crypto_aead_alignmask(crypto_aead_reqtfm(req));
- return (void *)PTR_ALIGN((u8 *)aead_request_ctx(req), align + 1);
+ u8 *p = (u8 *) aead_request_ctx(req);
+ return (void *)PTR_ALIGN(p, (align + 1));
}
static int set_msg_len(u8 *block, unsigned int msglen, int csize)
@@ -681,8 +682,10 @@ static struct aead_request *crypto_rfc4309_crypt(struct aead_request *req)
struct crypto_aead *aead = crypto_aead_reqtfm(req);
struct crypto_rfc4309_ctx *ctx = crypto_aead_ctx(aead);
struct crypto_aead *child = ctx->child;
- u8 *iv = PTR_ALIGN((u8 *)(subreq + 1) + crypto_aead_reqsize(child),
- crypto_aead_alignmask(child) + 1);
+
+ unsigned long m = crypto_aead_alignmask(child) + 1;
+ u8 *p = (u8 *)(subreq + 1) + crypto_aead_reqsize(child);
+ u8 *iv = PTR_ALIGN(p, m);
/* L' */
iv[0] = 3;
diff --git a/crypto/ctr.c b/crypto/ctr.c
index f2b94f2..b345689 100644
--- a/crypto/ctr.c
+++ b/crypto/ctr.c
@@ -59,7 +59,9 @@ static void crypto_ctr_crypt_final(struct blkcipher_walk *walk,
unsigned long alignmask = crypto_cipher_alignmask(tfm);
u8 *ctrblk = walk->iv;
u8 tmp[bsize + alignmask];
- u8 *keystream = PTR_ALIGN(tmp + 0, alignmask + 1);
+ u8 *p = (u8*)(tmp + 0);
+ unsigned long m = alignmask + 1;
+ u8 *keystream = PTR_ALIGN(p, m);
u8 *src = walk->src.virt.addr;
u8 *dst = walk->dst.virt.addr;
unsigned int nbytes = walk->nbytes;
@@ -108,7 +110,9 @@ static int crypto_ctr_crypt_inplace(struct blkcipher_walk *walk,
u8 *ctrblk = walk->iv;
u8 *src = walk->src.virt.addr;
u8 tmp[bsize + alignmask];
- u8 *keystream = PTR_ALIGN(tmp + 0, alignmask + 1);
+ unsigned long m = alignmask + 1;
+ u8 *p = (u8*)(tmp + 0);
+ u8 *keystream = PTR_ALIGN(p , m);
do {
/* create keystream */
@@ -281,8 +285,11 @@ static int crypto_rfc3686_crypt(struct ablkcipher_request *req)
struct crypto_rfc3686_ctx *ctx = crypto_ablkcipher_ctx(tfm);
struct crypto_ablkcipher *child = ctx->child;
unsigned long align = crypto_ablkcipher_alignmask(tfm);
+
+ unsigned long m = align + 1;
+ u8 *p = (u8*) ablkcipher_request_ctx(req);
struct crypto_rfc3686_req_ctx *rctx =
- (void *)PTR_ALIGN((u8 *)ablkcipher_request_ctx(req), align + 1);
+ (void *)PTR_ALIGN(p, m);
struct ablkcipher_request *subreq = &rctx->subreq;
u8 *iv = rctx->iv;
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -201,8 +201,10 @@ void __ablkcipher_walk_complete(struct ablkcipher_walk *walk);
static inline void *crypto_tfm_ctx_aligned(struct crypto_tfm *tfm)
{
- return PTR_ALIGN(crypto_tfm_ctx(tfm),
- crypto_tfm_alg_alignmask(tfm) + 1);
+ void *p = crypto_tfm_ctx(tfm);
+ unsigned int m = crypto_tfm_alg_alignmask(tfm) + 1;
+
+ return PTR_ALIGN(p, m);
}
static inline struct crypto_instance *crypto_tfm_alg_instance(
--- a/crypto/algboss.c
+++ b/crypto/algboss.c
@@ -90,6 +90,8 @@ out:
crypto_alg_put(&param->larval->alg);
kfree(param);
module_put_and_exit(0);
+
+ return 0;
}
static int cryptomgr_schedule_probe(struct crypto_larval *larval)
@@ -228,6 +230,8 @@ skiptest:
kfree(param);
module_put_and_exit(0);
+
+ return 0;
}
static int cryptomgr_schedule_test(struct crypto_alg *alg)

View File

@ -0,0 +1,82 @@
--- a/drivers/net/wireless/iwlwifi/dvm/calib.c
+++ b/drivers/net/wireless/iwlwifi/dvm/calib.c
@@ -121,7 +121,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/iwlwifi/dvm/scan.c
+++ b/drivers/net/wireless/iwlwifi/dvm/scan.c
@@ -672,7 +672,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/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -1593,7 +1593,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
sizeof(struct iwl_device_cmd)
+ trans->dev_cmd_headroom,
sizeof(void *),
- SLAB_HWCACHE_ALIGN,
+ SLAB_HWCACHE_ALIGN | SLAB_LX_DMA,
NULL);
if (!trans->dev_cmd_pool) {
--- a/drivers/net/wireless/iwlwifi/pcie/tx.c
+++ b/drivers/net/wireless/iwlwifi/pcie/tx.c
@@ -492,7 +492,7 @@ static int iwl_pcie_txq_alloc(struct iwl_trans *trans,