]> Git Repo - linux.git/commitdiff
Merge tag 'mac80211-next-for-davem-2018-06-29' of git://git.kernel.org/pub/scm/linux...
authorDavid S. Miller <[email protected]>
Sat, 30 Jun 2018 12:08:12 +0000 (21:08 +0900)
committerDavid S. Miller <[email protected]>
Sat, 30 Jun 2018 12:08:12 +0000 (21:08 +0900)
Small merge conflict in net/mac80211/scan.c, I preserved
the kcalloc() conversion. -DaveM

Johannes Berg says:

====================
This round's updates:
 * finally some of the promised HE code, but it turns
   out to be small - but everything kept changing, so
   one part I did in the driver was >30 patches for
   what was ultimately <200 lines of code ... similar
   here for this code.
 * improved scan privacy support - can now specify scan
   flags for randomizing the sequence number as well as
   reducing the probe request element content
 * rfkill cleanups
 * a timekeeping cleanup from Arnd
 * various other cleanups
====================

Signed-off-by: David S. Miller <[email protected]>
1  2 
MAINTAINERS
include/uapi/linux/nl80211.h
net/mac80211/main.c
net/mac80211/scan.c
net/mac80211/util.c
net/wireless/core.c
net/wireless/nl80211.c
net/wireless/util.c

diff --combined MAINTAINERS
index f3e766e504d8b28607c8b3ac673656b956df4607,1fe2aac281775c11c156a22b794b416f8c37c279..3b2e592aa521e730b7cf9b244ace10be527f534e
@@@ -1419,7 -1419,6 +1419,7 @@@ M:      Shawn Guo <[email protected]
  M:    Sascha Hauer <[email protected]>
  R:    Pengutronix Kernel Team <[email protected]>
  R:    Fabio Estevam <[email protected]>
 +R:    NXP Linux Team <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git
@@@ -1732,8 -1731,7 +1732,8 @@@ F:      arch/arm/mach-npcm
  F:    arch/arm/boot/dts/nuvoton-npcm*
  F:    include/dt-bindings/clock/nuvoton,npcm7xx-clks.h
  F:    drivers/*/*npcm*
 -F:    Documentation/*/*npcm*
 +F:    Documentation/devicetree/bindings/*/*npcm*
 +F:    Documentation/devicetree/bindings/*/*/*npcm*
  
  ARM/NUVOTON W90X900 ARM ARCHITECTURE
  M:    Wan ZongShun <[email protected]>
@@@ -1831,7 -1829,7 +1831,7 @@@ F:      drivers/spi/spi-qup.
  F:    drivers/tty/serial/msm_serial.c
  F:    drivers/*/pm8???-*
  F:    drivers/mfd/ssbi.c
 -F:    drivers/firmware/qcom_scm.c
 +F:    drivers/firmware/qcom_scm*
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux.git
  
  ARM/RADISYS ENP2611 MACHINE SUPPORT
@@@ -2608,7 -2606,6 +2608,7 @@@ BACKLIGHT CLASS/SUBSYSTE
  M:    Lee Jones <[email protected]>
  M:    Daniel Thompson <[email protected]>
  M:    Jingoo Han <[email protected]>
 +L:    [email protected]
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git
  S:    Maintained
  F:    drivers/video/backlight/
@@@ -3080,7 -3077,7 +3080,7 @@@ M:      Clemens Ladisch <[email protected]
  L:    [email protected] (moderated for non-subscribers)
  T:    git git://git.alsa-project.org/alsa-kernel.git
  S:    Maintained
 -F:    Documentation/sound/alsa/Bt87x.txt
 +F:    Documentation/sound/cards/bt87x.rst
  F:    sound/pci/bt87x.c
  
  BT8XXGPIO DRIVER
@@@ -3376,7 -3373,7 +3376,7 @@@ M:      David Howells <[email protected]
  M:    David Woodhouse <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/module-signing.txt
 +F:    Documentation/admin-guide/module-signing.rst
  F:    certs/
  F:    scripts/sign-file.c
  F:    scripts/extract-cert.c
  T:    git git://git.infradead.org/users/hch/dma-mapping.git
  W:    http://git.infradead.org/users/hch/dma-mapping.git
  S:    Supported
 -F:    lib/dma-debug.c
 -F:    lib/dma-direct.c
 -F:    lib/dma-noncoherent.c
 -F:    lib/dma-virt.c
 -F:    drivers/base/dma-mapping.c
 -F:    drivers/base/dma-coherent.c
 +F:    kernel/dma/
  F:    include/asm-generic/dma-mapping.h
  F:    include/linux/dma-direct.h
  F:    include/linux/dma-mapping.h
@@@ -4509,7 -4511,7 +4509,7 @@@ DRM DRIVER FOR ILITEK ILI9225 PANEL
  M:    David Lechner <[email protected]>
  S:    Maintained
  F:    drivers/gpu/drm/tinydrm/ili9225.c
 -F:    Documentation/devicetree/bindings/display/ili9225.txt
 +F:    Documentation/devicetree/bindings/display/ilitek,ili9225.txt
  
  DRM DRIVER FOR INTEL I810 VIDEO CARDS
  S:    Orphan / Obsolete
@@@ -4595,13 -4597,13 +4595,13 @@@ DRM DRIVER FOR SITRONIX ST7586 PANEL
  M:    David Lechner <[email protected]>
  S:    Maintained
  F:    drivers/gpu/drm/tinydrm/st7586.c
 -F:    Documentation/devicetree/bindings/display/st7586.txt
 +F:    Documentation/devicetree/bindings/display/sitronix,st7586.txt
  
  DRM DRIVER FOR SITRONIX ST7735R PANELS
  M:    David Lechner <[email protected]>
  S:    Maintained
  F:    drivers/gpu/drm/tinydrm/st7735r.c
 -F:    Documentation/devicetree/bindings/display/st7735r.txt
 +F:    Documentation/devicetree/bindings/display/sitronix,st7735r.txt
  
  DRM DRIVER FOR TDFX VIDEO CARDS
  S:    Orphan / Obsolete
@@@ -4634,6 -4636,7 +4634,6 @@@ F:      drivers/gpu/drm
  F:    drivers/gpu/vga/
  F:    Documentation/devicetree/bindings/display/
  F:    Documentation/devicetree/bindings/gpu/
 -F:    Documentation/devicetree/bindings/video/
  F:    Documentation/gpu/
  F:    include/drm/
  F:    include/uapi/drm/
@@@ -4678,7 -4681,7 +4678,7 @@@ M:      Boris Brezillon <boris.brezillon@boo
  L:    [email protected]
  S:    Supported
  F:    drivers/gpu/drm/atmel-hlcdc/
 -F:    Documentation/devicetree/bindings/drm/atmel/
 +F:    Documentation/devicetree/bindings/display/atmel/
  T:    git git://anongit.freedesktop.org/drm/drm-misc
  
  DRM DRIVERS FOR BRIDGE CHIPS
@@@ -4709,7 -4712,7 +4709,7 @@@ S:      Supporte
  F:    drivers/gpu/drm/fsl-dcu/
  F:    Documentation/devicetree/bindings/display/fsl,dcu.txt
  F:    Documentation/devicetree/bindings/display/fsl,tcon.txt
 -F:    Documentation/devicetree/bindings/display/panel/nec,nl4827hc19_05b.txt
 +F:    Documentation/devicetree/bindings/display/panel/nec,nl4827hc19-05b.txt
  
  DRM DRIVERS FOR FREESCALE IMX
  M:    Philipp Zabel <[email protected]>
@@@ -4819,7 -4822,7 +4819,7 @@@ M:      Eric Anholt <[email protected]
  S:    Supported
  F:    drivers/gpu/drm/v3d/
  F:    include/uapi/drm/v3d_drm.h
 -F:    Documentation/devicetree/bindings/display/brcm,bcm-v3d.txt
 +F:    Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
  T:    git git://anongit.freedesktop.org/drm/drm-misc
  
  DRM DRIVERS FOR VC4
@@@ -5730,7 -5733,7 +5730,7 @@@ M:      Madalin Bucur <[email protected]
  L:    [email protected]
  S:    Maintained
  F:    drivers/net/ethernet/freescale/fman
 -F:    Documentation/devicetree/bindings/powerpc/fsl/fman.txt
 +F:    Documentation/devicetree/bindings/net/fsl-fman.txt
  
  FREESCALE QORIQ PTP CLOCK DRIVER
  M:    Yangbo Lu <[email protected]>
@@@ -5948,14 -5951,14 +5948,14 @@@ GENERIC GPIO I2C DRIVE
  M:    Haavard Skinnemoen <[email protected]>
  S:    Supported
  F:    drivers/i2c/busses/i2c-gpio.c
 -F:    include/linux/i2c-gpio.h
 +F:    include/linux/platform_data/i2c-gpio.h
  
  GENERIC GPIO I2C MULTIPLEXER DRIVER
  M:    Peter Korsgaard <[email protected]>
  L:    [email protected]
  S:    Supported
  F:    drivers/i2c/muxes/i2c-mux-gpio.c
 -F:    include/linux/i2c-mux-gpio.h
 +F:    include/linux/platform_data/i2c-mux-gpio.h
  F:    Documentation/i2c/muxes/i2c-mux-gpio
  
  GENERIC HDLC (WAN) DRIVERS
@@@ -6496,7 -6499,7 +6496,7 @@@ L:      [email protected]
  S:    Maintained
  F:    mm/hmm*
  F:    include/linux/hmm*
 -F:    Documentation/vm/hmm.txt
 +F:    Documentation/vm/hmm.rst
  
  HOST AP DRIVER
  M:    Jouni Malinen <[email protected]>
@@@ -6615,7 -6618,7 +6615,7 @@@ F:      arch/x86/hyper
  F:    drivers/hid/hid-hyperv.c
  F:    drivers/hv/
  F:    drivers/input/serio/hyperv-keyboard.c
 -F:    drivers/pci/host/pci-hyperv.c
 +F:    drivers/pci/controller/pci-hyperv.c
  F:    drivers/net/hyperv/
  F:    drivers/scsi/storvsc_drv.c
  F:    drivers/uio/uio_hv_generic.c
@@@ -6961,7 -6964,7 +6961,7 @@@ IIO MULTIPLEXE
  M:    Peter Rosin <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/devicetree/bindings/iio/multiplexer/iio-mux.txt
 +F:    Documentation/devicetree/bindings/iio/multiplexer/io-channel-mux.txt
  F:    drivers/iio/multiplexer/iio-mux.c
  
  IIO SUBSYSTEM AND DRIVERS
@@@ -7396,7 -7399,7 +7396,7 @@@ F:      drivers/platform/x86/intel-wmi-thund
  INTEL(R) TRACE HUB
  M:    Alexander Shishkin <[email protected]>
  S:    Supported
 -F:    Documentation/trace/intel_th.txt
 +F:    Documentation/trace/intel_th.rst
  F:    drivers/hwtracing/intel_th/
  
  INTEL(R) TRUSTED EXECUTION TECHNOLOGY (TXT)
@@@ -7420,7 -7423,7 +7420,7 @@@ M:      Linus Walleij <linus.walleij@linaro.
  L:    [email protected]
  S:    Maintained
  F:    drivers/iio/gyro/mpu3050*
 -F:    Documentation/devicetree/bindings/iio/gyroscope/inv,mpu3050.txt
 +F:    Documentation/devicetree/bindings/iio/gyroscope/invensense,mpu3050.txt
  
  IOC3 ETHERNET DRIVER
  M:    Ralf Baechle <[email protected]>
@@@ -8695,7 -8698,7 +8695,7 @@@ M:      Guenter Roeck <[email protected]
  L:    [email protected]
  S:    Maintained
  F:    Documentation/hwmon/max6697
 -F:    Documentation/devicetree/bindings/i2c/max6697.txt
 +F:    Documentation/devicetree/bindings/hwmon/max6697.txt
  F:    drivers/hwmon/max6697.c
  F:    include/linux/platform_data/max6697.h
  
@@@ -9075,7 -9078,7 +9075,7 @@@ M:      Martin Donnelly <martin.donnelly@ge.
  M:    Martyn Welch <[email protected]>
  S:    Maintained
  F:    drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
 -F:    Documentation/devicetree/bindings/video/bridge/megachips-stdpxxxx-ge-b850v3-fw.txt
 +F:    Documentation/devicetree/bindings/display/bridge/megachips-stdpxxxx-ge-b850v3-fw.txt
  
  MEGARAID SCSI/SAS DRIVERS
  M:    Kashyap Desai <[email protected]>
