未验证 提交 61059157 编写于 作者: A AmadeusGhost 提交者: GitHub

Wireless: rollback with mac80211 (#4683)

mt76: fix build
ath10k-ct: rollback to 4.19
Revert "iw/iwinfo/mwlwifi: bump version"
Revert "mac80211/5.4: fix build on kernel 4.9"
Revert "mac80211: switch to upstream owl-loader driver"
上级 d1f2153c
此差异已折叠。
......@@ -37,6 +37,11 @@ $(Package/ath10k-firmware-default)
TITLE:=ath10k firmware for QCA9888 devices
endef
define Package/ath10k-firmware-qca9887-ct
$(Package/ath10k-firmware-default)
TITLE:=ath10k-CT firmware for QCA9887 devices
endef
define Package/ath10k-firmware-qca988x
$(Package/ath10k-firmware-default)
TITLE:=ath10k firmware for QCA988x devices
......@@ -44,6 +49,111 @@ $(Package/ath10k-firmware-default)
CATEGORY:=Firmware
endef
CT_FIRMWARE_FILE = $(1)-$($(1)_FIRMWARE_FILE_CT)
CT_FIRMWARE_FILE_HTT = $(1)-$($(1)_FIRMWARE_FILE_CT_HTT)
define Download/ct-firmware
URL:=https://www.candelatech.com/downloads/$(2)
FILE:=$(call CT_FIRMWARE_FILE,$(1))
URL_FILE:=$($(1)_FIRMWARE_FILE_CT)
endef
define Download/ct-firmware-htt
URL:=https://www.candelatech.com/downloads/$(2)
FILE:=$(call CT_FIRMWARE_FILE_HTT,$(1))
URL_FILE:=$($(1)_FIRMWARE_FILE_CT_HTT)
endef
QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-22.bin.lede.013
define Download/ath10k-firmware-qca988x-ct
$(call Download/ct-firmware,QCA988X,)
HASH:=19db86003509dedb8ace339c183813ca637d65af24d00666411d1590efe33e13
endef
$(eval $(call Download,ath10k-firmware-qca988x-ct))
QCA988X_FIRMWARE_FILE_CT_HTT:=firmware-2-ct-full-htt-mgt-community-22.bin.lede.013
define Download/ath10k-firmware-qca988x-ct-htt
$(call Download/ct-firmware-htt,QCA988X,)
HASH:=454e67dab545e720369a07be2fee16de008c76db4ab3119e7760bf9f7504c066
endef
$(eval $(call Download,ath10k-firmware-qca988x-ct-htt))
QCA9887_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-22.bin.lede.013
define Download/ath10k-firmware-qca9887-ct
$(call Download/ct-firmware,QCA9887,ath10k-9887)
HASH:=b3c738328427e124701a5735d65cde0f60e4172ae5bc23b00e5b16df7995dbd4
endef
$(eval $(call Download,ath10k-firmware-qca9887-ct))
QCA9887_FIRMWARE_FILE_CT_HTT:=firmware-2-ct-full-htt-mgt-community-22.bin.lede.013
define Download/ath10k-firmware-qca9887-ct-htt
$(call Download/ct-firmware-htt,QCA9887,ath10k-9887)
HASH:=4432ccee23133bbaa4a5552e50a1e7e889b257362603e05530e751b67c29b7b5
endef
$(eval $(call Download,ath10k-firmware-qca9887-ct-htt))
QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.013
define Download/ath10k-firmware-qca99x0-ct
$(call Download/ct-firmware,QCA99X0,ath10k-10-4b)
HASH:=6fa74a3fc87cba97dbc4a7213b760f8d997cd9c5f11900d47d387b23764cf20a
endef
$(eval $(call Download,ath10k-firmware-qca99x0-ct))
QCA99X0_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.013
define Download/ath10k-firmware-qca99x0-ct-htt
$(call Download/ct-firmware-htt,QCA99X0,ath10k-10-4b)
HASH:=68e92820c51270eba4f68b24654c4a9408902b2600762b70204f4cb5419bb714
endef
$(eval $(call Download,ath10k-firmware-qca99x0-ct-htt))
QCA9984_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.013
define Download/ath10k-firmware-qca9984-ct
$(call Download/ct-firmware,QCA9984,ath10k-9984-10-4b)
HASH:=08aeb883bd2d9258e8f1907cca8a0d2eda1c559a66e228dadffd6798f6877c7d
endef
$(eval $(call Download,ath10k-firmware-qca9984-ct))
QCA9984_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.013
define Download/ath10k-firmware-qca9984-ct-htt
$(call Download/ct-firmware-htt,QCA9984,ath10k-9984-10-4b)
HASH:=38ed59a2b3c66c10926706a21ae2d3aeaf83e589f19345a8f48d6520522e4fde
endef
$(eval $(call Download,ath10k-firmware-qca9984-ct-htt))
QCA4019_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.013
define Download/ath10k-firmware-qca4019-ct
$(call Download/ct-firmware,QCA4019,ath10k-4019-10-4b)
HASH:=feca75fe89af9a3e998047f85ff3428676f4d574b770d51773bb419d0dd98e5a
endef
$(eval $(call Download,ath10k-firmware-qca4019-ct))
QCA4019_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.013
define Download/ath10k-firmware-qca4019-ct-htt
$(call Download/ct-firmware-htt,QCA4019,ath10k-4019-10-4b)
HASH:=6a4977689343f43edd934823512f031fd1a026e872004343b9952077f9607cb0
endef
$(eval $(call Download,ath10k-firmware-qca4019-ct-htt))
QCA9888_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.013
define Download/ath10k-firmware-qca9888-ct
$(call Download/ct-firmware,QCA9888,ath10k-9888-10-4b)
HASH:=d6a59c17bfbec1abc8498762d9f00b2449cab352feb8bef8b621771168376dbf
endef
$(eval $(call Download,ath10k-firmware-qca9888-ct))
QCA9888_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.013
define Download/ath10k-firmware-qca9888-ct-htt
$(call Download/ct-firmware-htt,QCA9888,ath10k-9888-10-4b)
HASH:=fe242c0d56494975d7a1aeb6969d90cc21cb133fba99040d4da7a25fdb90d92c
endef
$(eval $(call Download,ath10k-firmware-qca9888-ct-htt))
define Package/ath10k-firmware-qca99x0
$(Package/ath10k-firmware-default)
TITLE:=ath10k firmware for QCA99x0 devices
......@@ -51,12 +161,206 @@ $(Package/ath10k-firmware-default)
CATEGORY:=Firmware
endef
define Package/ath10k-firmware-qca988x-ct
$(Package/ath10k-firmware-default)
TITLE:=ath10k CT 10.1 firmware for QCA988x devices
SECTION:=firmware
CATEGORY:=Firmware
PROVIDES:=ath10k-firmware-qca988x
endef
define Package/ath10k-firmware-qca988x-ct-htt
$(Package/ath10k-firmware-default)
TITLE:=ath10k CT 10.1 htt-mgt fw for QCA988x
SECTION:=firmware
CATEGORY:=Firmware
PROVIDES:=ath10k-firmware-qca988x
DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
endef
define Package/ath10k-firmware-qca9887-ct
$(Package/ath10k-firmware-default)
TITLE:=ath10k CT 10.1 firmware for QCA9887 devices
SECTION:=firmware
CATEGORY:=Firmware
PROVIDES:=ath10k-firmware-qca9887
endef
define Package/ath10k-firmware-qca9887-ct-htt
$(Package/ath10k-firmware-default)
TITLE:=ath10k CT 10.1 htt-mgt fw for QCA9887
SECTION:=firmware
CATEGORY:=Firmware
PROVIDES:=ath10k-firmware-qca9887
DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
endef
define Package/ath10k-firmware-qca988x-ct/description
Alternative ath10k firmware for QCA988X from Candela Technologies.
Enables IBSS and other features. See:
http://www.candelatech.com/ath10k-10.1.php
This firmware will NOT be used unless the standard ath10k-firmware-qca988x
is un-selected since the driver will try to load firmware-5.bin before
firmware-2.bin
endef
define Package/ath10k-firmware-qca988x-ct-htt/description
Alternative ath10k firmware for QCA988X from Candela Technologies.
Uses normal HTT TX data path for management frames, which improves
stability in busy networks and fixes .11r authentication.
Enables IBSS and other features. See:
http://www.candelatech.com/ath10k-10.1.php
This firmware selects and requires the ath10k-ct driver.
endef
define Package/ath10k-firmware-qca9887-ct/description
Alternative ath10k firmware for QCA9887 from Candela Technologies.
Enables IBSS and other features. See:
http://www.candelatech.com/ath10k-10.1.php
This firmware conflicts with the standard 9887 firmware, so select only
one.
endef
define Package/ath10k-firmware-qca9887-ct-htt/description
Alternative ath10k firmware for QCA9887 from Candela Technologies.
Uses normal HTT TX data path for management frames, which improves
stability in busy networks and fixes .11r authentication.
Enables IBSS and other features. See:
http://www.candelatech.com/ath10k-10.1.php
This firmware selects and requires the ath10k-ct driver.
endef
define Package/ath10k-firmware-qca99x0-ct/description
Alternative ath10k firmware for QCA99x0 from Candela Technologies.
Enables IBSS and other features. See:
http://www.candelatech.com/ath10k-10.4.php
This firmware conflicts with the standard 99x0 firmware, so select only
one.
endef
define Package/ath10k-firmware-qca99x0-ct-htt/description
Alternative ath10k firmware for QCA99x0 from Candela Technologies.
Uses normal HTT TX data path for management frames, which improves
stability in busy networks and may be required for .11r authentication.
Enables IBSS and other features. See:
http://www.candelatech.com/ath10k-10.4.php
This firmware selects and requires the ath10k-ct driver.
endef
define Package/ath10k-firmware-qca9984-ct/description
Alternative ath10k firmware for QCA9984 from Candela Technologies.
Enables IBSS and other features. See:
http://www.candelatech.com/ath10k-10.4.php
This firmware conflicts with the standard 9984 firmware, so select only
one.
endef
define Package/ath10k-firmware-qca9984-ct-htt/description
Alternative ath10k firmware for QCA9984 from Candela Technologies.
Uses normal HTT TX data path for management frames, which improves
stability in busy networks and may be required for .11r authentication.
Enables IBSS and other features. See:
http://www.candelatech.com/ath10k-10.4.php
This firmware selects and requires the ath10k-ct driver.
endef
define Package/ath10k-firmware-qca4019-ct/description
Alternative ath10k firmware for IPQ4019 radio from Candela Technologies.
Enables IBSS and other features. Works with standard or ath10k-ct driver.
See: http://www.candelatech.com/ath10k-10.4.php
endef
define Package/ath10k-firmware-qca4019-ct-htt/description
Alternative ath10k firmware for IPQ4019 radio from Candela Technologies.
Uses normal HTT TX data path for management frames, which improves
stability in busy networks and may be required for .11r authentication.
Enables IBSS and other features.
See: http://www.candelatech.com/ath10k-10.4.php
This firmware selects and requires the ath10k-ct driver.
endef
define Package/ath10k-firmware-qca9888-ct/description
Alternative ath10k firmware for QCA9886 and QCA9888 from Candela Technologies.
Enables IBSS and other features. See:
http://www.candelatech.com/ath10k-10.4.php
This firmware conflicts with the standard 9886 and 9888 firmware, so select only
one.
endef
define Package/ath10k-firmware-qca9888-ct-htt/description
Alternative ath10k firmware for QCA9886 and QCA9888 from Candela Technologies.
Uses normal HTT TX data path for management frames, which improves
stability in busy networks and may be required for .11r authentication.
Enables IBSS and other features. See:
http://www.candelatech.com/ath10k-10.4.php
This firmware selects and requires the ath10k-ct driver.
endef
define Package/ath10k-firmware-qca99x0/description
Standard ath10k firmware for QCA99x0 from QCA
This firmware conflicts with the CT 99x0 firmware, so select only
one.
endef
define Package/ath10k-firmware-qca99x0-ct
$(Package/ath10k-firmware-default)
TITLE:=ath10k CT 10.4 firmware for QCA99x0 devices
SECTION:=firmware
CATEGORY:=Firmware
PROVIDES:=ath10k-firmware-qca99x0
endef
define Package/ath10k-firmware-qca99x0-ct-htt
$(Package/ath10k-firmware-default)
TITLE:=ath10k CT 10.4 htt-mgt fw for QCA99x0
SECTION:=firmware
CATEGORY:=Firmware
PROVIDES:=ath10k-firmware-qca99x0
DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
endef
define Package/ath10k-firmware-qca9984-ct
$(Package/ath10k-firmware-default)
TITLE:=ath10k CT 10.4 firmware for QCA9984 devices
SECTION:=firmware
CATEGORY:=Firmware
PROVIDES:=ath10k-firmware-qca9984
endef
define Package/ath10k-firmware-qca9984-ct-htt
$(Package/ath10k-firmware-default)
TITLE:=ath10k CT 10.4 htt-mgt fw for QCA9984
SECTION:=firmware
CATEGORY:=Firmware
PROVIDES:=ath10k-firmware-qca9984
DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
endef
define Package/ath10k-firmware-qca4019-ct
$(Package/ath10k-firmware-default)
TITLE:=ath10k CT 10.4 firmware for QCA4018/9
SECTION:=firmware
CATEGORY:=Firmware
PROVIDES:=ath10k-firmware-qca4019
endef
define Package/ath10k-firmware-qca4019-ct-htt
$(Package/ath10k-firmware-default)
TITLE:=ath10k CT 10.4 htt-mgt for QCA4018/9
SECTION:=firmware
CATEGORY:=Firmware
PROVIDES:=ath10k-firmware-qca4019
DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
endef
define Package/ath10k-firmware-qca9888-ct
$(Package/ath10k-firmware-default)
TITLE:=ath10k CT 10.4 fw for QCA9886/8 devices
SECTION:=firmware
CATEGORY:=Firmware
PROVIDES:=ath10k-firmware-qca9888
endef
define Package/ath10k-firmware-qca9888-ct-htt
$(Package/ath10k-firmware-default)
TITLE:=ath10k CT 10.4 htt-mgt fw for QCA9886/8
SECTION:=firmware
CATEGORY:=Firmware
PROVIDES:=ath10k-firmware-qca9888
DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
endef
define Package/ath10k-firmware-qca9984
$(Package/ath10k-firmware-default)
TITLE:=ath10k firmware for QCA9984 devices
......@@ -173,6 +477,135 @@ define Package/ath10k-firmware-qca9984/install
$(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin
endef
# CT related firmware
define Package/ath10k-firmware-qca9887-ct/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
$(INSTALL_DATA) \
$(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9887) \
$(1)/lib/firmware/ath10k/QCA9887/hw1.0/firmware-2.bin
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/QCA9887/hw1.0/board.bin \
$(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin
endef
define Package/ath10k-firmware-qca9887-ct-htt/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
$(INSTALL_DATA) \
$(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA9887) \
$(1)/lib/firmware/ath10k/QCA9887/hw1.0/ct-firmware-2.bin
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/QCA9887/hw1.0/board.bin \
$(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin
endef
define Package/ath10k-firmware-qca988x-ct/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/QCA988X/hw2.0/board.bin \
$(1)/lib/firmware/ath10k/QCA988X/hw2.0/
$(INSTALL_DATA) \
$(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA988X) \
$(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-2.bin
endef
define Package/ath10k-firmware-qca988x-ct-htt/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/QCA988X/hw2.0/board.bin \
$(1)/lib/firmware/ath10k/QCA988X/hw2.0/
$(INSTALL_DATA) \
$(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA988X) \
$(1)/lib/firmware/ath10k/QCA988X/hw2.0/ct-firmware-2.bin
endef
define Package/ath10k-firmware-qca99x0-ct/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
$(INSTALL_DATA) \
$(DL_DIR)/$(QCA99X0_BOARD_FILE) \
$(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/QCA99X0/hw2.0/boardData_AR900B_CUS239_5G_v2_001.bin \
$(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
$(INSTALL_DATA) \
$(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA99X0) \
$(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin
endef
define Package/ath10k-firmware-qca99x0-ct-htt/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
$(INSTALL_DATA) \
$(DL_DIR)/$(QCA99X0_BOARD_FILE) \
$(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/QCA99X0/hw2.0/boardData_AR900B_CUS239_5G_v2_001.bin \
$(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
$(INSTALL_DATA) \
$(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA99X0) \
$(1)/lib/firmware/ath10k/QCA99X0/hw2.0/ct-firmware-5.bin
endef
define Package/ath10k-firmware-qca9984-ct/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/QCA9984/hw1.0/board-2.bin \
$(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin
$(INSTALL_DATA) \
$(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9984) \
$(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin
endef
define Package/ath10k-firmware-qca9984-ct-htt/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/QCA9984/hw1.0/board-2.bin \
$(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin
$(INSTALL_DATA) \
$(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA9984) \
$(1)/lib/firmware/ath10k/QCA9984/hw1.0/ct-firmware-5.bin
endef
define Package/ath10k-firmware-qca4019-ct/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/QCA4019/hw1.0/board-2.bin \
$(1)/lib/firmware/ath10k/QCA4019/hw1.0/
$(INSTALL_DATA) \
$(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA4019) \
$(1)/lib/firmware/ath10k/QCA4019/hw1.0/firmware-5.bin
endef
define Package/ath10k-firmware-qca4019-ct-htt/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/QCA4019/hw1.0/board-2.bin \
$(1)/lib/firmware/ath10k/QCA4019/hw1.0/
$(INSTALL_DATA) \
$(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA4019) \
$(1)/lib/firmware/ath10k/QCA4019/hw1.0/ct-firmware-5.bin
endef
define Package/ath10k-firmware-qca9888-ct/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0
ln -s \
../../cal-pci-0000:01:00.0.bin \
$(1)/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/QCA9888/hw2.0/board-2.bin \
$(1)/lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin
$(INSTALL_DATA) \
$(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9888) \
$(1)/lib/firmware/ath10k/QCA9888/hw2.0/firmware-5.bin
endef
define Package/ath10k-firmware-qca9888-ct-htt/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0
ln -s \
../../cal-pci-0000:01:00.0.bin \
$(1)/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/QCA9888/hw2.0/board-2.bin \
$(1)/lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin
$(INSTALL_DATA) \
$(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA9888) \
$(1)/lib/firmware/ath10k/QCA9888/hw2.0/ct-firmware-5.bin
endef
$(eval $(call BuildPackage,ath10k-firmware-qca9887))
#$(eval $(call BuildPackage,ath10k-firmware-qca9888))
$(eval $(call BuildPackage,ath10k-firmware-qca988x))
......@@ -180,3 +613,16 @@ $(eval $(call BuildPackage,ath10k-firmware-qca988x))
#$(eval $(call BuildPackage,ath10k-firmware-qca6174))
#$(eval $(call BuildPackage,ath10k-firmware-qca9984))
#$(eval $(call BuildPackage,ath10k-firmware-qca4019))
$(eval $(call BuildPackage,ath10k-firmware-qca9887-ct))
$(eval $(call BuildPackage,ath10k-firmware-qca9887-ct-htt))
$(eval $(call BuildPackage,ath10k-firmware-qca988x-ct))
$(eval $(call BuildPackage,ath10k-firmware-qca988x-ct-htt))
$(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct))
$(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct-htt))
$(eval $(call BuildPackage,ath10k-firmware-qca9984-ct))
$(eval $(call BuildPackage,ath10k-firmware-qca9984-ct-htt))
$(eval $(call BuildPackage,ath10k-firmware-qca4019-ct))
$(eval $(call BuildPackage,ath10k-firmware-qca4019-ct-htt))
$(eval $(call BuildPackage,ath10k-firmware-qca9888-ct))
$(eval $(call BuildPackage,ath10k-firmware-qca9888-ct-htt))
......@@ -8,14 +8,14 @@ PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2020-04-29
PKG_SOURCE_VERSION:=3637be6f6baf99e85a7f0b27f80a99a2f2a5f78d
PKG_MIRROR_HASH:=97cf22a4a57381c7eb7a9b8a8b1e347e9711ce51c89db971b4ab9a35af476ece
PKG_SOURCE_DATE:=2019-09-09
PKG_SOURCE_VERSION:=5e8cd86f90dac966d12df6ece84ac41458d0e95f
PKG_MIRROR_HASH:=dc1097f3a7b4b7e346918f206746d00a0b7df07ae3be9b89be55dfaef3cbbe45
# Build the 5.4 ath10k-ct driver version. Other option is "-4.19".
# Probably this should match as closely as
# Build the 4.19 ath10k-ct driver version. Other options are "-4.16", or
# leave un-defined for 4.7 kernel. Probably this should match as closely as
# possible to whatever mac80211 backports version is being used.
CT_KVER="-5.4"
CT_KVER="-4.19"
PKG_MAINTAINER:=Ben Greear <greearb@candelatech.com>
PKG_BUILD_PARALLEL:=1
......
From: Sriram R <srirrama@codeaurora.org>
Date: Mon, 10 Sep 2018 11:09:40 +0530
Subject: [PATCH] ath10k: add support for configuring management packet rate
By default the firmware uses 1Mbps and 6Mbps rate for management packets
in 2G and 5G bands respectively. But when the user selects different
basic rates from the userspace, we need to send the management
packets at the lowest basic rate selected by the user.
This change makes use of WMI_VDEV_PARAM_MGMT_RATE param for configuring the
management packets rate to the firmware.
Chipsets Tested : QCA988X, QCA9887, QCA9984
FW Tested : 10.2.4-1.0-41, 10.4-3.6.104
Signed-off-by: Sriram R <srirrama@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f279294e9ee22a8f306fdc8e4181cf555e6f0f70
---
--- a/ath10k-4.19/mac.c
+++ b/ath10k-4.19/mac.c
@@ -157,6 +157,22 @@ u8 ath10k_mac_bitrate_to_idx(const struc
return 0;
}
+static int ath10k_mac_get_rate_hw_value(int bitrate)
+{
+ int i;
+ u8 hw_value_prefix = 0;
+
+ if (ath10k_mac_bitrate_is_cck(bitrate))
+ hw_value_prefix = WMI_RATE_PREAMBLE_CCK << 6;
+
+ for (i = 0; i < sizeof(ath10k_rates); i++) {
+ if (ath10k_rates[i].bitrate == bitrate)
+ return hw_value_prefix | ath10k_rates[i].hw_value;
+ }
+
+ return -EINVAL;
+}
+
static int ath10k_mac_get_max_vht_mcs_map(u16 mcs_map, int nss)
{
switch ((mcs_map >> (2 * nss)) & 0x3) {
@@ -6405,9 +6421,10 @@ static void ath10k_bss_info_changed(stru
struct cfg80211_chan_def def;
u32 vdev_param, pdev_param, slottime, preamble;
u16 bitrate, hw_value;
- u8 rate;
- int rateidx, ret = 0;
+ u8 rate, basic_rate_idx;
+ int rateidx, ret = 0, hw_rate_code;
enum nl80211_band band;
+ const struct ieee80211_supported_band *sband;
mutex_lock(&ar->conf_mutex);
@@ -6613,6 +6630,30 @@ static void ath10k_bss_info_changed(stru
arvif->vdev_id, ret);
}
+ if (changed & BSS_CHANGED_BASIC_RATES) {
+ if (WARN_ON(ath10k_mac_vif_chan(vif, &def))) {
+ mutex_unlock(&ar->conf_mutex);
+ return;
+ }
+
+ sband = ar->hw->wiphy->bands[def.chan->band];
+ basic_rate_idx = ffs(vif->bss_conf.basic_rates) - 1;
+ bitrate = sband->bitrates[basic_rate_idx].bitrate;
+
+ hw_rate_code = ath10k_mac_get_rate_hw_value(bitrate);
+ if (hw_rate_code < 0) {
+ ath10k_warn(ar, "bitrate not supported %d\n", bitrate);
+ mutex_unlock(&ar->conf_mutex);
+ return;
+ }
+
+ vdev_param = ar->wmi.vdev_param->mgmt_rate;
+ ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
+ hw_rate_code);
+ if (ret)
+ ath10k_warn(ar, "failed to set mgmt tx rate %d\n", ret);
+ }
+
mutex_unlock(&ar->conf_mutex);
}
From: Sriram R <srirrama@codeaurora.org>
Date: Wed, 3 Oct 2018 08:43:50 +0530
Subject: [PATCH] ath10k: fix possible out of bound access of ath10k_rates array
While using 'ath10k_mac_get_rate_hw_value()' to obtain the hw value
from the passed bitrate, there is a chance of out of bound array access
when wrong bitrate is passed. This is fixed by comparing the bitrates
within the correct size of the ath10k_rates array.
Fixes commit f279294e9ee2 ("ath10k: add support for configuring management
packet rate"). Also correction made to some indents used in the above commit.
Signed-off-by: Sriram R <srirrama@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34e141eea7dd8525dd1ef7a925459e455b4d307f
---
--- a/ath10k-4.19/mac.c
+++ b/ath10k-4.19/mac.c
@@ -165,7 +165,7 @@ static int ath10k_mac_get_rate_hw_value(
if (ath10k_mac_bitrate_is_cck(bitrate))
hw_value_prefix = WMI_RATE_PREAMBLE_CCK << 6;
- for (i = 0; i < sizeof(ath10k_rates); i++) {
+ for (i = 0; i < ARRAY_SIZE(ath10k_rates); i++) {
if (ath10k_rates[i].bitrate == bitrate)
return hw_value_prefix | ath10k_rates[i].hw_value;
}
@@ -6636,22 +6636,22 @@ static void ath10k_bss_info_changed(stru
return;
}
- sband = ar->hw->wiphy->bands[def.chan->band];
- basic_rate_idx = ffs(vif->bss_conf.basic_rates) - 1;
- bitrate = sband->bitrates[basic_rate_idx].bitrate;
-
- hw_rate_code = ath10k_mac_get_rate_hw_value(bitrate);
- if (hw_rate_code < 0) {
- ath10k_warn(ar, "bitrate not supported %d\n", bitrate);
- mutex_unlock(&ar->conf_mutex);
- return;
- }
+ sband = ar->hw->wiphy->bands[def.chan->band];
+ basic_rate_idx = ffs(vif->bss_conf.basic_rates) - 1;
+ bitrate = sband->bitrates[basic_rate_idx].bitrate;
+
+ hw_rate_code = ath10k_mac_get_rate_hw_value(bitrate);
+ if (hw_rate_code < 0) {
+ ath10k_warn(ar, "bitrate not supported %d\n", bitrate);
+ mutex_unlock(&ar->conf_mutex);
+ return;
+ }
- vdev_param = ar->wmi.vdev_param->mgmt_rate;
- ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
- hw_rate_code);
- if (ret)
- ath10k_warn(ar, "failed to set mgmt tx rate %d\n", ret);
+ vdev_param = ar->wmi.vdev_param->mgmt_rate;
+ ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
+ hw_rate_code);
+ if (ret)
+ ath10k_warn(ar, "failed to set mgmt tx rate %d\n", ret);
}
mutex_unlock(&ar->conf_mutex);
From: Pradeep kumar Chitrapu <pradeepc@codeaurora.org>
Date: Mon, 10 Dec 2018 20:56:11 -0800
Subject: ath10k: fix incorrect multicast/broadcast rate setting
Invalid rate code is sent to firmware when multicast rate value of 0 is
sent to driver indicating disabled case, causing broken mesh path.
so fix that.
Tested on QCA9984 with firmware 10.4-3.6.1-00827
Fixes: cd93b83ad92 ("ath10k: support for multicast rate control")
Co-developed-by: Zhi Chen <zhichen@codeaurora.org>
Signed-off-by: Zhi Chen <zhichen@codeaurora.org>
Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Origin: other, https://patchwork.kernel.org/patch/10723033/
--- a/ath10k-4.19/mac.c
+++ b/ath10k-4.19/mac.c
@@ -6421,8 +6421,8 @@ static void ath10k_bss_info_changed(stru
struct cfg80211_chan_def def;
u32 vdev_param, pdev_param, slottime, preamble;
u16 bitrate, hw_value;
- u8 rate, basic_rate_idx;
- int rateidx, ret = 0, hw_rate_code;
+ u8 rate, basic_rate_idx, rateidx;
+ int ret = 0, hw_rate_code, mcast_rate;
enum nl80211_band band;
const struct ieee80211_supported_band *sband;
@@ -6595,7 +6595,11 @@ static void ath10k_bss_info_changed(stru
if (changed & BSS_CHANGED_MCAST_RATE &&
!WARN_ON(ath10k_mac_vif_chan(arvif->vif, &def))) {
band = def.chan->band;
- rateidx = vif->bss_conf.mcast_rate[band] - 1;
+ mcast_rate = vif->bss_conf.mcast_rate[band];
+ if (mcast_rate > 0)
+ rateidx = mcast_rate - 1;
+ else
+ rateidx = ffs(vif->bss_conf.basic_rates) - 1;
if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY)
rateidx += ATH10K_MAC_FIRST_OFDM_RATE_IDX;
......@@ -9,9 +9,9 @@ mcast_rate set for a wifi-iface.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
--- a/ath10k-5.4/mac.c
+++ b/ath10k-5.4/mac.c
@@ -6793,6 +6793,7 @@ static void ath10k_bss_info_changed(stru
--- a/ath10k-4.19/mac.c
+++ b/ath10k-4.19/mac.c
@@ -6617,6 +6617,7 @@ static void ath10k_bss_info_changed(stru
"mac vdev %d mcast_rate %x\n",
arvif->vdev_id, rate);
......@@ -19,7 +19,7 @@ Signed-off-by: Sven Eckelmann <sven@narfation.org>
vdev_param = ar->wmi.vdev_param->mcast_data_rate;
ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id,
vdev_param, rate);
@@ -6801,6 +6802,7 @@ static void ath10k_bss_info_changed(stru
@@ -6625,6 +6626,7 @@ static void ath10k_bss_info_changed(stru
"failed to set mcast rate on vdev %i: %d\n",
arvif->vdev_id, ret);
......@@ -27,7 +27,7 @@ Signed-off-by: Sven Eckelmann <sven@narfation.org>
vdev_param = ar->wmi.vdev_param->bcast_data_rate;
ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id,
vdev_param, rate);
@@ -6827,6 +6829,7 @@ static void ath10k_bss_info_changed(stru
@@ -6651,6 +6653,7 @@ static void ath10k_bss_info_changed(stru
return;
}
......
......@@ -66,25 +66,25 @@ v13:
* cleanup includes
ath10k-5.4/Kconfig | 10 +++
ath10k-5.4/Makefile | 1 +
ath10k-5.4/core.c | 22 +++++++
ath10k-5.4/core.h | 9 ++-
ath10k-5.4/hw.h | 1 +
ath10k-5.4/leds.c | 103 ++++++++++++++++++++++++++++++
ath10k-5.4/leds.h | 45 +++++++++++++
ath10k-5.4/mac.c | 1 +
ath10k-5.4/wmi-ops.h | 32 ++++++++++
ath10k-5.4/wmi-tlv.c | 2 +
ath10k-5.4/wmi.c | 54 ++++++++++++++++
ath10k-5.4/wmi.h | 35 ++++++++++
12 files changed, 314 insertions(+), 1 deletion(-)
create mode 100644 ath10k-5.4/leds.c
create mode 100644 ath10k-5.4/leds.h
--- a/ath10k-5.4/Kconfig
+++ b/ath10k-5.4/Kconfig
@@ -66,6 +66,16 @@ config ATH10K_DEBUGFS
ath10k-4.16/Kconfig | 10 +++
ath10k-4.16/Makefile | 1 +
ath10k-4.16/core.c | 22 +++++++
ath10k-4.16/core.h | 9 ++-
ath10k-4.16/hw.h | 1 +
ath10k-4.16/leds.c | 103 ++++++++++++++++++++++++++++++
ath10k-4.16/leds.h | 45 +++++++++++++
ath10k-4.16/mac.c | 1 +
ath10k-4.16/wmi-ops.h | 32 ++++++++++
ath10k-4.16/wmi-tlv.c | 2 +
ath10k-4.16/wmi.c | 54 ++++++++++++++++
ath10k-4.16/wmi.h | 35 ++++++++++
12 files changed, 314 insertions(+), 1 deletion(-)
create mode 100644 ath10k-4.16/leds.c
create mode 100644 ath10k-4.16/leds.h
--- a/ath10k-4.19/Kconfig
+++ b/ath10k-4.19/Kconfig
@@ -64,6 +64,16 @@ config ATH10K_DEBUGFS
If unsure, say Y to make it easier to debug problems.
......@@ -101,8 +101,8 @@ v13:
config ATH10K_SPECTRAL
bool "Atheros ath10k spectral scan support"
depends on ATH10K_DEBUGFS
--- a/ath10k-5.4/Makefile
+++ b/ath10k-5.4/Makefile
--- a/ath10k-4.19/Makefile
+++ b/ath10k-4.19/Makefile
@@ -19,6 +19,7 @@ ath10k_core-$(CONFIG_ATH10K_SPECTRAL) +=
ath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o
ath10k_core-$(CONFIG_ATH10K_TRACING) += trace.o
......@@ -111,9 +111,9 @@ v13:
ath10k_core-$(CONFIG_MAC80211_DEBUGFS) += debugfs_sta.o
ath10k_core-$(CONFIG_PM) += wow.o
ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o
--- a/ath10k-5.4/core.c
+++ b/ath10k-5.4/core.c
@@ -25,6 +25,7 @@
--- a/ath10k-4.19/core.c
+++ b/ath10k-4.19/core.c
@@ -35,6 +35,7 @@
#include "testmode.h"
#include "wmi-ops.h"
#include "coredump.h"
......@@ -121,47 +121,47 @@ v13:
/* Disable ath10k-ct DBGLOG output by default */
unsigned int ath10k_debug_mask = ATH10K_DBG_NO_DBGLOG;
@@ -67,6 +68,7 @@ static const struct ath10k_hw_params ath
@@ -72,6 +73,7 @@ static const struct ath10k_hw_params ath
.id = QCA988X_HW_2_0_VERSION,
.dev_id = QCA988X_2_0_DEVICE_ID,
.bus = ATH10K_BUS_PCI,
.name = "qca988x hw2.0",
+ .led_pin = 1,
.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
.uart_pin = 7,
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
@@ -137,6 +139,7 @@ static const struct ath10k_hw_params ath
.id = QCA9887_HW_1_0_VERSION,
.dev_id = QCA9887_1_0_DEVICE_ID,
.bus = ATH10K_BUS_PCI,
.name = "qca9887 hw1.0",
+ .led_pin = 1,
.patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
.uart_pin = 7,
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
@@ -344,6 +347,7 @@ static const struct ath10k_hw_params ath
@@ -301,6 +304,7 @@ static const struct ath10k_hw_params ath
.id = QCA99X0_HW_2_0_DEV_VERSION,
.dev_id = QCA99X0_2_0_DEVICE_ID,
.bus = ATH10K_BUS_PCI,
.name = "qca99x0 hw2.0",
+ .led_pin = 17,
.patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
.uart_pin = 7,
.otp_exe_param = 0x00000700,
@@ -385,6 +389,7 @@ static const struct ath10k_hw_params ath
@@ -339,6 +343,7 @@ static const struct ath10k_hw_params ath
.id = QCA9984_HW_1_0_DEV_VERSION,
.dev_id = QCA9984_1_0_DEVICE_ID,
.bus = ATH10K_BUS_PCI,
.name = "qca9984/qca9994 hw1.0",
+ .led_pin = 17,
.patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
.uart_pin = 7,
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
@@ -433,6 +438,7 @@ static const struct ath10k_hw_params ath
@@ -382,6 +387,7 @@ static const struct ath10k_hw_params ath
.id = QCA9888_HW_2_0_DEV_VERSION,
.dev_id = QCA9888_2_0_DEVICE_ID,
.bus = ATH10K_BUS_PCI,
.name = "qca9888 hw2.0",
+ .led_pin = 17,
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
.uart_pin = 7,
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
@@ -3573,6 +3579,10 @@ int ath10k_core_start(struct ath10k *ar,
@@ -3167,6 +3173,10 @@ int ath10k_core_start(struct ath10k *ar,
ath10k_wmi_check_apply_board_power_ctl_table(ar);
}
......@@ -172,7 +172,7 @@ v13:
return 0;
err_hif_stop:
@@ -3829,9 +3839,18 @@ static void ath10k_core_register_work(st
@@ -3421,9 +3431,18 @@ static void ath10k_core_register_work(st
goto err_spectral_destroy;
}
......@@ -191,7 +191,7 @@ v13:
err_spectral_destroy:
ath10k_spectral_destroy(ar);
err_debug_destroy:
@@ -3891,6 +3910,8 @@ void ath10k_core_unregister(struct ath10
@@ -3481,6 +3500,8 @@ void ath10k_core_unregister(struct ath10
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
return;
......@@ -200,9 +200,9 @@ v13:
ath10k_thermal_unregister(ar);
/* Stop spectral before unregistering from mac80211 to remove the
* relayfs debugfs file cleanly. Otherwise the parent debugfs tree
--- a/ath10k-5.4/core.h
+++ b/ath10k-5.4/core.h
@@ -14,6 +14,7 @@
--- a/ath10k-4.19/core.h
+++ b/ath10k-4.19/core.h
@@ -25,6 +25,7 @@
#include <linux/pci.h>
#include <linux/uuid.h>
#include <linux/time.h>
......@@ -210,7 +210,15 @@ v13:
#include "htt.h"
#include "htc.h"
@@ -1469,6 +1470,13 @@ struct ath10k {
@@ -1138,7 +1139,6 @@ struct ath10k {
u32 low_5ghz_chan;
u32 high_5ghz_chan;
bool ani_enabled;
-
bool p2p;
bool ct_all_pkts_htt; /* CT firmware only: native-wifi for all pkts */
@@ -1389,6 +1389,13 @@ struct ath10k {
} testmode;
struct {
......@@ -224,9 +232,9 @@ v13:
/* protected by data_lock */
u32 fw_crash_counter;
u32 fw_warm_reset_counter;
--- a/ath10k-5.4/hw.h
+++ b/ath10k-5.4/hw.h
@@ -518,6 +518,7 @@ struct ath10k_hw_params {
--- a/ath10k-4.19/hw.h
+++ b/ath10k-4.19/hw.h
@@ -508,6 +508,7 @@ struct ath10k_hw_params {
const char *name;
u32 patch_load_addr;
int uart_pin;
......@@ -235,7 +243,7 @@ v13:
/* Type of hw cycle counter wraparound logic, for more info
--- /dev/null
+++ b/ath10k-5.4/leds.c
+++ b/ath10k-4.19/leds.c
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2005-2011 Atheros Communications Inc.
......@@ -341,7 +349,7 @@ v13:
+}
+
--- /dev/null
+++ b/ath10k-5.4/leds.h
+++ b/ath10k-4.19/leds.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
......@@ -384,9 +392,9 @@ v13:
+
+#endif
+#endif /* _LEDS_H_ */
--- a/ath10k-5.4/mac.c
+++ b/ath10k-5.4/mac.c
@@ -24,6 +24,7 @@
--- a/ath10k-4.19/mac.c
+++ b/ath10k-4.19/mac.c
@@ -34,6 +34,7 @@
#include "wmi-tlv.h"
#include "wmi-ops.h"
#include "wow.h"
......@@ -394,12 +402,12 @@ v13:
/*********/
/* Rates */
--- a/ath10k-5.4/wmi-ops.h
+++ b/ath10k-5.4/wmi-ops.h
--- a/ath10k-4.19/wmi-ops.h
+++ b/ath10k-4.19/wmi-ops.h
@@ -218,7 +218,10 @@ struct wmi_ops {
struct sk_buff *(*gen_bb_timing)
(struct ath10k *ar,
const struct wmi_bb_timing_cfg_arg *arg);
struct sk_buff *(*gen_echo)(struct ath10k *ar, u32 value);
struct sk_buff *(*gen_pdev_get_tpc_table_cmdid)(struct ath10k *ar,
u32 param);
+ struct sk_buff *(*gen_gpio_config)(struct ath10k *ar, u32 gpio_num,
+ u32 input, u32 pull_type, u32 intr_mode);
......@@ -407,7 +415,7 @@ v13:
};
int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
@@ -1105,6 +1108,35 @@ ath10k_wmi_force_fw_hang(struct ath10k *
@@ -1079,6 +1082,35 @@ ath10k_wmi_force_fw_hang(struct ath10k *
return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->force_fw_hang_cmdid);
}
......@@ -443,9 +451,9 @@ v13:
static inline int
ath10k_wmi_dbglog_cfg(struct ath10k *ar, u64 module_enable, u32 log_level)
{
--- a/ath10k-5.4/wmi-tlv.c
+++ b/ath10k-5.4/wmi-tlv.c
@@ -4364,6 +4364,8 @@ static const struct wmi_ops wmi_tlv_ops
--- a/ath10k-4.19/wmi-tlv.c
+++ b/ath10k-4.19/wmi-tlv.c
@@ -3976,6 +3976,8 @@ static const struct wmi_ops wmi_tlv_ops
.gen_echo = ath10k_wmi_tlv_op_gen_echo,
.gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf,
.gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable,
......@@ -454,9 +462,9 @@ v13:
};
static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
--- a/ath10k-5.4/wmi.c
+++ b/ath10k-5.4/wmi.c
@@ -8295,6 +8295,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
--- a/ath10k-4.19/wmi.c
+++ b/ath10k-4.19/wmi.c
@@ -8070,6 +8070,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
return skb;
}
......@@ -506,7 +514,7 @@ v13:
static struct sk_buff *
ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
enum wmi_sta_ps_mode psmode)
@@ -10094,6 +10137,9 @@ static const struct wmi_ops wmi_ops = {
@@ -9821,6 +9864,9 @@ static const struct wmi_ops wmi_ops = {
.fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill,
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
.gen_echo = ath10k_wmi_op_gen_echo,
......@@ -516,7 +524,7 @@ v13:
/* .gen_bcn_tmpl not implemented */
/* .gen_prb_tmpl not implemented */
/* .gen_p2p_go_bcn_ie not implemented */
@@ -10164,6 +10210,8 @@ static const struct wmi_ops wmi_10_1_ops
@@ -9891,6 +9937,8 @@ static const struct wmi_ops wmi_10_1_ops
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
.gen_echo = ath10k_wmi_op_gen_echo,
......@@ -525,7 +533,7 @@ v13:
/* .gen_bcn_tmpl not implemented */
/* .gen_prb_tmpl not implemented */
/* .gen_p2p_go_bcn_ie not implemented */
@@ -10243,6 +10291,8 @@ static const struct wmi_ops wmi_10_2_ops
@@ -9969,6 +10017,8 @@ static const struct wmi_ops wmi_10_2_ops
.gen_delba_send = ath10k_wmi_op_gen_delba_send,
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
......@@ -534,16 +542,16 @@ v13:
/* .gen_pdev_enable_adaptive_cca not implemented */
};
@@ -10314,6 +10364,8 @@ static const struct wmi_ops wmi_10_2_4_o
@@ -10039,6 +10089,8 @@ static const struct wmi_ops wmi_10_2_4_o
.gen_pdev_enable_adaptive_cca =
ath10k_wmi_op_gen_pdev_enable_adaptive_cca,
.get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype,
.gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing,
+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config,
+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output,
/* .gen_bcn_tmpl not implemented */
/* .gen_prb_tmpl not implemented */
/* .gen_p2p_go_bcn_ie not implemented */
@@ -10395,6 +10447,8 @@ static const struct wmi_ops wmi_10_4_ops
@@ -10119,6 +10171,8 @@ static const struct wmi_ops wmi_10_4_ops
.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info,
.gen_echo = ath10k_wmi_op_gen_echo,
.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config,
......@@ -552,9 +560,9 @@ v13:
};
int ath10k_wmi_attach(struct ath10k *ar)
--- a/ath10k-5.4/wmi.h
+++ b/ath10k-5.4/wmi.h
@@ -3110,6 +3110,41 @@ enum wmi_10_4_feature_mask {
--- a/ath10k-4.19/wmi.h
+++ b/ath10k-4.19/wmi.h
@@ -3084,6 +3084,41 @@ enum wmi_10_4_feature_mask {
};
......
......@@ -9,14 +9,14 @@ traffic.
Signed-off-by: Mathias Kresin <dev@kresin.me>
---
ath10k-5.4/core.h | 4 ++++
ath10k-5.4/leds.c | 4 +---
ath10k-5.4/mac.c | 2 +-
ath10k-4.16/core.h | 4 ++++
ath10k-4.16/leds.c | 4 +---
ath10k-4.16/mac.c | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
--- a/ath10k-5.4/core.h
+++ b/ath10k-5.4/core.h
@@ -1573,6 +1573,10 @@ struct ath10k {
--- a/ath10k-4.19/core.h
+++ b/ath10k-4.19/core.h
@@ -1488,6 +1488,10 @@ struct ath10k {
u8 csi_data[4096];
u16 csi_data_len;
......@@ -27,8 +27,8 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
/* must be last */
u8 drv_priv[0] __aligned(sizeof(void *));
};
--- a/ath10k-5.4/leds.c
+++ b/ath10k-5.4/leds.c
--- a/ath10k-4.19/leds.c
+++ b/ath10k-4.19/leds.c
@@ -81,9 +81,7 @@ int ath10k_leds_register(struct ath10k *
ar->leds.cdev.name = ar->leds.label;
......@@ -40,10 +40,10 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev);
if (ret)
--- a/ath10k-5.4/mac.c
+++ b/ath10k-5.4/mac.c
@@ -10367,7 +10367,7 @@ int ath10k_mac_register(struct ath10k *a
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
--- a/ath10k-4.19/mac.c
+++ b/ath10k-4.19/mac.c
@@ -9982,7 +9982,7 @@ int ath10k_mac_register(struct ath10k *a
wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
#ifdef CPTCFG_MAC80211_LEDS
- ieee80211_create_tpt_led_trigger(ar->hw,
......
From bbf0a8af2261bc7ae39b227ff6a1e9f45a008c27 Mon Sep 17 00:00:00 2001
From: Sven Eckelmann <sven.eckelmann@openmesh.com>
Date: Mon, 30 Jul 2018 17:31:41 +0200
Subject: [PATCH] ath10k: Limit available channels via DT ieee80211-freq-limit
Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special filters in
the RX and TX path. These filtered channel can in theory still be used by
the hardware but the signal strength is reduced so much that it makes no
sense.
There is already a DT property to limit the available channels but ath10k
has to manually call this functionality to limit the currrently set wiphy
channels further.
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
Forwarded: https://patchwork.kernel.org/patch/10549245/
---
drivers/net/wireless/ath/ath10k/mac.c | 2 ++
1 file changed, 2 insertions(+)
--- a/ath10k-4.19/mac.c
+++ b/ath10k-4.19/mac.c
@@ -18,6 +18,7 @@
#include "mac.h"
+#include <net/cfg80211.h>
#include <net/mac80211.h>
#include <linux/etherdevice.h>
#include <linux/acpi.h>
@@ -9706,6 +9707,7 @@ int ath10k_mac_register(struct ath10k *a
ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = band;
}
+ wiphy_read_of_freq_limits(ar->hw->wiphy);
ath10k_mac_setup_ht_vht_cap(ar);
ar->hw->wiphy->interface_modes =
--- a/ath10k-5.4/mac.c
+++ b/ath10k-5.4/mac.c
@@ -10180,6 +10180,7 @@ int ath10k_mac_register(struct ath10k *a
wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
wiphy_ext_feature_set(ar->hw->wiphy,
NL80211_EXT_FEATURE_SET_SCAN_DWELL);
+ wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_AQL);
if (test_bit(WMI_SERVICE_TX_DATA_ACK_RSSI, ar->wmi.svc_map) ||
test_bit(WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS, ar->wmi.svc_map))
--- a/ath10k-5.4/htt.h
+++ b/ath10k-5.4/htt.h
--- a/ath10k-4.19/htt.h
+++ b/ath10k-4.19/htt.h
@@ -237,7 +237,11 @@ enum htt_rx_ring_flags {
};
#define HTT_RX_RING_SIZE_MIN 128
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
#define HTT_RX_RING_SIZE_MAX 2048
+#else
+#define HTT_RX_RING_SIZE_MAX 512
+#endif
#define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
#define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
#define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
--- a/ath10k-5.2/htt.h
+++ b/ath10k-5.2/htt.h
@@ -225,7 +225,11 @@ enum htt_rx_ring_flags {
};
......
--- a/ath10k-5.4/pci.c
+++ b/ath10k-5.4/pci.c
--- a/ath10k-4.19/pci.c
+++ b/ath10k-4.19/pci.c
@@ -142,7 +142,11 @@ static struct ce_attr host_ce_config_wla
.flags = CE_ATTR_FLAGS,
.src_nentries = 0,
.src_sz_max = 2048,
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
.dest_nentries = 512,
+#else
+ .dest_nentries = 128,
+#endif
.recv_cb = ath10k_pci_htt_htc_rx_cb,
},
@@ -151,7 +155,11 @@ static struct ce_attr host_ce_config_wla
.flags = CE_ATTR_FLAGS,
.src_nentries = 0,
.src_sz_max = 2048,
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
.dest_nentries = 128,
+#else
+ .dest_nentries = 64,
+#endif
.recv_cb = ath10k_pci_htc_rx_cb,
},
@@ -178,7 +186,11 @@ static struct ce_attr host_ce_config_wla
.flags = CE_ATTR_FLAGS,
.src_nentries = 0,
.src_sz_max = 512,
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
.dest_nentries = 512,
+#else
+ .dest_nentries = 128,
+#endif
.recv_cb = ath10k_pci_htt_rx_cb,
},
@@ -203,7 +215,11 @@ static struct ce_attr host_ce_config_wla
.flags = CE_ATTR_FLAGS,
.src_nentries = 0,
.src_sz_max = 2048,
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
.dest_nentries = 128,
+#else
+ .dest_nentries = 96,
+#endif
.recv_cb = ath10k_pci_pktlog_rx_cb,
},
--- a/ath10k-5.2/pci.c
+++ b/ath10k-5.2/pci.c
@@ -131,7 +131,11 @@ static struct ce_attr host_ce_config_wla
.flags = CE_ATTR_FLAGS,
.src_nentries = 0,
......
......@@ -41,3 +41,24 @@ define KernelPackage/net-rtl8192su/description
endef
$(eval $(call KernelPackage,net-rtl8192su))
define KernelPackage/owl-loader
SUBMENU:=$(WIRELESS_MENU)
TITLE:=Owl loader for initializing Atheros PCI(e) Wifi chips
DEPENDS:=@PCI_SUPPORT
KCONFIG:=CONFIG_OWL_LOADER
FILES:=$(LINUX_DIR)/drivers/misc/owl-loader.ko
AUTOLOAD:=$(call AutoProbe,owl-loader)
endef
define KernelPackage/owl-loader/description
Kernel module that helps to initialize certain Qualcomm
Atheros' PCI(e) Wifi chips, which have the init data
(which contains the PCI device ID for example) stored
together with the calibration data in the file system.
This is necessary for devices like the Cisco Meraki Z1.
endef
$(eval $(call KernelPackage,owl-loader))
#
#
# Copyright (C) 2007-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
......
include $(TOPDIR)/rules.mk
PKG_NAME:=mt76
PKG_RELEASE=2
PKG_RELEASE=1
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2020-04-27
PKG_SOURCE_VERSION:=5f3ccc7226272198c21ec934d9072a56b0953f47
PKG_MIRROR_HASH:=6f1a7b7d7b9f4db79d72405baeafa318769eeab270fea4479756f91ac5a2494d
PKG_SOURCE_DATE:=2020-03-10
PKG_SOURCE_VERSION:=08054d5ab1350fcb8563feb90e6ab7f8f4a0a1b7
PKG_MIRROR_HASH:=b41a3cab1485c68befb1dcb4c1e426d41705db1b2a57851dafd6e8f75eeea3d7
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_BUILD_PARALLEL:=1
......@@ -143,7 +143,6 @@ define KernelPackage/mt7615e
TITLE:=MediaTek MT7615 wireless driver
DEPENDS+=@PCI_SUPPORT +kmod-mt76-core
FILES:=\
$(PKG_BUILD_DIR)/mt7615/mt7615-common.ko \
$(PKG_BUILD_DIR)/mt7615/mt7615e.ko
AUTOLOAD:=$(call AutoProbe,mt7615e)
endef
......@@ -192,19 +191,14 @@ ifdef CONFIG_PACKAGE_kmod-mt7603
PKG_MAKE_FLAGS += CONFIG_MT7603E=m
endif
ifdef CONFIG_PACKAGE_kmod-mt7615e
PKG_MAKE_FLAGS += CONFIG_MT7615_COMMON=m
PKG_MAKE_FLAGS += CONFIG_MT7615E=m
ifdef CONFIG_TARGET_mediatek_mt7622
PKG_MAKE_FLAGS += CONFIG_MT7622_WMAC=y
NOSTDINC_FLAGS += -DCONFIG_MT7622_WMAC
endif
endif
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
$(KERNEL_MAKE_FLAGS) \
$(PKG_MAKE_FLAGS) \
M="$(PKG_BUILD_DIR)" \
SUBDIRS="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
modules
endef
......@@ -257,9 +251,6 @@ define KernelPackage/mt7615e/install
$(PKG_BUILD_DIR)/firmware/mt7615_cr4.bin \
$(PKG_BUILD_DIR)/firmware/mt7615_n9.bin \
$(PKG_BUILD_DIR)/firmware/mt7615_rom_patch.bin \
$(if $(CONFIG_TARGET_mediatek_mt7622), \
$(PKG_BUILD_DIR)/firmware/mt7622_n9.bin \
$(PKG_BUILD_DIR)/firmware/mt7622_rom_patch.bin) \
$(1)/lib/firmware/mediatek
endef
......
......@@ -15,9 +15,9 @@ PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/kaloz/mwlwifi
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2020-02-06
PKG_SOURCE_VERSION:=a2fd00bb74c35820dfe233d762690c0433a87ef5
PKG_MIRROR_HASH:=0eda0e774a87e58e611d6436350e1cf2be3de50fddde334909a07a15b0c9862b
PKG_SOURCE_DATE:=2019-03-02
PKG_SOURCE_VERSION:=31d9386079b91cc699658c19294e139b62b512bc
PKG_MIRROR_HASH:=7bdd05765d8215a9c293cdcb028d63a04c9e55b337eaac9e8d3659bd86218321
PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
PKG_BUILD_PARALLEL:=1
......
From 182391a3c96ff6ad79bbba0758338a16a66abbd8 Mon Sep 17 00:00:00 2001
From: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Date: Wed, 12 Feb 2020 14:18:58 +0800
Subject: [PATCH] Fix driver loading with backports 5.3+
Commit 747796b2f126 did not solve the issue that it crashes when an older kernel
with a newer backport tries loading it, because it only detects kernel version.
As net/cfg80211.h in 5.3+ defines VENDOR_CMD_RAW_DATA, use it as a condition.
Signed-off-by: DENG Qingfang <dqfext@gmail.com>
---
vendor_cmd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/vendor_cmd.c
+++ b/vendor_cmd.c
@@ -92,7 +92,7 @@ static const struct wiphy_vendor_command
.subcmd = MWL_VENDOR_CMD_SET_BF_TYPE},
.flags = WIPHY_VENDOR_CMD_NEED_NETDEV,
.doit = mwl_vendor_cmd_set_bf_type,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0))
+#ifdef VENDOR_CMD_RAW_DATA
.policy = mwl_vendor_attr_policy,
#endif
},
@@ -101,7 +101,7 @@ static const struct wiphy_vendor_command
.subcmd = MWL_VENDOR_CMD_GET_BF_TYPE},
.flags = WIPHY_VENDOR_CMD_NEED_NETDEV,
.doit = mwl_vendor_cmd_get_bf_type,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0))
+#ifdef VENDOR_CMD_RAW_DATA
.policy = mwl_vendor_attr_policy,
#endif
}
......@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=iw
PKG_VERSION:=5.4
PKG_VERSION:=5.0.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/network/iw
PKG_HASH:=a2469f677088d7b1070a7fbb28f3c747041697e8f6ec70783339cb1bc27a395f
PKG_HASH:=1e38ea794a223525b2ea7fe78fd14f2a56121e62e21ba5f9dbe8c494b35b5c0d
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=GPL-2.0
......@@ -46,8 +46,7 @@ TARGET_CPPFLAGS:= \
-I$(STAGING_DIR)/usr/include/libnl-tiny \
$(TARGET_CPPFLAGS) \
-DCONFIG_LIBNL20 \
-D_GNU_SOURCE \
-flto
-D_GNU_SOURCE
ifeq ($(BUILD_VARIANT),full)
TARGET_CPPFLAGS += -DIW_FULL
......@@ -56,7 +55,7 @@ endif
MAKE_FLAGS += \
CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -ffunction-sections -fdata-sections" \
LDFLAGS="$(TARGET_LDFLAGS) -Wl,--gc-sections -flto" \
LDFLAGS="$(TARGET_LDFLAGS) -Wl,--gc-sections" \
NL1FOUND="" NL2FOUND=Y \
NLLIBNAME="libnl-tiny" \
LIBS="-lm -lnl-tiny" \
......
--- a/nl80211.h
+++ b/nl80211.h
@@ -2373,6 +2373,9 @@ enum nl80211_commands {
* the allowed channel bandwidth configurations. (u8 attribute)
* Defined by IEEE P802.11ay/D4.0 section 9.4.2.251, Table 13.
@@ -2299,6 +2299,12 @@ enum nl80211_commands {
* This is also used for capability advertisement in the wiphy information,
* with the appropriate sub-attributes.
*
+ * @NL80211_ATTR_AIRTIME_WEIGHT: Station's weight when scheduled by the airtime
+ * scheduler.
+ *
+ * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce
+ * transmit power to stay within regulatory limits. u32, dBi.
+ *
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2835,6 +2838,8 @@ enum nl80211_attrs {
NL80211_ATTR_WIPHY_EDMG_CHANNELS,
NL80211_ATTR_WIPHY_EDMG_BW_CONFIG,
@@ -2748,6 +2754,10 @@ enum nl80211_attrs {
NL80211_ATTR_PEER_MEASUREMENTS,
+ NL80211_ATTR_AIRTIME_WEIGHT,
+
+ NL80211_ATTR_WIPHY_ANTENNA_GAIN,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
@@ -5484,6 +5489,10 @@ enum nl80211_feature_flags {
* @NL80211_EXT_FEATURE_SAE_OFFLOAD: Device wants to do SAE authentication in
* station mode (SAE password is passed as part of the connect command).
*
+ * @NL80211_EXT_FEATURE_AQL: The driver supports the Airtime Queue Limit (AQL)
+ * feature, which prevents bufferbloat by using the expected transmission
+ * time to limit the amount of data buffered in the hardware.
+ *
* @NUM_NL80211_EXT_FEATURES: number of extended features.
* @MAX_NL80211_EXT_FEATURES: highest extended feature index.
@@ -3125,6 +3135,9 @@ enum nl80211_sta_bss_param {
* might not be fully accurate.
* @NL80211_STA_INFO_CONNECTED_TO_GATE: set to true if STA has a path to a
* mesh gate (u8, 0 or 1)
+ * @NL80211_STA_INFO_TX_DURATION: aggregate PPDU duration for all frames
+ * sent to the station (u64, usec)
+ * @NL80211_STA_INFO_AIRTIME_WEIGHT: current airtime weight for station (u16)
* @__NL80211_STA_INFO_AFTER_LAST: internal
* @NL80211_STA_INFO_MAX: highest possible station info attribute
*/
@@ -5529,6 +5538,8 @@ enum nl80211_ext_feature_index {
NL80211_EXT_FEATURE_EXT_KEY_ID,
NL80211_EXT_FEATURE_STA_TX_PWR,
NL80211_EXT_FEATURE_SAE_OFFLOAD,
+ NL80211_EXT_FEATURE_VLAN_OFFLOAD,
+ NL80211_EXT_FEATURE_AQL,
@@ -3168,6 +3181,8 @@ enum nl80211_sta_info {
NL80211_STA_INFO_RX_MPDUS,
NL80211_STA_INFO_FCS_ERROR_COUNT,
NL80211_STA_INFO_CONNECTED_TO_GATE,
+ NL80211_STA_INFO_TX_DURATION,
+ NL80211_STA_INFO_AIRTIME_WEIGHT,
/* add new features before the definition below */
NUM_NL80211_EXT_FEATURES,
/* keep last */
__NL80211_STA_INFO_AFTER_LAST,
--- a/phy.c
+++ b/phy.c
@@ -855,3 +855,30 @@ static int handle_get_txq(struct nl80211
@@ -843,3 +843,30 @@ static int handle_get_txq(struct nl80211
COMMAND(get, txq, "",
NL80211_CMD_GET_WIPHY, 0, CIB_PHY, handle_get_txq,
"Get TXQ parameters.");
......
--- a/survey.c
+++ b/survey.c
@@ -60,6 +60,9 @@ static int print_survey_handler(struct n
if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_RX])
printf("\tchannel receive time:\t\t%llu ms\n",
(unsigned long long)nla_get_u64(sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_RX]));
+ if (sinfo[NL80211_SURVEY_INFO_TIME_BSS_RX])
+ printf("\tchannel BSS receive time:\t%llu ms\n",
+ (unsigned long long)nla_get_u64(sinfo[NL80211_SURVEY_INFO_TIME_BSS_RX]));
if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_TX])
printf("\tchannel transmit time:\t\t%llu ms\n",
(unsigned long long)nla_get_u64(sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_TX]));
......@@ -38,23 +38,7 @@
--- a/info.c
+++ b/info.c
@@ -164,6 +164,7 @@ static int print_phy_handler(struct nl_m
tb_band[NL80211_BAND_ATTR_VHT_MCS_SET])
print_vht_info(nla_get_u32(tb_band[NL80211_BAND_ATTR_VHT_CAPA]),
nla_data(tb_band[NL80211_BAND_ATTR_VHT_MCS_SET]));
+#ifdef IW_FULL
if (tb_band[NL80211_BAND_ATTR_IFTYPE_DATA]) {
struct nlattr *nl_iftype;
int rem_band;
@@ -171,6 +172,7 @@ static int print_phy_handler(struct nl_m
nla_for_each_nested(nl_iftype, tb_band[NL80211_BAND_ATTR_IFTYPE_DATA], rem_band)
print_he_info(nl_iftype);
}
+#endif
if (tb_band[NL80211_BAND_ATTR_FREQS]) {
if (!band_had_freq) {
printf("\t\tFrequencies:\n");
@@ -213,6 +215,7 @@ next:
@@ -205,6 +205,7 @@ next:
}
}
......@@ -62,7 +46,7 @@
if (tb_band[NL80211_BAND_ATTR_RATES]) {
printf("\t\tBitrates (non-HT):\n");
nla_for_each_nested(nl_rate, tb_band[NL80211_BAND_ATTR_RATES], rem_rate) {
@@ -229,6 +232,7 @@ next:
@@ -221,6 +222,7 @@ next:
printf("\n");
}
}
......@@ -70,7 +54,7 @@
}
}
@@ -294,6 +298,7 @@ next:
@@ -286,6 +288,7 @@ next:
printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage);
}
......@@ -78,7 +62,7 @@
if (tb_msg[NL80211_ATTR_CIPHER_SUITES]) {
int num = nla_len(tb_msg[NL80211_ATTR_CIPHER_SUITES]) / sizeof(__u32);
int i;
@@ -305,6 +310,7 @@ next:
@@ -297,6 +300,7 @@ next:
cipher_name(ciphers[i]));
}
}
......@@ -86,7 +70,7 @@
if (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX] &&
tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX])
@@ -324,11 +330,13 @@ next:
@@ -316,11 +320,13 @@ next:
printf("\t\t * %s\n", iftype_name(nla_type(nl_mode)));
}
......@@ -100,7 +84,7 @@
if (tb_msg[NL80211_ATTR_INTERFACE_COMBINATIONS]) {
struct nlattr *nl_combi;
@@ -425,6 +433,7 @@ broken_combination:
@@ -417,6 +423,7 @@ broken_combination:
printf("\tinterface combinations are not supported\n");
}
......@@ -108,7 +92,7 @@
if (tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS]) {
printf("\tSupported commands:\n");
nla_for_each_nested(nl_cmd, tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS], rem_cmd)
@@ -522,6 +531,7 @@ broken_combination:
@@ -514,6 +521,7 @@ broken_combination:
printf("\t\t * wake up on TCP connection\n");
}
}
......@@ -116,7 +100,7 @@
if (tb_msg[NL80211_ATTR_ROAM_SUPPORT])
printf("\tDevice supports roaming.\n");
@@ -560,6 +570,7 @@ broken_combination:
@@ -552,6 +560,7 @@ broken_combination:
}
}
......@@ -124,7 +108,7 @@
if (tb_msg[NL80211_ATTR_FEATURE_FLAGS]) {
unsigned int features = nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]);
@@ -624,6 +635,7 @@ broken_combination:
@@ -616,6 +625,7 @@ broken_combination:
if (features & NL80211_FEATURE_ND_RANDOM_MAC_ADDR)
printf("\tDevice supports randomizing MAC-addr in net-detect scans.\n");
}
......@@ -132,7 +116,7 @@
if (tb_msg[NL80211_ATTR_TDLS_SUPPORT])
printf("\tDevice supports T-DLS.\n");
@@ -732,6 +744,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP
@@ -740,6 +750,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP
"List all wireless devices and their capabilities.");
TOPLEVEL(phy, NULL, NL80211_CMD_GET_WIPHY, NLM_F_DUMP, CIB_NONE, handle_info, NULL);
......@@ -140,7 +124,7 @@
static int handle_commands(struct nl80211_state *state, struct nl_msg *msg,
int argc, char **argv, enum id_input id)
{
@@ -743,6 +756,7 @@ static int handle_commands(struct nl8021
@@ -751,6 +762,7 @@ static int handle_commands(struct nl8021
}
TOPLEVEL(commands, NULL, NL80211_CMD_GET_WIPHY, 0, CIB_NONE, handle_commands,
"list all known commands and their decimal & hex value");
......@@ -150,7 +134,7 @@
{
--- a/scan.c
+++ b/scan.c
@@ -1195,6 +1195,9 @@ static void print_ht_op(const uint8_t ty
@@ -1197,6 +1197,9 @@ static void print_ht_op(const uint8_t ty
printf("\t\t * secondary channel offset: %s\n",
ht_secondary_offset[data[1] & 0x3]);
printf("\t\t * STA channel width: %s\n", sta_chan_width[(data[1] & 0x4)>>2]);
......@@ -160,7 +144,7 @@
printf("\t\t * RIFS: %d\n", (data[1] & 0x8)>>3);
printf("\t\t * HT protection: %s\n", protection[data[2] & 0x3]);
printf("\t\t * non-GF present: %d\n", (data[2] & 0x4) >> 2);
@@ -1522,6 +1525,14 @@ static void print_ie(const struct ie_pri
@@ -1524,6 +1527,14 @@ static void print_ie(const struct ie_pri
static const struct ie_print ieprinters[] = {
[0] = { "SSID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), },
......@@ -175,7 +159,7 @@
[1] = { "Supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), },
[3] = { "DS Parameter set", print_ds, 1, 1, BIT(PRINT_SCAN), },
[5] = { "TIM", print_tim, 4, 255, BIT(PRINT_SCAN), },
@@ -1531,21 +1542,15 @@ static const struct ie_print ieprinters[
@@ -1533,21 +1544,15 @@ static const struct ie_print ieprinters[
[32] = { "Power constraint", print_powerconstraint, 1, 1, BIT(PRINT_SCAN), },
[35] = { "TPC report", print_tpcreport, 2, 2, BIT(PRINT_SCAN), },
[42] = { "ERP", print_erp, 1, 255, BIT(PRINT_SCAN), },
......@@ -198,7 +182,7 @@
};
static void print_wifi_wpa(const uint8_t type, uint8_t len, const uint8_t *data,
@@ -2024,6 +2029,7 @@ void print_ies(unsigned char *ie, int ie
@@ -2026,6 +2031,7 @@ void print_ies(unsigned char *ie, int ie
ieprinters[ie[0]].flags & BIT(ptype)) {
print_ie(&ieprinters[ie[0]],
ie[0], ie[1], ie + 2, &ie_buffer);
......@@ -206,7 +190,7 @@
} else if (ie[0] == 221 /* vendor */) {
print_vendor(ie[1], ie + 2, unknown, ptype);
} else if (unknown) {
@@ -2033,6 +2039,7 @@ void print_ies(unsigned char *ie, int ie
@@ -2035,6 +2041,7 @@ void print_ies(unsigned char *ie, int ie
for (i=0; i<ie[1]; i++)
printf(" %.2x", ie[2+i]);
printf("\n");
......@@ -214,7 +198,7 @@
}
ielen -= ie[1] + 2;
ie += ie[1] + 2;
@@ -2073,6 +2080,7 @@ static void print_capa_non_dmg(__u16 cap
@@ -2075,6 +2082,7 @@ static void print_capa_non_dmg(__u16 cap
printf(" ESS");
if (capa & WLAN_CAPABILITY_IBSS)
printf(" IBSS");
......@@ -222,7 +206,7 @@
if (capa & WLAN_CAPABILITY_CF_POLLABLE)
printf(" CfPollable");
if (capa & WLAN_CAPABILITY_CF_POLL_REQUEST)
@@ -2101,6 +2109,7 @@ static void print_capa_non_dmg(__u16 cap
@@ -2103,6 +2111,7 @@ static void print_capa_non_dmg(__u16 cap
printf(" DelayedBACK");
if (capa & WLAN_CAPABILITY_IMM_BACK)
printf(" ImmediateBACK");
......@@ -230,7 +214,7 @@
}
static int print_bss_handler(struct nl_msg *msg, void *arg)
@@ -2185,8 +2194,10 @@ static int print_bss_handler(struct nl_m
@@ -2187,8 +2196,10 @@ static int print_bss_handler(struct nl_m
if (bss[NL80211_BSS_FREQUENCY]) {
int freq = nla_get_u32(bss[NL80211_BSS_FREQUENCY]);
printf("\tfreq: %d\n", freq);
......@@ -241,7 +225,7 @@
}
if (bss[NL80211_BSS_BEACON_INTERVAL])
printf("\tbeacon interval: %d TUs\n",
@@ -2380,6 +2391,7 @@ static int handle_stop_sched_scan(struct
@@ -2382,6 +2393,7 @@ static int handle_stop_sched_scan(struct
return 0;
}
......@@ -249,14 +233,14 @@
COMMAND(scan, sched_start,
SCHED_SCAN_OPTIONS,
NL80211_CMD_START_SCHED_SCAN, 0, CIB_NETDEV, handle_start_sched_scan,
@@ -2390,3 +2402,4 @@ COMMAND(scan, sched_start,
@@ -2392,3 +2404,4 @@ COMMAND(scan, sched_start,
COMMAND(scan, sched_stop, "",
NL80211_CMD_STOP_SCHED_SCAN, 0, CIB_NETDEV, handle_stop_sched_scan,
"Stop an ongoing scheduled scan.");
+#endif
--- a/util.c
+++ b/util.c
@@ -153,6 +153,7 @@ static const char *commands[NL80211_CMD_
@@ -289,6 +289,7 @@ static const char *commands[NL80211_CMD_
static char cmdbuf[100];
......@@ -264,7 +248,7 @@
const char *command_name(enum nl80211_commands cmd)
{
if (cmd <= NL80211_CMD_MAX && commands[cmd])
@@ -160,6 +161,7 @@ const char *command_name(enum nl80211_co
@@ -296,6 +297,7 @@ const char *command_name(enum nl80211_co
sprintf(cmdbuf, "Unknown command (%d)", cmd);
return cmdbuf;
}
......@@ -272,7 +256,7 @@
int ieee80211_channel_to_frequency(int chan, enum nl80211_band band)
{
@@ -298,6 +300,9 @@ int parse_keys(struct nl_msg *msg, char
@@ -434,6 +436,9 @@ int parse_keys(struct nl_msg *msg, char
char keybuf[13];
int pos = 0;
......@@ -284,9 +268,9 @@
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,12 @@ _OBJS := $(sort $(patsubst %.c,%.o,$(wil
VERSION_OBJS := $(filter-out version.o, $(_OBJS))
OBJS := $(VERSION_OBJS) version.o
@@ -31,6 +31,12 @@ OBJS-$(HWSIM) += hwsim.o
OBJS += $(OBJS-y) $(OBJS-Y)
+OBJS_FULL = ocb offch cqm wowlan coalesce roc p2p vendor mgmt ap sha256 nan bloom measurements ftm
+ifdef IW_FULL
......@@ -299,7 +283,7 @@
ifeq ($(NO_PKG_CONFIG),)
--- a/station.c
+++ b/station.c
@@ -759,10 +759,12 @@ static int handle_station_set_plink(stru
@@ -709,10 +709,12 @@ static int handle_station_set_plink(stru
nla_put_failure:
return -ENOBUFS;
}
......@@ -312,7 +296,7 @@
static int handle_station_set_vlan(struct nl80211_state *state,
struct nl_msg *msg,
@@ -857,11 +859,13 @@ static int handle_station_set_mesh_power
@@ -807,11 +809,13 @@ static int handle_station_set_mesh_power
nla_put_failure:
return -ENOBUFS;
}
......@@ -324,11 +308,11 @@
select_station_cmd, station_set_mesh_power_mode);
+#endif
static int handle_station_set_airtime_weight(struct nl80211_state *state,
struct nl_msg *msg,
static int handle_station_dump(struct nl80211_state *state,
struct nl_msg *msg,
--- a/interface.c
+++ b/interface.c
@@ -627,9 +627,11 @@ static int handle_interface_wds_peer(str
@@ -621,9 +621,11 @@ static int handle_interface_wds_peer(str
nla_put_failure:
return -ENOBUFS;
}
......@@ -340,7 +324,7 @@
static int set_mcast_rate(struct nl80211_state *state,
struct nl_msg *msg,
@@ -719,6 +721,7 @@ static int handle_chan(struct nl80211_st
@@ -713,6 +715,7 @@ static int handle_chan(struct nl80211_st
return handle_chanfreq(state, msg, true, argc, argv, id);
}
......@@ -348,22 +332,22 @@
SECTION(switch);
COMMAND(switch, freq,
"<freq> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons <count>] [block-tx]\n"
@@ -727,3 +730,4 @@ COMMAND(switch, freq,
@@ -721,3 +724,4 @@ COMMAND(switch, freq,
"Switch the operating channel by sending a channel switch announcement (CSA).");
COMMAND(switch, channel, "<channel> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons <count>] [block-tx]",
NL80211_CMD_CHANNEL_SWITCH, 0, CIB_NETDEV, handle_chan, NULL);
+#endif
--- a/phy.c
+++ b/phy.c
@@ -369,6 +369,7 @@ err_out:
free(cac_trigger_argv);
return err;
@@ -359,6 +359,7 @@ static int handle_cac(struct nl80211_sta
return 0;
}
+#ifdef IW_FULL
TOPLEVEL(cac, "channel <channel> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz]\n"
"freq <freq> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz]\n"
"freq <control freq> [5|10|20|40|80|80+80|160] [<center1_freq> [<center2_freq>]]",
@@ -380,6 +381,7 @@ COMMAND(cac, trigger,
@@ -370,6 +371,7 @@ COMMAND(cac, trigger,
NL80211_CMD_RADAR_DETECT, 0, CIB_NETDEV, handle_cac_trigger,
"Start or trigger a channel availability check (CAC) looking to look for\n"
"radars on the given channel.");
......
......@@ -11,9 +11,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git
PKG_SOURCE_DATE:=2020-03-22
PKG_SOURCE_VERSION:=9f5a7c4f9b78cb2de8fe5dd7af55bf0221706402
PKG_MIRROR_HASH:=d62cae4b3d2f65c189f179c3dabf1c8c244c5de801439c483ea87dcf8e85b476
PKG_SOURCE_DATE:=2019-10-16
PKG_SOURCE_VERSION:=07315b6fdb2566a8626d8a1e4de76eb30456fe17
PKG_MIRROR_HASH:=924914a51b8a668779e41dc2f40adfc1ae51846ea8b013de3e45999b4d04eecd
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=GPL-2.0
......@@ -33,7 +33,7 @@ define Package/libiwinfo
CATEGORY:=Libraries
TITLE:=Generalized Wireless Information Library (iwinfo)
DEPENDS:=+PACKAGE_kmod-cfg80211:libnl-tiny +libuci +libubus
ABI_VERSION:=20200105
ABI_VERSION:=20181126
endef
define Package/libiwinfo/description
......
......@@ -12,16 +12,15 @@ PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git
PKG_SOURCE_DATE:=2020-01-05
PKG_SOURCE_VERSION:=efe51f41d6288fa8503cc4f2efb37a777767d505
PKG_SOURCE_DATE:=2019-12-10
PKG_SOURCE_VERSION:=aaa08366e6384d9933a405d1218b03c1b167f9e5
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_MIRROR_HASH:=cf4bd4670ce8d49f5fb97f0e74a817324c1a503c90527282e30365d8b9a2e17a
PKG_MIRROR_HASH:=9b126ab4af26e5bd16e21175ccc24318e0a98afaf60f14199cebd4ec50ed2d8f
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=
PKG_BUILD_PARALLEL:=1
PKG_ASLR_PIE_REGULAR:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
......
......@@ -19,3 +19,7 @@ start_service() {
reload_service() {
procd_send_signal rpcd
}
service_running() {
procd_running rpcd
}
From: Alexander Duyck <alexander.h.duyck@intel.com>
Date: Tue, 10 Jan 2017 16:58:06 -0800
Subject: [PATCH] mm: rename __alloc_page_frag to page_frag_alloc and
__free_page_frag to page_frag_free
Patch series "Page fragment updates", v4.
This patch series takes care of a few cleanups for the page fragments
API.
First we do some renames so that things are much more consistent. First
we move the page_frag_ portion of the name to the front of the functions
names. Secondly we split out the cache specific functions from the
other page fragment functions by adding the word "cache" to the name.
Finally I added a bit of documentation that will hopefully help to
explain some of this. I plan to revisit this later as we get things
more ironed out in the near future with the changes planned for the DMA
setup to support eXpress Data Path.
This patch (of 3):
This patch renames the page frag functions to be more consistent with
other APIs. Specifically we place the name page_frag first in the name
and then have either an alloc or free call name that we append as the
suffix. This makes it a bit clearer in terms of naming.
In addition we drop the leading double underscores since we are
technically no longer a backing interface and instead the front end that
is called from the networking APIs.
Link: http://lkml.kernel.org/r/20170104023854.13451.67390.stgit@localhost.localdomain
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -531,9 +531,9 @@ extern void free_hot_cold_page_list(stru
struct page_frag_cache;
extern void __page_frag_drain(struct page *page, unsigned int order,
unsigned int count);
-extern void *__alloc_page_frag(struct page_frag_cache *nc,
- unsigned int fragsz, gfp_t gfp_mask);
-extern void __free_page_frag(void *addr);
+extern void *page_frag_alloc(struct page_frag_cache *nc,
+ unsigned int fragsz, gfp_t gfp_mask);
+extern void page_frag_free(void *addr);
#define __free_page(page) __free_pages((page), 0)
#define free_page(addr) free_pages((addr), 0)
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2477,7 +2477,7 @@ static inline struct sk_buff *netdev_all
static inline void skb_free_frag(void *addr)
{
- __free_page_frag(addr);
+ page_frag_free(addr);
}
void *napi_alloc_frag(unsigned int fragsz);
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3949,8 +3949,8 @@ void __page_frag_drain(struct page *page
}
EXPORT_SYMBOL(__page_frag_drain);
-void *__alloc_page_frag(struct page_frag_cache *nc,
- unsigned int fragsz, gfp_t gfp_mask)
+void *page_frag_alloc(struct page_frag_cache *nc,
+ unsigned int fragsz, gfp_t gfp_mask)
{
unsigned int size = PAGE_SIZE;
struct page *page;
@@ -4001,19 +4001,19 @@ refill:
return nc->va + offset;
}
-EXPORT_SYMBOL(__alloc_page_frag);
+EXPORT_SYMBOL(page_frag_alloc);
/*
* Frees a page fragment allocated out of either a compound or order 0 page.
*/
-void __free_page_frag(void *addr)
+void page_frag_free(void *addr)
{
struct page *page = virt_to_head_page(addr);
if (unlikely(put_page_testzero(page)))
__free_pages_ok(page, compound_order(page));
}
-EXPORT_SYMBOL(__free_page_frag);
+EXPORT_SYMBOL(page_frag_free);
static void *make_alloc_exact(unsigned long addr, unsigned int order,
size_t size)
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -369,7 +369,7 @@ static void *__netdev_alloc_frag(unsigne
local_irq_save(flags);
nc = this_cpu_ptr(&netdev_alloc_cache);
- data = __alloc_page_frag(nc, fragsz, gfp_mask);
+ data = page_frag_alloc(nc, fragsz, gfp_mask);
local_irq_restore(flags);
return data;
}
@@ -393,7 +393,7 @@ static void *__napi_alloc_frag(unsigned
{
struct napi_alloc_cache *nc = this_cpu_ptr(&napi_alloc_cache);
- return __alloc_page_frag(&nc->page, fragsz, gfp_mask);
+ return page_frag_alloc(&nc->page, fragsz, gfp_mask);
}
void *napi_alloc_frag(unsigned int fragsz)
@@ -445,7 +445,7 @@ struct sk_buff *__netdev_alloc_skb(struc
local_irq_save(flags);
nc = this_cpu_ptr(&netdev_alloc_cache);
- data = __alloc_page_frag(nc, len, gfp_mask);
+ data = page_frag_alloc(nc, len, gfp_mask);
pfmemalloc = nc->pfmemalloc;
local_irq_restore(flags);
@@ -509,7 +509,7 @@ struct sk_buff *__napi_alloc_skb(struct
if (sk_memalloc_socks())
gfp_mask |= __GFP_MEMALLOC;
- data = __alloc_page_frag(&nc->page, len, gfp_mask);
+ data = page_frag_alloc(&nc->page, len, gfp_mask);
if (unlikely(!data))
return NULL;
From: Alexander Duyck <alexander.h.duyck@intel.com>
Date: Tue, 10 Jan 2017 16:58:09 -0800
Subject: [PATCH] mm: rename __page_frag functions to __page_frag_cache, drop
order from drain
This patch does two things.
First it goes through and renames the __page_frag prefixed functions to
__page_frag_cache so that we can be clear that we are draining or
refilling the cache, not the frags themselves.
Second we drop the order parameter from __page_frag_cache_drain since we
don't actually need to pass it since all fragments are either order 0 or
must be a compound page.
Link: http://lkml.kernel.org/r/20170104023954.13451.5678.stgit@localhost.localdomain
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -529,8 +529,7 @@ extern void free_hot_cold_page(struct pa
extern void free_hot_cold_page_list(struct list_head *list, bool cold);
struct page_frag_cache;
-extern void __page_frag_drain(struct page *page, unsigned int order,
- unsigned int count);
+extern void __page_frag_cache_drain(struct page *page, unsigned int count);
extern void *page_frag_alloc(struct page_frag_cache *nc,
unsigned int fragsz, gfp_t gfp_mask);
extern void page_frag_free(void *addr);
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3914,8 +3914,8 @@ EXPORT_SYMBOL(free_pages);
* drivers to provide a backing region of memory for use as either an
* sk_buff->head, or to be used in the "frags" portion of skb_shared_info.
*/
-static struct page *__page_frag_refill(struct page_frag_cache *nc,
- gfp_t gfp_mask)
+static struct page *__page_frag_cache_refill(struct page_frag_cache *nc,
+ gfp_t gfp_mask)
{
struct page *page = NULL;
gfp_t gfp = gfp_mask;
@@ -3935,19 +3935,20 @@ static struct page *__page_frag_refill(s
return page;
}
-void __page_frag_drain(struct page *page, unsigned int order,
- unsigned int count)
+void __page_frag_cache_drain(struct page *page, unsigned int count)
{
VM_BUG_ON_PAGE(page_ref_count(page) == 0, page);
if (page_ref_sub_and_test(page, count)) {
+ unsigned int order = compound_order(page);
+
if (order == 0)
free_hot_cold_page(page, false);
else
__free_pages_ok(page, order);
}
}
-EXPORT_SYMBOL(__page_frag_drain);
+EXPORT_SYMBOL(__page_frag_cache_drain);
void *page_frag_alloc(struct page_frag_cache *nc,
unsigned int fragsz, gfp_t gfp_mask)
@@ -3958,7 +3959,7 @@ void *page_frag_alloc(struct page_frag_c
if (unlikely(!nc->va)) {
refill:
- page = __page_frag_refill(nc, gfp_mask);
+ page = __page_frag_cache_refill(nc, gfp_mask);
if (!page)
return NULL;
/*
* Initialize Owl Emulation Devices
*
* Copyright (C) 2016 Christian Lamparter <chunkeey@googlemail.com>
* Copyright (C) 2016 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
*
* 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 published
* by the Free Software Foundation.
*
* Some devices (like the Cisco Meraki Z1 Cloud Managed Teleworker Gateway)
* need to be able to initialize the PCIe wifi device. Normally, this is done
* during the early stages of booting linux, because the necessary init code
* is read from the memory mapped SPI and passed to pci_enable_ath9k_fixup.
* However,this isn't possible for devices which have the init code for the
* Atheros chip stored on NAND. Hence, this module can be used to initialze
* the chip when the user-space is ready to extract the init code.
*/
#include <linux/module.h>
#include <linux/version.h>
#include <linux/completion.h>
#include <linux/etherdevice.h>
#include <linux/firmware.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/ath9k_platform.h>
struct owl_ctx {
struct completion eeprom_load;
};
#define EEPROM_FILENAME_LEN 100
#define AR5416_EEPROM_MAGIC 0xa55a
static int ath9k_pci_fixup(struct pci_dev *pdev, const u16 *cal_data,
size_t cal_len)
{
void __iomem *mem;
const void *cal_end = (void *)cal_data + cal_len;
const struct {
__be16 reg;
__be16 low_val;
__be16 high_val;
} __packed *data;
u16 cmd;
u32 bar0;
bool swap_needed = false;
if (*cal_data != AR5416_EEPROM_MAGIC) {
if (*cal_data != swab16(AR5416_EEPROM_MAGIC)) {
dev_err(&pdev->dev, "invalid calibration data\n");
return -EINVAL;
}
dev_dbg(&pdev->dev, "calibration data needs swapping\n");
swap_needed = true;
}
dev_info(&pdev->dev, "fixup device configuration\n");
mem = pcim_iomap(pdev, 0, 0);
if (!mem) {
dev_err(&pdev->dev, "ioremap error\n");
return -EINVAL;
}
pci_read_config_dword(pdev, PCI_BASE_ADDRESS_0, &bar0);
pci_write_config_dword(pdev, PCI_BASE_ADDRESS_0,
pci_resource_start(pdev, 0));
pci_read_config_word(pdev, PCI_COMMAND, &cmd);
cmd |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
pci_write_config_word(pdev, PCI_COMMAND, cmd);
/* set pointer to first reg address */
for (data = (const void *) (cal_data + 3);
(const void *) data <= cal_end && data->reg != cpu_to_be16(~0);
data++) {
u32 val;
u16 reg;
reg = data->reg;
val = data->low_val;
val |= data->high_val << 16;
if (swap_needed) {
reg = swab16(reg);
val = swahb32(val);
}
#ifdef CONFIG_LANTIQ
val = swab32(val);
#endif
__raw_writel(val, mem + reg);
udelay(100);
}
pci_read_config_word(pdev, PCI_COMMAND, &cmd);
cmd &= ~(PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY);
pci_write_config_word(pdev, PCI_COMMAND, cmd);
pci_write_config_dword(pdev, PCI_BASE_ADDRESS_0, bar0);
pcim_iounmap(pdev, mem);
pci_disable_device(pdev);
return 0;
}
static void owl_fw_cb(const struct firmware *fw, void *context)
{
struct pci_dev *pdev = (struct pci_dev *) context;
struct owl_ctx *ctx = (struct owl_ctx *) pci_get_drvdata(pdev);
struct ath9k_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct pci_bus *bus;
complete(&ctx->eeprom_load);
if (!fw) {
dev_err(&pdev->dev, "no eeprom data received.\n");
goto release;
}
/* also note that we are doing *u16 operations on the file */
if (fw->size > sizeof(pdata->eeprom_data) || fw->size < 0x200 ||
(fw->size & 1) == 1) {
dev_err(&pdev->dev, "eeprom file has an invalid size.\n");
goto release;
}
if (pdata) {
memcpy(pdata->eeprom_data, fw->data, fw->size);
/*
* eeprom has been successfully loaded - pass the data to ath9k
* but remove the eeprom_name, so it doesn't try to load it too.
*/
pdata->eeprom_name = NULL;
}
if (ath9k_pci_fixup(pdev, (const u16 *) fw->data, fw->size))
goto release;
pci_lock_rescan_remove();
bus = pdev->bus;
pci_stop_and_remove_bus_device(pdev);
/*
* the device should come back with the proper
* ProductId. But we have to initiate a rescan.
*/
pci_rescan_bus(bus);
pci_unlock_rescan_remove();
release:
release_firmware(fw);
}
static const char *owl_get_eeprom_name(struct pci_dev *pdev)
{
struct device *dev = &pdev->dev;
struct ath9k_platform_data *pdata;
char *eeprom_name;
/* try the existing platform data first */
pdata = dev_get_platdata(dev);
if (pdata && pdata->eeprom_name)
return pdata->eeprom_name;
dev_dbg(dev, "using auto-generated eeprom filename\n");
eeprom_name = devm_kzalloc(dev, EEPROM_FILENAME_LEN, GFP_KERNEL);
if (!eeprom_name)
return NULL;
/* this should match the pattern used in ath9k/init.c */
scnprintf(eeprom_name, EEPROM_FILENAME_LEN, "ath9k-eeprom-pci-%s.bin",
dev_name(dev));
return eeprom_name;
}
static int owl_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{
struct owl_ctx *ctx;
const char *eeprom_name;
int err = 0;
if (pcim_enable_device(pdev))
return -EIO;
pcim_pin_device(pdev);
eeprom_name = owl_get_eeprom_name(pdev);
if (!eeprom_name) {
dev_err(&pdev->dev, "no eeprom filename found.\n");
return -ENODEV;
}
ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
if (!ctx) {
dev_err(&pdev->dev, "failed to alloc device context.\n");
return -ENOMEM;
}
init_completion(&ctx->eeprom_load);
pci_set_drvdata(pdev, ctx);
err = request_firmware_nowait(THIS_MODULE, true, eeprom_name,
&pdev->dev, GFP_KERNEL, pdev, owl_fw_cb);
if (err) {
dev_err(&pdev->dev, "failed to request caldata (%d).\n", err);
kfree(ctx);
}
return err;
}
static void owl_remove(struct pci_dev *pdev)
{
struct owl_ctx *ctx = pci_get_drvdata(pdev);
if (ctx) {
wait_for_completion(&ctx->eeprom_load);
pci_set_drvdata(pdev, NULL);
kfree(ctx);
}
}
static const struct pci_device_id owl_pci_table[] = {
{ PCI_VDEVICE(ATHEROS, 0xff1c) }, /* PCIe */
{ PCI_VDEVICE(ATHEROS, 0xff1d) }, /* PCI */
{ },
};
MODULE_DEVICE_TABLE(pci, owl_pci_table);
static struct pci_driver owl_driver = {
.name = "owl-loader",
.id_table = owl_pci_table,
.probe = owl_probe,
.remove = owl_remove,
};
module_pci_driver(owl_driver);
MODULE_AUTHOR("Christian Lamparter <chunkeey@googlemail.com>");
MODULE_DESCRIPTION("Initializes Atheros' Owl Emulation devices");
MODULE_LICENSE("GPL v2");
From dd36f935973d91644449bd9749f6062a2bed821b Mon Sep 17 00:00:00 2001
From: Christian Lamparter <chunkeey@googlemail.com>
Date: Fri, 7 Jul 2017 17:26:46 +0200
Subject: misc: owl-loader for delayed Atheros ath9k fixup
Some devices (like the Cisco Meraki Z1 Cloud Managed Teleworker Gateway)
need to be able to initialize the PCIe wifi device. Normally, this is done
during the early stages of booting linux, because the necessary init code
is read from the memory mapped SPI and passed to pci_enable_ath9k_fixup.
However,this isn't possible for devices which have the init code for the
Atheros chip stored on NAND in an UBI volume. Hence, this module can be
used to initialze the chip when the user-space is ready to extract the
init code.
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
---
drivers/misc/Kconfig | 12 ++++++++++++
drivers/misc/Makefile | 1 +
2 files changed, 13 insertions(+)
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -151,6 +151,18 @@ config SGI_IOC4
If you have an SGI Altix with an IOC4-based card say Y.
Otherwise say N.
+config OWL_LOADER
+ tristate "Owl loader for initializing Atheros PCI(e) Wifi chips"
+ depends on PCI
+ ---help---
+ This kernel module helps to initialize certain Qualcomm
+ Atheros' PCI(e) Wifi chips, which have the init data
+ (which contains the PCI device ID for example) stored
+ together with the calibration data in the file system.
+
+ This is necessary for devices like the Cisco Meraki Z1, say M.
+ Otherwise say N.
+
config TIFM_CORE
tristate "TI Flash Media interface support"
depends on PCI
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -13,6 +13,7 @@ obj-$(CONFIG_ATMEL_TCLIB) += atmel_tclib
obj-$(CONFIG_DUMMY_IRQ) += dummy-irq.o
obj-$(CONFIG_ICS932S401) += ics932s401.o
obj-$(CONFIG_LKDTM) += lkdtm.o
+obj-$(CONFIG_OWL_LOADER) += owl-loader.o
obj-$(CONFIG_TIFM_CORE) += tifm_core.o
obj-$(CONFIG_TIFM_7XX1) += tifm_7xx1.o
obj-$(CONFIG_PHANTOM) += phantom.o
From dd36f935973d91644449bd9749f6062a2bed821b Mon Sep 17 00:00:00 2001
From: Christian Lamparter <chunkeey@googlemail.com>
Date: Fri, 7 Jul 2017 17:26:46 +0200
Subject: misc: owl-loader for delayed Atheros ath9k fixup
Some devices (like the Cisco Meraki Z1 Cloud Managed Teleworker Gateway)
need to be able to initialize the PCIe wifi device. Normally, this is done
during the early stages of booting linux, because the necessary init code
is read from the memory mapped SPI and passed to pci_enable_ath9k_fixup.
However,this isn't possible for devices which have the init code for the
Atheros chip stored on NAND in an UBI volume. Hence, this module can be
used to initialze the chip when the user-space is ready to extract the
init code.
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
---
drivers/misc/Kconfig | 12 ++++++++++++
drivers/misc/Makefile | 1 +
2 files changed, 13 insertions(+)
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -164,6 +164,18 @@ config SGI_IOC4
If you have an SGI Altix with an IOC4-based card say Y.
Otherwise say N.
+config OWL_LOADER
+ tristate "Owl loader for initializing Atheros PCI(e) Wifi chips"
+ depends on PCI
+ ---help---
+ This kernel module helps to initialize certain Qualcomm
+ Atheros' PCI(e) Wifi chips, which have the init data
+ (which contains the PCI device ID for example) stored
+ together with the calibration data in the file system.
+
+ This is necessary for devices like the Cisco Meraki Z1, say M.
+ Otherwise say N.
+
config TIFM_CORE
tristate "TI Flash Media interface support"
depends on PCI
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -14,6 +14,7 @@ obj-$(CONFIG_ATMEL_TCLIB) += atmel_tclib
obj-$(CONFIG_DUMMY_IRQ) += dummy-irq.o
obj-$(CONFIG_ICS932S401) += ics932s401.o
obj-$(CONFIG_LKDTM) += lkdtm/
+obj-$(CONFIG_OWL_LOADER) += owl-loader.o
obj-$(CONFIG_TIFM_CORE) += tifm_core.o
obj-$(CONFIG_TIFM_7XX1) += tifm_7xx1.o
obj-$(CONFIG_PHANTOM) += phantom.o
From fd66884da2f96d2a7ea73f58b1b86251b959a913 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Fri, 7 Jul 2017 16:56:19 +0200
Subject: kernel: strip unnecessary symbol table information from kernel modules
reduces default squashfs size on ar71xx by about 4k
lede-commit: 058d331a39077f159ca8922f1f422a1346d6aa67
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/Makefile
+++ b/Makefile
@@ -398,7 +398,7 @@ KBUILD_AFLAGS_KERNEL :=
KBUILD_CFLAGS_KERNEL :=
KBUILD_AFLAGS_MODULE := -DMODULE
KBUILD_CFLAGS_MODULE := -DMODULE
-KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
+KBUILD_LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds $(if $(CONFIG_PROFILING),,-s)
GCC_PLUGINS_CFLAGS :=
CLANG_FLAGS :=
......@@ -7,8 +7,9 @@ When bridging, do not forward EAP frames to other ports, only deliver
them locally, regardless of the state.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
[add disable_eap_hack sysfs attribute]
Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
---
net/bridge/br_input.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
......@@ -18,7 +19,7 @@ Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
+ BR_INPUT_SKB_CB(skb)->brdev = br->dev;
+
+ if (skb->protocol == htons(ETH_P_PAE) && !br->disable_eap_hack)
+ if (skb->protocol == htons(ETH_P_PAE))
+ return br_pass_frame_up(skb);
+
if (p->state == BR_STATE_LEARNING)
......@@ -29,55 +30,3 @@ Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
if (IS_ENABLED(CONFIG_INET) && skb->protocol == htons(ETH_P_ARP))
br_do_proxy_arp(skb, br, vid, p);
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -295,6 +295,8 @@ struct net_bridge
u16 group_fwd_mask;
u16 group_fwd_mask_required;
+ bool disable_eap_hack;
+
/* STP */
bridge_id designated_root;
bridge_id bridge_id;
--- a/net/bridge/br_sysfs_br.c
+++ b/net/bridge/br_sysfs_br.c
@@ -169,6 +169,30 @@ static ssize_t group_fwd_mask_store(stru
}
static DEVICE_ATTR_RW(group_fwd_mask);
+static ssize_t disable_eap_hack_show(struct device *d,
+ struct device_attribute *attr,
+ char *buf)
+{
+ struct net_bridge *br = to_bridge(d);
+ return sprintf(buf, "%u\n", br->disable_eap_hack);
+}
+
+static int set_disable_eap_hack(struct net_bridge *br, unsigned long val)
+{
+ br->disable_eap_hack = !!val;
+
+ return 0;
+}
+
+static ssize_t disable_eap_hack_store(struct device *d,
+ struct device_attribute *attr,
+ const char *buf,
+ size_t len)
+{
+ return store_bridge_parm(d, buf, len, set_disable_eap_hack);
+}
+static DEVICE_ATTR_RW(disable_eap_hack);
+
static ssize_t priority_show(struct device *d, struct device_attribute *attr,
char *buf)
{
@@ -780,6 +804,7 @@ static struct attribute *bridge_attrs[]
&dev_attr_ageing_time.attr,
&dev_attr_stp_state.attr,
&dev_attr_group_fwd_mask.attr,
+ &dev_attr_disable_eap_hack.attr,
&dev_attr_priority.attr,
&dev_attr_bridge_id.attr,
&dev_attr_root_id.attr,
From dd36f935973d91644449bd9749f6062a2bed821b Mon Sep 17 00:00:00 2001
From: Christian Lamparter <chunkeey@googlemail.com>
Date: Fri, 7 Jul 2017 17:26:46 +0200
Subject: misc: owl-loader for delayed Atheros ath9k fixup
Some devices (like the Cisco Meraki Z1 Cloud Managed Teleworker Gateway)
need to be able to initialize the PCIe wifi device. Normally, this is done
during the early stages of booting linux, because the necessary init code
is read from the memory mapped SPI and passed to pci_enable_ath9k_fixup.
However,this isn't possible for devices which have the init code for the
Atheros chip stored on NAND in an UBI volume. Hence, this module can be
used to initialze the chip when the user-space is ready to extract the
init code.
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
---
drivers/misc/Kconfig | 12 ++++++++++++
drivers/misc/Makefile | 1 +
2 files changed, 13 insertions(+)
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -151,6 +151,18 @@ config SGI_IOC4
If you have an SGI Altix with an IOC4-based card say Y.
Otherwise say N.
+config OWL_LOADER
+ tristate "Owl loader for initializing Atheros PCI(e) Wifi chips"
+ depends on PCI
+ ---help---
+ This kernel module helps to initialize certain Qualcomm
+ Atheros' PCI(e) Wifi chips, which have the init data
+ (which contains the PCI device ID for example) stored
+ together with the calibration data in the file system.
+
+ This is necessary for devices like the Cisco Meraki Z1, say M.
+ Otherwise say N.
+
config TIFM_CORE
tristate "TI Flash Media interface support"
depends on PCI
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_ATMEL_TCLIB) += atmel_tclib
obj-$(CONFIG_DUMMY_IRQ) += dummy-irq.o
obj-$(CONFIG_ICS932S401) += ics932s401.o
obj-$(CONFIG_LKDTM) += lkdtm.o
+obj-$(CONFIG_OWL_LOADER) += owl-loader.o
obj-$(CONFIG_TIFM_CORE) += tifm_core.o
obj-$(CONFIG_TIFM_7XX1) += tifm_7xx1.o
obj-$(CONFIG_PHANTOM) += phantom.o
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册