Compare commits
85 Commits
v19.07.0-r
...
v19.07.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aca39acedf | ||
|
|
a3ffeb413b | ||
|
|
f58705b77e | ||
|
|
54711e528d | ||
|
|
abb0665bec | ||
|
|
e9929ebeea | ||
|
|
dc399c4e12 | ||
|
|
a5653ec87e | ||
|
|
6395ac4126 | ||
|
|
f3439c4019 | ||
|
|
64c45d95d6 | ||
|
|
04fd5e22b2 | ||
|
|
bf99f79200 | ||
|
|
3140d38042 | ||
|
|
3c11032039 | ||
|
|
3fc47dd443 | ||
|
|
330046922b | ||
|
|
084dfb8ebd | ||
|
|
f8543adb14 | ||
|
|
bce5342fb6 | ||
|
|
594f731e04 | ||
|
|
037a151c56 | ||
|
|
3e8b66e0da | ||
|
|
80e0b97d07 | ||
|
|
a2e2c40b5e | ||
|
|
1f927bd2f0 | ||
|
|
7ab5dc77b2 | ||
|
|
ad4b939bd0 | ||
|
|
91dde4291c | ||
|
|
30301dfcf0 | ||
|
|
da7dde8993 | ||
|
|
62d5ece70b | ||
|
|
94153971bb | ||
|
|
d13c6d078e | ||
|
|
f80272dd9c | ||
|
|
3030abfa7e | ||
|
|
36057763fa | ||
|
|
450b306e54 | ||
|
|
e50d44d985 | ||
|
|
6a151d6558 | ||
|
|
43c5927312 | ||
|
|
f7779d64ba | ||
|
|
ab7386bd67 | ||
|
|
c34499a6e4 | ||
|
|
7203a58d7b | ||
|
|
0c07224b5a | ||
|
|
4fba5dc103 | ||
|
|
df45ef5436 | ||
|
|
6351205d73 | ||
|
|
d2e87c7800 | ||
|
|
a7d880e830 | ||
|
|
3a863da268 | ||
|
|
18107f4481 | ||
|
|
414ea30927 | ||
|
|
27eea24921 | ||
|
|
9bdd3d39ad | ||
|
|
08c850f046 | ||
|
|
2c16044ccf | ||
|
|
c0f2905fa9 | ||
|
|
3243523c46 | ||
|
|
d0a71a89e1 | ||
|
|
9e6fb4463b | ||
|
|
4aebbaeac1 | ||
|
|
a2ac5b3a97 | ||
|
|
a467f39e55 | ||
|
|
a77d4bc3a5 | ||
|
|
40a7e761a0 | ||
|
|
852ec97e1c | ||
|
|
1f1867dd9b | ||
|
|
03c93679b4 | ||
|
|
795df80917 | ||
|
|
3959f11005 | ||
|
|
a50c2190d3 | ||
|
|
929c6d733a | ||
|
|
e8e09c5893 | ||
|
|
6e24df296c | ||
|
|
52c9f95178 | ||
|
|
e33a123140 | ||
|
|
d1d84da1c3 | ||
|
|
fa700ed714 | ||
|
|
0bb4733e67 | ||
|
|
c3cc419cc6 | ||
|
|
d2d12346e8 | ||
|
|
06bf1a9b67 | ||
|
|
d74526c1c5 |
@@ -1,4 +1,4 @@
|
||||
src-git packages https://git.openwrt.org/feed/packages.git^00803ffc91e80b16e9c1603ff32106d42e255923
|
||||
src-git luci https://git.openwrt.org/project/luci.git^039ef1f4deba725d3591b159bbc9569885d68131
|
||||
src-git routing https://git.openwrt.org/feed/routing.git^8d5ee29f088e9dfaa49dc74573edb1919f14dbf4
|
||||
src-git telephony https://git.openwrt.org/feed/telephony.git^44d82fa226dc36a53043fdffdb9688d34a16a18c
|
||||
src-git packages https://git.openwrt.org/feed/packages.git^d974cd36735353204fac679cb9febd6c9814c326
|
||||
src-git luci https://git.openwrt.org/project/luci.git^35aa5270592f7e837c42aa097f8fbb06faa4017d
|
||||
src-git routing https://git.openwrt.org/feed/routing.git^c82ce8d095a87df32bbd3a89e3cf113721d3ae82
|
||||
src-git telephony https://git.openwrt.org/feed/telephony.git^6f95d6ab3f359ee2ce81c20522700937424d1591
|
||||
|
||||
@@ -103,6 +103,7 @@ define Host/Configure/Default
|
||||
-DCMAKE_INSTALL_PREFIX=$(HOST_BUILD_PREFIX) \
|
||||
-DCMAKE_PREFIX_PATH=$(HOST_BUILD_PREFIX) \
|
||||
-DCMAKE_SKIP_RPATH=TRUE \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
$(CMAKE_HOST_OPTIONS) \
|
||||
$(HOST_CMAKE_SOURCE_DIR) \
|
||||
)
|
||||
|
||||
@@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL
|
||||
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
||||
endif
|
||||
|
||||
LINUX_VERSION-4.14 = .156
|
||||
LINUX_VERSION-4.14 = .162
|
||||
|
||||
LINUX_KERNEL_HASH-4.14.156 = f8889feb0cbd7df36ff35bd4c72c1e2010567621bfcb218fcfa501bc5c7787c0
|
||||
LINUX_KERNEL_HASH-4.14.162 = f65170224cd4359ce8b2793b492bd8127abdd0b91350484e001bce13f0c98b4b
|
||||
|
||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||
|
||||
@@ -26,13 +26,13 @@ PKG_CONFIG_DEPENDS += \
|
||||
sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
|
||||
|
||||
VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),19.07.0-rc2)
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),19.07.0)
|
||||
|
||||
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r10775-db8345d8e4)
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r10860-a3ffeb413b)
|
||||
|
||||
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),http://downloads.openwrt.org/releases/19.07.0-rc2)
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),http://downloads.openwrt.org/releases/19.07.0)
|
||||
|
||||
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
|
||||
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)
|
||||
|
||||
@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
|
||||
include $(INCLUDE_DIR)/feeds.mk
|
||||
|
||||
PKG_NAME:=base-files
|
||||
PKG_RELEASE:=204.1
|
||||
PKG_RELEASE:=204.2
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
||||
|
||||
@@ -103,7 +103,7 @@ get_magic_long() {
|
||||
}
|
||||
|
||||
export_bootdevice() {
|
||||
local cmdline bootdisk rootpart uuid blockdev uevent line
|
||||
local cmdline bootdisk rootpart uuid blockdev uevent line class
|
||||
local MAJOR MINOR DEVNAME DEVTYPE
|
||||
|
||||
if read cmdline < /proc/cmdline; then
|
||||
@@ -139,6 +139,18 @@ export_bootdevice() {
|
||||
/dev/*)
|
||||
uevent="/sys/class/block/${rootpart##*/}/../uevent"
|
||||
;;
|
||||
0x[a-f0-9][a-f0-9][a-f0-9] | 0x[a-f0-9][a-f0-9][a-f0-9][a-f0-9] | \
|
||||
[a-f0-9][a-f0-9][a-f0-9] | [a-f0-9][a-f0-9][a-f0-9][a-f0-9])
|
||||
rootpart=0x${rootpart#0x}
|
||||
for class in /sys/class/block/*; do
|
||||
while read line; do
|
||||
export -n "$line"
|
||||
done < "$class/uevent"
|
||||
if [ $((rootpart/256)) = $MAJOR -a $((rootpart%256)) = $MINOR ]; then
|
||||
uevent="$class/../uevent"
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -e "$uevent" ]; then
|
||||
|
||||
@@ -294,7 +294,7 @@ type platform_check_image >/dev/null 2>/dev/null || {
|
||||
case "$IMAGE" in
|
||||
http://*|\
|
||||
https://*)
|
||||
wget -O/tmp/sysupgrade.img "$IMAGE"
|
||||
wget -O/tmp/sysupgrade.img "$IMAGE" || exit 1
|
||||
IMAGE=/tmp/sysupgrade.img
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -183,7 +183,7 @@ if VERSIONOPT
|
||||
config VERSION_REPO
|
||||
string
|
||||
prompt "Release repository"
|
||||
default "http://downloads.openwrt.org/releases/19.07.0-rc2"
|
||||
default "http://downloads.openwrt.org/releases/19.07.0"
|
||||
help
|
||||
This is the repository address embedded in the image, it defaults
|
||||
to the trunk snapshot repo; the url may contain the following placeholders:
|
||||
|
||||
@@ -64,92 +64,92 @@ define Download/ct-firmware-htt
|
||||
URL_FILE:=$($(1)_FIRMWARE_FILE_CT_HTT)
|
||||
endef
|
||||
|
||||
QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-22.bin.lede.012
|
||||
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:=3b2c584f7070c3e286ce27a370cc181d70b45f9cdaa462fb4f44c6c20d2ee8c1
|
||||
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.012
|
||||
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:=a7042b2c90de82b21e87f243411b6fb12142bb4fb28266ea92cdf3101557b6de
|
||||
HASH:=454e67dab545e720369a07be2fee16de008c76db4ab3119e7760bf9f7504c066
|
||||
endef
|
||||
$(eval $(call Download,ath10k-firmware-qca988x-ct-htt))
|
||||
|
||||
|
||||
QCA9887_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-22.bin.lede.012
|
||||
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:=c3f891b2cd4e225e1c635a328af3dce94481b096432020e445f71144dda749d5
|
||||
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.012
|
||||
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:=f5e9825279d590a2362f44aef4ced345376cccd65d9b826c131d4dbcef4e689c
|
||||
HASH:=4432ccee23133bbaa4a5552e50a1e7e889b257362603e05530e751b67c29b7b5
|
||||
endef
|
||||
$(eval $(call Download,ath10k-firmware-qca9887-ct-htt))
|
||||
|
||||
|
||||
QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.012
|
||||
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:=4b90fa91dcab68350fe695b3c918cb9a4fb09c2b419519b8b84b71da4cfde5e8
|
||||
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.012
|
||||
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:=6dd40233fe99d99c69781d6514cf9ba7862b3f66c647f7921ca8be6100799986
|
||||
HASH:=68e92820c51270eba4f68b24654c4a9408902b2600762b70204f4cb5419bb714
|
||||
endef
|
||||
$(eval $(call Download,ath10k-firmware-qca99x0-ct-htt))
|
||||
|
||||
|
||||
QCA9984_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.012
|
||||
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:=2551f5c0bfa6c1b1222bd9452e14f60b8e29c8c0fe85de8af95393f31d544ea3
|
||||
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.012
|
||||
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:=90f947257e1f42496b22cbdd29be99fbc8ea8700045b4ed2380acc980b4c247b
|
||||
HASH:=38ed59a2b3c66c10926706a21ae2d3aeaf83e589f19345a8f48d6520522e4fde
|
||||
endef
|
||||
$(eval $(call Download,ath10k-firmware-qca9984-ct-htt))
|
||||
|
||||
|
||||
QCA4019_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.012
|
||||
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:=cd85fc9df8b3652f7b12c2ab745b2a9691dca5ca38f8d65a02003e938ad8b570
|
||||
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.012
|
||||
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:=67a923cda6ec3936ef23ec6c30c80dfc9bfd2cee73a142d2e308e8f035b8ed3a
|
||||
HASH:=6a4977689343f43edd934823512f031fd1a026e872004343b9952077f9607cb0
|
||||
endef
|
||||
$(eval $(call Download,ath10k-firmware-qca4019-ct-htt))
|
||||
|
||||
|
||||
QCA9888_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.012
|
||||
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:=4bdb71b50c68f1a07c88d21f84a6c054fe1b8cb5bacd089a6b9f0a56448535d3
|
||||
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.012
|
||||
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:=e1f0242a91af58ec5628bb4f7c015f6c8dba55f92e2813f8f0b97c86ec496d2d
|
||||
HASH:=fe242c0d56494975d7a1aeb6969d90cc21cb133fba99040d4da7a25fdb90d92c
|
||||
endef
|
||||
$(eval $(call Download,ath10k-firmware-qca9888-ct-htt))
|
||||
|
||||
@@ -174,7 +174,7 @@ $(Package/ath10k-firmware-default)
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
PROVIDES:=ath10k-firmware-qca988x
|
||||
DEPENDS:=+kmod-ath10k-ct
|
||||
DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
|
||||
endef
|
||||
|
||||
define Package/ath10k-firmware-qca9887-ct
|
||||
@@ -190,7 +190,7 @@ $(Package/ath10k-firmware-default)
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
PROVIDES:=ath10k-firmware-qca9887
|
||||
DEPENDS:=+kmod-ath10k-ct
|
||||
DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
|
||||
endef
|
||||
|
||||
define Package/ath10k-firmware-qca988x-ct/description
|
||||
@@ -308,7 +308,7 @@ $(Package/ath10k-firmware-default)
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
PROVIDES:=ath10k-firmware-qca99x0
|
||||
DEPENDS:=+kmod-ath10k-ct
|
||||
DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
|
||||
endef
|
||||
|
||||
define Package/ath10k-firmware-qca9984-ct
|
||||
@@ -324,7 +324,7 @@ $(Package/ath10k-firmware-default)
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
PROVIDES:=ath10k-firmware-qca9984
|
||||
DEPENDS:=+kmod-ath10k-ct
|
||||
DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
|
||||
endef
|
||||
|
||||
define Package/ath10k-firmware-qca4019-ct
|
||||
@@ -340,7 +340,7 @@ $(Package/ath10k-firmware-default)
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
PROVIDES:=ath10k-firmware-qca4019
|
||||
DEPENDS:=+kmod-ath10k-ct
|
||||
DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
|
||||
endef
|
||||
|
||||
define Package/ath10k-firmware-qca9888-ct
|
||||
@@ -356,7 +356,7 @@ $(Package/ath10k-firmware-default)
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
PROVIDES:=ath10k-firmware-qca9888
|
||||
DEPENDS:=+kmod-ath10k-ct
|
||||
DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
|
||||
endef
|
||||
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ define KernelPackage/ath10k-ct
|
||||
$(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_core.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ath10k_pci)
|
||||
PROVIDES:=kmod-ath10k
|
||||
VARIANT:=regular
|
||||
endef
|
||||
|
||||
define KernelPackage/ath10k-ct/config
|
||||
@@ -42,7 +43,13 @@ define KernelPackage/ath10k-ct/config
|
||||
config ATH10K-CT_LEDS
|
||||
bool "Enable LED support"
|
||||
default y
|
||||
depends on PACKAGE_kmod-ath10k-ct
|
||||
depends on PACKAGE_kmod-ath10k-ct || PACKAGE_kmod-ath10k-ct-smallbuffers
|
||||
endef
|
||||
|
||||
define KernelPackage/ath10k-ct-smallbuffers
|
||||
$(call KernelPackage/ath10k-ct)
|
||||
TITLE+= (small buffers for low-RAM devices)
|
||||
VARIANT:=smallbuffers
|
||||
endef
|
||||
|
||||
NOSTDINC_FLAGS = \
|
||||
@@ -90,6 +97,10 @@ ifeq ($(CONFIG_ATH10K-CT_LEDS),y)
|
||||
NOSTDINC_FLAGS += -DCONFIG_ATH10K_LEDS
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),smallbuffers)
|
||||
NOSTDINC_FLAGS += -DCONFIG_ATH10K_SMALLBUFFERS
|
||||
endif
|
||||
|
||||
define Build/Configure
|
||||
cp $(STAGING_DIR)/usr/include/mac80211/ath/*.h $(PKG_BUILD_DIR)
|
||||
endef
|
||||
@@ -107,3 +118,4 @@ define Build/Compile
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ath10k-ct))
|
||||
$(eval $(call KernelPackage,ath10k-ct-smallbuffers))
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
--- 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 {
|
||||
};
|
||||
|
||||
#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)
|
||||
@@ -0,0 +1,100 @@
|
||||
--- 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,
|
||||
.src_sz_max = 2048,
|
||||
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
||||
.dest_nentries = 512,
|
||||
+#else
|
||||
+ .dest_nentries = 128,
|
||||
+#endif
|
||||
.recv_cb = ath10k_pci_htt_htc_rx_cb,
|
||||
},
|
||||
|
||||
@@ -140,7 +144,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,
|
||||
},
|
||||
|
||||
@@ -167,7 +175,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,
|
||||
},
|
||||
|
||||
@@ -192,7 +204,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,
|
||||
},
|
||||
|
||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=i2c-gpio-custom
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
#define DRV_NAME "i2c-gpio-custom"
|
||||
#define DRV_DESC "Custom GPIO-based I2C driver"
|
||||
#define DRV_VERSION "0.1.1"
|
||||
#define DRV_VERSION "0.1.2"
|
||||
|
||||
#define PFX DRV_NAME ": "
|
||||
|
||||
@@ -101,7 +101,7 @@ static void i2c_gpio_custom_cleanup(void)
|
||||
|
||||
for (i = 0; i < nr_devices; i++)
|
||||
if (devices[i])
|
||||
platform_device_put(devices[i]);
|
||||
platform_device_unregister(devices[i]);
|
||||
}
|
||||
|
||||
static int __init i2c_gpio_custom_add_one(unsigned int id, unsigned int *params)
|
||||
|
||||
@@ -209,7 +209,6 @@ $(eval $(call KernelPackage,block2mtd))
|
||||
define KernelPackage/dax
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=DAX: direct access to differentiated memory
|
||||
DEPENDS:=@!LINUX_4_9
|
||||
KCONFIG:=CONFIG_DAX
|
||||
FILES:=$(LINUX_DIR)/drivers/dax/dax.ko
|
||||
endef
|
||||
@@ -220,7 +219,7 @@ $(eval $(call KernelPackage,dax))
|
||||
define KernelPackage/dm
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=Device Mapper
|
||||
DEPENDS:=+kmod-crypto-manager +!LINUX_4_9:kmod-dax
|
||||
DEPENDS:=+kmod-crypto-manager +kmod-dax
|
||||
# All the "=n" are unnecessary, they're only there
|
||||
# to stop the config from asking the question.
|
||||
# MIRROR is M because I've needed it for pvmove.
|
||||
|
||||
@@ -513,7 +513,7 @@ mac80211_prepare_vif() {
|
||||
|
||||
case "$mode" in
|
||||
monitor|mesh)
|
||||
[ "$auto_channel" -gt 0 ] || iw dev "$ifname" set channel "$channel" $htmode
|
||||
[ "$auto_channel" -gt 0 ] || iw dev "$ifname" set channel "$channel" $iw_htmode
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -544,40 +544,40 @@ mac80211_setup_supplicant_noctl() {
|
||||
wpa_supplicant_run "$ifname"
|
||||
}
|
||||
|
||||
mac80211_setup_adhoc_htmode() {
|
||||
mac80211_prepare_iw_htmode() {
|
||||
case "$htmode" in
|
||||
VHT20|HT20) ibss_htmode=HT20;;
|
||||
VHT20|HT20) iw_htmode=HT20;;
|
||||
HT40*|VHT40|VHT160)
|
||||
case "$hwmode" in
|
||||
a)
|
||||
case "$(( ($channel / 4) % 2 ))" in
|
||||
1) ibss_htmode="HT40+" ;;
|
||||
0) ibss_htmode="HT40-";;
|
||||
1) iw_htmode="HT40+" ;;
|
||||
0) iw_htmode="HT40-";;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
case "$htmode" in
|
||||
HT40+) ibss_htmode="HT40+";;
|
||||
HT40-) ibss_htmode="HT40-";;
|
||||
HT40+) iw_htmode="HT40+";;
|
||||
HT40-) iw_htmode="HT40-";;
|
||||
*)
|
||||
if [ "$channel" -lt 7 ]; then
|
||||
ibss_htmode="HT40+"
|
||||
iw_htmode="HT40+"
|
||||
else
|
||||
ibss_htmode="HT40-"
|
||||
iw_htmode="HT40-"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
[ "$auto_channel" -gt 0 ] && ibss_htmode="HT40+"
|
||||
[ "$auto_channel" -gt 0 ] && iw_htmode="HT40+"
|
||||
;;
|
||||
VHT80)
|
||||
ibss_htmode="80MHZ"
|
||||
iw_htmode="80MHZ"
|
||||
;;
|
||||
NONE|NOHT)
|
||||
ibss_htmode="NOHT"
|
||||
iw_htmode="NOHT"
|
||||
;;
|
||||
*) ibss_htmode="" ;;
|
||||
*) iw_htmode="" ;;
|
||||
esac
|
||||
|
||||
}
|
||||
@@ -615,7 +615,7 @@ mac80211_setup_adhoc() {
|
||||
mcval=
|
||||
[ -n "$mcast_rate" ] && wpa_supplicant_add_rate mcval "$mcast_rate"
|
||||
|
||||
iw dev "$ifname" ibss join "$ssid" $freq $ibss_htmode fixed-freq $bssid \
|
||||
iw dev "$ifname" ibss join "$ssid" $freq $iw_htmode fixed-freq $bssid \
|
||||
beacon-interval $beacon_int \
|
||||
${brstr:+basic-rates $brstr} \
|
||||
${mcval:+mcast-rate $mcval} \
|
||||
@@ -629,40 +629,7 @@ mac80211_setup_mesh() {
|
||||
[ -n "$mcast_rate" ] && wpa_supplicant_add_rate mcval "$mcast_rate"
|
||||
[ -n "$mesh_id" ] && ssid="$mesh_id"
|
||||
|
||||
case "$htmode" in
|
||||
VHT20|HT20) mesh_htmode=HT20;;
|
||||
HT40*|VHT40)
|
||||
case "$hwmode" in
|
||||
a)
|
||||
case "$(( ($channel / 4) % 2 ))" in
|
||||
1) mesh_htmode="HT40+" ;;
|
||||
0) mesh_htmode="HT40-";;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
case "$htmode" in
|
||||
HT40+) mesh_htmode="HT40+";;
|
||||
HT40-) mesh_htmode="HT40-";;
|
||||
*)
|
||||
if [ "$channel" -lt 7 ]; then
|
||||
mesh_htmode="HT40+"
|
||||
else
|
||||
mesh_htmode="HT40-"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
VHT80)
|
||||
mesh_htmode="80Mhz"
|
||||
;;
|
||||
VHT160)
|
||||
mesh_htmode="160Mhz"
|
||||
;;
|
||||
*) mesh_htmode="NOHT" ;;
|
||||
esac
|
||||
iw dev "$ifname" mesh join "$ssid" freq $freq $mesh_htmode \
|
||||
iw dev "$ifname" mesh join "$ssid" freq $freq $iw_htmode \
|
||||
${mcval:+mcast-rate $mcval} \
|
||||
beacon-interval $beacon_int
|
||||
}
|
||||
@@ -704,7 +671,6 @@ mac80211_setup_vif() {
|
||||
;;
|
||||
adhoc)
|
||||
wireless_vif_parse_encryption
|
||||
mac80211_setup_adhoc_htmode
|
||||
if [ "$wpa" -gt 0 -o "$auto_channel" -gt 0 ]; then
|
||||
freq="$(get_freq "$phy" "$channel")"
|
||||
mac80211_setup_supplicant_noctl || failed=1
|
||||
@@ -818,6 +784,7 @@ drv_mac80211_setup() {
|
||||
for_each_interface "sta adhoc mesh" mac80211_set_noscan
|
||||
[ -n "$has_ap" ] && mac80211_hostapd_setup_base "$phy"
|
||||
|
||||
mac80211_prepare_iw_htmode
|
||||
for_each_interface "sta adhoc mesh monitor" mac80211_prepare_vif
|
||||
for_each_interface "ap" mac80211_prepare_vif
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From 1524cbf3621576c639405e7aabeac415f9617c8d Mon Sep 17 00:00:00 2001
|
||||
From: Adrian Ratiu <adrian.ratiu@collabora.com>
|
||||
Date: Wed, 25 Sep 2019 16:44:57 +0300
|
||||
Subject: [PATCH] brcmfmac: don't WARN when there are no requests
|
||||
|
||||
When n_reqs == 0 there is nothing to do so it doesn't make sense to
|
||||
search for requests and issue a warning because none is found.
|
||||
|
||||
Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
|
||||
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c
|
||||
@@ -57,6 +57,10 @@ static int brcmf_pno_remove_request(stru
|
||||
|
||||
mutex_lock(&pi->req_lock);
|
||||
|
||||
+ /* Nothing to do if we have no requests */
|
||||
+ if (pi->n_reqs == 0)
|
||||
+ goto done;
|
||||
+
|
||||
/* find request */
|
||||
for (i = 0; i < pi->n_reqs; i++) {
|
||||
if (pi->reqs[i]->reqid == reqid)
|
||||
@@ -0,0 +1,109 @@
|
||||
From e0ae4bac22effbd644add326f658a3aeeb8d45ee Mon Sep 17 00:00:00 2001
|
||||
From: Adrian Ratiu <adrian.ratiu@collabora.com>
|
||||
Date: Wed, 25 Sep 2019 16:44:58 +0300
|
||||
Subject: [PATCH] brcmfmac: fix suspend/resume when power is cut off
|
||||
|
||||
brcmfmac assumed the wifi device always remains powered on and thus
|
||||
hardcoded the MMC_PM_KEEP_POWER flag expecting the wifi device to
|
||||
remain on even during suspend/resume cycles.
|
||||
|
||||
This is not always the case, some appliances cut power to everything
|
||||
connected via SDIO for efficiency reasons and this leads to wifi not
|
||||
being usable after coming out of suspend because the device was not
|
||||
correctly reinitialized.
|
||||
|
||||
So we check for the keep_power capability and if it's not present then
|
||||
we remove the device and probe it again during resume to mirror what's
|
||||
happening in hardware and ensure correct reinitialization in the case
|
||||
when MMC_PM_KEEP_POWER is not supported.
|
||||
|
||||
Suggested-by: Gustavo Padovan <gustavo.padovan@collabora.com>
|
||||
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../broadcom/brcm80211/brcmfmac/bcmsdh.c | 53 ++++++++++++++-----
|
||||
1 file changed, 39 insertions(+), 14 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
|
||||
@@ -1097,7 +1097,8 @@ static int brcmf_ops_sdio_suspend(struct
|
||||
struct sdio_func *func;
|
||||
struct brcmf_bus *bus_if;
|
||||
struct brcmf_sdio_dev *sdiodev;
|
||||
- mmc_pm_flag_t sdio_flags;
|
||||
+ mmc_pm_flag_t pm_caps, sdio_flags;
|
||||
+ int ret = 0;
|
||||
|
||||
func = container_of(dev, struct sdio_func, dev);
|
||||
brcmf_dbg(SDIO, "Enter: F%d\n", func->num);
|
||||
@@ -1108,19 +1109,33 @@ static int brcmf_ops_sdio_suspend(struct
|
||||
bus_if = dev_get_drvdata(dev);
|
||||
sdiodev = bus_if->bus_priv.sdio;
|
||||
|
||||
- brcmf_sdiod_freezer_on(sdiodev);
|
||||
- brcmf_sdio_wd_timer(sdiodev->bus, 0);
|
||||
+ pm_caps = sdio_get_host_pm_caps(func);
|
||||
|
||||
- sdio_flags = MMC_PM_KEEP_POWER;
|
||||
- if (sdiodev->wowl_enabled) {
|
||||
- if (sdiodev->settings->bus.sdio.oob_irq_supported)
|
||||
- enable_irq_wake(sdiodev->settings->bus.sdio.oob_irq_nr);
|
||||
- else
|
||||
- sdio_flags |= MMC_PM_WAKE_SDIO_IRQ;
|
||||
+ if (pm_caps & MMC_PM_KEEP_POWER) {
|
||||
+ /* preserve card power during suspend */
|
||||
+ brcmf_sdiod_freezer_on(sdiodev);
|
||||
+ brcmf_sdio_wd_timer(sdiodev->bus, 0);
|
||||
+
|
||||
+ sdio_flags = MMC_PM_KEEP_POWER;
|
||||
+ if (sdiodev->wowl_enabled) {
|
||||
+ if (sdiodev->settings->bus.sdio.oob_irq_supported)
|
||||
+ enable_irq_wake(sdiodev->settings->bus.sdio.oob_irq_nr);
|
||||
+ else
|
||||
+ sdio_flags |= MMC_PM_WAKE_SDIO_IRQ;
|
||||
+ }
|
||||
+
|
||||
+ if (sdio_set_host_pm_flags(sdiodev->func1, sdio_flags))
|
||||
+ brcmf_err("Failed to set pm_flags %x\n", sdio_flags);
|
||||
+
|
||||
+ } else {
|
||||
+ /* power will be cut so remove device, probe again in resume */
|
||||
+ brcmf_sdiod_intr_unregister(sdiodev);
|
||||
+ ret = brcmf_sdiod_remove(sdiodev);
|
||||
+ if (ret)
|
||||
+ brcmf_err("Failed to remove device on suspend\n");
|
||||
}
|
||||
- if (sdio_set_host_pm_flags(sdiodev->func1, sdio_flags))
|
||||
- brcmf_err("Failed to set pm_flags %x\n", sdio_flags);
|
||||
- return 0;
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static int brcmf_ops_sdio_resume(struct device *dev)
|
||||
@@ -1128,13 +1143,23 @@ static int brcmf_ops_sdio_resume(struct
|
||||
struct brcmf_bus *bus_if = dev_get_drvdata(dev);
|
||||
struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
|
||||
struct sdio_func *func = container_of(dev, struct sdio_func, dev);
|
||||
+ mmc_pm_flag_t pm_caps = sdio_get_host_pm_caps(func);
|
||||
+ int ret = 0;
|
||||
|
||||
brcmf_dbg(SDIO, "Enter: F%d\n", func->num);
|
||||
if (func->num != 2)
|
||||
return 0;
|
||||
|
||||
- brcmf_sdiod_freezer_off(sdiodev);
|
||||
- return 0;
|
||||
+ if (!(pm_caps & MMC_PM_KEEP_POWER)) {
|
||||
+ /* bus was powered off and device removed, probe again */
|
||||
+ ret = brcmf_sdiod_probe(sdiodev);
|
||||
+ if (ret)
|
||||
+ brcmf_err("Failed to probe device on resume\n");
|
||||
+ } else {
|
||||
+ brcmf_sdiod_freezer_off(sdiodev);
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops brcmf_sdio_pm_ops = {
|
||||
@@ -0,0 +1,58 @@
|
||||
From 7af496b9eb0433bc4cb478c9a46f85509cdb5541 Mon Sep 17 00:00:00 2001
|
||||
From: zhengbin <zhengbin13@huawei.com>
|
||||
Date: Sat, 16 Nov 2019 15:22:47 +0800
|
||||
Subject: [PATCH] brcmfmac: remove set but not used variable
|
||||
'mpnum','nsp','nmp'
|
||||
|
||||
Fixes gcc '-Wunused-but-set-variable' warning:
|
||||
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c: In function brcmf_chip_dmp_get_regaddr:
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c:790:5: warning: variable mpnum set but not used [-Wunused-but-set-variable]
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c: In function brcmf_chip_dmp_erom_scan:
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c:866:10: warning: variable nsp set but not used [-Wunused-but-set-variable]
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c: In function brcmf_chip_dmp_erom_scan:
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c:866:5: warning: variable nmp set but not used [-Wunused-but-set-variable]
|
||||
|
||||
Reported-by: Hulk Robot <hulkci@huawei.com>
|
||||
Signed-off-by: zhengbin <zhengbin13@huawei.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
|
||||
@@ -778,7 +778,6 @@ static int brcmf_chip_dmp_get_regaddr(st
|
||||
{
|
||||
u8 desc;
|
||||
u32 val, szdesc;
|
||||
- u8 mpnum = 0;
|
||||
u8 stype, sztype, wraptype;
|
||||
|
||||
*regbase = 0;
|
||||
@@ -786,7 +785,6 @@ static int brcmf_chip_dmp_get_regaddr(st
|
||||
|
||||
val = brcmf_chip_dmp_get_desc(ci, eromaddr, &desc);
|
||||
if (desc == DMP_DESC_MASTER_PORT) {
|
||||
- mpnum = (val & DMP_MASTER_PORT_NUM) >> DMP_MASTER_PORT_NUM_S;
|
||||
wraptype = DMP_SLAVE_TYPE_MWRAP;
|
||||
} else if (desc == DMP_DESC_ADDRESS) {
|
||||
/* revert erom address */
|
||||
@@ -854,7 +852,7 @@ int brcmf_chip_dmp_erom_scan(struct brcm
|
||||
u8 desc_type = 0;
|
||||
u32 val;
|
||||
u16 id;
|
||||
- u8 nmp, nsp, nmw, nsw, rev;
|
||||
+ u8 nmw, nsw, rev;
|
||||
u32 base, wrap;
|
||||
int err;
|
||||
|
||||
@@ -880,8 +878,6 @@ int brcmf_chip_dmp_erom_scan(struct brcm
|
||||
return -EFAULT;
|
||||
|
||||
/* only look at cores with master port(s) */
|
||||
- nmp = (val & DMP_COMP_NUM_MPORT) >> DMP_COMP_NUM_MPORT_S;
|
||||
- nsp = (val & DMP_COMP_NUM_SPORT) >> DMP_COMP_NUM_SPORT_S;
|
||||
nmw = (val & DMP_COMP_NUM_MWRAP) >> DMP_COMP_NUM_MWRAP_S;
|
||||
nsw = (val & DMP_COMP_NUM_SWRAP) >> DMP_COMP_NUM_SWRAP_S;
|
||||
rev = (val & DMP_COMP_REVISION) >> DMP_COMP_REVISION_S;
|
||||
@@ -0,0 +1,29 @@
|
||||
From 5cc509aa83c6acd2c5cd94f99065c39d2bd0a490 Mon Sep 17 00:00:00 2001
|
||||
From: Navid Emamdoost <navid.emamdoost@gmail.com>
|
||||
Date: Fri, 22 Nov 2019 13:19:48 -0600
|
||||
Subject: [PATCH] brcmfmac: Fix memory leak in brcmf_p2p_create_p2pdev()
|
||||
|
||||
In the implementation of brcmf_p2p_create_p2pdev() the allocated memory
|
||||
for p2p_vif is leaked when the mac address is the same as primary
|
||||
interface. To fix this, go to error path to release p2p_vif via
|
||||
brcmf_free_vif().
|
||||
|
||||
Fixes: cb746e47837a ("brcmfmac: check p2pdev mac address uniqueness")
|
||||
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
|
||||
@@ -2092,7 +2092,8 @@ static struct wireless_dev *brcmf_p2p_cr
|
||||
/* firmware requires unique mac address for p2pdev interface */
|
||||
if (addr && ether_addr_equal(addr, pri_ifp->mac_addr)) {
|
||||
bphy_err(drvr, "discovery vif must be different from primary interface\n");
|
||||
- return ERR_PTR(-EINVAL);
|
||||
+ err = -EINVAL;
|
||||
+ goto fail;
|
||||
}
|
||||
|
||||
brcmf_p2p_generate_bss_mac(p2p, addr);
|
||||
@@ -0,0 +1,31 @@
|
||||
From 216b44000ada87a63891a8214c347e05a4aea8fe Mon Sep 17 00:00:00 2001
|
||||
From: Dan Carpenter <dan.carpenter@oracle.com>
|
||||
Date: Tue, 3 Dec 2019 12:58:55 +0300
|
||||
Subject: [PATCH] brcmfmac: Fix use after free in brcmf_sdio_readframes()
|
||||
|
||||
The brcmu_pkt_buf_free_skb() function frees "pkt" so it leads to a
|
||||
static checker warning:
|
||||
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:1974 brcmf_sdio_readframes()
|
||||
error: dereferencing freed memory 'pkt'
|
||||
|
||||
It looks like there was supposed to be a continue after we free "pkt".
|
||||
|
||||
Fixes: 4754fceeb9a6 ("brcmfmac: streamline SDIO read frame routine")
|
||||
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
|
||||
Acked-by: Franky Lin <franky.lin@broadcom.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
@@ -1935,6 +1935,7 @@ static uint brcmf_sdio_readframes(struct
|
||||
BRCMF_SDIO_FT_NORMAL)) {
|
||||
rd->len = 0;
|
||||
brcmu_pkt_buf_free_skb(pkt);
|
||||
+ continue;
|
||||
}
|
||||
bus->sdcnt.rx_readahead_cnt++;
|
||||
if (rd->len != roundup(rd_new.len, 16)) {
|
||||
@@ -0,0 +1,29 @@
|
||||
From 8d9627b05b2c33e4468e65739eb7caf9c3f274d8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Tue, 10 Dec 2019 12:35:55 +0100
|
||||
Subject: [PATCH] brcmfmac: set interface carrier to off by default
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
It's important as brcmfmac creates one main interface for each PHY and
|
||||
doesn't allow deleting it. Not setting carrier could result in other
|
||||
subsystems misbehaving (e.g. LEDs "netdev" trigger turning LED on).
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
@@ -678,6 +678,8 @@ int brcmf_net_attach(struct brcmf_if *if
|
||||
goto fail;
|
||||
}
|
||||
|
||||
+ netif_carrier_off(ndev);
|
||||
+
|
||||
netdev_set_priv_destructor(ndev, brcmf_cfg80211_free_netdev);
|
||||
brcmf_dbg(INFO, "%s: Broadcom Dongle Host Driver\n", ndev->name);
|
||||
return 0;
|
||||
@@ -0,0 +1,40 @@
|
||||
From 3428fbcd6e6c0850b1a8b2a12082b7b2aabb3da3 Mon Sep 17 00:00:00 2001
|
||||
From: Johan Hovold <johan@kernel.org>
|
||||
Date: Tue, 10 Dec 2019 12:44:22 +0100
|
||||
Subject: [PATCH] brcmfmac: fix interface sanity check
|
||||
|
||||
Make sure to use the current alternate setting when verifying the
|
||||
interface descriptors to avoid binding to an invalid interface.
|
||||
|
||||
Failing to do so could cause the driver to misbehave or trigger a WARN()
|
||||
in usb_submit_urb() that kernels with panic_on_warn set would choke on.
|
||||
|
||||
Fixes: 71bb244ba2fd ("brcm80211: fmac: add USB support for bcm43235/6/8 chipsets")
|
||||
Cc: stable <stable@vger.kernel.org> # 3.4
|
||||
Cc: Arend van Spriel <arend@broadcom.com>
|
||||
Signed-off-by: Johan Hovold <johan@kernel.org>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
|
||||
@@ -1348,7 +1348,7 @@ brcmf_usb_probe(struct usb_interface *in
|
||||
goto fail;
|
||||
}
|
||||
|
||||
- desc = &intf->altsetting[0].desc;
|
||||
+ desc = &intf->cur_altsetting->desc;
|
||||
if ((desc->bInterfaceClass != USB_CLASS_VENDOR_SPEC) ||
|
||||
(desc->bInterfaceSubClass != 2) ||
|
||||
(desc->bInterfaceProtocol != 0xff)) {
|
||||
@@ -1361,7 +1361,7 @@ brcmf_usb_probe(struct usb_interface *in
|
||||
|
||||
num_of_eps = desc->bNumEndpoints;
|
||||
for (ep = 0; ep < num_of_eps; ep++) {
|
||||
- endpoint = &intf->altsetting[0].endpoint[ep].desc;
|
||||
+ endpoint = &intf->cur_altsetting->endpoint[ep].desc;
|
||||
endpoint_num = usb_endpoint_num(endpoint);
|
||||
if (!usb_endpoint_xfer_bulk(endpoint))
|
||||
continue;
|
||||
@@ -0,0 +1,121 @@
|
||||
From 1b8d2e0a9e4221b99eea375c079507ce8ef655f5 Mon Sep 17 00:00:00 2001
|
||||
From: Wright Feng <wright.feng@cypress.com>
|
||||
Date: Thu, 12 Dec 2019 00:52:45 +0100
|
||||
Subject: [PATCH 1/7] brcmfmac: reset two D11 cores if chip has two D11 cores
|
||||
|
||||
There are two D11 cores in RSDB chips like 4359. We have to reset two
|
||||
D11 cores simutaneously before firmware download, or the firmware may
|
||||
not be initialized correctly and cause "fw initialized failed" error.
|
||||
|
||||
Signed-off-by: Wright Feng <wright.feng@cypress.com>
|
||||
Signed-off-by: Soeren Moch <smoch@web.de>
|
||||
Reviewed-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../broadcom/brcm80211/brcmfmac/chip.c | 50 +++++++++++++++++++
|
||||
.../broadcom/brcm80211/brcmfmac/chip.h | 1 +
|
||||
.../broadcom/brcm80211/brcmfmac/pcie.c | 2 +-
|
||||
3 files changed, 52 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
|
||||
@@ -433,11 +433,25 @@ static void brcmf_chip_ai_resetcore(stru
|
||||
{
|
||||
struct brcmf_chip_priv *ci;
|
||||
int count;
|
||||
+ struct brcmf_core *d11core2 = NULL;
|
||||
+ struct brcmf_core_priv *d11priv2 = NULL;
|
||||
|
||||
ci = core->chip;
|
||||
|
||||
+ /* special handle two D11 cores reset */
|
||||
+ if (core->pub.id == BCMA_CORE_80211) {
|
||||
+ d11core2 = brcmf_chip_get_d11core(&ci->pub, 1);
|
||||
+ if (d11core2) {
|
||||
+ brcmf_dbg(INFO, "found two d11 cores, reset both\n");
|
||||
+ d11priv2 = container_of(d11core2,
|
||||
+ struct brcmf_core_priv, pub);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* must disable first to work for arbitrary current core state */
|
||||
brcmf_chip_ai_coredisable(core, prereset, reset);
|
||||
+ if (d11priv2)
|
||||
+ brcmf_chip_ai_coredisable(d11priv2, prereset, reset);
|
||||
|
||||
count = 0;
|
||||
while (ci->ops->read32(ci->ctx, core->wrapbase + BCMA_RESET_CTL) &
|
||||
@@ -449,9 +463,30 @@ static void brcmf_chip_ai_resetcore(stru
|
||||
usleep_range(40, 60);
|
||||
}
|
||||
|
||||
+ if (d11priv2) {
|
||||
+ count = 0;
|
||||
+ while (ci->ops->read32(ci->ctx,
|
||||
+ d11priv2->wrapbase + BCMA_RESET_CTL) &
|
||||
+ BCMA_RESET_CTL_RESET) {
|
||||
+ ci->ops->write32(ci->ctx,
|
||||
+ d11priv2->wrapbase + BCMA_RESET_CTL,
|
||||
+ 0);
|
||||
+ count++;
|
||||
+ if (count > 50)
|
||||
+ break;
|
||||
+ usleep_range(40, 60);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
ci->ops->write32(ci->ctx, core->wrapbase + BCMA_IOCTL,
|
||||
postreset | BCMA_IOCTL_CLK);
|
||||
ci->ops->read32(ci->ctx, core->wrapbase + BCMA_IOCTL);
|
||||
+
|
||||
+ if (d11priv2) {
|
||||
+ ci->ops->write32(ci->ctx, d11priv2->wrapbase + BCMA_IOCTL,
|
||||
+ postreset | BCMA_IOCTL_CLK);
|
||||
+ ci->ops->read32(ci->ctx, d11priv2->wrapbase + BCMA_IOCTL);
|
||||
+ }
|
||||
}
|
||||
|
||||
char *brcmf_chip_name(u32 id, u32 rev, char *buf, uint len)
|
||||
@@ -1109,6 +1144,21 @@ void brcmf_chip_detach(struct brcmf_chip
|
||||
kfree(chip);
|
||||
}
|
||||
|
||||
+struct brcmf_core *brcmf_chip_get_d11core(struct brcmf_chip *pub, u8 unit)
|
||||
+{
|
||||
+ struct brcmf_chip_priv *chip;
|
||||
+ struct brcmf_core_priv *core;
|
||||
+
|
||||
+ chip = container_of(pub, struct brcmf_chip_priv, pub);
|
||||
+ list_for_each_entry(core, &chip->cores, list) {
|
||||
+ if (core->pub.id == BCMA_CORE_80211) {
|
||||
+ if (unit-- == 0)
|
||||
+ return &core->pub;
|
||||
+ }
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
struct brcmf_core *brcmf_chip_get_core(struct brcmf_chip *pub, u16 coreid)
|
||||
{
|
||||
struct brcmf_chip_priv *chip;
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.h
|
||||
@@ -74,6 +74,7 @@ struct brcmf_chip *brcmf_chip_attach(voi
|
||||
const struct brcmf_buscore_ops *ops);
|
||||
void brcmf_chip_detach(struct brcmf_chip *chip);
|
||||
struct brcmf_core *brcmf_chip_get_core(struct brcmf_chip *chip, u16 coreid);
|
||||
+struct brcmf_core *brcmf_chip_get_d11core(struct brcmf_chip *pub, u8 unit);
|
||||
struct brcmf_core *brcmf_chip_get_chipcommon(struct brcmf_chip *chip);
|
||||
struct brcmf_core *brcmf_chip_get_pmu(struct brcmf_chip *pub);
|
||||
bool brcmf_chip_iscoreup(struct brcmf_core *core);
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
|
||||
@@ -78,7 +78,7 @@ static const struct brcmf_firmware_mappi
|
||||
BRCMF_FW_ENTRY(BRCM_CC_4371_CHIP_ID, 0xFFFFFFFF, 4371),
|
||||
};
|
||||
|
||||
-#define BRCMF_PCIE_FW_UP_TIMEOUT 2000 /* msec */
|
||||
+#define BRCMF_PCIE_FW_UP_TIMEOUT 5000 /* msec */
|
||||
|
||||
#define BRCMF_PCIE_REG_MAP_SIZE (32 * 1024)
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
From 172f6854551d48d1c9530f84513b421db944e714 Mon Sep 17 00:00:00 2001
|
||||
From: Chung-Hsien Hsu <stanley.hsu@cypress.com>
|
||||
Date: Thu, 12 Dec 2019 00:52:46 +0100
|
||||
Subject: [PATCH 2/7] brcmfmac: set F2 blocksize and watermark for 4359
|
||||
|
||||
Set F2 blocksize to 256 bytes and watermark to 0x40 for 4359. Also
|
||||
enable and configure F1 MesBusyCtrl. It fixes DMA error while having
|
||||
UDP bi-directional traffic.
|
||||
|
||||
Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
|
||||
[slightly adapted for rebase on mainline linux]
|
||||
Signed-off-by: Soeren Moch <smoch@web.de>
|
||||
Reviewed-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 6 +++++-
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 15 +++++++++++++++
|
||||
2 files changed, 20 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#define SDIO_FUNC1_BLOCKSIZE 64
|
||||
#define SDIO_FUNC2_BLOCKSIZE 512
|
||||
+#define SDIO_4359_FUNC2_BLOCKSIZE 256
|
||||
/* Maximum milliseconds to wait for F2 to come up */
|
||||
#define SDIO_WAIT_F2RDY 3000
|
||||
|
||||
@@ -892,6 +893,7 @@ static void brcmf_sdiod_host_fixup(struc
|
||||
static int brcmf_sdiod_probe(struct brcmf_sdio_dev *sdiodev)
|
||||
{
|
||||
int ret = 0;
|
||||
+ unsigned int f2_blksz = SDIO_FUNC2_BLOCKSIZE;
|
||||
|
||||
sdio_claim_host(sdiodev->func1);
|
||||
|
||||
@@ -901,7 +903,9 @@ static int brcmf_sdiod_probe(struct brcm
|
||||
sdio_release_host(sdiodev->func1);
|
||||
goto out;
|
||||
}
|
||||
- ret = sdio_set_block_size(sdiodev->func2, SDIO_FUNC2_BLOCKSIZE);
|
||||
+ if (sdiodev->func2->device == SDIO_DEVICE_ID_BROADCOM_4359)
|
||||
+ f2_blksz = SDIO_4359_FUNC2_BLOCKSIZE;
|
||||
+ ret = sdio_set_block_size(sdiodev->func2, f2_blksz);
|
||||
if (ret) {
|
||||
brcmf_err("Failed to set F2 blocksize\n");
|
||||
sdio_release_host(sdiodev->func1);
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
@@ -42,6 +42,8 @@
|
||||
#define DEFAULT_F2_WATERMARK 0x8
|
||||
#define CY_4373_F2_WATERMARK 0x40
|
||||
#define CY_43012_F2_WATERMARK 0x60
|
||||
+#define CY_4359_F2_WATERMARK 0x40
|
||||
+#define CY_4359_F1_MESBUSYCTRL (CY_4359_F2_WATERMARK | SBSDIO_MESBUSYCTRL_ENAB)
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
@@ -4210,6 +4212,19 @@ static void brcmf_sdio_firmware_callback
|
||||
brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl,
|
||||
&err);
|
||||
break;
|
||||
+ case SDIO_DEVICE_ID_BROADCOM_4359:
|
||||
+ brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes\n",
|
||||
+ CY_4359_F2_WATERMARK);
|
||||
+ brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK,
|
||||
+ CY_4359_F2_WATERMARK, &err);
|
||||
+ devctl = brcmf_sdiod_readb(sdiod, SBSDIO_DEVICE_CTL,
|
||||
+ &err);
|
||||
+ devctl |= SBSDIO_DEVCTL_F2WM_ENAB;
|
||||
+ brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl,
|
||||
+ &err);
|
||||
+ brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_MESBUSYCTRL,
|
||||
+ CY_4359_F1_MESBUSYCTRL, &err);
|
||||
+ break;
|
||||
default:
|
||||
brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK,
|
||||
DEFAULT_F2_WATERMARK, &err);
|
||||
@@ -0,0 +1,34 @@
|
||||
From 6647274ed995a172369cb04754eb5f8b85f68f6d Mon Sep 17 00:00:00 2001
|
||||
From: Soeren Moch <smoch@web.de>
|
||||
Date: Thu, 12 Dec 2019 00:52:47 +0100
|
||||
Subject: [PATCH 3/7] brcmfmac: fix rambase for 4359/9
|
||||
|
||||
Newer 4359 chip revisions need a different rambase address.
|
||||
This fixes firmware download on such devices which fails otherwise.
|
||||
|
||||
Signed-off-by: Soeren Moch <smoch@web.de>
|
||||
Acked-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
|
||||
@@ -712,7 +712,6 @@ static u32 brcmf_chip_tcm_rambase(struct
|
||||
case BRCM_CC_43569_CHIP_ID:
|
||||
case BRCM_CC_43570_CHIP_ID:
|
||||
case BRCM_CC_4358_CHIP_ID:
|
||||
- case BRCM_CC_4359_CHIP_ID:
|
||||
case BRCM_CC_43602_CHIP_ID:
|
||||
case BRCM_CC_4371_CHIP_ID:
|
||||
return 0x180000;
|
||||
@@ -722,6 +721,8 @@ static u32 brcmf_chip_tcm_rambase(struct
|
||||
case BRCM_CC_4366_CHIP_ID:
|
||||
case BRCM_CC_43664_CHIP_ID:
|
||||
return 0x200000;
|
||||
+ case BRCM_CC_4359_CHIP_ID:
|
||||
+ return (ci->pub.chiprev < 9) ? 0x180000 : 0x160000;
|
||||
case CY_CC_4373_CHIP_ID:
|
||||
return 0x160000;
|
||||
default:
|
||||
@@ -0,0 +1,42 @@
|
||||
From c12c8913d79c49ceccb38f42714d25b783833758 Mon Sep 17 00:00:00 2001
|
||||
From: Soeren Moch <smoch@web.de>
|
||||
Date: Thu, 12 Dec 2019 00:52:48 +0100
|
||||
Subject: [PATCH 4/7] brcmfmac: make errors when setting roaming parameters
|
||||
non-fatal
|
||||
|
||||
4359 dongles do not support setting roaming parameters (error -52).
|
||||
Do not fail the 80211 configuration in this case.
|
||||
|
||||
Signed-off-by: Soeren Moch <smoch@web.de>
|
||||
Acked-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 10 ++++------
|
||||
1 file changed, 4 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -5936,19 +5936,17 @@ static s32 brcmf_dongle_roam(struct brcm
|
||||
roamtrigger[1] = cpu_to_le32(BRCM_BAND_ALL);
|
||||
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_TRIGGER,
|
||||
(void *)roamtrigger, sizeof(roamtrigger));
|
||||
- if (err) {
|
||||
+ if (err)
|
||||
bphy_err(drvr, "WLC_SET_ROAM_TRIGGER error (%d)\n", err);
|
||||
- goto roam_setup_done;
|
||||
- }
|
||||
|
||||
roam_delta[0] = cpu_to_le32(WL_ROAM_DELTA);
|
||||
roam_delta[1] = cpu_to_le32(BRCM_BAND_ALL);
|
||||
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_DELTA,
|
||||
(void *)roam_delta, sizeof(roam_delta));
|
||||
- if (err) {
|
||||
+ if (err)
|
||||
bphy_err(drvr, "WLC_SET_ROAM_DELTA error (%d)\n", err);
|
||||
- goto roam_setup_done;
|
||||
- }
|
||||
+
|
||||
+ return 0;
|
||||
|
||||
roam_setup_done:
|
||||
return err;
|
||||
@@ -0,0 +1,75 @@
|
||||
From d4aef159394d5940bd7158ab789969dab82f7c76 Mon Sep 17 00:00:00 2001
|
||||
From: Soeren Moch <smoch@web.de>
|
||||
Date: Thu, 12 Dec 2019 00:52:49 +0100
|
||||
Subject: [PATCH 5/7] brcmfmac: add support for BCM4359 SDIO chipset
|
||||
|
||||
BCM4359 is a 2x2 802.11 abgn+ac Dual-Band HT80 combo chip and it
|
||||
supports Real Simultaneous Dual Band feature.
|
||||
|
||||
Based on a similar patch by: Wright Feng <wright.feng@cypress.com>
|
||||
|
||||
Signed-off-by: Soeren Moch <smoch@web.de>
|
||||
Acked-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
|
||||
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 2 ++
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 1 +
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 ++
|
||||
include/linux/mmc/sdio_ids.h | 2 ++
|
||||
4 files changed, 7 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
|
||||
@@ -962,8 +962,10 @@ static const struct sdio_device_id brcmf
|
||||
BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43455),
|
||||
BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4354),
|
||||
BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4356),
|
||||
+ BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4359),
|
||||
BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_CYPRESS_4373),
|
||||
BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_CYPRESS_43012),
|
||||
+ BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_CYPRESS_89359),
|
||||
{ /* end: all zeroes */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(sdio, brcmf_sdmmc_ids);
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
|
||||
@@ -1408,6 +1408,7 @@ bool brcmf_chip_sr_capable(struct brcmf_
|
||||
addr = CORE_CC_REG(base, sr_control0);
|
||||
reg = chip->ops->read32(chip->ctx, addr);
|
||||
return (reg & CC_SR_CTL0_ENABLE_MASK) != 0;
|
||||
+ case BRCM_CC_4359_CHIP_ID:
|
||||
case CY_CC_43012_CHIP_ID:
|
||||
addr = CORE_CC_REG(pmu->base, retention_ctl);
|
||||
reg = chip->ops->read32(chip->ctx, addr);
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
@@ -616,6 +616,7 @@ BRCMF_FW_DEF(43455, "brcmfmac43455-sdio"
|
||||
BRCMF_FW_DEF(43456, "brcmfmac43456-sdio");
|
||||
BRCMF_FW_DEF(4354, "brcmfmac4354-sdio");
|
||||
BRCMF_FW_DEF(4356, "brcmfmac4356-sdio");
|
||||
+BRCMF_FW_DEF(4359, "brcmfmac4359-sdio");
|
||||
BRCMF_FW_DEF(4373, "brcmfmac4373-sdio");
|
||||
BRCMF_FW_DEF(43012, "brcmfmac43012-sdio");
|
||||
|
||||
@@ -638,6 +639,7 @@ static const struct brcmf_firmware_mappi
|
||||
BRCMF_FW_ENTRY(BRCM_CC_4345_CHIP_ID, 0xFFFFFDC0, 43455),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_4354_CHIP_ID, 0xFFFFFFFF, 4354),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_4356_CHIP_ID, 0xFFFFFFFF, 4356),
|
||||
+ BRCMF_FW_ENTRY(BRCM_CC_4359_CHIP_ID, 0xFFFFFFFF, 4359),
|
||||
BRCMF_FW_ENTRY(CY_CC_4373_CHIP_ID, 0xFFFFFFFF, 4373),
|
||||
BRCMF_FW_ENTRY(CY_CC_43012_CHIP_ID, 0xFFFFFFFF, 43012)
|
||||
};
|
||||
--- a/include/linux/mmc/sdio_ids.h
|
||||
+++ b/include/linux/mmc/sdio_ids.h
|
||||
@@ -41,8 +41,10 @@
|
||||
#define SDIO_DEVICE_ID_BROADCOM_43455 0xa9bf
|
||||
#define SDIO_DEVICE_ID_BROADCOM_4354 0x4354
|
||||
#define SDIO_DEVICE_ID_BROADCOM_4356 0x4356
|
||||
+#define SDIO_DEVICE_ID_BROADCOM_4359 0x4359
|
||||
#define SDIO_DEVICE_ID_CYPRESS_4373 0x4373
|
||||
#define SDIO_DEVICE_ID_CYPRESS_43012 43012
|
||||
+#define SDIO_DEVICE_ID_CYPRESS_89359 0x4355
|
||||
|
||||
#define SDIO_VENDOR_ID_INTEL 0x0089
|
||||
#define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX 0x1402
|
||||
@@ -0,0 +1,130 @@
|
||||
From 837482e69a3f0d7cbc73922020012f83635f5ddb Mon Sep 17 00:00:00 2001
|
||||
From: Wright Feng <wright.feng@cypress.com>
|
||||
Date: Thu, 12 Dec 2019 00:52:50 +0100
|
||||
Subject: [PATCH 6/7] brcmfmac: add RSDB condition when setting interface
|
||||
combinations
|
||||
|
||||
With firmware RSDB feature
|
||||
1. The maximum support interface is four.
|
||||
2. The maximum difference channel is two.
|
||||
3. The maximum interfaces of {station/p2p client/AP} are two.
|
||||
4. The maximum interface of p2p device is one.
|
||||
|
||||
Signed-off-by: Wright Feng <wright.feng@cypress.com>
|
||||
Signed-off-by: Soeren Moch <smoch@web.de>
|
||||
Reviewed-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../broadcom/brcm80211/brcmfmac/cfg80211.c | 54 ++++++++++++++++---
|
||||
1 file changed, 46 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -6444,6 +6444,9 @@ brcmf_txrx_stypes[NUM_NL80211_IFTYPES] =
|
||||
* #STA <= 1, #AP <= 1, channels = 1, 2 total
|
||||
* #AP <= 4, matching BI, channels = 1, 4 total
|
||||
*
|
||||
+ * no p2p and rsdb:
|
||||
+ * #STA <= 2, #AP <= 2, channels = 2, 4 total
|
||||
+ *
|
||||
* p2p, no mchan, and mbss:
|
||||
*
|
||||
* #STA <= 1, #P2P-DEV <= 1, #{P2P-CL, P2P-GO} <= 1, channels = 1, 3 total
|
||||
@@ -6455,6 +6458,10 @@ brcmf_txrx_stypes[NUM_NL80211_IFTYPES] =
|
||||
* #STA <= 1, #P2P-DEV <= 1, #{P2P-CL, P2P-GO} <= 1, channels = 2, 3 total
|
||||
* #STA <= 1, #P2P-DEV <= 1, #AP <= 1, #P2P-CL <= 1, channels = 1, 4 total
|
||||
* #AP <= 4, matching BI, channels = 1, 4 total
|
||||
+ *
|
||||
+ * p2p, rsdb, and no mbss:
|
||||
+ * #STA <= 2, #P2P-DEV <= 1, #{P2P-CL, P2P-GO} <= 2, AP <= 2,
|
||||
+ * channels = 2, 4 total
|
||||
*/
|
||||
static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp)
|
||||
{
|
||||
@@ -6462,13 +6469,14 @@ static int brcmf_setup_ifmodes(struct wi
|
||||
struct ieee80211_iface_limit *c0_limits = NULL;
|
||||
struct ieee80211_iface_limit *p2p_limits = NULL;
|
||||
struct ieee80211_iface_limit *mbss_limits = NULL;
|
||||
- bool mbss, p2p;
|
||||
+ bool mbss, p2p, rsdb;
|
||||
int i, c, n_combos;
|
||||
|
||||
mbss = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS);
|
||||
p2p = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_P2P);
|
||||
+ rsdb = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_RSDB);
|
||||
|
||||
- n_combos = 1 + !!p2p + !!mbss;
|
||||
+ n_combos = 1 + !!(p2p && !rsdb) + !!mbss;
|
||||
combo = kcalloc(n_combos, sizeof(*combo), GFP_KERNEL);
|
||||
if (!combo)
|
||||
goto err;
|
||||
@@ -6479,16 +6487,36 @@ static int brcmf_setup_ifmodes(struct wi
|
||||
|
||||
c = 0;
|
||||
i = 0;
|
||||
- c0_limits = kcalloc(p2p ? 3 : 2, sizeof(*c0_limits), GFP_KERNEL);
|
||||
+ if (p2p && rsdb)
|
||||
+ c0_limits = kcalloc(4, sizeof(*c0_limits), GFP_KERNEL);
|
||||
+ else if (p2p)
|
||||
+ c0_limits = kcalloc(3, sizeof(*c0_limits), GFP_KERNEL);
|
||||
+ else
|
||||
+ c0_limits = kcalloc(2, sizeof(*c0_limits), GFP_KERNEL);
|
||||
if (!c0_limits)
|
||||
goto err;
|
||||
- c0_limits[i].max = 1;
|
||||
- c0_limits[i++].types = BIT(NL80211_IFTYPE_STATION);
|
||||
- if (p2p) {
|
||||
+ if (p2p && rsdb) {
|
||||
+ combo[c].num_different_channels = 2;
|
||||
+ wiphy->interface_modes |= BIT(NL80211_IFTYPE_P2P_CLIENT) |
|
||||
+ BIT(NL80211_IFTYPE_P2P_GO) |
|
||||
+ BIT(NL80211_IFTYPE_P2P_DEVICE);
|
||||
+ c0_limits[i].max = 2;
|
||||
+ c0_limits[i++].types = BIT(NL80211_IFTYPE_STATION);
|
||||
+ c0_limits[i].max = 1;
|
||||
+ c0_limits[i++].types = BIT(NL80211_IFTYPE_P2P_DEVICE);
|
||||
+ c0_limits[i].max = 2;
|
||||
+ c0_limits[i++].types = BIT(NL80211_IFTYPE_P2P_CLIENT) |
|
||||
+ BIT(NL80211_IFTYPE_P2P_GO);
|
||||
+ c0_limits[i].max = 2;
|
||||
+ c0_limits[i++].types = BIT(NL80211_IFTYPE_AP);
|
||||
+ combo[c].max_interfaces = 5;
|
||||
+ } else if (p2p) {
|
||||
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MCHAN))
|
||||
combo[c].num_different_channels = 2;
|
||||
else
|
||||
combo[c].num_different_channels = 1;
|
||||
+ c0_limits[i].max = 1;
|
||||
+ c0_limits[i++].types = BIT(NL80211_IFTYPE_STATION);
|
||||
wiphy->interface_modes |= BIT(NL80211_IFTYPE_P2P_CLIENT) |
|
||||
BIT(NL80211_IFTYPE_P2P_GO) |
|
||||
BIT(NL80211_IFTYPE_P2P_DEVICE);
|
||||
@@ -6497,16 +6525,26 @@ static int brcmf_setup_ifmodes(struct wi
|
||||
c0_limits[i].max = 1;
|
||||
c0_limits[i++].types = BIT(NL80211_IFTYPE_P2P_CLIENT) |
|
||||
BIT(NL80211_IFTYPE_P2P_GO);
|
||||
+ combo[c].max_interfaces = i;
|
||||
+ } else if (rsdb) {
|
||||
+ combo[c].num_different_channels = 2;
|
||||
+ c0_limits[i].max = 2;
|
||||
+ c0_limits[i++].types = BIT(NL80211_IFTYPE_STATION);
|
||||
+ c0_limits[i].max = 2;
|
||||
+ c0_limits[i++].types = BIT(NL80211_IFTYPE_AP);
|
||||
+ combo[c].max_interfaces = 3;
|
||||
} else {
|
||||
combo[c].num_different_channels = 1;
|
||||
c0_limits[i].max = 1;
|
||||
+ c0_limits[i++].types = BIT(NL80211_IFTYPE_STATION);
|
||||
+ c0_limits[i].max = 1;
|
||||
c0_limits[i++].types = BIT(NL80211_IFTYPE_AP);
|
||||
+ combo[c].max_interfaces = i;
|
||||
}
|
||||
- combo[c].max_interfaces = i;
|
||||
combo[c].n_limits = i;
|
||||
combo[c].limits = c0_limits;
|
||||
|
||||
- if (p2p) {
|
||||
+ if (p2p && !rsdb) {
|
||||
c++;
|
||||
i = 0;
|
||||
p2p_limits = kcalloc(4, sizeof(*p2p_limits), GFP_KERNEL);
|
||||
@@ -0,0 +1,38 @@
|
||||
From 2635853ce4ab7654a77ab7080fb56de83408606b Mon Sep 17 00:00:00 2001
|
||||
From: Wright Feng <wright.feng@cypress.com>
|
||||
Date: Thu, 12 Dec 2019 00:52:51 +0100
|
||||
Subject: [PATCH 7/7] brcmfmac: not set mbss in vif if firmware does not
|
||||
support MBSS
|
||||
|
||||
With RSDB mode, FMAC and firmware are able to create 2 or more AP,
|
||||
so we should not set mbss in vif structure if firmware does not
|
||||
support MBSS feature.
|
||||
|
||||
Signed-off-by: Wright Feng <wright.feng@cypress.com>
|
||||
Signed-off-by: Soeren Moch <smoch@web.de>
|
||||
Reviewed-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -5293,6 +5293,7 @@ struct brcmf_cfg80211_vif *brcmf_alloc_v
|
||||
struct brcmf_cfg80211_vif *vif_walk;
|
||||
struct brcmf_cfg80211_vif *vif;
|
||||
bool mbss;
|
||||
+ struct brcmf_if *ifp = brcmf_get_ifp(cfg->pub, 0);
|
||||
|
||||
brcmf_dbg(TRACE, "allocating virtual interface (size=%zu)\n",
|
||||
sizeof(*vif));
|
||||
@@ -5305,7 +5306,8 @@ struct brcmf_cfg80211_vif *brcmf_alloc_v
|
||||
|
||||
brcmf_init_prof(&vif->profile);
|
||||
|
||||
- if (type == NL80211_IFTYPE_AP) {
|
||||
+ if (type == NL80211_IFTYPE_AP &&
|
||||
+ brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS)) {
|
||||
mbss = false;
|
||||
list_for_each_entry(vif_walk, &cfg->vif_list, list) {
|
||||
if (vif_walk->wdev.iftype == NL80211_IFTYPE_AP) {
|
||||
@@ -13,7 +13,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
@@ -1477,6 +1477,7 @@ int __init brcmf_core_init(void)
|
||||
@@ -1479,6 +1479,7 @@ int __init brcmf_core_init(void)
|
||||
{
|
||||
if (!schedule_work(&brcmf_driver_work))
|
||||
return -EBUSY;
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Fri, 27 Sep 2019 23:12:08 +0200
|
||||
Subject: [PATCH] backports: pci: Include linux/pci-aspm.h
|
||||
|
||||
In upstream commit 7ce2e76a0420 linux/pci-aspm.h was removed and the
|
||||
content included into pci.h. Add an include to have the functions
|
||||
defined in linux/pci-aspm.h available when linux/pci.h is included.
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
---
|
||||
|
||||
--- a/backport-include/linux/pci.h
|
||||
+++ b/backport-include/linux/pci.h
|
||||
@@ -3,6 +3,10 @@
|
||||
#include_next <linux/pci.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
+#if LINUX_VERSION_IS_LESS(5,4,0)
|
||||
+#include <linux/pci-aspm.h>
|
||||
+#endif
|
||||
+
|
||||
#ifndef module_pci_driver
|
||||
/**
|
||||
* module_pci_driver() - Helper macro for registering a PCI driver
|
||||
@@ -0,0 +1,43 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Mon, 28 Oct 2019 15:20:40 +0100
|
||||
Subject: [PATCH] backport: add pci_disable_link_state wrapper with return code
|
||||
|
||||
The signature of pci_disable_link_state was changed to indicate if the state
|
||||
was successfully disabled. Since the old version did not have this, add a
|
||||
wrapper which checks the pcie register to determine the return code
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/backport-include/linux/pci.h
|
||||
+++ b/backport-include/linux/pci.h
|
||||
@@ -236,4 +236,29 @@ static inline struct pci_dev *pcie_find_
|
||||
(PCI_IRQ_LEGACY | PCI_IRQ_MSI | PCI_IRQ_MSIX)
|
||||
#endif
|
||||
|
||||
+#if defined(CONFIG_PCI) && LINUX_VERSION_IS_LESS(5,3,0)
|
||||
+
|
||||
+static inline int
|
||||
+LINUX_BACKPORT(pci_disable_link_state)(struct pci_dev *pdev, int state)
|
||||
+{
|
||||
+ u16 aspmc;
|
||||
+
|
||||
+ pci_disable_link_state(pdev, state);
|
||||
+
|
||||
+ pcie_capability_read_word(pdev, PCI_EXP_LNKCTL, &aspmc);
|
||||
+ if ((state & PCIE_LINK_STATE_L0S) &&
|
||||
+ (aspmc & PCI_EXP_LNKCTL_ASPM_L0S))
|
||||
+ return -EPERM;
|
||||
+
|
||||
+ if ((state & PCIE_LINK_STATE_L1) &&
|
||||
+ (aspmc & PCI_EXP_LNKCTL_ASPM_L1))
|
||||
+ return -EPERM;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#define pci_disable_link_state LINUX_BACKPORT(pci_disable_link_state)
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
#endif /* _BACKPORT_LINUX_PCI_H */
|
||||
@@ -0,0 +1,44 @@
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Mon, 16 Dec 2019 20:47:06 +0100
|
||||
Subject: [PATCH] rt2x00: add throughput LED trigger
|
||||
|
||||
This adds a (currently missing) throughput LED trigger for the rt2x00
|
||||
driver. Previously, LED triggers had to be assigned to the netdev, which
|
||||
was limited to a single VAP.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
Tested-by: Christoph Krapp <achterin@googlemail.com>
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
||||
@@ -1140,6 +1140,19 @@ static void rt2x00lib_remove_hw(struct r
|
||||
kfree(rt2x00dev->spec.channels_info);
|
||||
}
|
||||
|
||||
+static const struct ieee80211_tpt_blink rt2x00_tpt_blink[] = {
|
||||
+ { .throughput = 0 * 1024, .blink_time = 334 },
|
||||
+ { .throughput = 1 * 1024, .blink_time = 260 },
|
||||
+ { .throughput = 2 * 1024, .blink_time = 220 },
|
||||
+ { .throughput = 5 * 1024, .blink_time = 190 },
|
||||
+ { .throughput = 10 * 1024, .blink_time = 170 },
|
||||
+ { .throughput = 25 * 1024, .blink_time = 150 },
|
||||
+ { .throughput = 54 * 1024, .blink_time = 130 },
|
||||
+ { .throughput = 120 * 1024, .blink_time = 110 },
|
||||
+ { .throughput = 265 * 1024, .blink_time = 80 },
|
||||
+ { .throughput = 586 * 1024, .blink_time = 50 },
|
||||
+};
|
||||
+
|
||||
static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev)
|
||||
{
|
||||
struct hw_mode_spec *spec = &rt2x00dev->spec;
|
||||
@@ -1222,6 +1235,10 @@ static int rt2x00lib_probe_hw(struct rt2
|
||||
|
||||
#undef RT2X00_TASKLET_INIT
|
||||
|
||||
+ ieee80211_create_tpt_led_trigger(rt2x00dev->hw,
|
||||
+ IEEE80211_TPT_LEDTRIG_FL_RADIO, rt2x00_tpt_blink,
|
||||
+ ARRAY_SIZE(rt2x00_tpt_blink));
|
||||
+
|
||||
/*
|
||||
* Register HW.
|
||||
*/
|
||||
@@ -0,0 +1,77 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Wed, 28 Aug 2019 12:13:55 +0200
|
||||
Subject: [PATCH] cfg80211: add local BSS receive time to survey information
|
||||
|
||||
This is useful for checking how much airtime is being used up by other
|
||||
transmissions on the channel, e.g. by calculating (time_rx - time_bss_rx)
|
||||
or (time_busy - time_bss_rx - time_tx)
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -668,6 +668,7 @@ ieee80211_chandef_max_power(struct cfg80
|
||||
* @SURVEY_INFO_TIME_RX: receive time was filled in
|
||||
* @SURVEY_INFO_TIME_TX: transmit time was filled in
|
||||
* @SURVEY_INFO_TIME_SCAN: scan time was filled in
|
||||
+ * @SURVEY_INFO_TIME_BSS_RX: local BSS receive time was filled in
|
||||
*
|
||||
* Used by the driver to indicate which info in &struct survey_info
|
||||
* it has filled in during the get_survey().
|
||||
@@ -681,6 +682,7 @@ enum survey_info_flags {
|
||||
SURVEY_INFO_TIME_RX = BIT(5),
|
||||
SURVEY_INFO_TIME_TX = BIT(6),
|
||||
SURVEY_INFO_TIME_SCAN = BIT(7),
|
||||
+ SURVEY_INFO_TIME_BSS_RX = BIT(8),
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -697,6 +699,7 @@ enum survey_info_flags {
|
||||
* @time_rx: amount of time the radio spent receiving data
|
||||
* @time_tx: amount of time the radio spent transmitting data
|
||||
* @time_scan: amount of time the radio spent for scanning
|
||||
+ * @time_bss_rx: amount of time the radio spent receiving data on a local BSS
|
||||
*
|
||||
* Used by dump_survey() to report back per-channel survey information.
|
||||
*
|
||||
@@ -711,6 +714,7 @@ struct survey_info {
|
||||
u64 time_rx;
|
||||
u64 time_tx;
|
||||
u64 time_scan;
|
||||
+ u64 time_bss_rx;
|
||||
u32 filled;
|
||||
s8 noise;
|
||||
};
|
||||
--- a/include/uapi/linux/nl80211.h
|
||||
+++ b/include/uapi/linux/nl80211.h
|
||||
@@ -3693,6 +3693,8 @@ enum nl80211_user_reg_hint_type {
|
||||
* @NL80211_SURVEY_INFO_TIME_SCAN: time the radio spent for scan
|
||||
* (on this channel or globally)
|
||||
* @NL80211_SURVEY_INFO_PAD: attribute used for padding for 64-bit alignment
|
||||
+ * @NL80211_SURVEY_INFO_TIME_BSS_RX: amount of time the radio spent
|
||||
+ * receiving local BSS data
|
||||
* @NL80211_SURVEY_INFO_MAX: highest survey info attribute number
|
||||
* currently defined
|
||||
* @__NL80211_SURVEY_INFO_AFTER_LAST: internal use
|
||||
@@ -3709,6 +3711,7 @@ enum nl80211_survey_info {
|
||||
NL80211_SURVEY_INFO_TIME_TX,
|
||||
NL80211_SURVEY_INFO_TIME_SCAN,
|
||||
NL80211_SURVEY_INFO_PAD,
|
||||
+ NL80211_SURVEY_INFO_TIME_BSS_RX,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_SURVEY_INFO_AFTER_LAST,
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -8367,6 +8367,10 @@ static int nl80211_send_survey(struct sk
|
||||
nla_put_u64_64bit(msg, NL80211_SURVEY_INFO_TIME_SCAN,
|
||||
survey->time_scan, NL80211_SURVEY_INFO_PAD))
|
||||
goto nla_put_failure;
|
||||
+ if ((survey->filled & SURVEY_INFO_TIME_BSS_RX) &&
|
||||
+ nla_put_u64_64bit(msg, NL80211_SURVEY_INFO_TIME_BSS_RX,
|
||||
+ survey->time_bss_rx, NL80211_SURVEY_INFO_PAD))
|
||||
+ goto nla_put_failure;
|
||||
|
||||
nla_nest_end(msg, infoattr);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -2968,6 +2968,7 @@ struct cfg80211_external_auth_params {
|
||||
@@ -2972,6 +2972,7 @@ struct cfg80211_external_auth_params {
|
||||
* (as advertised by the nl80211 feature flag.)
|
||||
* @get_tx_power: store the current TX power into the dbm variable;
|
||||
* return 0 if successful
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* @set_wds_peer: set the WDS peer for a WDS interface
|
||||
*
|
||||
@@ -3268,6 +3269,7 @@ struct cfg80211_ops {
|
||||
@@ -3272,6 +3273,7 @@ struct cfg80211_ops {
|
||||
enum nl80211_tx_power_setting type, int mbm);
|
||||
int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
|
||||
int *dbm);
|
||||
|
||||
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2019-08-22
|
||||
PKG_SOURCE_VERSION:=2a0edbb4473b71dfaa4756f7189abf6cb7f7be8b
|
||||
PKG_MIRROR_HASH:=a37975c179b929716c40d19fdcd5b131386d7f497eb8cd5d848be74e76d50d21
|
||||
PKG_SOURCE_DATE:=2020-01-04
|
||||
PKG_SOURCE_VERSION:=8a78567983a16869b77a0254b4917027df4a7ad9
|
||||
PKG_MIRROR_HASH:=0cc48bc7093b99dc7f43a5a83a3a00d205709326f529b91b0b14fe0d89cb783d
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
@@ -246,12 +246,12 @@ define KernelPackage/mt7603/install
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7615e/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7615_cr4.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7615_n9.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7615_rom_patch.bin \
|
||||
$(1)/lib/firmware
|
||||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,mt76-core))
|
||||
|
||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=w1-gpio-custom
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
#define DRV_NAME "w1-gpio-custom"
|
||||
#define DRV_DESC "Custom GPIO-based W1 driver"
|
||||
#define DRV_VERSION "0.1.1"
|
||||
#define DRV_VERSION "0.1.2"
|
||||
|
||||
#define PFX DRV_NAME ": "
|
||||
|
||||
@@ -86,7 +86,7 @@ static void w1_gpio_custom_cleanup(void)
|
||||
|
||||
for (i = 0; i < nr_devices; i++)
|
||||
if (devices[i])
|
||||
platform_device_put(devices[i]);
|
||||
platform_device_unregister(devices[i]);
|
||||
}
|
||||
|
||||
static int __init w1_gpio_custom_add_one(unsigned int id, unsigned int *params)
|
||||
|
||||
@@ -5,9 +5,9 @@ PKG_RELEASE=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git
|
||||
PKG_SOURCE_DATE:=2019-06-16
|
||||
PKG_SOURCE_VERSION:=ecf56174da9614a0b3107d33def463eefb4d7785
|
||||
PKG_MIRROR_HASH:=e3dd137d69848b8cf2dbc58d70452586dd4178b55977896ea3a9dedaf62c768c
|
||||
PKG_MIRROR_HASH:=90511058f49a178a816d520944cddba421f9eb50c319ef1623bed7aa22f94a3a
|
||||
PKG_SOURCE_DATE:=2019-12-28
|
||||
PKG_SOURCE_VERSION:=cd75136b1342e1e9dabf921be13240c6653640ed
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=ISC
|
||||
@@ -27,7 +27,7 @@ define Package/libubox
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Basic utility library
|
||||
ABI_VERSION:=20170601
|
||||
ABI_VERSION:=20191228
|
||||
DEPENDS:=
|
||||
endef
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wolfssl
|
||||
PKG_VERSION:=4.2.0-stable
|
||||
PKG_VERSION:=4.3.0-stable
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
|
||||
PKG_HASH:=3562af485c26cd7abe94d9404fbfc0c5c9bceb4aab29b81ebf5e6c2467507e12
|
||||
PKG_HASH:=6896f8ad6c44aff3e583006eeee839600848a0e37118ebbb7514eca9409ae08b
|
||||
|
||||
PKG_FIXUP:=libtool
|
||||
PKG_INSTALL:=1
|
||||
@@ -44,7 +44,7 @@ define Package/libwolfssl
|
||||
MENU:=1
|
||||
PROVIDES:=libcyassl
|
||||
DEPENDS:=+WOLFSSL_HAS_DEVCRYPTO:kmod-cryptodev +WOLFSSL_HAS_AFALG:kmod-crypto-user
|
||||
ABI_VERSION:=23
|
||||
ABI_VERSION:=24
|
||||
endef
|
||||
|
||||
define Package/libwolfssl/description
|
||||
|
||||
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||
PKG_NAME:=dnsmasq
|
||||
PKG_UPSTREAM_VERSION:=2.80
|
||||
PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION)))
|
||||
PKG_RELEASE:=14
|
||||
PKG_RELEASE:=15
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
From e710c34469af4378c2db6fa0b0be88313adcb68f Mon Sep 17 00:00:00 2001
|
||||
From: Alin Nastac <alin.nastac@gmail.com>
|
||||
Date: Mon, 30 Sep 2019 15:30:26 +0100
|
||||
Subject: [PATCH] Fix crash when negative SRV response over TCP gets stored in
|
||||
LRU cache entry.
|
||||
|
||||
Patch extended to receive side of pipe by SRK.
|
||||
---
|
||||
src/cache.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/src/cache.c
|
||||
+++ b/src/cache.c
|
||||
@@ -665,7 +665,11 @@ void cache_end_insert(void)
|
||||
if (flags & (F_IPV4 | F_IPV6 | F_DNSKEY | F_DS | F_SRV))
|
||||
read_write(daemon->pipe_to_parent, (unsigned char *)&new_chain->addr, sizeof(new_chain->addr), 0);
|
||||
if (flags & F_SRV)
|
||||
- blockdata_write(new_chain->addr.srv.target, new_chain->addr.srv.targetlen, daemon->pipe_to_parent);
|
||||
+ {
|
||||
+ /* A negative SRV entry is possible and has no data, obviously. */
|
||||
+ if (!(flags & F_NEG))
|
||||
+ blockdata_write(new_chain->addr.srv.target, new_chain->addr.srv.targetlen, daemon->pipe_to_parent);
|
||||
+ }
|
||||
#ifdef HAVE_DNSSEC
|
||||
if (flags & F_DNSKEY)
|
||||
{
|
||||
@@ -737,7 +741,7 @@ int cache_recv_insert(time_t now, int fd
|
||||
if (!read_write(fd, (unsigned char *)&addr, sizeof(addr), 1))
|
||||
return 0;
|
||||
|
||||
- if (flags & F_SRV && !(addr.srv.target = blockdata_read(fd, addr.srv.targetlen)))
|
||||
+ if ((flags & F_SRV) && !(flags & F_NEG) && !(addr.srv.target = blockdata_read(fd, addr.srv.targetlen)))
|
||||
return 0;
|
||||
|
||||
#ifdef HAVE_DNSSEC
|
||||
@@ -12,9 +12,9 @@ PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git
|
||||
PKG_SOURCE_DATE:=2019-09-15
|
||||
PKG_SOURCE_VERSION:=88d9ab643e6d69972c918fad44cc7f33783d92d9
|
||||
PKG_MIRROR_HASH:=e68b3b96a29c04bb5bcffe7cd77e77a1da33105f7e13cc8b599bf672d302120d
|
||||
PKG_SOURCE_DATE:=2019-12-16
|
||||
PKG_SOURCE_VERSION:=e53fec897838aca411cb5fcdb9bf795e73414565
|
||||
PKG_MIRROR_HASH:=853dfcd464e2c6d09e37720421ebccb20581159763416fcd5ac8aad439e206b7
|
||||
|
||||
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uhttpd
|
||||
PKG_RELEASE:=4
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git
|
||||
PKG_SOURCE_DATE:=2019-08-17
|
||||
PKG_SOURCE_VERSION:=6b03f9605323df23d12e3876feb466f53f8d50c4
|
||||
PKG_MIRROR_HASH:=4df96054a4fce659e6c849feae7850d542b37ad5caffc1485b7a63c7c2764cb1
|
||||
PKG_SOURCE_DATE:=2019-12-22
|
||||
PKG_SOURCE_VERSION:=5f9ae5738372aaa3a6be2f0a278933563d3f191a
|
||||
PKG_MIRROR_HASH:=16977c2d7e68f6db3241f874df625af9bd3bafa06fe4499ecb3561c825321e5d
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=ISC
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ca-certificates
|
||||
PKG_VERSION:=20190110
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
PKG_MAINTAINER:=
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
|
||||
@@ -24,6 +24,7 @@ define Package/ca-certificates
|
||||
CATEGORY:=Base system
|
||||
TITLE:=System CA certificates
|
||||
PKGARCH:=all
|
||||
PROVIDES:=ca-certs
|
||||
endef
|
||||
|
||||
define Package/ca-bundle
|
||||
@@ -31,6 +32,7 @@ define Package/ca-bundle
|
||||
CATEGORY:=Base system
|
||||
TITLE:=System CA certificates as a bundle
|
||||
PKGARCH:=all
|
||||
PROVIDES:=ca-certs
|
||||
endef
|
||||
|
||||
define Build/Install
|
||||
@@ -59,5 +61,5 @@ define Package/ca-bundle/install
|
||||
cat $(PKG_INSTALL_DIR)/usr/share/ca-certificates/*/*.crt >$(1)/etc/ssl/certs/ca-certificates.crt
|
||||
$(LN) /etc/ssl/certs/ca-certificates.crt $(1)/etc/ssl/cert.pem
|
||||
endef
|
||||
$(eval $(call BuildPackage,ca-certificates))
|
||||
$(eval $(call BuildPackage,ca-bundle))
|
||||
$(eval $(call BuildPackage,ca-certificates))
|
||||
|
||||
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
|
||||
PKG_SOURCE_DATE:=2019-08-28
|
||||
PKG_SOURCE_VERSION:=6a61b9ac105b8eb28680e728a2723e302a91304d
|
||||
PKG_MIRROR_HASH:=f617d06ccea732fcbfdc2a2bd70c59726d37f61de100fae895d718884a9624d1
|
||||
PKG_MIRROR_HASH:=7077c90f3938c7316ff7c8c353a178c4de61ef107b08b79209b93916a67c951d
|
||||
PKG_SOURCE_DATE:=2020-01-05
|
||||
PKG_SOURCE_VERSION:=823faa0f3edb93fac528bc35588cea81f0a77146
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@@ -12,9 +12,9 @@ PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
|
||||
PKG_MIRROR_HASH:=4a99856ac9696a9c8721aa090780f2bee929aae056561729d7a01efe8fd584ec
|
||||
PKG_SOURCE_DATE:=2019-09-16
|
||||
PKG_SOURCE_VERSION:=62dc8c0efe1e8acd694b893effd973a295c5b676
|
||||
PKG_MIRROR_HASH:=036a42aa87741fa5e587195255c01b6b561bcb7b3858be12e8781949ecb1bda0
|
||||
PKG_SOURCE_DATE:=2020-01-04
|
||||
PKG_SOURCE_VERSION:=a5af33ce9a16f6aa599f19cc7161e067fab9495d
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git
|
||||
PKG_SOURCE_DATE:=2018-10-06
|
||||
PKG_SOURCE_VERSION:=221ce7e7ff1bd1a0c9995fa9d32f58e865f7207f
|
||||
PKG_MIRROR_HASH:=e6ab3f009688740eb6d7a1857df59a6ba10ae8ae0fac78ae0fd6672f71c02dce
|
||||
PKG_SOURCE_DATE:=2019-12-27
|
||||
PKG_SOURCE_VERSION:=041c9d1c052bb4936fd03240f7d0dd64aedda972
|
||||
PKG_MIRROR_HASH:=7febbe78dd178d8d7ccacff54c00fb2d19a53624005920db8cd85236f54f8324
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=LGPL-2.1
|
||||
@@ -36,7 +36,7 @@ define Package/libubus
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
DEPENDS:=+libubox
|
||||
ABI_VERSION:=20170705
|
||||
ABI_VERSION:=20191227
|
||||
TITLE:=OpenWrt RPC client library
|
||||
endef
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ucert.git
|
||||
PKG_SOURCE_DATE:=2018-09-18
|
||||
PKG_SOURCE_VERSION:=e1c722b1b6cbf2527b3178342464e56b97825874
|
||||
PKG_MIRROR_HASH:=36dcca7c2d649a6c34a8daaaef4698fbeb808fd6580c6bfb1ca35f4f06825d17
|
||||
PKG_SOURCE_DATE:=2019-11-29
|
||||
PKG_SOURCE_VERSION:=e4bd927cc7c756de5f3005824b63a7a6d827e1ee
|
||||
PKG_MIRROR_HASH:=cc6853e861110dd89cc8bd909c5f02150c2c3f9a77de66017393515644a7ac36
|
||||
|
||||
CMAKE_INSTALL:=1
|
||||
PKG_CHECK_FORMAT_SECURITY:=1
|
||||
|
||||
@@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=adb
|
||||
PKG_VERSION:=android.5.0.2_r1
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://android.googlesource.com/platform/system/core
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- /dev/null
|
||||
+++ b/adb/Makefile 2016-10-19 15:28:03.421194137 +0200
|
||||
+++ b/adb/Makefile
|
||||
@@ -0,0 +1,42 @@
|
||||
+SRCS+= adb.c
|
||||
+SRCS+= adb_auth_host.c
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From 58b01e01875e2f6ae593ded197430bc23713dd0a Mon Sep 17 00:00:00 2001
|
||||
From: Ingo Rohloff <lundril@gmx.de>
|
||||
Date: Fri, 16 May 2014 21:51:41 +0200
|
||||
Subject: [PATCH] ADB on linux: Handle USB SuperSpeed extra Descriptors
|
||||
|
||||
Under Linux, ADB manually parses USB Descriptors to check for
|
||||
possible ADB USB Interfaces. USB Devices connected with SuperSpeed
|
||||
will exhibit extra USB SuperSpeed Endpoint Companion Descriptors.
|
||||
This patch handles these USB SuperSpeed specific USB Descriptors.
|
||||
|
||||
Change-Id: Icd1e5fdde0b324c7df4f933583499f2c52a922f3
|
||||
Signed-off-by: Ingo Rohloff <lundril@gmx.de>
|
||||
---
|
||||
adb/usb_linux.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
--- a/adb/usb_linux.c
|
||||
+++ b/adb/usb_linux.c
|
||||
@@ -238,8 +238,20 @@ static void find_usb_device(const char *
|
||||
// looks like ADB...
|
||||
ep1 = (struct usb_endpoint_descriptor *)bufptr;
|
||||
bufptr += USB_DT_ENDPOINT_SIZE;
|
||||
+ // For USB 3.0 SuperSpeed devices, skip potential
|
||||
+ // USB 3.0 SuperSpeed Endpoint Companion descriptor
|
||||
+ if (bufptr+2 <= devdesc + desclength &&
|
||||
+ bufptr[0] == USB_DT_SS_EP_COMP_SIZE &&
|
||||
+ bufptr[1] == USB_DT_SS_ENDPOINT_COMP) {
|
||||
+ bufptr += USB_DT_SS_EP_COMP_SIZE;
|
||||
+ }
|
||||
ep2 = (struct usb_endpoint_descriptor *)bufptr;
|
||||
bufptr += USB_DT_ENDPOINT_SIZE;
|
||||
+ if (bufptr+2 <= devdesc + desclength &&
|
||||
+ bufptr[0] == USB_DT_SS_EP_COMP_SIZE &&
|
||||
+ bufptr[1] == USB_DT_SS_ENDPOINT_COMP) {
|
||||
+ bufptr += USB_DT_SS_EP_COMP_SIZE;
|
||||
+ }
|
||||
|
||||
if (bufptr > devdesc + desclength ||
|
||||
ep1->bLength != USB_DT_ENDPOINT_SIZE ||
|
||||
@@ -197,6 +197,7 @@ foreach my $mirror (@ARGV) {
|
||||
push @mirrors, "https://mirror.netcologne.de/apache.org/$1";
|
||||
push @mirrors, "https://mirror.aarnet.edu.au/pub/apache/$1";
|
||||
push @mirrors, "https://mirror.csclub.uwaterloo.ca/apache/$1";
|
||||
push @mirrors, "https://archive.apache.org/dist/$1";
|
||||
push @mirrors, "http://mirror.cogentco.com/pub/apache/$1";
|
||||
push @mirrors, "http://mirror.navercorp.com/apache/$1";
|
||||
push @mirrors, "http://ftp.jaist.ac.jp/pub/apache/$1";
|
||||
|
||||
@@ -67,7 +67,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
--- a/drivers/crypto/amcc/crypto4xx_core.c
|
||||
+++ b/drivers/crypto/amcc/crypto4xx_core.c
|
||||
@@ -973,7 +973,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -969,7 +969,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
|
||||
sa->sa_command_1.bf.hash_crypto_offset = 0;
|
||||
pd->pd_ctl.w = ctx->pd_ctl;
|
||||
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
--- a/drivers/crypto/amcc/crypto4xx_core.c
|
||||
+++ b/drivers/crypto/amcc/crypto4xx_core.c
|
||||
@@ -1125,7 +1125,9 @@ struct crypto4xx_alg_common crypto4xx_al
|
||||
@@ -1121,7 +1121,9 @@ struct crypto4xx_alg_common crypto4xx_al
|
||||
.cra_name = "cbc(aes)",
|
||||
.cra_driver_name = "cbc-aes-ppc4xx",
|
||||
.cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
|
||||
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
--- a/drivers/crypto/amcc/crypto4xx_core.c
|
||||
+++ b/drivers/crypto/amcc/crypto4xx_core.c
|
||||
@@ -1090,7 +1090,6 @@ static void crypto4xx_bh_tasklet_cb(unsi
|
||||
@@ -1086,7 +1086,6 @@ static void crypto4xx_bh_tasklet_cb(unsi
|
||||
pd->pd_ctl.bf.pe_done = 0;
|
||||
crypto4xx_pd_done(core_dev->dev, tail);
|
||||
crypto4xx_put_pd_to_pdr(core_dev->dev, tail);
|
||||
|
||||
@@ -109,7 +109,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
#include <crypto/sha.h>
|
||||
#include "crypto4xx_reg_def.h"
|
||||
#include "crypto4xx_core.h"
|
||||
@@ -1144,6 +1145,103 @@ struct crypto4xx_alg_common crypto4xx_al
|
||||
@@ -1140,6 +1141,103 @@ struct crypto4xx_alg_common crypto4xx_al
|
||||
}
|
||||
}
|
||||
}},
|
||||
|
||||
@@ -27,7 +27,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
#include "crypto4xx_reg_def.h"
|
||||
#include "crypto4xx_core.h"
|
||||
#include "crypto4xx_sa.h"
|
||||
@@ -483,111 +484,44 @@ static inline struct ce_sd *crypto4xx_ge
|
||||
@@ -479,111 +480,44 @@ static inline struct ce_sd *crypto4xx_ge
|
||||
return (struct ce_sd *)(dev->sdr + sizeof(struct ce_sd) * idx);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
- dev->scatter_buffer_size * PPC4XX_NUM_SD,
|
||||
+ PPC4XX_SD_BUFFER_SIZE * PPC4XX_NUM_SD,
|
||||
&dev->scatter_buffer_pa, GFP_ATOMIC);
|
||||
if (!dev->scatter_buffer_va) {
|
||||
dma_free_coherent(dev->core_dev->device,
|
||||
@@ -412,7 +411,7 @@ static u32 crypto4xx_build_sdr(struct cr
|
||||
if (!dev->scatter_buffer_va)
|
||||
return -ENOMEM;
|
||||
@@ -408,7 +407,7 @@ static u32 crypto4xx_build_sdr(struct cr
|
||||
|
||||
for (i = 0; i < PPC4XX_NUM_SD; i++) {
|
||||
sd_array[i].ptr = dev->scatter_buffer_pa +
|
||||
@@ -38,7 +38,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -427,7 +426,7 @@ static void crypto4xx_destroy_sdr(struct
|
||||
@@ -423,7 +422,7 @@ static void crypto4xx_destroy_sdr(struct
|
||||
|
||||
if (dev->scatter_buffer_va)
|
||||
dma_free_coherent(dev->core_dev->device,
|
||||
|
||||
@@ -171,9 +171,9 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
/* alloc memory for scatter descriptor ring */
|
||||
dev->sdr = dma_alloc_coherent(dev->core_dev->device,
|
||||
@@ -407,10 +403,8 @@ static u32 crypto4xx_build_sdr(struct cr
|
||||
@@ -403,10 +399,8 @@ static u32 crypto4xx_build_sdr(struct cr
|
||||
if (!dev->scatter_buffer_va)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
- sd_array = dev->sdr;
|
||||
-
|
||||
@@ -183,7 +183,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
PPC4XX_SD_BUFFER_SIZE * i;
|
||||
}
|
||||
|
||||
@@ -480,7 +474,7 @@ static inline struct ce_sd *crypto4xx_ge
|
||||
@@ -476,7 +470,7 @@ static inline struct ce_sd *crypto4xx_ge
|
||||
{
|
||||
*sd_dma = dev->sdr_pa + sizeof(struct ce_sd) * idx;
|
||||
|
||||
@@ -192,7 +192,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
}
|
||||
|
||||
static void crypto4xx_copy_pkt_to_dst(struct crypto4xx_device *dev,
|
||||
@@ -529,11 +523,10 @@ static u32 crypto4xx_copy_digest_to_dst(
|
||||
@@ -525,11 +519,10 @@ static u32 crypto4xx_copy_digest_to_dst(
|
||||
struct crypto4xx_ctx *ctx)
|
||||
{
|
||||
struct dynamic_sa_ctl *sa = (struct dynamic_sa_ctl *) ctx->sa_in;
|
||||
@@ -206,7 +206,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
SA_HASH_ALG_SHA1_DIGEST_SIZE);
|
||||
}
|
||||
|
||||
@@ -616,11 +609,9 @@ static u32 crypto4xx_ahash_done(struct c
|
||||
@@ -612,11 +605,9 @@ static u32 crypto4xx_ahash_done(struct c
|
||||
|
||||
static u32 crypto4xx_pd_done(struct crypto4xx_device *dev, u32 idx)
|
||||
{
|
||||
@@ -220,7 +220,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
if (crypto_tfm_alg_type(pd_uinfo->async_req->tfm) ==
|
||||
CRYPTO_ALG_TYPE_ABLKCIPHER)
|
||||
return crypto4xx_ablkcipher_done(dev, pd_uinfo, pd);
|
||||
@@ -721,7 +712,6 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -717,7 +708,6 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
unsigned long flags;
|
||||
struct pd_uinfo *pd_uinfo = NULL;
|
||||
unsigned int nbytes = datalen, idx;
|
||||
@@ -228,7 +228,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
u32 gd_idx = 0;
|
||||
|
||||
/* figure how many gd is needed */
|
||||
@@ -780,17 +770,15 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -776,17 +766,15 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
}
|
||||
spin_unlock_irqrestore(&dev->core_dev->lock, flags);
|
||||
|
||||
@@ -248,7 +248,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
if (ctx->direction == DIR_INBOUND)
|
||||
memcpy(sa, ctx->sa_in, ctx->sa_len * 4);
|
||||
else
|
||||
@@ -800,14 +788,15 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -796,14 +784,15 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
&pd_uinfo->sr_pa, 4);
|
||||
|
||||
if (iv_len)
|
||||
@@ -267,7 +267,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
}
|
||||
}
|
||||
pd->sa_len = ctx->sa_len;
|
||||
@@ -1015,9 +1004,8 @@ static void crypto4xx_bh_tasklet_cb(unsi
|
||||
@@ -1011,9 +1000,8 @@ static void crypto4xx_bh_tasklet_cb(unsi
|
||||
|
||||
while (core_dev->dev->pdr_head != core_dev->dev->pdr_tail) {
|
||||
tail = core_dev->dev->pdr_tail;
|
||||
|
||||
@@ -38,7 +38,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
--- a/drivers/crypto/amcc/crypto4xx_core.c
|
||||
+++ b/drivers/crypto/amcc/crypto4xx_core.c
|
||||
@@ -1157,7 +1157,7 @@ struct crypto4xx_alg_common crypto4xx_al
|
||||
@@ -1153,7 +1153,7 @@ struct crypto4xx_alg_common crypto4xx_al
|
||||
.min_keysize = AES_MIN_KEY_SIZE,
|
||||
.max_keysize = AES_MAX_KEY_SIZE,
|
||||
.ivsize = AES_IV_SIZE,
|
||||
|
||||
@@ -56,7 +56,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
#include "crypto4xx_reg_def.h"
|
||||
#include "crypto4xx_core.h"
|
||||
#include "crypto4xx_sa.h"
|
||||
@@ -582,8 +583,10 @@ static u32 crypto4xx_ablkcipher_done(str
|
||||
@@ -578,8 +579,10 @@ static u32 crypto4xx_ablkcipher_done(str
|
||||
}
|
||||
|
||||
crypto4xx_ret_sg_desc(dev, pd_uinfo);
|
||||
@@ -69,7 +69,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -600,9 +603,10 @@ static u32 crypto4xx_ahash_done(struct c
|
||||
@@ -596,9 +599,10 @@ static u32 crypto4xx_ahash_done(struct c
|
||||
crypto4xx_copy_digest_to_dst(pd_uinfo,
|
||||
crypto_tfm_ctx(ahash_req->base.tfm));
|
||||
crypto4xx_ret_sg_desc(dev, pd_uinfo);
|
||||
@@ -83,7 +83,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -713,6 +717,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -709,6 +713,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
struct pd_uinfo *pd_uinfo = NULL;
|
||||
unsigned int nbytes = datalen, idx;
|
||||
u32 gd_idx = 0;
|
||||
@@ -91,7 +91,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
/* figure how many gd is needed */
|
||||
num_gd = sg_nents_for_len(src, datalen);
|
||||
@@ -743,6 +748,31 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -739,6 +744,31 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
* already got must be return the original place.
|
||||
*/
|
||||
spin_lock_irqsave(&dev->core_dev->lock, flags);
|
||||
@@ -123,7 +123,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
if (num_gd) {
|
||||
fst_gd = crypto4xx_get_n_gd(dev, num_gd);
|
||||
if (fst_gd == ERING_WAS_FULL) {
|
||||
@@ -897,11 +927,12 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -893,11 +923,12 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
sa->sa_command_1.bf.hash_crypto_offset = 0;
|
||||
pd->pd_ctl.w = ctx->pd_ctl;
|
||||
pd->pd_ctl_len.w = 0x00400000 | datalen;
|
||||
@@ -138,7 +138,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1006,7 +1037,7 @@ static void crypto4xx_bh_tasklet_cb(unsi
|
||||
@@ -1002,7 +1033,7 @@ static void crypto4xx_bh_tasklet_cb(unsi
|
||||
tail = core_dev->dev->pdr_tail;
|
||||
pd_uinfo = &core_dev->dev->pdr_uinfo[tail];
|
||||
pd = &core_dev->dev->pdr[tail];
|
||||
|
||||
@@ -45,7 +45,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
ctx->is_hash = 0;
|
||||
--- a/drivers/crypto/amcc/crypto4xx_core.c
|
||||
+++ b/drivers/crypto/amcc/crypto4xx_core.c
|
||||
@@ -623,42 +623,6 @@ static u32 crypto4xx_pd_done(struct cryp
|
||||
@@ -619,42 +619,6 @@ static u32 crypto4xx_pd_done(struct cryp
|
||||
return crypto4xx_ahash_done(dev, pd_uinfo);
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
static void crypto4xx_stop_all(struct crypto4xx_core_device *core_dev)
|
||||
{
|
||||
crypto4xx_destroy_pdr(core_dev->dev);
|
||||
@@ -818,8 +782,8 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -814,8 +778,8 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
&pd_uinfo->sr_pa, 4);
|
||||
|
||||
if (iv_len)
|
||||
|
||||
@@ -263,7 +263,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
/**
|
||||
* alloc memory for the gather ring
|
||||
* no need to alloc buf for the ring
|
||||
@@ -520,18 +514,16 @@ static void crypto4xx_copy_pkt_to_dst(st
|
||||
@@ -516,18 +510,16 @@ static void crypto4xx_copy_pkt_to_dst(st
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
}
|
||||
|
||||
static void crypto4xx_ret_sg_desc(struct crypto4xx_device *dev,
|
||||
@@ -600,7 +592,7 @@ static u32 crypto4xx_ahash_done(struct c
|
||||
@@ -596,7 +588,7 @@ static u32 crypto4xx_ahash_done(struct c
|
||||
ahash_req = ahash_request_cast(pd_uinfo->async_req);
|
||||
ctx = crypto_tfm_ctx(ahash_req->base.tfm);
|
||||
|
||||
@@ -294,7 +294,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
crypto_tfm_ctx(ahash_req->base.tfm));
|
||||
crypto4xx_ret_sg_desc(dev, pd_uinfo);
|
||||
|
||||
@@ -660,17 +652,17 @@ static u32 get_next_sd(u32 current)
|
||||
@@ -656,17 +648,17 @@ static u32 get_next_sd(u32 current)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
struct ce_gd *gd;
|
||||
struct ce_pd *pd;
|
||||
u32 num_gd, num_sd;
|
||||
@@ -678,8 +670,9 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -674,8 +666,9 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
u32 fst_sd = 0xffffffff;
|
||||
u32 pd_entry;
|
||||
unsigned long flags;
|
||||
@@ -329,7 +329,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
u32 gd_idx = 0;
|
||||
bool is_busy;
|
||||
|
||||
@@ -693,7 +686,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -689,7 +682,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
num_gd = 0;
|
||||
|
||||
/* figure how many sd is needed */
|
||||
@@ -338,7 +338,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
num_sd = 0;
|
||||
} else {
|
||||
if (datalen > PPC4XX_SD_BUFFER_SIZE) {
|
||||
@@ -764,37 +757,27 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -760,37 +753,27 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
}
|
||||
spin_unlock_irqrestore(&dev->core_dev->lock, flags);
|
||||
|
||||
@@ -389,7 +389,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
/* get first gd we are going to use */
|
||||
gd_idx = fst_gd;
|
||||
pd_uinfo->first_gd = fst_gd;
|
||||
@@ -803,27 +786,30 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -799,27 +782,30 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
pd->src = gd_dma;
|
||||
/* enable gather */
|
||||
sa->sa_command_0.bf.gather = 1;
|
||||
@@ -430,7 +430,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
/*
|
||||
* Disable gather in sa command
|
||||
*/
|
||||
@@ -834,25 +820,24 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -830,25 +816,24 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
pd_uinfo->first_gd = 0xffffffff;
|
||||
pd_uinfo->num_gd = 0;
|
||||
}
|
||||
@@ -463,7 +463,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
u32 sd_idx = fst_sd;
|
||||
nbytes = datalen;
|
||||
sa->sa_command_0.bf.scatter = 1;
|
||||
@@ -866,7 +851,6 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -862,7 +847,6 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
sd->ctl.done = 0;
|
||||
sd->ctl.rdy = 1;
|
||||
/* sd->ptr should be setup by sd_init routine*/
|
||||
@@ -471,7 +471,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
if (nbytes >= PPC4XX_SD_BUFFER_SIZE)
|
||||
nbytes -= PPC4XX_SD_BUFFER_SIZE;
|
||||
else
|
||||
@@ -877,19 +861,23 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -873,19 +857,23 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
||||
/* setup scatter descriptor */
|
||||
sd->ctl.done = 0;
|
||||
sd->ctl.rdy = 1;
|
||||
|
||||
@@ -42,7 +42,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
if (n >= PPC4XX_NUM_GD)
|
||||
return ERING_WAS_FULL;
|
||||
|
||||
@@ -625,17 +626,6 @@ static void crypto4xx_stop_all(struct cr
|
||||
@@ -621,17 +622,6 @@ static void crypto4xx_stop_all(struct cr
|
||||
kfree(core_dev);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -863,16 +866,16 @@ int crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -859,16 +862,16 @@ int crypto4xx_build_pd(struct crypto_asy
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
writel(1, dev->ce_base + CRYPTO4XX_INT_DESCR_RD);
|
||||
return is_busy ? -EBUSY : -EINPROGRESS;
|
||||
}
|
||||
@@ -973,23 +976,23 @@ static void crypto4xx_bh_tasklet_cb(unsi
|
||||
@@ -969,23 +972,23 @@ static void crypto4xx_bh_tasklet_cb(unsi
|
||||
struct crypto4xx_core_device *core_dev = dev_get_drvdata(dev);
|
||||
struct pd_uinfo *pd_uinfo;
|
||||
struct ce_pd *pd;
|
||||
|
||||
@@ -167,7 +167,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
/**
|
||||
* alloc memory for the gather ring
|
||||
* no need to alloc buf for the ring
|
||||
@@ -892,8 +861,6 @@ static int crypto4xx_alg_init(struct cry
|
||||
@@ -888,8 +857,6 @@ static int crypto4xx_alg_init(struct cry
|
||||
ctx->dev = amcc_alg->dev;
|
||||
ctx->sa_in = NULL;
|
||||
ctx->sa_out = NULL;
|
||||
@@ -176,7 +176,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
ctx->sa_len = 0;
|
||||
|
||||
switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) {
|
||||
@@ -914,7 +881,6 @@ static void crypto4xx_alg_exit(struct cr
|
||||
@@ -910,7 +877,6 @@ static void crypto4xx_alg_exit(struct cr
|
||||
struct crypto4xx_ctx *ctx = crypto_tfm_ctx(tfm);
|
||||
|
||||
crypto4xx_free_sa(ctx);
|
||||
|
||||
@@ -116,7 +116,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
#include <crypto/internal/skcipher.h>
|
||||
#include "crypto4xx_reg_def.h"
|
||||
#include "crypto4xx_core.h"
|
||||
@@ -518,7 +520,7 @@ static void crypto4xx_ret_sg_desc(struct
|
||||
@@ -514,7 +516,7 @@ static void crypto4xx_ret_sg_desc(struct
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
struct pd_uinfo *pd_uinfo,
|
||||
struct ce_pd *pd)
|
||||
{
|
||||
@@ -552,11 +554,9 @@ static u32 crypto4xx_ablkcipher_done(str
|
||||
@@ -548,11 +550,9 @@ static u32 crypto4xx_ablkcipher_done(str
|
||||
if (pd_uinfo->state & PD_ENTRY_BUSY)
|
||||
ablkcipher_request_complete(ablk_req, -EINPROGRESS);
|
||||
ablkcipher_request_complete(ablk_req, 0);
|
||||
@@ -138,7 +138,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
struct pd_uinfo *pd_uinfo)
|
||||
{
|
||||
struct crypto4xx_ctx *ctx;
|
||||
@@ -572,20 +572,88 @@ static u32 crypto4xx_ahash_done(struct c
|
||||
@@ -568,20 +568,88 @@ static u32 crypto4xx_ahash_done(struct c
|
||||
if (pd_uinfo->state & PD_ENTRY_BUSY)
|
||||
ahash_request_complete(ahash_req, -EINPROGRESS);
|
||||
ahash_request_complete(ahash_req, 0);
|
||||
@@ -234,7 +234,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
}
|
||||
|
||||
static void crypto4xx_stop_all(struct crypto4xx_core_device *core_dev)
|
||||
@@ -621,8 +689,10 @@ int crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -617,8 +685,10 @@ int crypto4xx_build_pd(struct crypto_asy
|
||||
const unsigned int datalen,
|
||||
const __le32 *iv, const u32 iv_len,
|
||||
const struct dynamic_sa_ctl *req_sa,
|
||||
@@ -246,7 +246,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
struct crypto4xx_device *dev = ctx->dev;
|
||||
struct dynamic_sa_ctl *sa;
|
||||
struct ce_gd *gd;
|
||||
@@ -636,18 +706,25 @@ int crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -632,18 +702,25 @@ int crypto4xx_build_pd(struct crypto_asy
|
||||
unsigned int nbytes = datalen;
|
||||
size_t offset_to_sr_ptr;
|
||||
u32 gd_idx = 0;
|
||||
@@ -279,7 +279,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
if (sg_is_last(dst)) {
|
||||
num_sd = 0;
|
||||
} else {
|
||||
@@ -733,6 +810,7 @@ int crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -729,6 +806,7 @@ int crypto4xx_build_pd(struct crypto_asy
|
||||
sa = pd_uinfo->sa_va;
|
||||
memcpy(sa, req_sa, sa_len * 4);
|
||||
|
||||
@@ -287,7 +287,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
offset_to_sr_ptr = get_dynamic_sa_offset_state_ptr_field(sa);
|
||||
*(u32 *)((unsigned long)sa + offset_to_sr_ptr) = pd_uinfo->sr_pa;
|
||||
|
||||
@@ -839,7 +917,7 @@ int crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -835,7 +913,7 @@ int crypto4xx_build_pd(struct crypto_asy
|
||||
((crypto_tfm_alg_type(req->tfm) == CRYPTO_ALG_TYPE_AHASH) |
|
||||
(crypto_tfm_alg_type(req->tfm) == CRYPTO_ALG_TYPE_AEAD) ?
|
||||
PD_CTL_HASH_FINAL : 0);
|
||||
@@ -296,7 +296,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
pd_uinfo->state = PD_ENTRY_INUSE | (is_busy ? PD_ENTRY_BUSY : 0);
|
||||
|
||||
wmb();
|
||||
@@ -852,40 +930,68 @@ int crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -848,40 +926,68 @@ int crypto4xx_build_pd(struct crypto_asy
|
||||
/**
|
||||
* Algorithm Registration Functions
|
||||
*/
|
||||
@@ -385,7 +385,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
{
|
||||
struct crypto4xx_alg *alg;
|
||||
int i;
|
||||
@@ -900,6 +1006,10 @@ int crypto4xx_register_alg(struct crypto
|
||||
@@ -896,6 +1002,10 @@ int crypto4xx_register_alg(struct crypto
|
||||
alg->dev = sec_dev;
|
||||
|
||||
switch (alg->alg.type) {
|
||||
@@ -396,7 +396,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
case CRYPTO_ALG_TYPE_AHASH:
|
||||
rc = crypto_register_ahash(&alg->alg.u.hash);
|
||||
break;
|
||||
@@ -929,6 +1039,10 @@ static void crypto4xx_unregister_alg(str
|
||||
@@ -925,6 +1035,10 @@ static void crypto4xx_unregister_alg(str
|
||||
crypto_unregister_ahash(&alg->alg.u.hash);
|
||||
break;
|
||||
|
||||
@@ -407,7 +407,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
default:
|
||||
crypto_unregister_alg(&alg->alg.u.cipher);
|
||||
}
|
||||
@@ -982,7 +1096,7 @@ static irqreturn_t crypto4xx_ce_interrup
|
||||
@@ -978,7 +1092,7 @@ static irqreturn_t crypto4xx_ce_interrup
|
||||
/**
|
||||
* Supported Crypto Algorithms
|
||||
*/
|
||||
@@ -416,7 +416,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
/* Crypto AES modes */
|
||||
{ .type = CRYPTO_ALG_TYPE_ABLKCIPHER, .u.cipher = {
|
||||
.cra_name = "cbc(aes)",
|
||||
@@ -994,8 +1108,8 @@ struct crypto4xx_alg_common crypto4xx_al
|
||||
@@ -990,8 +1104,8 @@ struct crypto4xx_alg_common crypto4xx_al
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct crypto4xx_ctx),
|
||||
.cra_type = &crypto_ablkcipher_type,
|
||||
@@ -427,7 +427,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_u = {
|
||||
.ablkcipher = {
|
||||
@@ -1018,8 +1132,8 @@ struct crypto4xx_alg_common crypto4xx_al
|
||||
@@ -1014,8 +1128,8 @@ struct crypto4xx_alg_common crypto4xx_al
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct crypto4xx_ctx),
|
||||
.cra_type = &crypto_ablkcipher_type,
|
||||
@@ -438,7 +438,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_u = {
|
||||
.ablkcipher = {
|
||||
@@ -1042,8 +1156,8 @@ struct crypto4xx_alg_common crypto4xx_al
|
||||
@@ -1038,8 +1152,8 @@ struct crypto4xx_alg_common crypto4xx_al
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct crypto4xx_ctx),
|
||||
.cra_type = &crypto_ablkcipher_type,
|
||||
@@ -449,7 +449,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_u = {
|
||||
.ablkcipher = {
|
||||
@@ -1068,8 +1182,8 @@ struct crypto4xx_alg_common crypto4xx_al
|
||||
@@ -1064,8 +1178,8 @@ struct crypto4xx_alg_common crypto4xx_al
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct crypto4xx_ctx),
|
||||
.cra_type = &crypto_ablkcipher_type,
|
||||
@@ -460,7 +460,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_u = {
|
||||
.ablkcipher = {
|
||||
@@ -1091,8 +1205,8 @@ struct crypto4xx_alg_common crypto4xx_al
|
||||
@@ -1087,8 +1201,8 @@ struct crypto4xx_alg_common crypto4xx_al
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct crypto4xx_ctx),
|
||||
.cra_type = &crypto_ablkcipher_type,
|
||||
@@ -471,7 +471,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_u = {
|
||||
.ablkcipher = {
|
||||
@@ -1158,6 +1272,7 @@ static int crypto4xx_probe(struct platfo
|
||||
@@ -1154,6 +1268,7 @@ static int crypto4xx_probe(struct platfo
|
||||
core_dev->device = dev;
|
||||
spin_lock_init(&core_dev->lock);
|
||||
INIT_LIST_HEAD(&core_dev->dev->alg_list);
|
||||
|
||||
@@ -209,7 +209,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
*/
|
||||
--- a/drivers/crypto/amcc/crypto4xx_core.c
|
||||
+++ b/drivers/crypto/amcc/crypto4xx_core.c
|
||||
@@ -1219,6 +1219,29 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1215,6 +1215,29 @@ static struct crypto4xx_alg_common crypt
|
||||
}
|
||||
}
|
||||
} },
|
||||
|
||||
@@ -178,7 +178,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
#include <crypto/sha.h>
|
||||
#include <crypto/scatterwalk.h>
|
||||
#include <crypto/internal/aead.h>
|
||||
@@ -1236,6 +1237,27 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1232,6 +1233,27 @@ static struct crypto4xx_alg_common crypt
|
||||
.cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
|
||||
.cra_flags = CRYPTO_ALG_ASYNC |
|
||||
CRYPTO_ALG_NEED_FALLBACK |
|
||||
|
||||
@@ -17,7 +17,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
|
||||
--- a/drivers/crypto/amcc/crypto4xx_core.c
|
||||
+++ b/drivers/crypto/amcc/crypto4xx_core.c
|
||||
@@ -1084,9 +1084,6 @@ static irqreturn_t crypto4xx_ce_interrup
|
||||
@@ -1080,9 +1080,6 @@ static irqreturn_t crypto4xx_ce_interrup
|
||||
struct device *dev = (struct device *)data;
|
||||
struct crypto4xx_core_device *core_dev = dev_get_drvdata(dev);
|
||||
|
||||
@@ -27,7 +27,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
writel(PPC4XX_INTERRUPT_CLR,
|
||||
core_dev->dev->ce_base + CRYPTO4XX_INT_CLR);
|
||||
tasklet_schedule(&core_dev->tasklet);
|
||||
@@ -1334,13 +1331,6 @@ static int crypto4xx_probe(struct platfo
|
||||
@@ -1330,13 +1327,6 @@ static int crypto4xx_probe(struct platfo
|
||||
tasklet_init(&core_dev->tasklet, crypto4xx_bh_tasklet_cb,
|
||||
(unsigned long) dev);
|
||||
|
||||
@@ -41,7 +41,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
core_dev->dev->ce_base = of_iomap(ofdev->dev.of_node, 0);
|
||||
if (!core_dev->dev->ce_base) {
|
||||
dev_err(dev, "failed to of_iomap\n");
|
||||
@@ -1348,6 +1338,13 @@ static int crypto4xx_probe(struct platfo
|
||||
@@ -1344,6 +1334,13 @@ static int crypto4xx_probe(struct platfo
|
||||
goto err_iomap;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
/* need to setup pdr, rdr, gdr and sdr before this */
|
||||
crypto4xx_hw_init(core_dev->dev);
|
||||
|
||||
@@ -1361,11 +1358,11 @@ static int crypto4xx_probe(struct platfo
|
||||
@@ -1357,11 +1354,11 @@ static int crypto4xx_probe(struct platfo
|
||||
return 0;
|
||||
|
||||
err_start_dev:
|
||||
|
||||
@@ -35,7 +35,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
}
|
||||
|
||||
int crypto4xx_alloc_sa(struct crypto4xx_ctx *ctx, u32 size)
|
||||
@@ -1079,18 +1086,29 @@ static void crypto4xx_bh_tasklet_cb(unsi
|
||||
@@ -1075,18 +1082,29 @@ static void crypto4xx_bh_tasklet_cb(unsi
|
||||
/**
|
||||
* Top Half of isr.
|
||||
*/
|
||||
@@ -68,7 +68,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
/**
|
||||
* Supported Crypto Algorithms
|
||||
*/
|
||||
@@ -1272,6 +1290,8 @@ static int crypto4xx_probe(struct platfo
|
||||
@@ -1268,6 +1286,8 @@ static int crypto4xx_probe(struct platfo
|
||||
struct resource res;
|
||||
struct device *dev = &ofdev->dev;
|
||||
struct crypto4xx_core_device *core_dev;
|
||||
@@ -77,7 +77,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
|
||||
rc = of_address_to_resource(ofdev->dev.of_node, 0, &res);
|
||||
if (rc)
|
||||
@@ -1288,6 +1308,7 @@ static int crypto4xx_probe(struct platfo
|
||||
@@ -1284,6 +1304,7 @@ static int crypto4xx_probe(struct platfo
|
||||
mfdcri(SDR0, PPC405EX_SDR0_SRST) | PPC405EX_CE_RESET);
|
||||
mtdcri(SDR0, PPC405EX_SDR0_SRST,
|
||||
mfdcri(SDR0, PPC405EX_SDR0_SRST) & ~PPC405EX_CE_RESET);
|
||||
@@ -85,7 +85,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
} else if (of_find_compatible_node(NULL, NULL,
|
||||
"amcc,ppc460sx-crypto")) {
|
||||
mtdcri(SDR0, PPC460SX_SDR0_SRST,
|
||||
@@ -1310,7 +1331,22 @@ static int crypto4xx_probe(struct platfo
|
||||
@@ -1306,7 +1327,22 @@ static int crypto4xx_probe(struct platfo
|
||||
if (!core_dev->dev)
|
||||
goto err_alloc_dev;
|
||||
|
||||
@@ -108,7 +108,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
core_dev->device = dev;
|
||||
spin_lock_init(&core_dev->lock);
|
||||
INIT_LIST_HEAD(&core_dev->dev->alg_list);
|
||||
@@ -1340,7 +1376,9 @@ static int crypto4xx_probe(struct platfo
|
||||
@@ -1336,7 +1372,9 @@ static int crypto4xx_probe(struct platfo
|
||||
|
||||
/* Register for Crypto isr, Crypto Engine IRQ */
|
||||
core_dev->irq = irq_of_parse_and_map(ofdev->dev.of_node, 0);
|
||||
|
||||
@@ -16,7 +16,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
|
||||
--- a/drivers/crypto/amcc/crypto4xx_core.c
|
||||
+++ b/drivers/crypto/amcc/crypto4xx_core.c
|
||||
@@ -1379,7 +1379,7 @@ static int crypto4xx_probe(struct platfo
|
||||
@@ -1375,7 +1375,7 @@ static int crypto4xx_probe(struct platfo
|
||||
rc = request_irq(core_dev->irq, is_revb ?
|
||||
crypto4xx_ce_interrupt_handler_revb :
|
||||
crypto4xx_ce_interrupt_handler, 0,
|
||||
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
|
||||
--- a/drivers/crypto/amcc/crypto4xx_core.c
|
||||
+++ b/drivers/crypto/amcc/crypto4xx_core.c
|
||||
@@ -1441,7 +1441,7 @@ MODULE_DEVICE_TABLE(of, crypto4xx_match)
|
||||
@@ -1437,7 +1437,7 @@ MODULE_DEVICE_TABLE(of, crypto4xx_match)
|
||||
|
||||
static struct platform_driver crypto4xx_driver = {
|
||||
.driver = {
|
||||
|
||||
@@ -62,7 +62,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
SA_CIPHER_ALG_AES,
|
||||
--- a/drivers/crypto/amcc/crypto4xx_core.c
|
||||
+++ b/drivers/crypto/amcc/crypto4xx_core.c
|
||||
@@ -586,15 +586,14 @@ static void crypto4xx_aead_done(struct c
|
||||
@@ -582,15 +582,14 @@ static void crypto4xx_aead_done(struct c
|
||||
struct pd_uinfo *pd_uinfo,
|
||||
struct ce_pd *pd)
|
||||
{
|
||||
@@ -83,7 +83,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
if (pd_uinfo->using_sd) {
|
||||
crypto4xx_copy_pkt_to_dst(dev, pd, pd_uinfo,
|
||||
pd->pd_ctl_len.bf.pkt_len,
|
||||
@@ -606,38 +605,39 @@ static void crypto4xx_aead_done(struct c
|
||||
@@ -602,38 +601,39 @@ static void crypto4xx_aead_done(struct c
|
||||
|
||||
if (pd_uinfo->sa_va->sa_command_0.bf.dir == DIR_OUTBOUND) {
|
||||
/* append icv at the end */
|
||||
|
||||
@@ -71,7 +71,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
/**
|
||||
--- a/drivers/crypto/amcc/crypto4xx_core.c
|
||||
+++ b/drivers/crypto/amcc/crypto4xx_core.c
|
||||
@@ -589,7 +589,7 @@ static void crypto4xx_aead_done(struct c
|
||||
@@ -585,7 +585,7 @@ static void crypto4xx_aead_done(struct c
|
||||
struct scatterlist *dst = pd_uinfo->dest_va;
|
||||
size_t cp_len = crypto_aead_authsize(
|
||||
crypto_aead_reqtfm(aead_req));
|
||||
@@ -80,7 +80,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
int err = 0;
|
||||
|
||||
if (pd_uinfo->using_sd) {
|
||||
@@ -604,7 +604,7 @@ static void crypto4xx_aead_done(struct c
|
||||
@@ -600,7 +600,7 @@ static void crypto4xx_aead_done(struct c
|
||||
if (pd_uinfo->sa_va->sa_command_0.bf.dir == DIR_OUTBOUND) {
|
||||
/* append icv at the end */
|
||||
crypto4xx_memcpy_from_le32(icv, pd_uinfo->sr_va->save_digest,
|
||||
@@ -89,7 +89,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
scatterwalk_map_and_copy(icv, dst, aead_req->cryptlen,
|
||||
cp_len, 1);
|
||||
@@ -614,7 +614,7 @@ static void crypto4xx_aead_done(struct c
|
||||
@@ -610,7 +610,7 @@ static void crypto4xx_aead_done(struct c
|
||||
aead_req->assoclen + aead_req->cryptlen -
|
||||
cp_len, cp_len, 0);
|
||||
|
||||
@@ -98,7 +98,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
if (crypto_memneq(icv, pd_uinfo->sr_va->save_digest, cp_len))
|
||||
err = -EBADMSG;
|
||||
@@ -1131,8 +1131,8 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1127,8 +1127,8 @@ static struct crypto4xx_alg_common crypt
|
||||
.max_keysize = AES_MAX_KEY_SIZE,
|
||||
.ivsize = AES_IV_SIZE,
|
||||
.setkey = crypto4xx_setkey_aes_cbc,
|
||||
@@ -109,7 +109,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
}
|
||||
}
|
||||
}},
|
||||
@@ -1155,8 +1155,8 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1151,8 +1151,8 @@ static struct crypto4xx_alg_common crypt
|
||||
.max_keysize = AES_MAX_KEY_SIZE,
|
||||
.ivsize = AES_IV_SIZE,
|
||||
.setkey = crypto4xx_setkey_aes_cfb,
|
||||
@@ -120,7 +120,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
}
|
||||
}
|
||||
} },
|
||||
@@ -1204,8 +1204,8 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1200,8 +1200,8 @@ static struct crypto4xx_alg_common crypt
|
||||
.min_keysize = AES_MIN_KEY_SIZE,
|
||||
.max_keysize = AES_MAX_KEY_SIZE,
|
||||
.setkey = crypto4xx_setkey_aes_ecb,
|
||||
@@ -131,7 +131,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
}
|
||||
}
|
||||
} },
|
||||
@@ -1228,8 +1228,8 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1224,8 +1224,8 @@ static struct crypto4xx_alg_common crypt
|
||||
.max_keysize = AES_MAX_KEY_SIZE,
|
||||
.ivsize = AES_IV_SIZE,
|
||||
.setkey = crypto4xx_setkey_aes_ofb,
|
||||
|
||||
@@ -196,7 +196,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
#include <crypto/internal/aead.h>
|
||||
#include <crypto/internal/skcipher.h>
|
||||
#include "crypto4xx_reg_def.h"
|
||||
@@ -526,21 +527,19 @@ static void crypto4xx_ret_sg_desc(struct
|
||||
@@ -522,21 +523,19 @@ static void crypto4xx_ret_sg_desc(struct
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
} else {
|
||||
dst = pd_uinfo->dest_va;
|
||||
addr = dma_map_page(dev->core_dev->device, sg_page(dst),
|
||||
@@ -558,8 +557,8 @@ static void crypto4xx_ablkcipher_done(st
|
||||
@@ -554,8 +553,8 @@ static void crypto4xx_ablkcipher_done(st
|
||||
crypto4xx_ret_sg_desc(dev, pd_uinfo);
|
||||
|
||||
if (pd_uinfo->state & PD_ENTRY_BUSY)
|
||||
@@ -234,7 +234,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
}
|
||||
|
||||
static void crypto4xx_ahash_done(struct crypto4xx_device *dev,
|
||||
@@ -650,8 +649,8 @@ static void crypto4xx_pd_done(struct cry
|
||||
@@ -646,8 +645,8 @@ static void crypto4xx_pd_done(struct cry
|
||||
struct pd_uinfo *pd_uinfo = &dev->pdr_uinfo[idx];
|
||||
|
||||
switch (crypto_tfm_alg_type(pd_uinfo->async_req->tfm)) {
|
||||
@@ -245,7 +245,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
break;
|
||||
case CRYPTO_ALG_TYPE_AEAD:
|
||||
crypto4xx_aead_done(dev, pd_uinfo, pd);
|
||||
@@ -945,15 +944,14 @@ static void crypto4xx_ctx_init(struct cr
|
||||
@@ -941,15 +940,14 @@ static void crypto4xx_ctx_init(struct cr
|
||||
ctx->sa_len = 0;
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -962,9 +960,11 @@ static void crypto4xx_common_exit(struct
|
||||
@@ -958,9 +956,11 @@ static void crypto4xx_common_exit(struct
|
||||
crypto4xx_free_sa(ctx);
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
}
|
||||
|
||||
static int crypto4xx_aead_init(struct crypto_aead *tfm)
|
||||
@@ -1021,7 +1021,7 @@ static int crypto4xx_register_alg(struct
|
||||
@@ -1017,7 +1017,7 @@ static int crypto4xx_register_alg(struct
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -287,7 +287,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1050,7 +1050,7 @@ static void crypto4xx_unregister_alg(str
|
||||
@@ -1046,7 +1046,7 @@ static void crypto4xx_unregister_alg(str
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -296,7 +296,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
}
|
||||
kfree(alg);
|
||||
}
|
||||
@@ -1112,126 +1112,109 @@ static irqreturn_t crypto4xx_ce_interrup
|
||||
@@ -1108,126 +1108,109 @@ static irqreturn_t crypto4xx_ce_interrup
|
||||
*/
|
||||
static struct crypto4xx_alg_common crypto4xx_alg[] = {
|
||||
/* Crypto AES modes */
|
||||
|
||||
@@ -160,7 +160,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
--- a/drivers/crypto/amcc/crypto4xx_core.c
|
||||
+++ b/drivers/crypto/amcc/crypto4xx_core.c
|
||||
@@ -950,6 +950,19 @@ static int crypto4xx_sk_init(struct cryp
|
||||
@@ -946,6 +946,19 @@ static int crypto4xx_sk_init(struct cryp
|
||||
struct crypto4xx_alg *amcc_alg;
|
||||
struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(sk);
|
||||
|
||||
@@ -180,7 +180,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
amcc_alg = container_of(alg, struct crypto4xx_alg, alg.u.cipher);
|
||||
crypto4xx_ctx_init(amcc_alg, ctx);
|
||||
return 0;
|
||||
@@ -965,6 +978,8 @@ static void crypto4xx_sk_exit(struct cry
|
||||
@@ -961,6 +974,8 @@ static void crypto4xx_sk_exit(struct cry
|
||||
struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(sk);
|
||||
|
||||
crypto4xx_common_exit(ctx);
|
||||
@@ -189,7 +189,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
}
|
||||
|
||||
static int crypto4xx_aead_init(struct crypto_aead *tfm)
|
||||
@@ -1154,6 +1169,28 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1150,6 +1165,28 @@ static struct crypto4xx_alg_common crypt
|
||||
.init = crypto4xx_sk_init,
|
||||
.exit = crypto4xx_sk_exit,
|
||||
} },
|
||||
|
||||
@@ -107,7 +107,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
/**
|
||||
--- a/drivers/crypto/amcc/crypto4xx_core.c
|
||||
+++ b/drivers/crypto/amcc/crypto4xx_core.c
|
||||
@@ -695,9 +695,9 @@ int crypto4xx_build_pd(struct crypto_asy
|
||||
@@ -691,9 +691,9 @@ int crypto4xx_build_pd(struct crypto_asy
|
||||
const __le32 *iv, const u32 iv_len,
|
||||
const struct dynamic_sa_ctl *req_sa,
|
||||
const unsigned int sa_len,
|
||||
@@ -119,7 +119,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
struct crypto4xx_device *dev = ctx->dev;
|
||||
struct dynamic_sa_ctl *sa;
|
||||
struct ce_gd *gd;
|
||||
@@ -996,9 +996,9 @@ static int crypto4xx_aead_init(struct cr
|
||||
@@ -992,9 +992,9 @@ static int crypto4xx_aead_init(struct cr
|
||||
|
||||
amcc_alg = container_of(alg, struct crypto4xx_alg, alg.u.aead);
|
||||
crypto4xx_ctx_init(amcc_alg, ctx);
|
||||
|
||||
@@ -22,7 +22,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
--- a/drivers/crypto/amcc/crypto4xx_core.c
|
||||
+++ b/drivers/crypto/amcc/crypto4xx_core.c
|
||||
@@ -1132,8 +1132,7 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1128,8 +1128,7 @@ static struct crypto4xx_alg_common crypt
|
||||
.cra_name = "cbc(aes)",
|
||||
.cra_driver_name = "cbc-aes-ppc4xx",
|
||||
.cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
|
||||
@@ -32,7 +32,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct crypto4xx_ctx),
|
||||
@@ -1153,8 +1152,7 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1149,8 +1148,7 @@ static struct crypto4xx_alg_common crypt
|
||||
.cra_name = "cfb(aes)",
|
||||
.cra_driver_name = "cfb-aes-ppc4xx",
|
||||
.cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
|
||||
@@ -42,7 +42,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct crypto4xx_ctx),
|
||||
@@ -1174,8 +1172,7 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1170,8 +1168,7 @@ static struct crypto4xx_alg_common crypt
|
||||
.cra_name = "ctr(aes)",
|
||||
.cra_driver_name = "ctr-aes-ppc4xx",
|
||||
.cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
|
||||
@@ -52,7 +52,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
CRYPTO_ALG_ASYNC |
|
||||
CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
@@ -1196,8 +1193,7 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1192,8 +1189,7 @@ static struct crypto4xx_alg_common crypt
|
||||
.cra_name = "rfc3686(ctr(aes))",
|
||||
.cra_driver_name = "rfc3686-ctr-aes-ppc4xx",
|
||||
.cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
|
||||
@@ -62,7 +62,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct crypto4xx_ctx),
|
||||
@@ -1217,8 +1213,7 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1213,8 +1209,7 @@ static struct crypto4xx_alg_common crypt
|
||||
.cra_name = "ecb(aes)",
|
||||
.cra_driver_name = "ecb-aes-ppc4xx",
|
||||
.cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
|
||||
@@ -72,7 +72,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct crypto4xx_ctx),
|
||||
@@ -1237,8 +1232,7 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1233,8 +1228,7 @@ static struct crypto4xx_alg_common crypt
|
||||
.cra_name = "ofb(aes)",
|
||||
.cra_driver_name = "ofb-aes-ppc4xx",
|
||||
.cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
|
||||
|
||||
@@ -19,7 +19,7 @@ Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
|
||||
|
||||
--- a/drivers/crypto/amcc/crypto4xx_core.c
|
||||
+++ b/drivers/crypto/amcc/crypto4xx_core.c
|
||||
@@ -596,7 +596,7 @@ static void crypto4xx_aead_done(struct c
|
||||
@@ -592,7 +592,7 @@ static void crypto4xx_aead_done(struct c
|
||||
pd->pd_ctl_len.bf.pkt_len,
|
||||
dst);
|
||||
} else {
|
||||
|
||||
@@ -31,7 +31,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
#include <crypto/internal/skcipher.h>
|
||||
#include "crypto4xx_reg_def.h"
|
||||
#include "crypto4xx_core.h"
|
||||
@@ -1035,6 +1037,10 @@ static int crypto4xx_register_alg(struct
|
||||
@@ -1031,6 +1033,10 @@ static int crypto4xx_register_alg(struct
|
||||
rc = crypto_register_ahash(&alg->alg.u.hash);
|
||||
break;
|
||||
|
||||
@@ -42,7 +42,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
default:
|
||||
rc = crypto_register_skcipher(&alg->alg.u.cipher);
|
||||
break;
|
||||
@@ -1064,6 +1070,10 @@ static void crypto4xx_unregister_alg(str
|
||||
@@ -1060,6 +1066,10 @@ static void crypto4xx_unregister_alg(str
|
||||
crypto_unregister_aead(&alg->alg.u.aead);
|
||||
break;
|
||||
|
||||
@@ -53,7 +53,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
default:
|
||||
crypto_unregister_skcipher(&alg->alg.u.cipher);
|
||||
}
|
||||
@@ -1122,6 +1132,69 @@ static irqreturn_t crypto4xx_ce_interrup
|
||||
@@ -1118,6 +1128,69 @@ static irqreturn_t crypto4xx_ce_interrup
|
||||
PPC4XX_TMO_ERR_INT);
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
/**
|
||||
* Supported Crypto Algorithms
|
||||
*/
|
||||
@@ -1291,6 +1364,18 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1287,6 +1360,18 @@ static struct crypto4xx_alg_common crypt
|
||||
.cra_module = THIS_MODULE,
|
||||
},
|
||||
} },
|
||||
@@ -142,7 +142,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1360,6 +1445,7 @@ static int crypto4xx_probe(struct platfo
|
||||
@@ -1356,6 +1441,7 @@ static int crypto4xx_probe(struct platfo
|
||||
core_dev->dev->core_dev = core_dev;
|
||||
core_dev->dev->is_revb = is_revb;
|
||||
core_dev->device = dev;
|
||||
@@ -150,7 +150,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
spin_lock_init(&core_dev->lock);
|
||||
INIT_LIST_HEAD(&core_dev->dev->alg_list);
|
||||
ratelimit_default_init(&core_dev->dev->aead_ratelimit);
|
||||
@@ -1439,6 +1525,7 @@ static int crypto4xx_remove(struct platf
|
||||
@@ -1435,6 +1521,7 @@ static int crypto4xx_remove(struct platf
|
||||
tasklet_kill(&core_dev->tasklet);
|
||||
/* Un-register with Linux CryptoAPI */
|
||||
crypto4xx_unregister_alg(core_dev->dev);
|
||||
|
||||
@@ -40,7 +40,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
--- a/drivers/crypto/amcc/crypto4xx_core.c
|
||||
+++ b/drivers/crypto/amcc/crypto4xx_core.c
|
||||
@@ -1248,7 +1248,7 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1244,7 +1244,7 @@ static struct crypto4xx_alg_common crypt
|
||||
.cra_flags = CRYPTO_ALG_NEED_FALLBACK |
|
||||
CRYPTO_ALG_ASYNC |
|
||||
CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
@@ -49,7 +49,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
.cra_ctxsize = sizeof(struct crypto4xx_ctx),
|
||||
.cra_module = THIS_MODULE,
|
||||
},
|
||||
@@ -1268,7 +1268,7 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1264,7 +1264,7 @@ static struct crypto4xx_alg_common crypt
|
||||
.cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
|
||||
.cra_flags = CRYPTO_ALG_ASYNC |
|
||||
CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
|
||||
@@ -24,7 +24,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
--- a/drivers/crypto/amcc/crypto4xx_core.c
|
||||
+++ b/drivers/crypto/amcc/crypto4xx_core.c
|
||||
@@ -1227,7 +1227,7 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1223,7 +1223,7 @@ static struct crypto4xx_alg_common crypt
|
||||
.cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
|
||||
.cra_flags = CRYPTO_ALG_ASYNC |
|
||||
CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
@@ -33,7 +33,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
.cra_ctxsize = sizeof(struct crypto4xx_ctx),
|
||||
.cra_module = THIS_MODULE,
|
||||
},
|
||||
@@ -1307,7 +1307,7 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1303,7 +1303,7 @@ static struct crypto4xx_alg_common crypt
|
||||
.cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
|
||||
.cra_flags = CRYPTO_ALG_ASYNC |
|
||||
CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
|
||||
@@ -107,7 +107,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
static int crypto4xx_sk_setup_fallback(struct crypto4xx_ctx *ctx,
|
||||
--- a/drivers/crypto/amcc/crypto4xx_core.c
|
||||
+++ b/drivers/crypto/amcc/crypto4xx_core.c
|
||||
@@ -1215,8 +1215,8 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1211,8 +1211,8 @@ static struct crypto4xx_alg_common crypt
|
||||
.max_keysize = AES_MAX_KEY_SIZE,
|
||||
.ivsize = AES_IV_SIZE,
|
||||
.setkey = crypto4xx_setkey_aes_cbc,
|
||||
@@ -118,7 +118,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
.init = crypto4xx_sk_init,
|
||||
.exit = crypto4xx_sk_exit,
|
||||
} },
|
||||
@@ -1235,8 +1235,8 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1231,8 +1231,8 @@ static struct crypto4xx_alg_common crypt
|
||||
.max_keysize = AES_MAX_KEY_SIZE,
|
||||
.ivsize = AES_IV_SIZE,
|
||||
.setkey = crypto4xx_setkey_aes_cfb,
|
||||
@@ -129,7 +129,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
.init = crypto4xx_sk_init,
|
||||
.exit = crypto4xx_sk_exit,
|
||||
} },
|
||||
@@ -1295,8 +1295,8 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1291,8 +1291,8 @@ static struct crypto4xx_alg_common crypt
|
||||
.min_keysize = AES_MIN_KEY_SIZE,
|
||||
.max_keysize = AES_MAX_KEY_SIZE,
|
||||
.setkey = crypto4xx_setkey_aes_ecb,
|
||||
@@ -140,7 +140,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
.init = crypto4xx_sk_init,
|
||||
.exit = crypto4xx_sk_exit,
|
||||
} },
|
||||
@@ -1315,8 +1315,8 @@ static struct crypto4xx_alg_common crypt
|
||||
@@ -1311,8 +1311,8 @@ static struct crypto4xx_alg_common crypt
|
||||
.max_keysize = AES_MAX_KEY_SIZE,
|
||||
.ivsize = AES_IV_SIZE,
|
||||
.setkey = crypto4xx_setkey_aes_ofb,
|
||||
|
||||
@@ -1,128 +0,0 @@
|
||||
From 2aad36357bbc73bc88ebab35a59a70a8f4ae6ecb Mon Sep 17 00:00:00 2001
|
||||
From: Christian Lamparter <chunkeey@gmail.com>
|
||||
Date: Wed, 31 Oct 2018 22:27:27 +0100
|
||||
Subject: [PATCH 2/2] dmaengine: dw: implement per-channel protection control
|
||||
setting
|
||||
|
||||
This patch adds a new device-tree property that allows to
|
||||
specify the protection control bits for each DMA channel
|
||||
individually.
|
||||
|
||||
Setting the "correct" bits can have a huge impact on the
|
||||
PPC460EX and APM82181 that use this DMA engine in combination
|
||||
with a DesignWare' SATA-II core (sata_dwc_460ex driver).
|
||||
|
||||
In the OpenWrt Forum, the user takimata reported that:
|
||||
|It seems your patch unleashed the full power of the SATA port.
|
||||
|Where I was previously hitting a really hard limit at around
|
||||
|82 MB/s for reading and 27 MB/s for writing, I am now getting this:
|
||||
|
|
||||
|root@OpenWrt:/mnt# time dd if=/dev/zero of=tempfile bs=1M count=1024
|
||||
|1024+0 records in
|
||||
|1024+0 records out
|
||||
|real 0m 13.65s
|
||||
|user 0m 0.01s
|
||||
|sys 0m 11.89s
|
||||
|
|
||||
|root@OpenWrt:/mnt# time dd if=tempfile of=/dev/null bs=1M count=1024
|
||||
|1024+0 records in
|
||||
|1024+0 records out
|
||||
|real 0m 8.41s
|
||||
|user 0m 0.01s
|
||||
|sys 0m 4.70s
|
||||
|
|
||||
|This means: 121 MB/s reading and 75 MB/s writing!
|
||||
|
|
||||
|The drive is a WD Green WD10EARX taken from an older MBL Single.
|
||||
|I repeated the test a few times with even larger files to rule out
|
||||
|any caching, I'm still seeing the same great performance. OpenWrt is
|
||||
|now completely on par with the original MBL firmware's performance.
|
||||
|
||||
Another user And.short reported:
|
||||
|I can report that your fix worked! Boots up fine with two
|
||||
|drives even with more partitions, and no more reboot on
|
||||
|concurrent disk access!
|
||||
|
||||
A closer look into the sata_dwc_460ex code revealed that
|
||||
the driver did initally set the correct protection control
|
||||
bits. However, this feature was lost when the sata_dwc_460ex
|
||||
driver was converted to the generic DMA driver framework.
|
||||
|
||||
BugLink: https://forum.openwrt.org/t/wd-mybook-live-duo-two-disks/16195/55
|
||||
BugLink: https://forum.openwrt.org/t/wd-mybook-live-duo-two-disks/16195/50
|
||||
Fixes: 8b3444852a2b ("sata_dwc_460ex: move to generic DMA driver")
|
||||
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
---
|
||||
drivers/dma/dw/core.c | 2 ++
|
||||
drivers/dma/dw/platform.c | 12 +++++++++---
|
||||
drivers/dma/dw/regs.h | 4 ++++
|
||||
include/linux/platform_data/dma-dw.h | 6 ++++++
|
||||
4 files changed, 21 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/dma/dw/core.c
|
||||
+++ b/drivers/dma/dw/core.c
|
||||
@@ -160,12 +160,14 @@ static void dwc_initialize_chan_idma32(s
|
||||
|
||||
static void dwc_initialize_chan_dw(struct dw_dma_chan *dwc)
|
||||
{
|
||||
+ struct dw_dma *dw = to_dw_dma(dwc->chan.device);
|
||||
u32 cfghi = DWC_CFGH_FIFO_MODE;
|
||||
u32 cfglo = DWC_CFGL_CH_PRIOR(dwc->priority);
|
||||
bool hs_polarity = dwc->dws.hs_polarity;
|
||||
|
||||
cfghi |= DWC_CFGH_DST_PER(dwc->dws.dst_id);
|
||||
cfghi |= DWC_CFGH_SRC_PER(dwc->dws.src_id);
|
||||
+ cfghi |= DWC_CFGH_PROTCTL(dw->pdata->protctl);
|
||||
|
||||
/* Set polarity of handshake interface */
|
||||
cfglo |= hs_polarity ? DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL : 0;
|
||||
--- a/drivers/dma/dw/platform.c
|
||||
+++ b/drivers/dma/dw/platform.c
|
||||
@@ -162,6 +162,12 @@ dw_dma_parse_dt(struct platform_device *
|
||||
pdata->multi_block[tmp] = 1;
|
||||
}
|
||||
|
||||
+ if (!of_property_read_u32(np, "snps,dma-protection-control", &tmp)) {
|
||||
+ if (tmp > CHAN_PROTCTL_MASK)
|
||||
+ return NULL;
|
||||
+ pdata->protctl = tmp;
|
||||
+ }
|
||||
+
|
||||
return pdata;
|
||||
}
|
||||
#else
|
||||
--- a/drivers/dma/dw/regs.h
|
||||
+++ b/drivers/dma/dw/regs.h
|
||||
@@ -200,6 +200,10 @@ enum dw_dma_msize {
|
||||
#define DWC_CFGH_FCMODE (1 << 0)
|
||||
#define DWC_CFGH_FIFO_MODE (1 << 1)
|
||||
#define DWC_CFGH_PROTCTL(x) ((x) << 2)
|
||||
+#define DWC_CFGH_PROTCTL_DATA (0 << 2) /* data access - always set */
|
||||
+#define DWC_CFGH_PROTCTL_PRIV (1 << 2) /* privileged -> AHB HPROT[1] */
|
||||
+#define DWC_CFGH_PROTCTL_BUFFER (2 << 2) /* bufferable -> AHB HPROT[2] */
|
||||
+#define DWC_CFGH_PROTCTL_CACHE (4 << 2) /* cacheable -> AHB HPROT[3] */
|
||||
#define DWC_CFGH_DS_UPD_EN (1 << 5)
|
||||
#define DWC_CFGH_SS_UPD_EN (1 << 6)
|
||||
#define DWC_CFGH_SRC_PER(x) ((x) << 7)
|
||||
--- a/include/linux/platform_data/dma-dw.h
|
||||
+++ b/include/linux/platform_data/dma-dw.h
|
||||
@@ -49,6 +49,7 @@ struct dw_dma_slave {
|
||||
* @data_width: Maximum data width supported by hardware per AHB master
|
||||
* (in bytes, power of 2)
|
||||
* @multi_block: Multi block transfers supported by hardware per channel.
|
||||
+ * @protctl: Protection control signals setting per channel.
|
||||
*/
|
||||
struct dw_dma_platform_data {
|
||||
unsigned int nr_channels;
|
||||
@@ -65,6 +66,11 @@ struct dw_dma_platform_data {
|
||||
unsigned char nr_masters;
|
||||
unsigned char data_width[DW_DMA_MAX_NR_MASTERS];
|
||||
unsigned char multi_block[DW_DMA_MAX_NR_CHANNELS];
|
||||
+#define CHAN_PROTCTL_PRIVILEGED BIT(0)
|
||||
+#define CHAN_PROTCTL_BUFFERABLE BIT(1)
|
||||
+#define CHAN_PROTCTL_CACHEABLE BIT(2)
|
||||
+#define CHAN_PROTCTL_MASK GENMASK(2, 0)
|
||||
+ unsigned char protctl;
|
||||
};
|
||||
|
||||
#endif /* _PLATFORM_DATA_DMA_DW_H */
|
||||
@@ -633,6 +633,10 @@ ar71xx_setup_macs()
|
||||
fritz300e)
|
||||
lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
|
||||
;;
|
||||
tl-wdr4300)
|
||||
base_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
|
||||
wan_mac=$(macaddr_add "$base_mac" 1)
|
||||
;;
|
||||
tl-wr1043n-v5|\
|
||||
tl-wr1043nd-v4)
|
||||
lan_mac=$(mtd_get_mac_binary product-info 8)
|
||||
|
||||
@@ -183,7 +183,7 @@ static void __init wdr4300_setup(void)
|
||||
|
||||
ath79_register_mdio(0, 0x0);
|
||||
|
||||
ath79_init_mac(ath79_eth0_data.mac_addr, mac, -2);
|
||||
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
|
||||
|
||||
/* GMAC0 is connected to an AR8327N switch */
|
||||
ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
--- a/arch/mips/Kconfig
|
||||
+++ b/arch/mips/Kconfig
|
||||
@@ -1152,6 +1152,9 @@ config MIPS_MSC
|
||||
@@ -1153,6 +1153,9 @@ config MIPS_MSC
|
||||
config MIPS_NILE4
|
||||
bool
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/ipv6.h>
|
||||
#include <linux/icmpv6.h>
|
||||
@@ -819,10 +820,10 @@ static void tcp_v6_send_response(const s
|
||||
@@ -820,10 +821,10 @@ static void tcp_v6_send_response(const s
|
||||
topt = (__be32 *)(t1 + 1);
|
||||
|
||||
if (tsecr) {
|
||||
@@ -325,7 +325,7 @@
|
||||
for (p = *head; p; p = p->next) {
|
||||
--- a/net/ipv4/route.c
|
||||
+++ b/net/ipv4/route.c
|
||||
@@ -465,7 +465,7 @@ static struct neighbour *ipv4_neigh_look
|
||||
@@ -466,7 +466,7 @@ static struct neighbour *ipv4_neigh_look
|
||||
else if (skb)
|
||||
pkey = &ip_hdr(skb)->daddr;
|
||||
|
||||
|
||||
@@ -315,8 +315,6 @@ CONFIG_LEDS_TRIGGER_CPU=y
|
||||
# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
|
||||
CONFIG_LEDS_TRIGGER_GPIO=y
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||
CONFIG_LEGACY_PTYS=y
|
||||
CONFIG_LEGACY_PTY_COUNT=4
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
CONFIG_LOG_BUF_SHIFT=16
|
||||
@@ -556,10 +554,6 @@ CONFIG_VIDEOMODE_HELPERS=y
|
||||
CONFIG_VIDEO_DEV=y
|
||||
CONFIG_VIDEO_V4L2=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_VT=y
|
||||
CONFIG_VT_CONSOLE=y
|
||||
CONFIG_VT_CONSOLE_SLEEP=y
|
||||
# CONFIG_VT_HW_CONSOLE_BINDING is not set
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
|
||||
@@ -196,6 +196,7 @@ ath79_setup_interfaces()
|
||||
tplink,archer-c7-v5|\
|
||||
tplink,tl-wdr3600-v1|\
|
||||
tplink,tl-wdr4300-v1|\
|
||||
tplink,tl-wdr4300-v1-il|\
|
||||
tplink,tl-wr941n-v7-cn)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan"
|
||||
@@ -348,6 +349,12 @@ ath79_setup_macs()
|
||||
base_mac=$(mtd_get_mac_binary info 8)
|
||||
wan_mac=$(macaddr_add "$base_mac" 1)
|
||||
;;
|
||||
tplink,tl-wdr3600-v1|\
|
||||
tplink,tl-wdr4300-v1|\
|
||||
tplink,tl-wdr4300-v1-il)
|
||||
base_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
|
||||
wan_mac=$(macaddr_add "$base_mac" 1)
|
||||
;;
|
||||
tplink,tl-wr941-v2|\
|
||||
tplink,tl-wr941n-v7-cn)
|
||||
base_mac=$(mtd_get_mac_binary u-boot 130048)
|
||||
|
||||
@@ -154,6 +154,7 @@ case "$FIRMWARE" in
|
||||
ocedo,raccoon|\
|
||||
tplink,tl-wdr3600-v1|\
|
||||
tplink,tl-wdr4300-v1|\
|
||||
tplink,tl-wdr4300-v1-il|\
|
||||
tplink,tl-wdr4900-v2|\
|
||||
winchannel,wb2000)
|
||||
ath9k_eeprom_extract "art" 20480 1088
|
||||
|
||||
@@ -17,7 +17,10 @@ tplink,archer-c7-v4|\
|
||||
tplink,archer-c7-v5)
|
||||
migrate_leds "^$boardonly:=tp-link:"
|
||||
;;
|
||||
tplink,archer-c7-v2)
|
||||
tplink,archer-c7-v2|\
|
||||
tplink,tl-wdr3600-v1|\
|
||||
tplink,tl-wdr4300-v1|\
|
||||
tplink,tl-wdr4300-v1-il)
|
||||
migrate_leds ":blue:=:green:"
|
||||
;;
|
||||
wd,mynet-n750)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/dts-v1/;
|
||||
|
||||
#include "ar9344_tplink_tl-wdr4300.dtsi"
|
||||
|
||||
/ {
|
||||
model = "TP-Link TL-WDR4300 v1 (IL)";
|
||||
compatible = "tplink,tl-wdr4300-v1-il", "qca,ar9344";
|
||||
};
|
||||
@@ -229,7 +229,6 @@
|
||||
pll-data = <0x06000000 0x00000101 0x00001616>;
|
||||
|
||||
mtd-mac-address = <&uboot 0x1fc00>;
|
||||
mtd-mac-address-increment = <(-2)>;
|
||||
|
||||
phy-mode = "rgmii";
|
||||
phy-handle = <&phy0>;
|
||||
|
||||
@@ -17,7 +17,7 @@ define Device/tplink_archer-c2-v3
|
||||
ATH_SOC := qca9563
|
||||
IMAGE_SIZE := 7808k
|
||||
DEVICE_TITLE := TP-Link Archer C2 v3
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct
|
||||
TPLINK_BOARD_ID := ARCHER-C2-V3
|
||||
endef
|
||||
TARGET_DEVICES += tplink_archer-c2-v3
|
||||
@@ -28,7 +28,7 @@ define Device/tplink_archer-c25-v1
|
||||
IMAGE_SIZE := 7808k
|
||||
DEVICE_TITLE := TP-Link Archer C25 v1
|
||||
TPLINK_BOARD_ID := ARCHER-C25-V1
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct
|
||||
SUPPORTED_DEVICES += archer-c25-v1
|
||||
endef
|
||||
TARGET_DEVICES += tplink_archer-c25-v1
|
||||
@@ -39,7 +39,7 @@ define Device/tplink_archer-c58-v1
|
||||
IMAGE_SIZE := 7936k
|
||||
DEVICE_TITLE := TP-Link Archer C58 v1
|
||||
TPLINK_BOARD_ID := ARCHER-C58-V1
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9888-ct
|
||||
SUPPORTED_DEVICES += archer-c58-v1
|
||||
endef
|
||||
TARGET_DEVICES += tplink_archer-c58-v1
|
||||
@@ -61,7 +61,7 @@ define Device/tplink_archer-c60-v1
|
||||
IMAGE_SIZE := 7936k
|
||||
DEVICE_TITLE := TP-Link Archer C60 v1
|
||||
TPLINK_BOARD_ID := ARCHER-C60-V1
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9888-ct
|
||||
SUPPORTED_DEVICES += archer-c60-v1
|
||||
endef
|
||||
TARGET_DEVICES += tplink_archer-c60-v1
|
||||
@@ -72,7 +72,7 @@ define Device/tplink_archer-c60-v2
|
||||
IMAGE_SIZE := 7808k
|
||||
DEVICE_TITLE := TP-Link Archer C60 v2
|
||||
TPLINK_BOARD_ID := ARCHER-C60-V2
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9888-ct
|
||||
SUPPORTED_DEVICES += archer-c60-v2
|
||||
endef
|
||||
TARGET_DEVICES += tplink_archer-c60-v2
|
||||
@@ -171,7 +171,7 @@ TARGET_DEVICES += tplink_cpe210-v3
|
||||
define Device/tplink_archer-d50-v1
|
||||
ATH_SOC := qca9531
|
||||
DEVICE_TITLE := TP-Link Archer D50 v1
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct ath10k-firmware-qca988x-ct
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
|
||||
BOARDNAME := ARCHER-D50-V1
|
||||
IMAGE_SIZE := 7808k
|
||||
TPLINK_HWID := 0xC1200001
|
||||
@@ -206,7 +206,7 @@ define Device/tplink_re450-v2
|
||||
ATH_SOC := qca9563
|
||||
IMAGE_SIZE := 6016k
|
||||
DEVICE_TITLE := TP-Link RE450 v2
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
|
||||
TPLINK_HWID := 0x0
|
||||
TPLINK_HWREV := 0
|
||||
TPLINK_BOARD_ID := RE450-V2
|
||||
@@ -234,6 +234,16 @@ define Device/tplink_tl-wdr4300-v1
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-wdr4300-v1
|
||||
|
||||
define Device/tplink_tl-wdr4300-v1-il
|
||||
$(Device/tplink-8mlzma)
|
||||
ATH_SOC := ar9344
|
||||
DEVICE_TITLE := TP-Link TL-WDR4300 v1 (IL)
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
|
||||
TPLINK_HWID := 0x43008001
|
||||
SUPPORTED_DEVICES += tl-wdr4300
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-wdr4300-v1-il
|
||||
|
||||
define Device/tplink_tl-wdr4900-v2
|
||||
$(Device/tplink-8mlzma)
|
||||
ATH_SOC := qca9558
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user