@@@ -9412,12 -9415,10 +9412,12 @@@ F:   drivers/usb/image/microtek.
  
  MIPS
  M:    Ralf Baechle <[email protected]>
 +M:    Paul Burton <[email protected]>
  M:    James Hogan <[email protected]>
  L:    [email protected]
  W:    http://www.linux-mips.org/
  T:    git git://git.linux-mips.org/pub/scm/ralf/linux.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git
  Q:    http://patchwork.linux-mips.org/project/linux-mips/list/
  S:    Supported
  F:    Documentation/devicetree/bindings/mips/
@@@ -9519,7 -9520,7 +9519,7 @@@ M:      Subrahmanya Lingappa <l.subrahmanya@
  L:    [email protected]
  S:    Supported
  F:    Documentation/devicetree/bindings/pci/mobiveil-pcie.txt
 -F:    drivers/pci/host/pcie-mobiveil.c
 +F:    drivers/pci/controller/pcie-mobiveil.c
  
  MODULE SUPPORT
  M:    Jessica Yu <[email protected]>
@@@ -9660,7 -9661,7 +9660,7 @@@ F:      include/uapi/linux/mmc
  MULTIPLEXER SUBSYSTEM
  M:    Peter Rosin <[email protected]>
  S:    Maintained
 -F:    Documentation/ABI/testing/mux/sysfs-class-mux*
 +F:    Documentation/ABI/testing/sysfs-class-mux*
  F:    Documentation/devicetree/bindings/mux/
  F:    include/linux/dt-bindings/mux/
  F:    include/linux/mux/
@@@ -9691,7 -9692,7 +9691,7 @@@ MXSFB DRM DRIVE
  M:    Marek Vasut <[email protected]>
  S:    Supported
  F:    drivers/gpu/drm/mxsfb/
 -F:    Documentation/devicetree/bindings/display/mxsfb-drm.txt
 +F:    Documentation/devicetree/bindings/display/mxsfb.txt
  
  MYRICOM MYRI-10G 10GbE DRIVER (MYRI10GE)
  M:    Chris Lee <[email protected]>
  S:    Maintained
  F:    drivers/scsi/NCR_D700.*
  
 +NCSI LIBRARY:
 +M:    Samuel Mendoza-Jonas <[email protected]>
 +S:    Maintained
 +F:    net/ncsi/
 +
  NCT6775 HARDWARE MONITOR DRIVER
  M:    Guenter Roeck <[email protected]>
  L:    [email protected]
@@@ -9882,7 -9878,6 +9882,7 @@@ M:      Andrew Lunn <[email protected]
  M:    Vivien Didelot <[email protected]>
  M:    Florian Fainelli <[email protected]>
  S:    Maintained
 +F:    Documentation/devicetree/bindings/net/dsa/
  F:    net/dsa/
  F:    include/net/dsa.h
  F:    include/linux/dsa/
@@@ -10245,7 -10240,7 +10245,7 @@@ F:   arch/powerpc/include/asm/pnv-ocxl.
  F:    drivers/misc/ocxl/
  F:    include/misc/ocxl*
  F:    include/uapi/misc/ocxl.h
 -F:    Documentation/accelerators/ocxl.txt
 +F:    Documentation/accelerators/ocxl.rst
  
  OMAP AUDIO SUPPORT
  M:    Peter Ujfalusi <[email protected]>
@@@ -10274,16 -10269,18 +10274,16 @@@ F:        arch/arm/boot/dts/*am5
  F:    arch/arm/boot/dts/*dra7*
  
  OMAP DISPLAY SUBSYSTEM and FRAMEBUFFER SUPPORT (DSS2)
 -M:    Tomi Valkeinen <[email protected]>
  L:    [email protected]
  L:    [email protected]
 -S:    Maintained
 +S:    Orphan
  F:    drivers/video/fbdev/omap2/
  F:    Documentation/arm/OMAP/DSS
  
  OMAP FRAMEBUFFER SUPPORT
 -M:    Tomi Valkeinen <[email protected]>
  L:    [email protected]
  L:    [email protected]
 -S:    Maintained
 +S:    Orphan
  F:    drivers/video/fbdev/omap/
  
  OMAP GENERAL PURPOSE MEMORY CONTROLLER SUPPORT
@@@ -10391,7 -10388,7 +10391,7 @@@ F:   arch/arm/mach-omap1
  F:    arch/arm/plat-omap/
  F:    arch/arm/configs/omap1_defconfig
  F:    drivers/i2c/busses/i2c-omap.c
 -F:    include/linux/i2c-omap.h
 +F:    include/linux/platform_data/i2c-omap.h
  
  OMAP2+ SUPPORT
  M:    Tony Lindgren <[email protected]>
@@@ -10423,7 -10420,7 +10423,7 @@@ F:   drivers/regulator/tps65218-regulator
  F:    drivers/regulator/tps65910-regulator.c
  F:    drivers/regulator/twl-regulator.c
  F:    drivers/regulator/twl6030-regulator.c
 -F:    include/linux/i2c-omap.h
 +F:    include/linux/platform_data/i2c-omap.h
  
  ONION OMEGA2+ BOARD
  M:    Harvey Hunt <[email protected]>
@@@ -10727,7 -10724,7 +10727,7 @@@ PARALLEL LCD/KEYPAD PANEL DRIVE
  M:    Willy Tarreau <[email protected]>
  M:    Ksenija Stanojevic <[email protected]>
  S:    Odd Fixes
 -F:    Documentation/misc-devices/lcd-panel-cgram.txt
 +F:    Documentation/auxdisplay/lcd-panel-cgram.txt
  F:    drivers/misc/panel.c
  
  PARALLEL PORT SUBSYSTEM
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/aardvark-pci.txt
 -F:    drivers/pci/host/pci-aardvark.c
 +F:    drivers/pci/controller/pci-aardvark.c
  
  PCI DRIVER FOR ALTERA PCIE IP
  M:    Ley Foon Tan <[email protected]>
@@@ -10836,7 -10833,7 +10836,7 @@@ L:   [email protected] (moderate
  L:    [email protected]
  S:    Supported
  F:    Documentation/devicetree/bindings/pci/altera-pcie.txt
 -F:    drivers/pci/host/pcie-altera.c
 +F:    drivers/pci/controller/pcie-altera.c
  
  PCI DRIVER FOR APPLIEDMICRO XGENE
  M:    Tanmay Inamdar <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/xgene-pci.txt
 -F:    drivers/pci/host/pci-xgene.c
 +F:    drivers/pci/controller/pci-xgene.c
  
  PCI DRIVER FOR ARM VERSATILE PLATFORM
  M:    Rob Herring <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/versatile.txt
 -F:    drivers/pci/host/pci-versatile.c
 +F:    drivers/pci/controller/pci-versatile.c
  
  PCI DRIVER FOR ARMADA 8K
  M:    Thomas Petazzoni <[email protected]>
@@@ -10860,14 -10857,14 +10860,14 @@@ L:        [email protected]
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/pci-armada8k.txt
 -F:    drivers/pci/dwc/pcie-armada8k.c
 +F:    drivers/pci/controller/dwc/pcie-armada8k.c
  
  PCI DRIVER FOR CADENCE PCIE IP
  M:    Alan Douglas <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/cdns,*.txt
 -F:    drivers/pci/cadence/pcie-cadence*
 +F:    drivers/pci/controller/pcie-cadence*
  
  PCI DRIVER FOR FREESCALE LAYERSCAPE
  M:    Minghuan Lian <[email protected]>
  L:    [email protected]
  L:    [email protected]
  S:    Maintained
 -F:    drivers/pci/dwc/*layerscape*
 +F:    drivers/pci/controller/dwc/*layerscape*
  
  PCI DRIVER FOR GENERIC OF HOSTS
  M:    Will Deacon <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/host-generic-pci.txt
 -F:    drivers/pci/host/pci-host-common.c
 -F:    drivers/pci/host/pci-host-generic.c
 +F:    drivers/pci/controller/pci-host-common.c
 +F:    drivers/pci/controller/pci-host-generic.c
  
  PCI DRIVER FOR IMX6
  M:    Richard Zhu <[email protected]>
@@@ -10895,14 -10892,14 +10895,14 @@@ L:        [email protected]
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt
 -F:    drivers/pci/dwc/*imx6*
 +F:    drivers/pci/controller/dwc/*imx6*
  
  PCI DRIVER FOR INTEL VOLUME MANAGEMENT DEVICE (VMD)
  M:    Keith Busch <[email protected]>
  M:    Jonathan Derrick <[email protected]>
  L:    [email protected]
  S:    Supported
 -F:    drivers/pci/host/vmd.c
 +F:    drivers/pci/controller/vmd.c
  
  PCI DRIVER FOR MICROSEMI SWITCHTEC
  M:    Kurt Schwemmer <[email protected]>
@@@ -10922,7 -10919,7 +10922,7 @@@ M:   Jason Cooper <[email protected]
  L:    [email protected]
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
 -F:    drivers/pci/host/*mvebu*
 +F:    drivers/pci/controller/*mvebu*
  
  PCI DRIVER FOR NVIDIA TEGRA
  M:    Thierry Reding <[email protected]>
@@@ -10930,14 -10927,14 +10930,14 @@@ L:        [email protected]
  L:    [email protected]
  S:    Supported
  F:    Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
 -F:    drivers/pci/host/pci-tegra.c
 +F:    drivers/pci/controller/pci-tegra.c
  
  PCI DRIVER FOR RENESAS R-CAR
  M:    Simon Horman <[email protected]>
  L:    [email protected]
  L:    [email protected]
  S:    Maintained
 -F:    drivers/pci/host/*rcar*
 +F:    drivers/pci/controller/*rcar*
  
  PCI DRIVER FOR SAMSUNG EXYNOS
  M:    Jingoo Han <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
 -F:    drivers/pci/dwc/pci-exynos.c
 +F:    drivers/pci/controller/dwc/pci-exynos.c
  
  PCI DRIVER FOR SYNOPSYS DESIGNWARE
  M:    Jingoo Han <[email protected]>
@@@ -10953,7 -10950,7 +10953,7 @@@ M:   Joao Pinto <[email protected]
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/designware-pcie.txt
 -F:    drivers/pci/dwc/*designware*
 +F:    drivers/pci/controller/dwc/*designware*
  
  PCI DRIVER FOR TI DRA7XX
  M:    Kishon Vijay Abraham I <[email protected]>
@@@ -10961,14 -10958,14 +10961,14 @@@ L:        [email protected]
  L:    [email protected]
  S:    Supported
  F:    Documentation/devicetree/bindings/pci/ti-pci.txt
 -F:    drivers/pci/dwc/pci-dra7xx.c
 +F:    drivers/pci/controller/dwc/pci-dra7xx.c
  
  PCI DRIVER FOR TI KEYSTONE
  M:    Murali Karicheri <[email protected]>
  L:    [email protected]
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
 -F:    drivers/pci/dwc/*keystone*
 +F:    drivers/pci/controller/dwc/*keystone*
  
  PCI ENDPOINT SUBSYSTEM
  M:    Kishon Vijay Abraham I <[email protected]>
@@@ -11001,7 -10998,7 +11001,7 @@@ L:   [email protected] (moderate
  L:    [email protected]
  S:    Supported
  F:    Documentation/devicetree/bindings/pci/altera-pcie-msi.txt
 -F:    drivers/pci/host/pcie-altera-msi.c
 +F:    drivers/pci/controller/pcie-altera-msi.c
  
  PCI MSI DRIVER FOR APPLIEDMICRO XGENE
  M:    Duc Dang <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/xgene-pci-msi.txt
 -F:    drivers/pci/host/pci-xgene-msi.c
 +F:    drivers/pci/controller/pci-xgene-msi.c
  
  PCI SUBSYSTEM
  M:    Bjorn Helgaas <[email protected]>
  Q:    http://patchwork.ozlabs.org/project/linux-pci/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git/
  S:    Supported
 -F:    drivers/pci/cadence/
 -F:    drivers/pci/host/
 -F:    drivers/pci/dwc/
 +F:    drivers/pci/controller/
  
  PCIE DRIVER FOR AXIS ARTPEC
  M:    Jesper Nilsson <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/axis,artpec*
 -F:    drivers/pci/dwc/*artpec*
 +F:    drivers/pci/controller/dwc/*artpec*
  
  PCIE DRIVER FOR CAVIUM THUNDERX
  M:    David Daney <[email protected]>
@@@ -11051,22 -11050,22 +11051,22 @@@ L:        [email protected]
  L:    [email protected] (moderated for non-subscribers)
  S:    Supported
  F:    Documentation/devicetree/bindings/pci/pci-thunder-*
 -F:    drivers/pci/host/pci-thunder-*
 +F:    drivers/pci/controller/pci-thunder-*
  
  PCIE DRIVER FOR HISILICON
  M:    Zhou Wang <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/hisilicon-pcie.txt
 -F:    drivers/pci/dwc/pcie-hisi.c
 +F:    drivers/pci/controller/dwc/pcie-hisi.c
  
  PCIE DRIVER FOR HISILICON KIRIN
  M:    Xiaowei Song <[email protected]>
  M:    Binghui Wang <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/devicetree/bindings/pci/pcie-kirin.txt
 -F:    drivers/pci/dwc/pcie-kirin.c
 +F:    Documentation/devicetree/bindings/pci/kirin-pcie.txt
 +F:    drivers/pci/controller/dwc/pcie-kirin.c
  
  PCIE DRIVER FOR HISILICON STB
  M:    Jianguo Sun <[email protected]>
@@@ -11074,7 -11073,7 +11074,7 @@@ M:   Shawn Guo <[email protected]
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/hisilicon-histb-pcie.txt
 -F:    drivers/pci/dwc/pcie-histb.c
 +F:    drivers/pci/controller/dwc/pcie-histb.c
  
  PCIE DRIVER FOR MEDIATEK
  M:    Ryder Lee <[email protected]>
@@@ -11082,14 -11081,14 +11082,14 @@@ L:        [email protected]
  L:    [email protected]
  S:    Supported
  F:    Documentation/devicetree/bindings/pci/mediatek*
 -F:    drivers/pci/host/*mediatek*
 +F:    drivers/pci/controller/*mediatek*
  
  PCIE DRIVER FOR QUALCOMM MSM
  M:    Stanimir Varbanov <[email protected]>
  L:    [email protected]
  L:    [email protected]
  S:    Maintained
 -F:    drivers/pci/dwc/*qcom*
 +F:    drivers/pci/controller/dwc/*qcom*
  
  PCIE DRIVER FOR ROCKCHIP
  M:    Shawn Lin <[email protected]>
@@@ -11097,20 -11096,20 +11097,20 @@@ L:        [email protected]
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/rockchip-pcie*
 -F:    drivers/pci/host/pcie-rockchip*
 +F:    drivers/pci/controller/pcie-rockchip*
  
  PCI DRIVER FOR V3 SEMICONDUCTOR V360EPC
  M:    Linus Walleij <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt
 -F:    drivers/pci/host/pci-v3-semi.c
 +F:    drivers/pci/controller/pci-v3-semi.c
  
  PCIE DRIVER FOR ST SPEAR13XX
  M:    Pratyush Anand <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    drivers/pci/dwc/*spear*
 +F:    drivers/pci/controller/dwc/*spear*
  
  PCMCIA SUBSYSTEM
  M:    Dominik Brodowski <[email protected]>
@@@ -12156,6 -12155,8 +12156,8 @@@ S:   Maintaine
  F:    Documentation/rfkill.txt
  F:    Documentation/ABI/stable/sysfs-class-rfkill
  F:    net/rfkill/
+ F:    include/linux/rfkill.h
+ F:    include/uapi/linux/rfkill.h
  
  RHASHTABLE
  M:    Thomas Graf <[email protected]>
@@@ -12163,9 -12164,7 +12165,9 @@@ M:   Herbert Xu <[email protected]
  L:    [email protected]
  S:    Maintained
  F:    lib/rhashtable.c
 +F:    lib/test_rhashtable.c
  F:    include/linux/rhashtable.h
 +F:    include/linux/rhashtable-types.h
  
  RICOH R5C592 MEMORYSTICK DRIVER
  M:    Maxim Levitsky <[email protected]>
@@@ -12180,7 -12179,7 +12182,7 @@@ F:   drivers/mtd/nand/raw/r852.
  
  RISC-V ARCHITECTURE
  M:    Palmer Dabbelt <[email protected]>
 -M:    Albert Ou <a[email protected]>
 +M:    Albert Ou <a[email protected]>
  L:    [email protected]
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux.git
  S:    Supported
  L:    [email protected]
  S:    Maintained
  F:    drivers/crypto/exynos-rng.c
 -F:    Documentation/devicetree/bindings/crypto/samsung,exynos-rng4.txt
 +F:    Documentation/devicetree/bindings/rng/samsung,exynos4-rng.txt
  
  SAMSUNG EXYNOS TRUE RANDOM NUMBER GENERATOR (TRNG) DRIVER
  M:    Łukasz Stelmach <[email protected]>
@@@ -12940,14 -12939,6 +12942,14 @@@ F: drivers/media/usb/siano
  F:    drivers/media/usb/siano/
  F:    drivers/media/mmc/siano/
  
 +SIFIVE DRIVERS
 +M:    Palmer Dabbelt <[email protected]>
 +L:    [email protected]
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux.git
 +S:    Supported
 +K:    sifive
 +N:    sifive
 +
  SILEAD TOUCHSCREEN DRIVER
  M:    Hans de Goede <[email protected]>
  L:    [email protected]
@@@ -13300,7 -13291,7 +13302,7 @@@ M:   Vinod Koul <[email protected]
  L:    [email protected] (moderated for non-subscribers)
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
  S:    Supported
 -F:    Documentation/sound/alsa/compress_offload.txt
 +F:    Documentation/sound/designs/compress-offload.rst
  F:    include/sound/compress_driver.h
  F:    include/uapi/sound/compress_*
  F:    sound/core/compress_offload.c
@@@ -13321,7 -13312,7 +13323,7 @@@ L:   [email protected] (moderat
  W:    http://alsa-project.org/main/index.php/ASoC
  S:    Supported
  F:    Documentation/devicetree/bindings/sound/
 -F:    Documentation/sound/alsa/soc/
 +F:    Documentation/sound/soc/
  F:    sound/soc/
  F:    include/sound/soc*
  
@@@ -13573,16 -13564,6 +13575,16 @@@ T: git git://linuxtv.org/media_tree.gi
  S:    Maintained
  F:    drivers/media/usb/stk1160/
  
 +STM32 TIMER/LPTIMER DRIVERS
 +M:    Fabrice Gasnier <[email protected]>
 +S:    Maintained
 +F:    drivers/*/stm32-*timer*
 +F:    drivers/pwm/pwm-stm32*
 +F:    include/linux/*/stm32-*tim*
 +F:    Documentation/ABI/testing/*timer-stm32
 +F:    Documentation/devicetree/bindings/*/stm32-*timer*
 +F:    Documentation/devicetree/bindings/pwm/pwm-stm32*
 +
  STMMAC ETHERNET DRIVER
  M:    Giuseppe Cavallaro <[email protected]>
  M:    Alexandre Torgue <[email protected]>
@@@ -13651,7 -13632,7 +13653,7 @@@ M:   Konrad Rzeszutek Wilk <konrad.wilk@o
  L:    [email protected]
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb.git
  S:    Supported
 -F:    lib/swiotlb.c
 +F:    kernel/dma/swiotlb.c
  F:    arch/*/kernel/pci-swiotlb.c
  F:    include/linux/swiotlb.h
  
@@@ -13803,7 -13784,7 +13805,7 @@@ SYSTEM TRACE MODULE CLAS
  M:    Alexander Shishkin <[email protected]>
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ash/stm.git
 -F:    Documentation/trace/stm.txt
 +F:    Documentation/trace/stm.rst
  F:    drivers/hwtracing/stm/
  F:    include/linux/stm.h
  F:    include/uapi/linux/stm.h
@@@ -14480,7 -14461,7 +14482,7 @@@ M:   Steven Rostedt <[email protected]
  M:    Ingo Molnar <[email protected]>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core
  S:    Maintained
 -F:    Documentation/trace/ftrace.txt
 +F:    Documentation/trace/ftrace.rst
  F:    arch/*/*/*/ftrace.h
  F:    arch/*/kernel/ftrace.c
  F:    include/*/ftrace.h
@@@ -14949,7 -14930,7 +14951,7 @@@ M:   Heikki Krogerus <heikki.krogerus@lin
  L:    [email protected]
  S:    Maintained
  F:    Documentation/ABI/testing/sysfs-class-typec
 -F:    Documentation/usb/typec.rst
 +F:    Documentation/driver-api/usb/typec.rst
  F:    drivers/usb/typec/
  F:    include/linux/usb/typec.h
  
@@@ -15016,7 -14997,8 +15018,7 @@@ F:   drivers/media/usb/zr364xx
  USER-MODE LINUX (UML)
  M:    Jeff Dike <[email protected]>
  M:    Richard Weinberger <[email protected]>
 -L:    [email protected]
 -L:    [email protected]
 +L:    [email protected]
  W:    http://user-mode-linux.sourceforge.net
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml.git
  S:    Maintained
  L:    [email protected]
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/core
  S:    Maintained
 +F:    Documentation/devicetree/bindings/x86/
  F:    Documentation/x86/
  F:    arch/x86/
  
 +X86 ENTRY CODE
 +M:    Andy Lutomirski <[email protected]>
 +L:    [email protected]
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/asm
 +S:    Maintained
 +F:    arch/x86/entry/
 +
  X86 MCE INFRASTRUCTURE
  M:    Tony Luck <[email protected]>
  M:    Borislav Petkov <[email protected]>
@@@ -15608,7 -15582,7 +15610,7 @@@ F:   drivers/platform/x86
  F:    drivers/platform/olpc/
  
  X86 VDSO
 -M:    Andy Lutomirski <luto@amacapital.net>
 +M:    Andy Lutomirski <luto@kernel.org>
  L:    [email protected]
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/vdso
  S:    Maintained
@@@ -15786,7 -15760,7 +15788,7 @@@ YEALINK PHONE DRIVE
  M:    Henk Vergonet <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/input/yealink.rst
 +F:    Documentation/input/devices/yealink.rst
  F:    drivers/input/misc/yealink.*
  
  Z8530 DRIVER FOR AX.25
index 27e4e441caacdbd590a1afad65c6f5c1b3ec3edd,f82ce3c89ab71b1648d03d2864885c70ef66707c..7acc16f349427a772f507e6a25b66b5b95b210d7
   *    only the %NL80211_ATTR_IE data is used and updated with this command.
   *
   * @NL80211_CMD_SET_PMK: For offloaded 4-Way handshake, set the PMK or PMK-R0
 - *    for the given authenticator address (specified with &NL80211_ATTR_MAC).
 - *    When &NL80211_ATTR_PMKR0_NAME is set, &NL80211_ATTR_PMK specifies the
 + *    for the given authenticator address (specified with %NL80211_ATTR_MAC).
 + *    When %NL80211_ATTR_PMKR0_NAME is set, %NL80211_ATTR_PMK specifies the
   *    PMK-R0, otherwise it specifies the PMK.
   * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously
   *    configured PMK for the authenticator address identified by
 - *    &NL80211_ATTR_MAC.
 + *    %NL80211_ATTR_MAC.
   * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates that the 4 way
   *    handshake was completed successfully by the driver. The BSSID is
 - *    specified with &NL80211_ATTR_MAC. Drivers that support 4 way handshake
 + *    specified with %NL80211_ATTR_MAC. Drivers that support 4 way handshake
   *    offload should send this event after indicating 802.11 association with
 - *    &NL80211_CMD_CONNECT or &NL80211_CMD_ROAM. If the 4 way handshake failed
 - *    &NL80211_CMD_DISCONNECT should be indicated instead.
 + *    %NL80211_CMD_CONNECT or %NL80211_CMD_ROAM. If the 4 way handshake failed
 + *    %NL80211_CMD_DISCONNECT should be indicated instead.
   *
   * @NL80211_CMD_CONTROL_PORT_FRAME: Control Port (e.g. PAE) frame TX request
   *    and RX notification.  This command is used both as a request to transmit
   *    initiated the connection through the connect request.
   *
   * @NL80211_CMD_STA_OPMODE_CHANGED: An event that notify station's
 - *    ht opmode or vht opmode changes using any of &NL80211_ATTR_SMPS_MODE,
 - *    &NL80211_ATTR_CHANNEL_WIDTH,&NL80211_ATTR_NSS attributes with its
 - *    address(specified in &NL80211_ATTR_MAC).
 + *    ht opmode or vht opmode changes using any of %NL80211_ATTR_SMPS_MODE,
 + *    %NL80211_ATTR_CHANNEL_WIDTH,%NL80211_ATTR_NSS attributes with its
 + *    address(specified in %NL80211_ATTR_MAC).
   *
   * @NL80211_CMD_MAX: highest used command number
   * @__NL80211_CMD_AFTER_LAST: internal use
@@@ -2218,7 -2218,7 +2218,7 @@@ enum nl80211_commands 
   * @NL80211_ATTR_EXTERNAL_AUTH_ACTION: Identify the requested external
   *     authentication operation (u32 attribute with an
   *     &enum nl80211_external_auth_action value). This is used with the
 - *     &NL80211_CMD_EXTERNAL_AUTH request event.
 + *     %NL80211_CMD_EXTERNAL_AUTH request event.
   * @NL80211_ATTR_EXTERNAL_AUTH_SUPPORT: Flag attribute indicating that the user
   *     space supports external authentication. This attribute shall be used
   *     only with %NL80211_CMD_CONNECT request. The driver may offload
   *      enforced.
   * @NL80211_ATTR_TXQ_QUANTUM: TXQ scheduler quantum (bytes). Number of bytes
   *      a flow is assigned on each round of the DRR scheduler.
+  * @NL80211_ATTR_HE_CAPABILITY: HE Capability information element (from
+  *    association request when used with NL80211_CMD_NEW_STATION). Can be set
+  *    only if %NL80211_STA_FLAG_WME is set.
   *
   * @NUM_NL80211_ATTR: total number of nl80211_attrs available
   * @NL80211_ATTR_MAX: highest attribute number currently defined
@@@ -2677,6 -2680,8 +2680,8 @@@ enum nl80211_attrs 
        NL80211_ATTR_TXQ_MEMORY_LIMIT,
        NL80211_ATTR_TXQ_QUANTUM,
  
+       NL80211_ATTR_HE_CAPABILITY,
        /* add attributes here, update the policy in nl80211.c */
  
        __NL80211_ATTR_AFTER_LAST,
  #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY   24
  #define NL80211_HT_CAPABILITY_LEN             26
  #define NL80211_VHT_CAPABILITY_LEN            12
+ #define NL80211_HE_MIN_CAPABILITY_LEN           16
+ #define NL80211_HE_MAX_CAPABILITY_LEN           51
  #define NL80211_MAX_NR_CIPHER_SUITES          5
  #define NL80211_MAX_NR_AKM_SUITES             2
  
@@@ -2853,6 -2859,38 +2859,38 @@@ struct nl80211_sta_flag_update 
        __u32 set;
  } __attribute__((packed));
  
+ /**
+  * enum nl80211_he_gi - HE guard interval
+  * @NL80211_RATE_INFO_HE_GI_0_8: 0.8 usec
+  * @NL80211_RATE_INFO_HE_GI_1_6: 1.6 usec
+  * @NL80211_RATE_INFO_HE_GI_3_2: 3.2 usec
+  */
+ enum nl80211_he_gi {
+       NL80211_RATE_INFO_HE_GI_0_8,
+       NL80211_RATE_INFO_HE_GI_1_6,
+       NL80211_RATE_INFO_HE_GI_3_2,
+ };
+ /**
+  * enum nl80211_he_ru_alloc - HE RU allocation values
+  * @NL80211_RATE_INFO_HE_RU_ALLOC_26: 26-tone RU allocation
+  * @NL80211_RATE_INFO_HE_RU_ALLOC_52: 52-tone RU allocation
+  * @NL80211_RATE_INFO_HE_RU_ALLOC_106: 106-tone RU allocation
+  * @NL80211_RATE_INFO_HE_RU_ALLOC_242: 242-tone RU allocation
+  * @NL80211_RATE_INFO_HE_RU_ALLOC_484: 484-tone RU allocation
+  * @NL80211_RATE_INFO_HE_RU_ALLOC_996: 996-tone RU allocation
+  * @NL80211_RATE_INFO_HE_RU_ALLOC_2x996: 2x996-tone RU allocation
+  */
+ enum nl80211_he_ru_alloc {
+       NL80211_RATE_INFO_HE_RU_ALLOC_26,
+       NL80211_RATE_INFO_HE_RU_ALLOC_52,
+       NL80211_RATE_INFO_HE_RU_ALLOC_106,
+       NL80211_RATE_INFO_HE_RU_ALLOC_242,
+       NL80211_RATE_INFO_HE_RU_ALLOC_484,
+       NL80211_RATE_INFO_HE_RU_ALLOC_996,
+       NL80211_RATE_INFO_HE_RU_ALLOC_2x996,
+ };
  /**
   * enum nl80211_rate_info - bitrate information
   *
   * @NL80211_RATE_INFO_5_MHZ_WIDTH: 5 MHz width - note that this is
   *    a legacy rate and will be reported as the actual bitrate, i.e.
   *    a quarter of the base (20 MHz) rate
+  * @NL80211_RATE_INFO_HE_MCS: HE MCS index (u8, 0-11)
+  * @NL80211_RATE_INFO_HE_NSS: HE NSS value (u8, 1-8)
+  * @NL80211_RATE_INFO_HE_GI: HE guard interval identifier
+  *    (u8, see &enum nl80211_he_gi)
+  * @NL80211_RATE_INFO_HE_DCM: HE DCM value (u8, 0/1)
+  * @NL80211_RATE_INFO_RU_ALLOC: HE RU allocation, if not present then
+  *    non-OFDMA was used (u8, see &enum nl80211_he_ru_alloc)
   * @__NL80211_RATE_INFO_AFTER_LAST: internal use
   */
  enum nl80211_rate_info {
        NL80211_RATE_INFO_160_MHZ_WIDTH,
        NL80211_RATE_INFO_10_MHZ_WIDTH,
        NL80211_RATE_INFO_5_MHZ_WIDTH,
+       NL80211_RATE_INFO_HE_MCS,
+       NL80211_RATE_INFO_HE_NSS,
+       NL80211_RATE_INFO_HE_GI,
+       NL80211_RATE_INFO_HE_DCM,
+       NL80211_RATE_INFO_HE_RU_ALLOC,
  
        /* keep last */
        __NL80211_RATE_INFO_AFTER_LAST,
@@@ -3166,6 -3216,38 +3216,38 @@@ enum nl80211_mpath_info 
        NL80211_MPATH_INFO_MAX = __NL80211_MPATH_INFO_AFTER_LAST - 1
  };
  
+ /**
+  * enum nl80211_band_iftype_attr - Interface type data attributes
+  *
+  * @__NL80211_BAND_IFTYPE_ATTR_INVALID: attribute number 0 is reserved
+  * @NL80211_BAND_IFTYPE_ATTR_IFTYPES: nested attribute containing a flag attribute
+  *     for each interface type that supports the band data
+  * @NL80211_BAND_IFTYPE_ATTR_HE_CAP_MAC: HE MAC capabilities as in HE
+  *     capabilities IE
+  * @NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY: HE PHY capabilities as in HE
+  *     capabilities IE
+  * @NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET: HE supported NSS/MCS as in HE
+  *     capabilities IE
+  * @NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE: HE PPE thresholds information as
+  *     defined in HE capabilities IE
+  * @NL80211_BAND_IFTYPE_ATTR_MAX: highest band HE capability attribute currently
+  *     defined
+  * @__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST: internal use
+  */
+ enum nl80211_band_iftype_attr {
+       __NL80211_BAND_IFTYPE_ATTR_INVALID,
+       NL80211_BAND_IFTYPE_ATTR_IFTYPES,
+       NL80211_BAND_IFTYPE_ATTR_HE_CAP_MAC,
+       NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY,
+       NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET,
+       NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE,
+       /* keep last */
+       __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST,
+       NL80211_BAND_IFTYPE_ATTR_MAX = __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST - 1
+ };
  /**
   * enum nl80211_band_attr - band attributes
   * @__NL80211_BAND_ATTR_INVALID: attribute number 0 is reserved
   * @NL80211_BAND_ATTR_VHT_MCS_SET: 32-byte attribute containing the MCS set as
   *    defined in 802.11ac
   * @NL80211_BAND_ATTR_VHT_CAPA: VHT capabilities, as in the HT information IE
+  * @NL80211_BAND_ATTR_IFTYPE_DATA: nested array attribute, with each entry using
+  *    attributes from &enum nl80211_band_iftype_attr
   * @NL80211_BAND_ATTR_MAX: highest band attribute currently defined
   * @__NL80211_BAND_ATTR_AFTER_LAST: internal use
   */
@@@ -3196,6 -3280,7 +3280,7 @@@ enum nl80211_band_attr 
  
        NL80211_BAND_ATTR_VHT_MCS_SET,
        NL80211_BAND_ATTR_VHT_CAPA,
+       NL80211_BAND_ATTR_IFTYPE_DATA,
  
        /* keep last */
        __NL80211_BAND_ATTR_AFTER_LAST,
@@@ -3491,7 -3576,7 +3576,7 @@@ enum nl80211_sched_scan_match_attr 
   * @NL80211_RRF_AUTO_BW: maximum available bandwidth should be calculated
   *    base on contiguous rules and wider channels will be allowed to cross
   *    multiple contiguous/overlapping frequency ranges.
 - * @NL80211_RRF_IR_CONCURRENT: See &NL80211_FREQUENCY_ATTR_IR_CONCURRENT
 + * @NL80211_RRF_IR_CONCURRENT: See %NL80211_FREQUENCY_ATTR_IR_CONCURRENT
   * @NL80211_RRF_NO_HT40MINUS: channels can't be used in HT40- operation
   * @NL80211_RRF_NO_HT40PLUS: channels can't be used in HT40+ operation
   * @NL80211_RRF_NO_80MHZ: 80MHz operation not allowed
@@@ -5133,6 -5218,11 +5218,11 @@@ enum nl80211_feature_flags 
   *    support to nl80211.
   * @NL80211_EXT_FEATURE_TXQS: Driver supports FQ-CoDel-enabled intermediate
   *      TXQs.
+  * @NL80211_EXT_FEATURE_SCAN_RANDOM_SN: Driver/device supports randomizing the
+  *    SN in probe request frames if requested by %NL80211_SCAN_FLAG_RANDOM_SN.
+  * @NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT: Driver/device can omit all data
+  *    except for supported rates from the probe request content if requested
+  *    by the %NL80211_SCAN_FLAG_MIN_PREQ_CONTENT flag.
   *
   * @NUM_NL80211_EXT_FEATURES: number of extended features.
   * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
@@@ -5167,6 -5257,8 +5257,8 @@@ enum nl80211_ext_feature_index 
        NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211,
        NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT,
        NL80211_EXT_FEATURE_TXQS,
+       NL80211_EXT_FEATURE_SCAN_RANDOM_SN,
+       NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT,
  
        /* add new features before the definition below */
        NUM_NL80211_EXT_FEATURES,
@@@ -5272,6 -5364,12 +5364,12 @@@ enum nl80211_timeout_reason 
   *    possible scan results. This flag hints the driver to use the best
   *    possible scan configuration to improve the accuracy in scanning.
   *    Latency and power use may get impacted with this flag.
+  * @NL80211_SCAN_FLAG_RANDOM_SN: randomize the sequence number in probe
+  *    request frames from this scan to avoid correlation/tracking being
+  *    possible.
+  * @NL80211_SCAN_FLAG_MIN_PREQ_CONTENT: minimize probe request content to
+  *    only have supported rates and no additional capabilities (unless
+  *    added by userspace explicitly.)
   */
  enum nl80211_scan_flags {
        NL80211_SCAN_FLAG_LOW_PRIORITY                          = 1<<0,
        NL80211_SCAN_FLAG_LOW_SPAN                              = 1<<8,
        NL80211_SCAN_FLAG_LOW_POWER                             = 1<<9,
        NL80211_SCAN_FLAG_HIGH_ACCURACY                         = 1<<10,
+       NL80211_SCAN_FLAG_RANDOM_SN                             = 1<<11,
+       NL80211_SCAN_FLAG_MIN_PREQ_CONTENT                      = 1<<12,
  };
  
  /**
@@@ -5643,11 -5743,11 +5743,11 @@@ enum nl80211_nan_func_attributes 
   * @NL80211_NAN_SRF_INCLUDE: present if the include bit of the SRF set.
   *    This is a flag.
   * @NL80211_NAN_SRF_BF: Bloom Filter. Present if and only if
 - *    &NL80211_NAN_SRF_MAC_ADDRS isn't present. This attribute is binary.
 + *    %NL80211_NAN_SRF_MAC_ADDRS isn't present. This attribute is binary.
   * @NL80211_NAN_SRF_BF_IDX: index of the Bloom Filter. Mandatory if
 - *    &NL80211_NAN_SRF_BF is present. This is a u8.
 + *    %NL80211_NAN_SRF_BF is present. This is a u8.
   * @NL80211_NAN_SRF_MAC_ADDRS: list of MAC addresses for the SRF. Present if
 - *    and only if &NL80211_NAN_SRF_BF isn't present. This is a nested
 + *    and only if %NL80211_NAN_SRF_BF isn't present. This is a nested
   *    attribute. Each nested attribute is a MAC address.
   * @NUM_NL80211_NAN_SRF_ATTR: internal
   * @NL80211_NAN_SRF_ATTR_MAX: highest NAN SRF attribute
diff --combined net/mac80211/main.c
index fb73451ed85ec65cd0b4b5cc3808d51d40a8dd39,b33faba8cbbe49000e014130c6248045f3a28bcd..4fb2709cb52796c752f052a746bd5c420d6caf08
@@@ -3,6 -3,7 +3,7 @@@
   * Copyright 2005-2006, Devicescape Software, Inc.
   * Copyright 2006-2007        Jiri Benc <[email protected]>
   * Copyright 2013-2014  Intel Mobile Communications GmbH
+  * Copyright (C) 2017     Intel Deutschland GmbH
   *
   * This program is free software; you can redistribute it and/or modify
   * it under the terms of the GNU General Public License version 2 as
@@@ -557,10 -558,19 +558,19 @@@ struct ieee80211_hw *ieee80211_alloc_hw
        wiphy_ext_feature_set(wiphy,
                              NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211);
  
-       if (!ops->hw_scan)
+       if (!ops->hw_scan) {
                wiphy->features |= NL80211_FEATURE_LOW_PRIORITY_SCAN |
                                   NL80211_FEATURE_AP_SCAN;
+               /*
+                * if the driver behaves correctly using the probe request
+                * (template) from mac80211, then both of these should be
+                * supported even with hw scan - but let drivers opt in.
+                */
+               wiphy_ext_feature_set(wiphy,
+                                     NL80211_EXT_FEATURE_SCAN_RANDOM_SN);
+               wiphy_ext_feature_set(wiphy,
+                                     NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT);
+       }
  
        if (!ops->set_key)
                wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
        local->hw.queues = 1;
        local->hw.max_rates = 1;
        local->hw.max_report_rates = 0;
-       local->hw.max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF;
-       local->hw.max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF;
+       local->hw.max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HT;
+       local->hw.max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HT;
        local->hw.offchannel_tx_hw_queue = IEEE80211_INVAL_HW_QUEUE;
        local->hw.conf.long_frame_max_tx_count = wiphy->retry_long;
        local->hw.conf.short_frame_max_tx_count = wiphy->retry_short;
@@@ -772,7 -782,7 +782,7 @@@ static int ieee80211_init_cipher_suites
                if (have_mfp)
                        n_suites += 4;
  
 -              suites = kmalloc(sizeof(u32) * n_suites, GFP_KERNEL);
 +              suites = kmalloc_array(n_suites, sizeof(u32), GFP_KERNEL);
                if (!suites)
                        return -ENOMEM;
  
@@@ -816,7 -826,7 +826,7 @@@ int ieee80211_register_hw(struct ieee80
        int result, i;
        enum nl80211_band band;
        int channels, max_bitrates;
-       bool supp_ht, supp_vht;
+       bool supp_ht, supp_vht, supp_he;
        netdev_features_t feature_whitelist;
        struct cfg80211_chan_def dflt_chandef = {};
  
        max_bitrates = 0;
        supp_ht = false;
        supp_vht = false;
+       supp_he = false;
        for (band = 0; band < NUM_NL80211_BANDS; band++) {
                struct ieee80211_supported_band *sband;
  
                supp_ht = supp_ht || sband->ht_cap.ht_supported;
                supp_vht = supp_vht || sband->vht_cap.vht_supported;
  
+               if (!supp_he)
+                       supp_he = !!ieee80211_get_he_sta_cap(sband);
                if (!sband->ht_cap.ht_supported)
                        continue;
  
                local->scan_ies_len +=
                        2 + sizeof(struct ieee80211_vht_cap);
  
+       /* HE cap element is variable in size - set len to allow max size */
+       /*
+        * TODO: 1 is added at the end of the calculation to accommodate for
+        *      the temporary placing of the HE capabilities IE under EXT.
+        *      Remove it once it is placed in the final place.
+        */
+       if (supp_he)
+               local->scan_ies_len +=
+                       2 + sizeof(struct ieee80211_he_cap_elem) +
+                       sizeof(struct ieee80211_he_mcs_nss_supp) +
+                       IEEE80211_HE_PPE_THRES_MAX_LEN + 1;
        if (!local->ops->hw_scan) {
                /* For hw_scan, driver needs to set these up. */
                local->hw.wiphy->max_scan_ssids = 4;
  
        ieee80211_led_init(local);
  
 +      result = ieee80211_txq_setup_flows(local);
 +      if (result)
 +              goto fail_flows;
 +
        rtnl_lock();
  
        result = ieee80211_init_rate_ctrl_alg(local,
  
        rtnl_unlock();
  
 -      result = ieee80211_txq_setup_flows(local);
 -      if (result)
 -              goto fail_flows;
 -
  #ifdef CONFIG_INET
        local->ifa_notifier.notifier_call = ieee80211_ifa_changed;
        result = register_inetaddr_notifier(&local->ifa_notifier);
  #if defined(CONFIG_INET) || defined(CONFIG_IPV6)
   fail_ifa:
  #endif
 -      ieee80211_txq_teardown_flows(local);
 - fail_flows:
        rtnl_lock();
        rate_control_deinitialize(local);
        ieee80211_remove_interfaces(local);
        rtnl_unlock();
        ieee80211_led_exit(local);
        ieee80211_wep_free(local);
 +      ieee80211_txq_teardown_flows(local);
 + fail_flows:
        destroy_workqueue(local->workqueue);
   fail_workqueue:
        wiphy_unregister(local->hw.wiphy);
diff --combined net/mac80211/scan.c
index 2e917a6d239d234ce671b8b4017dbd23c4be5b2e,ae77d1c1285623ed7a595223dfb9bf0a1a0b5ce9..5d2a11777718c42c3ba4affb190904d2b7bd61de
@@@ -20,6 -20,7 +20,7 @@@
  #include <net/sch_generic.h>
  #include <linux/slab.h>
  #include <linux/export.h>
+ #include <linux/random.h>
  #include <net/mac80211.h>
  
  #include "ieee80211_i.h"
@@@ -293,6 -294,7 +294,7 @@@ static bool ieee80211_prep_hw_scan(stru
        struct cfg80211_chan_def chandef;
        u8 bands_used = 0;
        int i, ielen, n_chans;
+       u32 flags = 0;
  
        req = rcu_dereference_protected(local->scan_req,
                                        lockdep_is_held(&local->mtx));
        local->hw_scan_req->req.n_channels = n_chans;
        ieee80211_prepare_scan_chandef(&chandef, req->scan_width);
  
+       if (req->flags & NL80211_SCAN_FLAG_MIN_PREQ_CONTENT)
+               flags |= IEEE80211_PROBE_FLAG_MIN_CONTENT;
        ielen = ieee80211_build_preq_ies(local,
                                         (u8 *)local->hw_scan_req->req.ie,
                                         local->hw_scan_ies_bufsize,
                                         &local->hw_scan_req->ies,
                                         req->ie, req->ie_len,
-                                        bands_used, req->rates, &chandef);
+                                        bands_used, req->rates, &chandef,
+                                        flags);
        local->hw_scan_req->req.ie_len = ielen;
        local->hw_scan_req->req.no_cck = req->no_cck;
        ether_addr_copy(local->hw_scan_req->req.mac_addr, req->mac_addr);
@@@ -528,6 -534,35 +534,35 @@@ void ieee80211_run_deferred_scan(struc
                                     round_jiffies_relative(0));
  }
  
+ static void ieee80211_send_scan_probe_req(struct ieee80211_sub_if_data *sdata,
+                                         const u8 *src, const u8 *dst,
+                                         const u8 *ssid, size_t ssid_len,
+                                         const u8 *ie, size_t ie_len,
+                                         u32 ratemask, u32 flags, u32 tx_flags,
+                                         struct ieee80211_channel *channel)
+ {
+       struct sk_buff *skb;
+       u32 txdata_flags = 0;
+       skb = ieee80211_build_probe_req(sdata, src, dst, ratemask, channel,
+                                       ssid, ssid_len,
+                                       ie, ie_len, flags);
+       if (skb) {
+               if (flags & IEEE80211_PROBE_FLAG_RANDOM_SN) {
+                       struct ieee80211_hdr *hdr = (void *)skb->data;
+                       u16 sn = get_random_u32();
+                       txdata_flags |= IEEE80211_TX_NO_SEQNO;
+                       hdr->seq_ctrl =
+                               cpu_to_le16(IEEE80211_SN_TO_SEQ(sn));
+               }
+               IEEE80211_SKB_CB(skb)->flags |= tx_flags;
+               ieee80211_tx_skb_tid_band(sdata, skb, 7, channel->band,
+                                         txdata_flags);
+       }
+ }
  static void ieee80211_scan_state_send_probe(struct ieee80211_local *local,
                                            unsigned long *next_delay)
  {
        struct ieee80211_sub_if_data *sdata;
        struct cfg80211_scan_request *scan_req;
        enum nl80211_band band = local->hw.conf.chandef.chan->band;
-       u32 tx_flags;
+       u32 flags = 0, tx_flags;
  
        scan_req = rcu_dereference_protected(local->scan_req,
                                             lockdep_is_held(&local->mtx));
        tx_flags = IEEE80211_TX_INTFL_OFFCHAN_TX_OK;
        if (scan_req->no_cck)
                tx_flags |= IEEE80211_TX_CTL_NO_CCK_RATE;
+       if (scan_req->flags & NL80211_SCAN_FLAG_MIN_PREQ_CONTENT)
+               flags |= IEEE80211_PROBE_FLAG_MIN_CONTENT;
+       if (scan_req->flags & NL80211_SCAN_FLAG_RANDOM_SN)
+               flags |= IEEE80211_PROBE_FLAG_RANDOM_SN;
  
        sdata = rcu_dereference_protected(local->scan_sdata,
                                          lockdep_is_held(&local->mtx));
  
        for (i = 0; i < scan_req->n_ssids; i++)
-               ieee80211_send_probe_req(
+               ieee80211_send_scan_probe_req(
                        sdata, local->scan_addr, scan_req->bssid,
                        scan_req->ssids[i].ssid, scan_req->ssids[i].ssid_len,
                        scan_req->ie, scan_req->ie_len,
-                       scan_req->rates[band], false,
-                       tx_flags, local->hw.conf.chandef.chan, true);
+                       scan_req->rates[band], flags,
+                       tx_flags, local->hw.conf.chandef.chan);
  
        /*
         * After sending probe requests, wait for probe responses
@@@ -1141,6 -1180,7 +1180,7 @@@ int __ieee80211_request_sched_scan_star
        u32 rate_masks[NUM_NL80211_BANDS] = {};
        u8 bands_used = 0;
        u8 *ie;
+       u32 flags = 0;
  
        iebufsz = local->scan_ies_len + req->ie_len;
  
                }
        }
  
 -      ie = kzalloc(num_bands * iebufsz, GFP_KERNEL);
+       if (req->flags & NL80211_SCAN_FLAG_MIN_PREQ_CONTENT)
+               flags |= IEEE80211_PROBE_FLAG_MIN_CONTENT;
 +      ie = kcalloc(iebufsz, num_bands, GFP_KERNEL);
        if (!ie) {
                ret = -ENOMEM;
                goto out;
  
        ieee80211_build_preq_ies(local, ie, num_bands * iebufsz,
                                 &sched_scan_ies, req->ie,
-                                req->ie_len, bands_used, rate_masks, &chandef);
+                                req->ie_len, bands_used, rate_masks, &chandef,
+                                flags);
  
        ret = drv_sched_scan_start(local, sdata, req, &sched_scan_ies);
        if (ret == 0) {
diff --combined net/mac80211/util.c
index 5e2e511c4a6f69cf0b613c1b3facd0665d672cfd,c77c84325348e7697c23a3fcf3c5d41e6aac2488..3e68132a41fabd029a8a78161eb783570d1c20f7
@@@ -1095,6 -1095,21 +1095,21 @@@ u32 ieee802_11_parse_elems_crc(const u
                        if (elen >= sizeof(*elems->max_idle_period_ie))
                                elems->max_idle_period_ie = (void *)pos;
                        break;
+               case WLAN_EID_EXTENSION:
+                       if (pos[0] == WLAN_EID_EXT_HE_MU_EDCA &&
+                           elen >= (sizeof(*elems->mu_edca_param_set) + 1)) {
+                               elems->mu_edca_param_set = (void *)&pos[1];
+                       } else if (pos[0] == WLAN_EID_EXT_HE_CAPABILITY) {
+                               elems->he_cap = (void *)&pos[1];
+                               elems->he_cap_len = elen - 1;
+                       } else if (pos[0] == WLAN_EID_EXT_HE_OPERATION &&
+                                  elen >= sizeof(*elems->he_operation) &&
+                                  elen >= ieee80211_he_oper_size(&pos[1])) {
+                               elems->he_operation = (void *)&pos[1];
+                       } else if (pos[0] == WLAN_EID_EXT_UORA && elen >= 1) {
+                               elems->uora_element = (void *)&pos[1];
+                       }
+                       break;
                default:
                        break;
                }
@@@ -1353,9 -1368,10 +1368,10 @@@ static int ieee80211_build_preq_ies_ban
                                         enum nl80211_band band,
                                         u32 rate_mask,
                                         struct cfg80211_chan_def *chandef,
-                                        size_t *offset)
+                                        size_t *offset, u32 flags)
  {
        struct ieee80211_supported_band *sband;
+       const struct ieee80211_sta_he_cap *he_cap;
        u8 *pos = buffer, *end = buffer + buffer_len;
        size_t noffset;
        int supp_rates_len, i;
                                chandef->chan->center_freq);
        }
  
+       if (flags & IEEE80211_PROBE_FLAG_MIN_CONTENT)
+               goto done;
        /* insert custom IEs that go before HT */
        if (ie && ie_len) {
                static const u8 before_ht[] = {
                                                sband->ht_cap.cap);
        }
  
-       /*
-        * If adding more here, adjust code in main.c
-        * that calculates local->scan_ies_len.
-        */
        /* insert custom IEs that go before VHT */
        if (ie && ie_len) {
                static const u8 before_vht[] = {
                                                 sband->vht_cap.cap);
        }
  
+       /* insert custom IEs that go before HE */
+       if (ie && ie_len) {
+               static const u8 before_he[] = {
+                       /*
+                        * no need to list the ones split off before VHT
+                        * or generated here
+                        */
+                       WLAN_EID_EXTENSION, WLAN_EID_EXT_FILS_REQ_PARAMS,
+                       WLAN_EID_AP_CSN,
+                       /* TODO: add 11ah/11aj/11ak elements */
+               };
+               noffset = ieee80211_ie_split(ie, ie_len,
+                                            before_he, ARRAY_SIZE(before_he),
+                                            *offset);
+               if (end - pos < noffset - *offset)
+                       goto out_err;
+               memcpy(pos, ie + *offset, noffset - *offset);
+               pos += noffset - *offset;
+               *offset = noffset;
+       }
+       he_cap = ieee80211_get_he_sta_cap(sband);
+       if (he_cap) {
+               pos = ieee80211_ie_build_he_cap(pos, he_cap, end);
+               if (!pos)
+                       goto out_err;
+       }
+       /*
+        * If adding more here, adjust code in main.c
+        * that calculates local->scan_ies_len.
+        */
        return pos - buffer;
   out_err:
        WARN_ONCE(1, "not enough space for preq IEs\n");
+  done:
        return pos - buffer;
  }
  
@@@ -1518,7 -1566,8 +1566,8 @@@ int ieee80211_build_preq_ies(struct iee
                             struct ieee80211_scan_ies *ie_desc,
                             const u8 *ie, size_t ie_len,
                             u8 bands_used, u32 *rate_masks,
-                            struct cfg80211_chan_def *chandef)
+                            struct cfg80211_chan_def *chandef,
+                            u32 flags)
  {
        size_t pos = 0, old_pos = 0, custom_ie_offset = 0;
        int i;
                                                             ie, ie_len, i,
                                                             rate_masks[i],
                                                             chandef,
-                                                            &custom_ie_offset);
+                                                            &custom_ie_offset,
+                                                            flags);
                        ie_desc->ies[i] = buffer + old_pos;
                        ie_desc->len[i] = pos - old_pos;
                        old_pos = pos;
@@@ -1561,7 -1611,7 +1611,7 @@@ struct sk_buff *ieee80211_build_probe_r
                                          struct ieee80211_channel *chan,
                                          const u8 *ssid, size_t ssid_len,
                                          const u8 *ie, size_t ie_len,
-                                         bool directed)
+                                         u32 flags)
  {
        struct ieee80211_local *local = sdata->local;
        struct cfg80211_chan_def chandef;
         * badly-behaved APs don't respond when this parameter is included.
         */
        chandef.width = sdata->vif.bss_conf.chandef.width;
-       if (directed)
+       if (flags & IEEE80211_PROBE_FLAG_DIRECTED)
                chandef.chan = NULL;
        else
                chandef.chan = chan;
        ies_len = ieee80211_build_preq_ies(local, skb_tail_pointer(skb),
                                           skb_tailroom(skb), &dummy_ie_desc,
                                           ie, ie_len, BIT(chan->band),
-                                          rate_masks, &chandef);
+                                          rate_masks, &chandef, flags);
        skb_put(skb, ies_len);
  
        if (dst) {
        return skb;
  }
  
- void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata,
-                             const u8 *src, const u8 *dst,
-                             const u8 *ssid, size_t ssid_len,
-                             const u8 *ie, size_t ie_len,
-                             u32 ratemask, bool directed, u32 tx_flags,
-                             struct ieee80211_channel *channel, bool scan)
- {
-       struct sk_buff *skb;
-       skb = ieee80211_build_probe_req(sdata, src, dst, ratemask, channel,
-                                       ssid, ssid_len,
-                                       ie, ie_len, directed);
-       if (skb) {
-               IEEE80211_SKB_CB(skb)->flags |= tx_flags;
-               if (scan)
-                       ieee80211_tx_skb_tid_band(sdata, skb, 7, channel->band);
-               else
-                       ieee80211_tx_skb(sdata, skb);
-       }
- }
  u32 ieee80211_sta_get_rates(struct ieee80211_sub_if_data *sdata,
                            struct ieee802_11_elems *elems,
                            enum nl80211_band band, u32 *basic_rates)
@@@ -1803,9 -1832,8 +1832,9 @@@ static int ieee80211_reconfig_nan(struc
        if (WARN_ON(res))
                return res;
  
 -      funcs = kzalloc((sdata->local->hw.max_nan_de_entries + 1) *
 -                      sizeof(*funcs), GFP_KERNEL);
 +      funcs = kcalloc(sdata->local->hw.max_nan_de_entries + 1,
 +                      sizeof(*funcs),
 +                      GFP_KERNEL);
        if (!funcs)
                return -ENOMEM;
  
@@@ -2412,6 -2440,72 +2441,72 @@@ u8 *ieee80211_ie_build_vht_cap(u8 *pos
        return pos;
  }
  
+ u8 *ieee80211_ie_build_he_cap(u8 *pos,
+                             const struct ieee80211_sta_he_cap *he_cap,
+                             u8 *end)
+ {
+       u8 n;
+       u8 ie_len;
+       u8 *orig_pos = pos;
+       /* Make sure we have place for the IE */
+       /*
+        * TODO: the 1 added is because this temporarily is under the EXTENSION
+        * IE. Get rid of it when it moves.
+        */
+       if (!he_cap)
+               return orig_pos;
+       n = ieee80211_he_mcs_nss_size(&he_cap->he_cap_elem);
+       ie_len = 2 + 1 +
+                sizeof(he_cap->he_cap_elem) + n +
+                ieee80211_he_ppe_size(he_cap->ppe_thres[0],
+                                      he_cap->he_cap_elem.phy_cap_info);
+       if ((end - pos) < ie_len)
+               return orig_pos;
+       *pos++ = WLAN_EID_EXTENSION;
+       pos++; /* We'll set the size later below */
+       *pos++ = WLAN_EID_EXT_HE_CAPABILITY;
+       /* Fixed data */
+       memcpy(pos, &he_cap->he_cap_elem, sizeof(he_cap->he_cap_elem));
+       pos += sizeof(he_cap->he_cap_elem);
+       memcpy(pos, &he_cap->he_mcs_nss_supp, n);
+       pos += n;
+       /* Check if PPE Threshold should be present */
+       if ((he_cap->he_cap_elem.phy_cap_info[6] &
+            IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT) == 0)
+               goto end;
+       /*
+        * Calculate how many PPET16/PPET8 pairs are to come. Algorithm:
+        * (NSS_M1 + 1) x (num of 1 bits in RU_INDEX_BITMASK)
+        */
+       n = hweight8(he_cap->ppe_thres[0] &
+                    IEEE80211_PPE_THRES_RU_INDEX_BITMASK_MASK);
+       n *= (1 + ((he_cap->ppe_thres[0] & IEEE80211_PPE_THRES_NSS_MASK) >>
+                  IEEE80211_PPE_THRES_NSS_POS));
+       /*
+        * Each pair is 6 bits, and we need to add the 7 "header" bits to the
+        * total size.
+        */
+       n = (n * IEEE80211_PPE_THRES_INFO_PPET_SIZE * 2) + 7;
+       n = DIV_ROUND_UP(n, 8);
+       /* Copy PPE Thresholds */
+       memcpy(pos, &he_cap->ppe_thres, n);
+       pos += n;
+ end:
+       orig_pos[1] = (pos - orig_pos) - 2;
+       return pos;
+ }
  u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
                               const struct cfg80211_chan_def *chandef,
                               u16 prot_mode, bool rifs_mode)
diff --combined net/wireless/core.c
index 48e8097339ab44cca29bc9bbc938b58ea3a43333,d23abc619e77f5ebacfd0a900bf82642d5f49f6a..a88551f3bc43f201cfd09ec7dc93ed2a42e93cf8
@@@ -3,7 -3,7 +3,7 @@@
   *
   * Copyright 2006-2010                Johannes Berg <[email protected]>
   * Copyright 2013-2014  Intel Mobile Communications GmbH
-  * Copyright 2015     Intel Deutschland GmbH
+  * Copyright 2015-2017        Intel Deutschland GmbH
   */
  
  #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@@ -744,6 -744,8 +744,8 @@@ int wiphy_register(struct wiphy *wiphy
  
        /* sanity check supported bands/channels */
        for (band = 0; band < NUM_NL80211_BANDS; band++) {
+               u16 types = 0;
                sband = wiphy->bands[band];
                if (!sband)
                        continue;
                        sband->channels[i].band = band;
                }
  
+               for (i = 0; i < sband->n_iftype_data; i++) {
+                       const struct ieee80211_sband_iftype_data *iftd;
+                       iftd = &sband->iftype_data[i];
+                       if (WARN_ON(!iftd->types_mask))
+                               return -EINVAL;
+                       if (WARN_ON(types & iftd->types_mask))
+                               return -EINVAL;
+                       /* at least one piece of information must be present */
+                       if (WARN_ON(!iftd->he_cap.has_he))
+                               return -EINVAL;
+                       types |= iftd->types_mask;
+               }
                have_band = true;
        }
  
@@@ -1012,7 -1031,6 +1031,7 @@@ void cfg80211_unregister_wdev(struct wi
        nl80211_notify_iface(rdev, wdev, NL80211_CMD_DEL_INTERFACE);
  
        list_del_rcu(&wdev->list);
 +      synchronize_rcu();
        rdev->devlist_generation++;
  
        switch (wdev->iftype) {
diff --combined net/wireless/nl80211.c
index c7bbe5f0aae8839bdfe5ac7b7bd02c6aad8ac8dc,350d2962524c6039040459e50368375975a905d4..8db59129c095e50f6d5478216bf04b63e22a425d
@@@ -428,6 -428,8 +428,8 @@@ static const struct nla_policy nl80211_
        [NL80211_ATTR_TXQ_LIMIT] = { .type = NLA_U32 },
        [NL80211_ATTR_TXQ_MEMORY_LIMIT] = { .type = NLA_U32 },
        [NL80211_ATTR_TXQ_QUANTUM] = { .type = NLA_U32 },
+       [NL80211_ATTR_HE_CAPABILITY] = { .type = NLA_BINARY,
+                                        .len = NL80211_HE_MAX_CAPABILITY_LEN },
  };
  
  /* policy for the key attributes */
@@@ -1324,6 -1326,34 +1326,34 @@@ static int nl80211_send_coalesce(struc
        return 0;
  }
  
+ static int
+ nl80211_send_iftype_data(struct sk_buff *msg,
+                        const struct ieee80211_sband_iftype_data *iftdata)
+ {
+       const struct ieee80211_sta_he_cap *he_cap = &iftdata->he_cap;
+       if (nl80211_put_iftypes(msg, NL80211_BAND_IFTYPE_ATTR_IFTYPES,
+                               iftdata->types_mask))
+               return -ENOBUFS;
+       if (he_cap->has_he) {
+               if (nla_put(msg, NL80211_BAND_IFTYPE_ATTR_HE_CAP_MAC,
+                           sizeof(he_cap->he_cap_elem.mac_cap_info),
+                           he_cap->he_cap_elem.mac_cap_info) ||
+                   nla_put(msg, NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY,
+                           sizeof(he_cap->he_cap_elem.phy_cap_info),
+                           he_cap->he_cap_elem.phy_cap_info) ||
+                   nla_put(msg, NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET,
+                           sizeof(he_cap->he_mcs_nss_supp),
+                           &he_cap->he_mcs_nss_supp) ||
+                   nla_put(msg, NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE,
+                           sizeof(he_cap->ppe_thres), he_cap->ppe_thres))
+                       return -ENOBUFS;
+       }
+       return 0;
+ }
  static int nl80211_send_band_rateinfo(struct sk_buff *msg,
                                      struct ieee80211_supported_band *sband)
  {
                         sband->vht_cap.cap)))
                return -ENOBUFS;
  
+       if (sband->n_iftype_data) {
+               struct nlattr *nl_iftype_data =
+                       nla_nest_start(msg, NL80211_BAND_ATTR_IFTYPE_DATA);
+               int err;
+               if (!nl_iftype_data)
+                       return -ENOBUFS;
+               for (i = 0; i < sband->n_iftype_data; i++) {
+                       struct nlattr *iftdata;
+                       iftdata = nla_nest_start(msg, i + 1);
+                       if (!iftdata)
+                               return -ENOBUFS;
+                       err = nl80211_send_iftype_data(msg,
+                                                      &sband->iftype_data[i]);
+                       if (err)
+                               return err;
+                       nla_nest_end(msg, iftdata);
+               }
+               nla_nest_end(msg, nl_iftype_data);
+       }
        /* add bitrates */
        nl_rates = nla_nest_start(msg, NL80211_BAND_ATTR_RATES);
        if (!nl_rates)
@@@ -2757,7 -2813,8 +2813,8 @@@ static int nl80211_send_iface(struct sk
            nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, wdev_address(wdev)) ||
            nla_put_u32(msg, NL80211_ATTR_GENERATION,
                        rdev->devlist_generation ^
-                       (cfg80211_rdev_list_generation << 2)))
+                       (cfg80211_rdev_list_generation << 2)) ||
+           nla_put_u8(msg, NL80211_ATTR_4ADDR, wdev->use_4addr))
                goto nla_put_failure;
  
        if (rdev->ops->get_channel) {
@@@ -4471,6 -4528,9 +4528,9 @@@ static bool nl80211_put_sta_rate(struc
        case RATE_INFO_BW_160:
                rate_flg = NL80211_RATE_INFO_160_MHZ_WIDTH;
                break;
+       case RATE_INFO_BW_HE_RU:
+               rate_flg = 0;
+               WARN_ON(!(info->flags & RATE_INFO_FLAGS_HE_MCS));
        }
  
        if (rate_flg && nla_put_flag(msg, rate_flg))
                if (info->flags & RATE_INFO_FLAGS_SHORT_GI &&
                    nla_put_flag(msg, NL80211_RATE_INFO_SHORT_GI))
                        return false;
+       } else if (info->flags & RATE_INFO_FLAGS_HE_MCS) {
+               if (nla_put_u8(msg, NL80211_RATE_INFO_HE_MCS, info->mcs))
+                       return false;
+               if (nla_put_u8(msg, NL80211_RATE_INFO_HE_NSS, info->nss))
+                       return false;
+               if (nla_put_u8(msg, NL80211_RATE_INFO_HE_GI, info->he_gi))
+                       return false;
+               if (nla_put_u8(msg, NL80211_RATE_INFO_HE_DCM, info->he_dcm))
+                       return false;
+               if (info->bw == RATE_INFO_BW_HE_RU &&
+                   nla_put_u8(msg, NL80211_RATE_INFO_HE_RU_ALLOC,
+                              info->he_ru_alloc))
+                       return false;
        }
  
        nla_nest_end(msg, rate);
@@@ -4546,13 -4619,13 +4619,13 @@@ static int nl80211_send_station(struct 
  
  #define PUT_SINFO(attr, memb, type) do {                              \
        BUILD_BUG_ON(sizeof(type) == sizeof(u64));                      \
-       if (sinfo->filled & (1ULL << NL80211_STA_INFO_ ## attr) &&      \
+       if (sinfo->filled & BIT_ULL(NL80211_STA_INFO_ ## attr) &&       \
            nla_put_ ## type(msg, NL80211_STA_INFO_ ## attr,            \
                             sinfo->memb))                              \
                goto nla_put_failure;                                   \
        } while (0)
  #define PUT_SINFO_U64(attr, memb) do {                                        \
-       if (sinfo->filled & (1ULL << NL80211_STA_INFO_ ## attr) &&      \
+       if (sinfo->filled & BIT_ULL(NL80211_STA_INFO_ ## attr) &&       \
            nla_put_u64_64bit(msg, NL80211_STA_INFO_ ## attr,           \
                              sinfo->memb, NL80211_STA_INFO_PAD))       \
                goto nla_put_failure;                                   \
        PUT_SINFO(CONNECTED_TIME, connected_time, u32);
        PUT_SINFO(INACTIVE_TIME, inactive_time, u32);
  
-       if (sinfo->filled & (BIT(NL80211_STA_INFO_RX_BYTES) |
-                            BIT(NL80211_STA_INFO_RX_BYTES64)) &&
+       if (sinfo->filled & (BIT_ULL(NL80211_STA_INFO_RX_BYTES) |
+                            BIT_ULL(NL80211_STA_INFO_RX_BYTES64)) &&
            nla_put_u32(msg, NL80211_STA_INFO_RX_BYTES,
                        (u32)sinfo->rx_bytes))
                goto nla_put_failure;
  
-       if (sinfo->filled & (BIT(NL80211_STA_INFO_TX_BYTES) |
-                            BIT(NL80211_STA_INFO_TX_BYTES64)) &&
+       if (sinfo->filled & (BIT_ULL(NL80211_STA_INFO_TX_BYTES) |
+                            BIT_ULL(NL80211_STA_INFO_TX_BYTES64)) &&
            nla_put_u32(msg, NL80211_STA_INFO_TX_BYTES,
                        (u32)sinfo->tx_bytes))
                goto nla_put_failure;
        default:
                break;
        }
-       if (sinfo->filled & BIT(NL80211_STA_INFO_CHAIN_SIGNAL)) {
+       if (sinfo->filled & BIT_ULL(NL80211_STA_INFO_CHAIN_SIGNAL)) {
                if (!nl80211_put_signal(msg, sinfo->chains,
                                        sinfo->chain_signal,
                                        NL80211_STA_INFO_CHAIN_SIGNAL))
                        goto nla_put_failure;
        }
-       if (sinfo->filled & BIT(NL80211_STA_INFO_CHAIN_SIGNAL_AVG)) {
+       if (sinfo->filled & BIT_ULL(NL80211_STA_INFO_CHAIN_SIGNAL_AVG)) {
                if (!nl80211_put_signal(msg, sinfo->chains,
                                        sinfo->chain_signal_avg,
                                        NL80211_STA_INFO_CHAIN_SIGNAL_AVG))
                        goto nla_put_failure;
        }
-       if (sinfo->filled & BIT(NL80211_STA_INFO_TX_BITRATE)) {
+       if (sinfo->filled & BIT_ULL(NL80211_STA_INFO_TX_BITRATE)) {
                if (!nl80211_put_sta_rate(msg, &sinfo->txrate,
                                          NL80211_STA_INFO_TX_BITRATE))
                        goto nla_put_failure;
        }
-       if (sinfo->filled & BIT(NL80211_STA_INFO_RX_BITRATE)) {
+       if (sinfo->filled & BIT_ULL(NL80211_STA_INFO_RX_BITRATE)) {
                if (!nl80211_put_sta_rate(msg, &sinfo->rxrate,
                                          NL80211_STA_INFO_RX_BITRATE))
                        goto nla_put_failure;
        PUT_SINFO(PEER_PM, peer_pm, u32);
        PUT_SINFO(NONPEER_PM, nonpeer_pm, u32);
  
-       if (sinfo->filled & BIT(NL80211_STA_INFO_BSS_PARAM)) {
+       if (sinfo->filled & BIT_ULL(NL80211_STA_INFO_BSS_PARAM)) {
                bss_param = nla_nest_start(msg, NL80211_STA_INFO_BSS_PARAM);
                if (!bss_param)
                        goto nla_put_failure;
  
                nla_nest_end(msg, bss_param);
        }
-       if ((sinfo->filled & BIT(NL80211_STA_INFO_STA_FLAGS)) &&
+       if ((sinfo->filled & BIT_ULL(NL80211_STA_INFO_STA_FLAGS)) &&
            nla_put(msg, NL80211_STA_INFO_STA_FLAGS,
                    sizeof(struct nl80211_sta_flag_update),
                    &sinfo->sta_flags))
@@@ -4886,7 -4959,8 +4959,8 @@@ int cfg80211_check_station_change(struc
                        return -EINVAL;
                if (params->supported_rates)
                        return -EINVAL;
-               if (params->ext_capab || params->ht_capa || params->vht_capa)
+               if (params->ext_capab || params->ht_capa || params->vht_capa ||
+                   params->he_capa)
                        return -EINVAL;
        }
  
@@@ -5092,6 -5166,15 +5166,15 @@@ static int nl80211_set_station_tdls(str
        if (info->attrs[NL80211_ATTR_VHT_CAPABILITY])
                params->vht_capa =
                        nla_data(info->attrs[NL80211_ATTR_VHT_CAPABILITY]);
+       if (info->attrs[NL80211_ATTR_HE_CAPABILITY]) {
+               params->he_capa =
+                       nla_data(info->attrs[NL80211_ATTR_HE_CAPABILITY]);
+               params->he_capa_len =
+                       nla_len(info->attrs[NL80211_ATTR_HE_CAPABILITY]);
+               if (params->he_capa_len < NL80211_HE_MIN_CAPABILITY_LEN)
+                       return -EINVAL;
+       }
  
        err = nl80211_parse_sta_channel_info(info, params);
        if (err)
@@@ -5319,6 -5402,17 +5402,17 @@@ static int nl80211_new_station(struct s
                params.vht_capa =
                        nla_data(info->attrs[NL80211_ATTR_VHT_CAPABILITY]);
  
+       if (info->attrs[NL80211_ATTR_HE_CAPABILITY]) {
+               params.he_capa =
+                       nla_data(info->attrs[NL80211_ATTR_HE_CAPABILITY]);
+               params.he_capa_len =
+                       nla_len(info->attrs[NL80211_ATTR_HE_CAPABILITY]);
+               /* max len is validated in nla policy */
+               if (params.he_capa_len < NL80211_HE_MIN_CAPABILITY_LEN)
+                       return -EINVAL;
+       }
        if (info->attrs[NL80211_ATTR_OPMODE_NOTIF]) {
                params.opmode_notif_used = true;
                params.opmode_notif =
        if (!(params.sta_flags_set & BIT(NL80211_STA_FLAG_WME))) {
                params.ht_capa = NULL;
                params.vht_capa = NULL;
+               /* HE requires WME */
+               if (params.he_capa_len)
+                       return -EINVAL;
        }
  
        /* When you run into this, adjust the code below for the new flag */
@@@ -6861,6 -6959,16 +6959,16 @@@ static bool cfg80211_off_channel_oper_a
        return regulatory_pre_cac_allowed(wdev->wiphy);
  }
  
+ static bool nl80211_check_scan_feat(struct wiphy *wiphy, u32 flags, u32 flag,
+                                   enum nl80211_ext_feature_index feat)
+ {
+       if (!(flags & flag))
+               return true;
+       if (wiphy_ext_feature_isset(wiphy, feat))
+               return true;
+       return false;
+ }
  static int
  nl80211_check_scan_flags(struct wiphy *wiphy, struct wireless_dev *wdev,
                         void *request, struct nlattr **attrs,
  
        if (((*flags & NL80211_SCAN_FLAG_LOW_PRIORITY) &&
             !(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN)) ||
-           ((*flags & NL80211_SCAN_FLAG_LOW_SPAN) &&
-            !wiphy_ext_feature_isset(wiphy,
-                                     NL80211_EXT_FEATURE_LOW_SPAN_SCAN)) ||
-           ((*flags & NL80211_SCAN_FLAG_LOW_POWER) &&
-            !wiphy_ext_feature_isset(wiphy,
-                                     NL80211_EXT_FEATURE_LOW_POWER_SCAN)) ||
-           ((*flags & NL80211_SCAN_FLAG_HIGH_ACCURACY) &&
-            !wiphy_ext_feature_isset(wiphy,
-                                     NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN)))
+           !nl80211_check_scan_feat(wiphy, *flags,
+                                    NL80211_SCAN_FLAG_LOW_SPAN,
+                                    NL80211_EXT_FEATURE_LOW_SPAN_SCAN) ||
+           !nl80211_check_scan_feat(wiphy, *flags,
+                                    NL80211_SCAN_FLAG_LOW_POWER,
+                                    NL80211_EXT_FEATURE_LOW_POWER_SCAN) ||
+           !nl80211_check_scan_feat(wiphy, *flags,
+                                    NL80211_SCAN_FLAG_HIGH_ACCURACY,
+                                    NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN) ||
+           !nl80211_check_scan_feat(wiphy, *flags,
+                                    NL80211_SCAN_FLAG_FILS_MAX_CHANNEL_TIME,
+                                    NL80211_EXT_FEATURE_FILS_MAX_CHANNEL_TIME) ||
+           !nl80211_check_scan_feat(wiphy, *flags,
+                                    NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP,
+                                    NL80211_EXT_FEATURE_ACCEPT_BCAST_PROBE_RESP) ||
+           !nl80211_check_scan_feat(wiphy, *flags,
+                                    NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION,
+                                    NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION) ||
+           !nl80211_check_scan_feat(wiphy, *flags,
+                                    NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE,
+                                    NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE) ||
+           !nl80211_check_scan_feat(wiphy, *flags,
+                                    NL80211_SCAN_FLAG_RANDOM_SN,
+                                    NL80211_EXT_FEATURE_SCAN_RANDOM_SN) ||
+           !nl80211_check_scan_feat(wiphy, *flags,
+                                    NL80211_SCAN_FLAG_MIN_PREQ_CONTENT,
+                                    NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT))
                return -EOPNOTSUPP;
  
        if (*flags & NL80211_SCAN_FLAG_RANDOM_ADDR) {
                        return err;
        }
  
-       if ((*flags & NL80211_SCAN_FLAG_FILS_MAX_CHANNEL_TIME) &&
-           !wiphy_ext_feature_isset(wiphy,
-                                    NL80211_EXT_FEATURE_FILS_MAX_CHANNEL_TIME))
-               return -EOPNOTSUPP;
-       if ((*flags & NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP) &&
-          !wiphy_ext_feature_isset(wiphy,
-                                   NL80211_EXT_FEATURE_ACCEPT_BCAST_PROBE_RESP))
-               return -EOPNOTSUPP;
-       if ((*flags & NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION) &&
-           !wiphy_ext_feature_isset(wiphy,
-                                    NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION))
-               return -EOPNOTSUPP;
-       if ((*flags & NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE) &&
-           !wiphy_ext_feature_isset(wiphy,
-                                    NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE))
-               return -EOPNOTSUPP;
        return 0;
  }
  
@@@ -10160,7 -10266,7 +10266,7 @@@ static int cfg80211_cqm_rssi_update(str
                if (err)
                        return err;
  
-               if (sinfo.filled & BIT(NL80211_STA_INFO_BEACON_SIGNAL_AVG))
+               if (sinfo.filled & BIT_ULL(NL80211_STA_INFO_BEACON_SIGNAL_AVG))
                        wdev->cqm_config->last_rssi_event_value =
                                (s8) sinfo.rx_beacon_signal_avg;
        }
@@@ -10833,7 -10939,7 +10939,7 @@@ static int nl80211_parse_wowlan_nd(stru
        struct nlattr **tb;
        int err;
  
 -      tb = kzalloc(NUM_NL80211_ATTR * sizeof(*tb), GFP_KERNEL);
 +      tb = kcalloc(NUM_NL80211_ATTR, sizeof(*tb), GFP_KERNEL);
        if (!tb)
                return -ENOMEM;
  
@@@ -11793,7 -11899,7 +11899,7 @@@ static int nl80211_nan_add_func(struct 
  
                        func->srf_num_macs = n_entries;
                        func->srf_macs =
 -                              kzalloc(sizeof(*func->srf_macs) * n_entries,
 +                              kcalloc(n_entries, sizeof(*func->srf_macs),
                                        GFP_KERNEL);
                        if (!func->srf_macs) {
                                err = -ENOMEM;
diff --combined net/wireless/util.c
index 3c654cd7ba562ad874c7176960c688b53fb80f61,4ed06b271f322a4f77aef2479d7105342c138471..e0825a019e9fb255adc2f4f749b08e241b2c2dde
@@@ -4,6 -4,7 +4,7 @@@
   *
   * Copyright 2007-2009        Johannes Berg <[email protected]>
   * Copyright 2013-2014  Intel Mobile Communications GmbH
+  * Copyright 2017     Intel Deutschland GmbH
   */
  #include <linux/export.h>
  #include <linux/bitops.h>
@@@ -1142,6 -1143,85 +1143,85 @@@ static u32 cfg80211_calculate_bitrate_v
        return 0;
  }
  
+ static u32 cfg80211_calculate_bitrate_he(struct rate_info *rate)
+ {
+ #define SCALE 2048
+       u16 mcs_divisors[12] = {
+               34133, /* 16.666666... */
+               17067, /*  8.333333... */
+               11378, /*  5.555555... */
+                8533, /*  4.166666... */
+                5689, /*  2.777777... */
+                4267, /*  2.083333... */
+                3923, /*  1.851851... */
+                3413, /*  1.666666... */
+                2844, /*  1.388888... */
+                2560, /*  1.250000... */
+                2276, /*  1.111111... */
+                2048, /*  1.000000... */
+       };
+       u32 rates_160M[3] = { 960777777, 907400000, 816666666 };
+       u32 rates_969[3] =  { 480388888, 453700000, 408333333 };
+       u32 rates_484[3] =  { 229411111, 216666666, 195000000 };
+       u32 rates_242[3] =  { 114711111, 108333333,  97500000 };
+       u32 rates_106[3] =  {  40000000,  37777777,  34000000 };
+       u32 rates_52[3]  =  {  18820000,  17777777,  16000000 };
+       u32 rates_26[3]  =  {   9411111,   8888888,   8000000 };
+       u64 tmp;
+       u32 result;
+       if (WARN_ON_ONCE(rate->mcs > 11))
+               return 0;
+       if (WARN_ON_ONCE(rate->he_gi > NL80211_RATE_INFO_HE_GI_3_2))
+               return 0;
+       if (WARN_ON_ONCE(rate->he_ru_alloc >
+                        NL80211_RATE_INFO_HE_RU_ALLOC_2x996))
+               return 0;
+       if (WARN_ON_ONCE(rate->nss < 1 || rate->nss > 8))
+               return 0;
+       if (rate->bw == RATE_INFO_BW_160)
+               result = rates_160M[rate->he_gi];
+       else if (rate->bw == RATE_INFO_BW_80 ||
+                (rate->bw == RATE_INFO_BW_HE_RU &&
+                 rate->he_ru_alloc == NL80211_RATE_INFO_HE_RU_ALLOC_996))
+               result = rates_969[rate->he_gi];
+       else if (rate->bw == RATE_INFO_BW_40 ||
+                (rate->bw == RATE_INFO_BW_HE_RU &&
+                 rate->he_ru_alloc == NL80211_RATE_INFO_HE_RU_ALLOC_484))
+               result = rates_484[rate->he_gi];
+       else if (rate->bw == RATE_INFO_BW_20 ||
+                (rate->bw == RATE_INFO_BW_HE_RU &&
+                 rate->he_ru_alloc == NL80211_RATE_INFO_HE_RU_ALLOC_242))
+               result = rates_242[rate->he_gi];
+       else if (rate->bw == RATE_INFO_BW_HE_RU &&
+                rate->he_ru_alloc == NL80211_RATE_INFO_HE_RU_ALLOC_106)
+               result = rates_106[rate->he_gi];
+       else if (rate->bw == RATE_INFO_BW_HE_RU &&
+                rate->he_ru_alloc == NL80211_RATE_INFO_HE_RU_ALLOC_52)
+               result = rates_52[rate->he_gi];
+       else if (rate->bw == RATE_INFO_BW_HE_RU &&
+                rate->he_ru_alloc == NL80211_RATE_INFO_HE_RU_ALLOC_26)
+               result = rates_26[rate->he_gi];
+       else if (WARN(1, "invalid HE MCS: bw:%d, ru:%d\n",
+                     rate->bw, rate->he_ru_alloc))
+               return 0;
+       /* now scale to the appropriate MCS */
+       tmp = result;
+       tmp *= SCALE;
+       do_div(tmp, mcs_divisors[rate->mcs]);
+       result = tmp;
+       /* and take NSS, DCM into account */
+       result = (result * rate->nss) / 8;
+       if (rate->he_dcm)
+               result /= 2;
+       return result;
+ }
  u32 cfg80211_calculate_bitrate(struct rate_info *rate)
  {
        if (rate->flags & RATE_INFO_FLAGS_MCS)
                return cfg80211_calculate_bitrate_60g(rate);
        if (rate->flags & RATE_INFO_FLAGS_VHT_MCS)
                return cfg80211_calculate_bitrate_vht(rate);
+       if (rate->flags & RATE_INFO_FLAGS_HE_MCS)
+               return cfg80211_calculate_bitrate_he(rate);
  
        return rate->legacy;
  }
@@@ -1746,8 -1828,6 +1828,8 @@@ int cfg80211_get_station(struct net_dev
        if (!rdev->ops->get_station)
                return -EOPNOTSUPP;
  
 +      memset(sinfo, 0, sizeof(*sinfo));
 +
        return rdev_get_station(rdev, dev, mac_addr, sinfo);
  }
  EXPORT_SYMBOL(cfg80211_get_station);
@@@ -1791,8 -1871,9 +1873,9 @@@ bool cfg80211_does_bw_fit_range(const s
  
  int cfg80211_sinfo_alloc_tid_stats(struct station_info *sinfo, gfp_t gfp)
  {
-       sinfo->pertid = kcalloc(sizeof(*(sinfo->pertid)),
-                               IEEE80211_NUM_TIDS + 1, gfp);
+       sinfo->pertid = kcalloc(IEEE80211_NUM_TIDS + 1,
+                               sizeof(*(sinfo->pertid)),
+                               gfp);
        if (!sinfo->pertid)
                return -ENOMEM;
  
This page took 0.191526 seconds and 4 git commands to generate.