Compare commits
84 Commits
v21.02.0-r
...
v21.02.0-r
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
134ac824c5 | ||
|
|
2d5ee43dc6 | ||
|
|
a205de5594 | ||
|
|
8abe67d6d2 | ||
|
|
2e1a5a4353 | ||
|
|
941ba3ffc4 | ||
|
|
17cb9a9a9e | ||
|
|
a5850c049e | ||
|
|
55d9c020a1 | ||
|
|
089efd61e9 | ||
|
|
60fad8f82b | ||
|
|
c58afca1aa | ||
|
|
249aeaa9d8 | ||
|
|
a1d50e7b45 | ||
|
|
88c8d0a219 | ||
|
|
4633471d74 | ||
|
|
df4feb1655 | ||
|
|
f3f70fb956 | ||
|
|
23cde9d12a | ||
|
|
fe498dd3f1 | ||
|
|
38cdc57be6 | ||
|
|
6073d2c02a | ||
|
|
8921e36ed8 | ||
|
|
d3278c4343 | ||
|
|
47f617ef8d | ||
|
|
febf6db0d0 | ||
|
|
983fcc42a4 | ||
|
|
0ad49d368b | ||
|
|
ffa943f0b9 | ||
|
|
88e1c9b0b5 | ||
|
|
bd2e070557 | ||
|
|
43723e6db9 | ||
|
|
3eb34bc251 | ||
|
|
89d21b7f62 | ||
|
|
72f0733123 | ||
|
|
b0424190ef | ||
|
|
d723002d84 | ||
|
|
86f6171788 | ||
|
|
24cfa5005e | ||
|
|
69c10497c7 | ||
|
|
fc4b5411b3 | ||
|
|
d666ebcaa3 | ||
|
|
a9100f2196 | ||
|
|
b27b63b082 | ||
|
|
6f13a39035 | ||
|
|
9302e63d1a | ||
|
|
bea9380149 | ||
|
|
ccbe535604 | ||
|
|
4c29ff7cb8 | ||
|
|
a078037ace | ||
|
|
9fa925362f | ||
|
|
a75928d125 | ||
|
|
e16a45f258 | ||
|
|
0c51b265bf | ||
|
|
85cef1cf22 | ||
|
|
e171d11f55 | ||
|
|
3d62b5d5c6 | ||
|
|
3047df2317 | ||
|
|
ab5010d170 | ||
|
|
72d93c1ba4 | ||
|
|
7a5a247c1f | ||
|
|
c0fdfd15fc | ||
|
|
98b1a6435f | ||
|
|
ec780bdb92 | ||
|
|
82c700de67 | ||
|
|
1247a6bb35 | ||
|
|
25daa921da | ||
|
|
74dbf3412b | ||
|
|
125deb4d78 | ||
|
|
e410ef8389 | ||
|
|
f6d8c0cf2b | ||
|
|
56228e9393 | ||
|
|
2e157714a8 | ||
|
|
8add3e139c | ||
|
|
b2a3df91fa | ||
|
|
3d0ed7d763 | ||
|
|
7a4bd9cc51 | ||
|
|
3839a4c7e9 | ||
|
|
3921f213e5 | ||
|
|
20f66649dd | ||
|
|
05a8bf04ec | ||
|
|
072d0afb8f | ||
|
|
25c75424e7 | ||
|
|
aeb7b57798 |
@@ -1,4 +1,4 @@
|
||||
src-git packages https://git.openwrt.org/feed/packages.git^e738d2faf1c4ed68094f1d5da075d2d92fb35049
|
||||
src-git luci https://git.openwrt.org/project/luci.git^2778366916f815d4af9534218bef10aa3aad3c01
|
||||
src-git routing https://git.openwrt.org/feed/routing.git^2baff33918c089fd3744c7192f8ae7a29c47a8d7
|
||||
src-git telephony https://git.openwrt.org/feed/telephony.git^ee64ec42e981e1f9e5a21cd3478497987ff76680
|
||||
src-git packages https://git.openwrt.org/feed/packages.git^49b1a6f4cc6e265cb98eb3d3225aca96079d1ec0
|
||||
src-git luci https://git.openwrt.org/project/luci.git^132c72c7b75b7c69ec713cd9c44b7566da7f052a
|
||||
src-git routing https://git.openwrt.org/feed/routing.git^e7e25b873b8ed4376cdcf82f963db34dda954f02
|
||||
src-git telephony https://git.openwrt.org/feed/telephony.git^aa1954024371e02d985b51ec4187fc0745ab4e18
|
||||
|
||||
@@ -43,5 +43,11 @@ endef
|
||||
|
||||
# 1: package name
|
||||
define GetABISuffix
|
||||
$(if $(filter-out kmod-%,$(1)),$(if $(ABIV_$(1)),$(ABIV_$(1)),$(foreach v,$(wildcard $(STAGING_DIR)/pkginfo/$(1).version),$(shell cat $(v)))))
|
||||
$(if $(ABIV_$(1)),$(ABIV_$(1)),$(call FormatABISuffix,$(1),$(foreach v,$(wildcard $(STAGING_DIR)/pkginfo/$(1).version),$(shell cat $(v)))))
|
||||
endef
|
||||
|
||||
# 1: package name
|
||||
# 2: abi version
|
||||
define FormatABISuffix
|
||||
$(if $(filter-out kmod-%,$(1)),$(if $(2),$(if $(filter %0 %1 %2 %3 %4 %5 %6 %7 %8 %9,$(1)),-)$(2)))
|
||||
endef
|
||||
|
||||
@@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL
|
||||
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
||||
endif
|
||||
|
||||
LINUX_VERSION-5.4 = .124
|
||||
LINUX_VERSION-5.4 = .137
|
||||
|
||||
LINUX_KERNEL_HASH-5.4.124 = f7f29dda2b042d7b5986d18274413131cf70e17288c05e9a683df1f46c507d82
|
||||
LINUX_KERNEL_HASH-5.4.137 = f09e5e366ce5d8bde887cda229ef17138fd1653706a702221f934f99aaa31f7c
|
||||
|
||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||
|
||||
@@ -99,7 +99,7 @@ _endef=endef
|
||||
|
||||
ifeq ($(DUMP),)
|
||||
define BuildTarget/ipkg
|
||||
ABIV_$(1):=$(if $(filter-out kmod-%,$(1)),$(ABI_VERSION))
|
||||
ABIV_$(1):=$(call FormatABISuffix,$(1),$(ABI_VERSION))
|
||||
PDIR_$(1):=$(call FeedPackageDir,$(1))
|
||||
IPKG_$(1):=$$(PDIR_$(1))/$(1)$$(ABIV_$(1))_$(VERSION)_$(PKGARCH).ipk
|
||||
IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1)
|
||||
|
||||
@@ -23,13 +23,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),21.02.0-rc3)
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02.0-rc4)
|
||||
|
||||
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r16172-2aba3e9784)
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r16256-2d5ee43dc6)
|
||||
|
||||
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/21.02.0-rc3)
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/21.02.0-rc4)
|
||||
|
||||
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
|
||||
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)
|
||||
|
||||
@@ -114,9 +114,17 @@ generate_network() {
|
||||
add network device
|
||||
set network.@device[-1].name='br-$1'
|
||||
set network.@device[-1].type='bridge'
|
||||
set network.@device[-1].macaddr='$macaddr'
|
||||
EOF
|
||||
for port in $ports; do uci add_list network.@device[-1].ports="$port"; done
|
||||
[ -n "$macaddr" ] && {
|
||||
for port in $ports; do
|
||||
uci -q batch <<-EOF
|
||||
add network device
|
||||
set network.@device[-1].name='$port'
|
||||
set network.@device[-1].macaddr='$macaddr'
|
||||
EOF
|
||||
done
|
||||
}
|
||||
device=br-$1
|
||||
type=
|
||||
macaddr=""
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
START=10
|
||||
USE_PROCD=1
|
||||
|
||||
validate_system_section()
|
||||
{
|
||||
validate_system_section() {
|
||||
uci_load_validate system system "$1" "$2" \
|
||||
'hostname:string:OpenWrt' \
|
||||
'conloglevel:uinteger' \
|
||||
@@ -23,8 +22,9 @@ system_config() {
|
||||
echo "$hostname" > /proc/sys/kernel/hostname
|
||||
[ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
|
||||
echo "$timezone" > /tmp/TZ
|
||||
[ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && \
|
||||
ln -sf "/usr/share/zoneinfo/$zonename" /tmp/localtime && rm -f /tmp/TZ
|
||||
[ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/${zonename// /_}" ] \
|
||||
&& ln -sf "/usr/share/zoneinfo/${zonename// /_}" /tmp/localtime \
|
||||
&& rm -f /tmp/TZ
|
||||
|
||||
# apply timezone to kernel
|
||||
hwclock -u --systz
|
||||
@@ -35,8 +35,7 @@ reload_service() {
|
||||
config_foreach validate_system_section system system_config
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "system"
|
||||
procd_add_validation validate_system_section
|
||||
}
|
||||
|
||||
@@ -72,14 +72,20 @@ preinit_config_board() {
|
||||
|
||||
json_select network
|
||||
json_select "lan"
|
||||
json_get_vars ifname
|
||||
json_get_vars device
|
||||
json_get_values ports ports
|
||||
json_select ..
|
||||
json_select ..
|
||||
|
||||
[ -n "$ifname" ] || return
|
||||
[ -n "$device" -o -n "$ports" ] || return
|
||||
|
||||
# swconfig uses $device and DSA uses ports
|
||||
[ -z "$ports" ] && {
|
||||
ports="$device"
|
||||
}
|
||||
|
||||
# only use the first one
|
||||
ifname=${ifname%% *}
|
||||
ifname=${ports%% *}
|
||||
|
||||
if [ -x /sbin/swconfig ]; then
|
||||
# configure the switch, if present
|
||||
@@ -91,6 +97,8 @@ preinit_config_board() {
|
||||
else
|
||||
# trim any vlan ids
|
||||
ifname=${ifname%\.*}
|
||||
# trim any vlan modifiers like :t
|
||||
ifname=${ifname%\:*}
|
||||
fi
|
||||
|
||||
pi_ifname=$ifname
|
||||
|
||||
@@ -130,10 +130,12 @@ wifi_updown() {
|
||||
ubus_wifi_cmd "$cmd" "$2"
|
||||
scan_wifi
|
||||
cmd=up
|
||||
ubus call network reload
|
||||
}
|
||||
[ reconf = "$1" ] && {
|
||||
scan_wifi
|
||||
cmd=reconf
|
||||
ubus call network reload
|
||||
}
|
||||
ubus_wifi_cmd "$cmd" "$2"
|
||||
_wifi_updown "$@"
|
||||
@@ -246,7 +248,7 @@ case "$1" in
|
||||
reload) wifi_reload "$2";;
|
||||
reload_legacy) wifi_reload_legacy "$2";;
|
||||
--help|help) usage;;
|
||||
reconf) ubus call network reload; wifi_updown "reconf" "$2";;
|
||||
''|up) ubus call network reload; wifi_updown "enable" "$2";;
|
||||
reconf) wifi_updown "reconf" "$2";;
|
||||
''|up) wifi_updown "enable" "$2";;
|
||||
*) usage; exit 1;;
|
||||
esac
|
||||
|
||||
@@ -183,7 +183,7 @@ if VERSIONOPT
|
||||
config VERSION_REPO
|
||||
string
|
||||
prompt "Release repository"
|
||||
default "https://downloads.openwrt.org/releases/21.02.0-rc3"
|
||||
default "https://downloads.openwrt.org/releases/21.02.0-rc4"
|
||||
help
|
||||
This is the repository address embedded in the image, it defaults
|
||||
to the trunk snapshot repo; the url may contain the following placeholders:
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ath10k-ct
|
||||
PKG_RELEASE=2
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2021-01-11
|
||||
PKG_SOURCE_VERSION:=9fe1df7d4f783b6b0cd1c99d11979e5a6e6fc40b
|
||||
PKG_MIRROR_HASH:=4e30e256716611045e930b95eadaa8bfcadd5bdd8bbe3869cfe0f377920e812b
|
||||
PKG_SOURCE_DATE:=2021-06-03
|
||||
PKG_SOURCE_VERSION:=b44cd7b2e7b0df5995ece18f358d4dfc40834ba1
|
||||
PKG_MIRROR_HASH:=59f961ad425eb1a48fa9c391a325cc0f23845daec9d12673445d3077f9756cf0
|
||||
|
||||
# Build the 5.10 ath10k-ct driver version.
|
||||
# Probably this should match as closely as
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
From: Sven Eckelmann <sven@narfation.org>
|
||||
Date: Tue, 26 Feb 2019 08:06:35 +0100
|
||||
Subject: ath10k-ct: apply mac80211 rates to ath10k-ct rate state
|
||||
|
||||
The rates from mac80211 have to be copied to the state of ath10k-ct or
|
||||
otherwise the ath10k_check_apply_special_rates function overwrites
|
||||
them again with some default values. This breaks for example the
|
||||
mcast_rate set for a wifi-iface.
|
||||
|
||||
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
||||
|
||||
--- a/ath10k-5.10/mac.c
|
||||
+++ b/ath10k-5.10/mac.c
|
||||
@@ -6774,6 +6774,7 @@ static void ath10k_recalculate_mgmt_rate
|
||||
return;
|
||||
}
|
||||
|
||||
+ arvif->mgt_rate[def->chan->band] = hw_rate_code;
|
||||
vdev_param = ar->wmi.vdev_param->mgmt_rate;
|
||||
ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
|
||||
hw_rate_code);
|
||||
@@ -7000,6 +7001,7 @@ static void ath10k_bss_info_changed(stru
|
||||
"mac vdev %d mcast_rate %x\n",
|
||||
arvif->vdev_id, rate);
|
||||
|
||||
+ arvif->mcast_rate[band] = rate;
|
||||
vdev_param = ar->wmi.vdev_param->mcast_data_rate;
|
||||
ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id,
|
||||
vdev_param, rate);
|
||||
@@ -7008,6 +7010,7 @@ static void ath10k_bss_info_changed(stru
|
||||
"failed to set mcast rate on vdev %i: %d\n",
|
||||
arvif->vdev_id, ret);
|
||||
|
||||
+ arvif->bcast_rate[band] = rate;
|
||||
vdev_param = ar->wmi.vdev_param->bcast_data_rate;
|
||||
ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id,
|
||||
vdev_param, rate);
|
||||
@@ -210,7 +210,7 @@ v13:
|
||||
|
||||
#include "htt.h"
|
||||
#include "htc.h"
|
||||
@@ -1551,6 +1552,13 @@ struct ath10k {
|
||||
@@ -1557,6 +1558,13 @@ struct ath10k {
|
||||
} testmode;
|
||||
|
||||
struct {
|
||||
@@ -445,7 +445,7 @@ v13:
|
||||
{
|
||||
--- a/ath10k-5.10/wmi-tlv.c
|
||||
+++ b/ath10k-5.10/wmi-tlv.c
|
||||
@@ -4585,6 +4585,8 @@ static const struct wmi_ops wmi_tlv_ops
|
||||
@@ -4594,6 +4594,8 @@ static const struct wmi_ops wmi_tlv_ops
|
||||
.gen_echo = ath10k_wmi_tlv_op_gen_echo,
|
||||
.gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf,
|
||||
.gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable,
|
||||
|
||||
@@ -16,7 +16,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
|
||||
--- a/ath10k-5.10/core.h
|
||||
+++ b/ath10k-5.10/core.h
|
||||
@@ -1659,6 +1659,10 @@ struct ath10k {
|
||||
@@ -1665,6 +1665,10 @@ struct ath10k {
|
||||
u8 csi_data[4096];
|
||||
u16 csi_data_len;
|
||||
|
||||
@@ -42,7 +42,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
if (ret)
|
||||
--- a/ath10k-5.10/mac.c
|
||||
+++ b/ath10k-5.10/mac.c
|
||||
@@ -11400,7 +11400,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -11403,7 +11403,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
|
||||
@@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=exfat
|
||||
PKG_VERSION:=5.10.1
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=5.12.3
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/namjaejeon/linux-exfat-oot/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=0ff77dd7d39eb231d00c3c4909b9fad31ebeeb618bd6fa18fce142becc9c1f98
|
||||
PKG_HASH:=43889c73af76c466bbc904aff80354a62ecaa24c7b20e354ff735f5949907982
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/linux-exfat-oot-$(PKG_VERSION)
|
||||
|
||||
PKG_MAINTAINER:=
|
||||
|
||||
@@ -721,7 +721,7 @@ $(eval $(call KernelPackage,mppe))
|
||||
|
||||
|
||||
SCHED_MODULES = $(patsubst $(LINUX_DIR)/net/sched/%.ko,%,$(wildcard $(LINUX_DIR)/net/sched/*.ko))
|
||||
SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf cls_basic cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_mirred act_skbedit cls_matchall
|
||||
SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf cls_basic cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_gact act_mirred act_skbedit cls_matchall
|
||||
SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark act_ctinfo sch_cake sch_netem sch_mqprio em_ipset cls_bpf cls_flower act_bpf act_vlan
|
||||
SCHED_MODULES_EXTRA = $(filter-out $(SCHED_MODULES_FILTER),$(SCHED_MODULES))
|
||||
SCHED_FILES = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(filter $(SCHED_MODULES_CORE),$(SCHED_MODULES)))
|
||||
@@ -745,6 +745,7 @@ define KernelPackage/sched-core
|
||||
CONFIG_NET_CLS_ROUTE4 \
|
||||
CONFIG_NET_CLS_TCINDEX \
|
||||
CONFIG_NET_CLS_U32 \
|
||||
CONFIG_NET_ACT_GACT \
|
||||
CONFIG_NET_ACT_MIRRED \
|
||||
CONFIG_NET_ACT_SKBEDIT \
|
||||
CONFIG_NET_CLS_MATCHALL \
|
||||
@@ -899,7 +900,6 @@ define KernelPackage/sched
|
||||
CONFIG_NET_SCH_FQ \
|
||||
CONFIG_NET_SCH_PIE \
|
||||
CONFIG_NET_ACT_POLICE \
|
||||
CONFIG_NET_ACT_GACT \
|
||||
CONFIG_NET_ACT_IPT \
|
||||
CONFIG_NET_ACT_PEDIT \
|
||||
CONFIG_NET_ACT_SIMP \
|
||||
|
||||
@@ -907,10 +907,8 @@ drv_mac80211_setup() {
|
||||
return 1
|
||||
}
|
||||
|
||||
[ -z "$(uci -q -P /var/state show wireless._${phy})" ] && {
|
||||
uci -q -P /var/state set wireless._${phy}=phy
|
||||
wireless_set_data phy="$phy"
|
||||
}
|
||||
wireless_set_data phy="$phy"
|
||||
[ -z "$(uci -q -P /var/state show wireless._${phy})" ] && uci -q -P /var/state set wireless._${phy}=phy
|
||||
|
||||
OLDAPLIST=$(uci -q -P /var/state get wireless._${phy}.aplist)
|
||||
OLDSPLIST=$(uci -q -P /var/state get wireless._${phy}.splist)
|
||||
@@ -1003,6 +1001,7 @@ drv_mac80211_setup() {
|
||||
[ -n "$hostapd_ctrl" ] && {
|
||||
local no_reload=1
|
||||
if [ -n "$(ubus list | grep hostapd.$primary_ap)" ]; then
|
||||
no_reload=0
|
||||
[ "${NEW_MD5}" = "${OLD_MD5}" ] || {
|
||||
ubus call hostapd.$primary_ap reload
|
||||
no_reload=$?
|
||||
@@ -1077,6 +1076,10 @@ drv_mac80211_teardown() {
|
||||
json_select data
|
||||
json_get_vars phy
|
||||
json_select ..
|
||||
[ -n "$phy" ] || {
|
||||
echo "Bug: PHY is undefined for device '$1'"
|
||||
return 1
|
||||
}
|
||||
|
||||
mac80211_interface_cleanup "$phy"
|
||||
uci -q -P /var/state revert wireless._${phy}
|
||||
|
||||
297
package/kernel/mac80211/patches/subsys/010-sync-nl80211_h.patch
Normal file
297
package/kernel/mac80211/patches/subsys/010-sync-nl80211_h.patch
Normal file
@@ -0,0 +1,297 @@
|
||||
--- a/include/uapi/linux/nl80211.h
|
||||
+++ b/include/uapi/linux/nl80211.h
|
||||
@@ -655,6 +655,9 @@
|
||||
* When a security association was established on an 802.1X network using
|
||||
* fast transition, this event should be followed by an
|
||||
* %NL80211_CMD_PORT_AUTHORIZED event.
|
||||
+ * Following a %NL80211_CMD_ROAM event userspace can issue
|
||||
+ * %NL80211_CMD_GET_SCAN in order to obtain the scan information for the
|
||||
+ * new BSS the card/driver roamed to.
|
||||
* @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify
|
||||
* userspace that a connection was dropped by the AP or due to other
|
||||
* reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and
|
||||
@@ -757,7 +760,8 @@
|
||||
* of any other interfaces, and other interfaces will again take
|
||||
* precedence when they are used.
|
||||
*
|
||||
- * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface.
|
||||
+ * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface
|
||||
+ * (no longer supported).
|
||||
*
|
||||
* @NL80211_CMD_SET_MULTICAST_TO_UNICAST: Configure if this AP should perform
|
||||
* multicast to unicast conversion. When enabled, all multicast packets
|
||||
@@ -1177,6 +1181,10 @@
|
||||
* includes the contents of the frame. %NL80211_ATTR_ACK flag is included
|
||||
* if the recipient acknowledged the frame.
|
||||
*
|
||||
+ * @NL80211_CMD_SET_SAR_SPECS: SAR power limitation configuration is
|
||||
+ * passed using %NL80211_ATTR_SAR_SPEC. %NL80211_ATTR_WIPHY is used to
|
||||
+ * specify the wiphy index to be applied to.
|
||||
+ *
|
||||
* @NL80211_CMD_MAX: highest used command number
|
||||
* @__NL80211_CMD_AFTER_LAST: internal use
|
||||
*/
|
||||
@@ -1407,6 +1415,8 @@ enum nl80211_commands {
|
||||
|
||||
NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS,
|
||||
|
||||
+ NL80211_CMD_SET_SAR_SPECS,
|
||||
+
|
||||
/* add new commands above here */
|
||||
|
||||
/* used to define NL80211_CMD_MAX below */
|
||||
@@ -1750,8 +1760,9 @@ enum nl80211_commands {
|
||||
* specify just a single bitrate, which is to be used for the beacon.
|
||||
* The driver must also specify support for this with the extended
|
||||
* features NL80211_EXT_FEATURE_BEACON_RATE_LEGACY,
|
||||
- * NL80211_EXT_FEATURE_BEACON_RATE_HT and
|
||||
- * NL80211_EXT_FEATURE_BEACON_RATE_VHT.
|
||||
+ * NL80211_EXT_FEATURE_BEACON_RATE_HT,
|
||||
+ * NL80211_EXT_FEATURE_BEACON_RATE_VHT and
|
||||
+ * NL80211_EXT_FEATURE_BEACON_RATE_HE.
|
||||
*
|
||||
* @NL80211_ATTR_FRAME_MATCH: A binary attribute which typically must contain
|
||||
* at least one byte, currently used with @NL80211_CMD_REGISTER_FRAME.
|
||||
@@ -1955,8 +1966,15 @@ enum nl80211_commands {
|
||||
* @NL80211_ATTR_PROBE_RESP: Probe Response template data. Contains the entire
|
||||
* probe-response frame. The DA field in the 802.11 header is zero-ed out,
|
||||
* to be filled by the FW.
|
||||
- * @NL80211_ATTR_DISABLE_HT: Force HT capable interfaces to disable
|
||||
- * this feature. Currently, only supported in mac80211 drivers.
|
||||
+ * @NL80211_ATTR_DISABLE_HT: Force HT capable interfaces to disable
|
||||
+ * this feature during association. This is a flag attribute.
|
||||
+ * Currently only supported in mac80211 drivers.
|
||||
+ * @NL80211_ATTR_DISABLE_VHT: Force VHT capable interfaces to disable
|
||||
+ * this feature during association. This is a flag attribute.
|
||||
+ * Currently only supported in mac80211 drivers.
|
||||
+ * @NL80211_ATTR_DISABLE_HE: Force HE capable interfaces to disable
|
||||
+ * this feature during association. This is a flag attribute.
|
||||
+ * Currently only supported in mac80211 drivers.
|
||||
* @NL80211_ATTR_HT_CAPABILITY_MASK: Specify which bits of the
|
||||
* ATTR_HT_CAPABILITY to which attention should be paid.
|
||||
* Currently, only mac80211 NICs support this feature.
|
||||
@@ -2077,7 +2095,8 @@ enum nl80211_commands {
|
||||
* until the channel switch event.
|
||||
* @NL80211_ATTR_CH_SWITCH_BLOCK_TX: flag attribute specifying that transmission
|
||||
* must be blocked on the current channel (before the channel switch
|
||||
- * operation).
|
||||
+ * operation). Also included in the channel switch started event if quiet
|
||||
+ * was requested by the AP.
|
||||
* @NL80211_ATTR_CSA_IES: Nested set of attributes containing the IE information
|
||||
* for the time while performing a channel switch.
|
||||
* @NL80211_ATTR_CNTDWN_OFFS_BEACON: An array of offsets (u16) to the channel
|
||||
@@ -2527,6 +2546,20 @@ enum nl80211_commands {
|
||||
* override mask. Used with NL80211_ATTR_S1G_CAPABILITY in
|
||||
* NL80211_CMD_ASSOCIATE or NL80211_CMD_CONNECT.
|
||||
*
|
||||
+ * @NL80211_ATTR_SAE_PWE: Indicates the mechanism(s) allowed for SAE PWE
|
||||
+ * derivation in WPA3-Personal networks which are using SAE authentication.
|
||||
+ * This is a u8 attribute that encapsulates one of the values from
|
||||
+ * &enum nl80211_sae_pwe_mechanism.
|
||||
+ *
|
||||
+ * @NL80211_ATTR_SAR_SPEC: SAR power limitation specification when
|
||||
+ * used with %NL80211_CMD_SET_SAR_SPECS. The message contains fields
|
||||
+ * of %nl80211_sar_attrs which specifies the sar type and related
|
||||
+ * sar specs. Sar specs contains array of %nl80211_sar_specs_attrs.
|
||||
+ *
|
||||
+ * @NL80211_ATTR_RECONNECT_REQUESTED: flag attribute, used with deauth and
|
||||
+ * disassoc events to indicate that an immediate reconnect to the AP
|
||||
+ * is desired.
|
||||
+ *
|
||||
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
|
||||
* @NL80211_ATTR_MAX: highest attribute number currently defined
|
||||
* @__NL80211_ATTR_AFTER_LAST: internal use
|
||||
@@ -3016,6 +3049,14 @@ enum nl80211_attrs {
|
||||
NL80211_ATTR_S1G_CAPABILITY,
|
||||
NL80211_ATTR_S1G_CAPABILITY_MASK,
|
||||
|
||||
+ NL80211_ATTR_SAE_PWE,
|
||||
+
|
||||
+ NL80211_ATTR_RECONNECT_REQUESTED,
|
||||
+
|
||||
+ NL80211_ATTR_SAR_SPEC,
|
||||
+
|
||||
+ NL80211_ATTR_DISABLE_HE,
|
||||
+
|
||||
/* add attributes here, update the policy in nl80211.c */
|
||||
|
||||
__NL80211_ATTR_AFTER_LAST,
|
||||
@@ -5896,6 +5937,19 @@ enum nl80211_feature_flags {
|
||||
* @NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP: Driver/device supports
|
||||
* unsolicited broadcast probe response transmission
|
||||
*
|
||||
+ * @NL80211_EXT_FEATURE_BEACON_RATE_HE: Driver supports beacon rate
|
||||
+ * configuration (AP/mesh) with HE rates.
|
||||
+ *
|
||||
+ * @NL80211_EXT_FEATURE_SECURE_LTF: Device supports secure LTF measurement
|
||||
+ * exchange protocol.
|
||||
+ *
|
||||
+ * @NL80211_EXT_FEATURE_SECURE_RTT: Device supports secure RTT measurement
|
||||
+ * exchange protocol.
|
||||
+ *
|
||||
+ * @NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE: Device supports management
|
||||
+ * frame protection for all management frames exchanged during the
|
||||
+ * negotiation and range measurement procedure.
|
||||
+ *
|
||||
* @NUM_NL80211_EXT_FEATURES: number of extended features.
|
||||
* @MAX_NL80211_EXT_FEATURES: highest extended feature index.
|
||||
*/
|
||||
@@ -5956,6 +6010,10 @@ enum nl80211_ext_feature_index {
|
||||
NL80211_EXT_FEATURE_SAE_OFFLOAD_AP,
|
||||
NL80211_EXT_FEATURE_FILS_DISCOVERY,
|
||||
NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP,
|
||||
+ NL80211_EXT_FEATURE_BEACON_RATE_HE,
|
||||
+ NL80211_EXT_FEATURE_SECURE_LTF,
|
||||
+ NL80211_EXT_FEATURE_SECURE_RTT,
|
||||
+ NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE,
|
||||
|
||||
/* add new features before the definition below */
|
||||
NUM_NL80211_EXT_FEATURES,
|
||||
@@ -6253,11 +6311,13 @@ struct nl80211_vendor_cmd_info {
|
||||
* @NL80211_TDLS_PEER_HT: TDLS peer is HT capable.
|
||||
* @NL80211_TDLS_PEER_VHT: TDLS peer is VHT capable.
|
||||
* @NL80211_TDLS_PEER_WMM: TDLS peer is WMM capable.
|
||||
+ * @NL80211_TDLS_PEER_HE: TDLS peer is HE capable.
|
||||
*/
|
||||
enum nl80211_tdls_peer_capability {
|
||||
NL80211_TDLS_PEER_HT = 1<<0,
|
||||
NL80211_TDLS_PEER_VHT = 1<<1,
|
||||
NL80211_TDLS_PEER_WMM = 1<<2,
|
||||
+ NL80211_TDLS_PEER_HE = 1<<3,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -6849,6 +6909,9 @@ enum nl80211_peer_measurement_ftm_capa {
|
||||
* if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor
|
||||
* %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based
|
||||
* ranging will be used.
|
||||
+ * @NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK: negotiate for LMR feedback. Only
|
||||
+ * valid if either %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED or
|
||||
+ * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
|
||||
*
|
||||
* @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal
|
||||
* @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number
|
||||
@@ -6867,6 +6930,7 @@ enum nl80211_peer_measurement_ftm_req {
|
||||
NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC,
|
||||
NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED,
|
||||
NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED,
|
||||
+ NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK,
|
||||
|
||||
/* keep last */
|
||||
NUM_NL80211_PMSR_FTM_REQ_ATTR,
|
||||
@@ -7124,4 +7188,115 @@ enum nl80211_unsol_bcast_probe_resp_attr
|
||||
NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX =
|
||||
__NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_LAST - 1
|
||||
};
|
||||
+
|
||||
+/**
|
||||
+ * enum nl80211_sae_pwe_mechanism - The mechanism(s) allowed for SAE PWE
|
||||
+ * derivation. Applicable only when WPA3-Personal SAE authentication is
|
||||
+ * used.
|
||||
+ *
|
||||
+ * @NL80211_SAE_PWE_UNSPECIFIED: not specified, used internally to indicate that
|
||||
+ * attribute is not present from userspace.
|
||||
+ * @NL80211_SAE_PWE_HUNT_AND_PECK: hunting-and-pecking loop only
|
||||
+ * @NL80211_SAE_PWE_HASH_TO_ELEMENT: hash-to-element only
|
||||
+ * @NL80211_SAE_PWE_BOTH: both hunting-and-pecking loop and hash-to-element
|
||||
+ * can be used.
|
||||
+ */
|
||||
+enum nl80211_sae_pwe_mechanism {
|
||||
+ NL80211_SAE_PWE_UNSPECIFIED,
|
||||
+ NL80211_SAE_PWE_HUNT_AND_PECK,
|
||||
+ NL80211_SAE_PWE_HASH_TO_ELEMENT,
|
||||
+ NL80211_SAE_PWE_BOTH,
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
+ * enum nl80211_sar_type - type of SAR specs
|
||||
+ *
|
||||
+ * @NL80211_SAR_TYPE_POWER: power limitation specified in 0.25dBm unit
|
||||
+ *
|
||||
+ */
|
||||
+enum nl80211_sar_type {
|
||||
+ NL80211_SAR_TYPE_POWER,
|
||||
+
|
||||
+ /* add new type here */
|
||||
+
|
||||
+ /* Keep last */
|
||||
+ NUM_NL80211_SAR_TYPE,
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
+ * enum nl80211_sar_attrs - Attributes for SAR spec
|
||||
+ *
|
||||
+ * @NL80211_SAR_ATTR_TYPE: the SAR type as defined in &enum nl80211_sar_type.
|
||||
+ *
|
||||
+ * @NL80211_SAR_ATTR_SPECS: Nested array of SAR power
|
||||
+ * limit specifications. Each specification contains a set
|
||||
+ * of %nl80211_sar_specs_attrs.
|
||||
+ *
|
||||
+ * For SET operation, it contains array of %NL80211_SAR_ATTR_SPECS_POWER
|
||||
+ * and %NL80211_SAR_ATTR_SPECS_RANGE_INDEX.
|
||||
+ *
|
||||
+ * For sar_capa dump, it contains array of
|
||||
+ * %NL80211_SAR_ATTR_SPECS_START_FREQ
|
||||
+ * and %NL80211_SAR_ATTR_SPECS_END_FREQ.
|
||||
+ *
|
||||
+ * @__NL80211_SAR_ATTR_LAST: Internal
|
||||
+ * @NL80211_SAR_ATTR_MAX: highest sar attribute
|
||||
+ *
|
||||
+ * These attributes are used with %NL80211_CMD_SET_SAR_SPEC
|
||||
+ */
|
||||
+enum nl80211_sar_attrs {
|
||||
+ __NL80211_SAR_ATTR_INVALID,
|
||||
+
|
||||
+ NL80211_SAR_ATTR_TYPE,
|
||||
+ NL80211_SAR_ATTR_SPECS,
|
||||
+
|
||||
+ __NL80211_SAR_ATTR_LAST,
|
||||
+ NL80211_SAR_ATTR_MAX = __NL80211_SAR_ATTR_LAST - 1,
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
+ * enum nl80211_sar_specs_attrs - Attributes for SAR power limit specs
|
||||
+ *
|
||||
+ * @NL80211_SAR_ATTR_SPECS_POWER: Required (s32)value to specify the actual
|
||||
+ * power limit value in units of 0.25 dBm if type is
|
||||
+ * NL80211_SAR_TYPE_POWER. (i.e., a value of 44 represents 11 dBm).
|
||||
+ * 0 means userspace doesn't have SAR limitation on this associated range.
|
||||
+ *
|
||||
+ * @NL80211_SAR_ATTR_SPECS_RANGE_INDEX: Required (u32) value to specify the
|
||||
+ * index of exported freq range table and the associated power limitation
|
||||
+ * is applied to this range.
|
||||
+ *
|
||||
+ * Userspace isn't required to set all the ranges advertised by WLAN driver,
|
||||
+ * and userspace can skip some certain ranges. These skipped ranges don't
|
||||
+ * have SAR limitations, and they are same as setting the
|
||||
+ * %NL80211_SAR_ATTR_SPECS_POWER to any unreasonable high value because any
|
||||
+ * value higher than regulatory allowed value just means SAR power
|
||||
+ * limitation is removed, but it's required to set at least one range.
|
||||
+ * It's not allowed to set duplicated range in one SET operation.
|
||||
+ *
|
||||
+ * Every SET operation overwrites previous SET operation.
|
||||
+ *
|
||||
+ * @NL80211_SAR_ATTR_SPECS_START_FREQ: Required (u32) value to specify the start
|
||||
+ * frequency of this range edge when registering SAR capability to wiphy.
|
||||
+ * It's not a channel center frequency. The unit is kHz.
|
||||
+ *
|
||||
+ * @NL80211_SAR_ATTR_SPECS_END_FREQ: Required (u32) value to specify the end
|
||||
+ * frequency of this range edge when registering SAR capability to wiphy.
|
||||
+ * It's not a channel center frequency. The unit is kHz.
|
||||
+ *
|
||||
+ * @__NL80211_SAR_ATTR_SPECS_LAST: Internal
|
||||
+ * @NL80211_SAR_ATTR_SPECS_MAX: highest sar specs attribute
|
||||
+ */
|
||||
+enum nl80211_sar_specs_attrs {
|
||||
+ __NL80211_SAR_ATTR_SPECS_INVALID,
|
||||
+
|
||||
+ NL80211_SAR_ATTR_SPECS_POWER,
|
||||
+ NL80211_SAR_ATTR_SPECS_RANGE_INDEX,
|
||||
+ NL80211_SAR_ATTR_SPECS_START_FREQ,
|
||||
+ NL80211_SAR_ATTR_SPECS_END_FREQ,
|
||||
+
|
||||
+ __NL80211_SAR_ATTR_SPECS_LAST,
|
||||
+ NL80211_SAR_ATTR_SPECS_MAX = __NL80211_SAR_ATTR_SPECS_LAST - 1,
|
||||
+};
|
||||
+
|
||||
#endif /* __LINUX_NL80211_H */
|
||||
@@ -31,28 +31,6 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
/**
|
||||
* cfg80211_rx_unprot_mlme_mgmt - notification of unprotected mlme mgmt frame
|
||||
--- a/include/uapi/linux/nl80211.h
|
||||
+++ b/include/uapi/linux/nl80211.h
|
||||
@@ -2527,6 +2527,10 @@ enum nl80211_commands {
|
||||
* override mask. Used with NL80211_ATTR_S1G_CAPABILITY in
|
||||
* NL80211_CMD_ASSOCIATE or NL80211_CMD_CONNECT.
|
||||
*
|
||||
+ * @NL80211_ATTR_RECONNECT_REQUESTED: flag attribute, used with deauth and
|
||||
+ * disassoc events to indicate that an immediate reconnect to the AP
|
||||
+ * is desired.
|
||||
+ *
|
||||
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
|
||||
* @NL80211_ATTR_MAX: highest attribute number currently defined
|
||||
* @__NL80211_ATTR_AFTER_LAST: internal use
|
||||
@@ -3016,6 +3020,8 @@ enum nl80211_attrs {
|
||||
NL80211_ATTR_S1G_CAPABILITY,
|
||||
NL80211_ATTR_S1G_CAPABILITY_MASK,
|
||||
|
||||
+ NL80211_ATTR_RECONNECT_REQUESTED,
|
||||
+
|
||||
/* add attributes here, update the policy in nl80211.c */
|
||||
|
||||
__NL80211_ATTR_AFTER_LAST,
|
||||
--- a/net/mac80211/mlme.c
|
||||
+++ b/net/mac80211/mlme.c
|
||||
@@ -2734,7 +2734,7 @@ static void ieee80211_report_disconnect(
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
From: Rohan Dutta <drohan@codeaurora.org>
|
||||
Date: Tue, 27 Oct 2020 12:09:10 +0200
|
||||
Subject: [PATCH] cfg80211: Add support to configure SAE PWE value to drivers
|
||||
|
||||
Add support to configure SAE PWE preference from userspace to drivers in
|
||||
both AP and STA modes. This is needed for cases where the driver takes
|
||||
care of Authentication frame processing (SME in the driver) so that
|
||||
correct enforcement of the acceptable PWE derivation mechanism can be
|
||||
performed.
|
||||
|
||||
The userspace applications can pass the sae_pwe value using the
|
||||
NL80211_ATTR_SAE_PWE attribute in the NL80211_CMD_CONNECT and
|
||||
NL80211_CMD_START_AP commands to the driver. This allows selection
|
||||
between the hunting-and-pecking loop and hash-to-element options for PWE
|
||||
derivation. For backwards compatibility, this new attribute is optional
|
||||
and if not included, the driver is notified of the value being
|
||||
unspecified.
|
||||
|
||||
Signed-off-by: Rohan Dutta <drohan@codeaurora.org>
|
||||
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
|
||||
Link: https://lore.kernel.org/r/20201027100910.22283-1-jouni@codeaurora.org
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -1009,6 +1009,14 @@ struct survey_info {
|
||||
* @sae_pwd: password for SAE authentication (for devices supporting SAE
|
||||
* offload)
|
||||
* @sae_pwd_len: length of SAE password (for devices supporting SAE offload)
|
||||
+ * @sae_pwe: The mechanisms allowed for SAE PWE derivation
|
||||
+ * NL80211_SAE_PWE_UNSPECIFIED: Not-specified, used to indicate userspace
|
||||
+ * did not specify any preference. The driver should follow its
|
||||
+ * internal policy in such a scenario.
|
||||
+ * NL80211_SAE_PWE_HUNT_AND_PECK: Allow hunting-and-pecking loop only
|
||||
+ * NL80211_SAE_PWE_HASH_TO_ELEMENT: Allow hash-to-element only
|
||||
+ * NL80211_SAE_PWE_BOTH: Allow either hunting-and-pecking loop
|
||||
+ * or hash-to-element
|
||||
*/
|
||||
struct cfg80211_crypto_settings {
|
||||
u32 wpa_versions;
|
||||
@@ -1027,6 +1035,7 @@ struct cfg80211_crypto_settings {
|
||||
const u8 *psk;
|
||||
const u8 *sae_pwd;
|
||||
u8 sae_pwd_len;
|
||||
+ enum nl80211_sae_pwe_mechanism sae_pwe;
|
||||
};
|
||||
|
||||
/**
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -736,6 +736,9 @@ static const struct nla_policy nl80211_p
|
||||
NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN),
|
||||
[NL80211_ATTR_S1G_CAPABILITY_MASK] =
|
||||
NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN),
|
||||
+ [NL80211_ATTR_SAE_PWE] =
|
||||
+ NLA_POLICY_RANGE(NLA_U8, NL80211_SAE_PWE_HUNT_AND_PECK,
|
||||
+ NL80211_SAE_PWE_BOTH),
|
||||
[NL80211_ATTR_RECONNECT_REQUESTED] = { .type = NLA_REJECT },
|
||||
};
|
||||
|
||||
@@ -9764,6 +9767,12 @@ static int nl80211_crypto_settings(struc
|
||||
nla_len(info->attrs[NL80211_ATTR_SAE_PASSWORD]);
|
||||
}
|
||||
|
||||
+ if (info->attrs[NL80211_ATTR_SAE_PWE])
|
||||
+ settings->sae_pwe =
|
||||
+ nla_get_u8(info->attrs[NL80211_ATTR_SAE_PWE]);
|
||||
+ else
|
||||
+ settings->sae_pwe = NL80211_SAE_PWE_UNSPECIFIED;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
From: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
Date: Sat, 6 Feb 2021 12:51:12 +0100
|
||||
Subject: [PATCH] mac80211: enable QoS support for nl80211 ctrl port
|
||||
|
||||
This patch unifies sending control port frames
|
||||
over nl80211 and AF_PACKET sockets a little more.
|
||||
|
||||
Before this patch, EAPOL frames got QoS prioritization
|
||||
only when using AF_PACKET sockets.
|
||||
|
||||
__ieee80211_select_queue only selects a QoS-enabled queue
|
||||
for control port frames, when the control port protocol
|
||||
is set correctly on the skb. For the AF_PACKET path this
|
||||
works, but the nl80211 path used ETH_P_802_3.
|
||||
|
||||
Another check for injected frames in wme.c then prevented
|
||||
the QoS TID to be copied in the frame.
|
||||
|
||||
In order to fix this, get rid of the frame injection marking
|
||||
for nl80211 ctrl port and set the correct ethernet protocol.
|
||||
|
||||
Please note:
|
||||
An erlier version of this path tried to prevent
|
||||
frame aggregation for control port frames in order to speed up
|
||||
the initial connection setup a little. This seemed to cause
|
||||
issues on my older Intel dvm-based hardware, and was therefore
|
||||
removed again. Future commits which try to reintroduce this
|
||||
have to check carefully how hw behaves with aggregated and
|
||||
non-aggregated traffic for the same TID.
|
||||
My NIC: Intel(R) Centrino(R) Ultimate-N 6300 AGN, REV=0x74
|
||||
|
||||
Reported-by: kernel test robot <lkp@intel.com>
|
||||
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
Link: https://lore.kernel.org/r/20210206115112.567881-1-markus.theil@tu-ilmenau.de
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/status.c
|
||||
+++ b/net/mac80211/status.c
|
||||
@@ -628,16 +628,12 @@ static void ieee80211_report_ack_skb(str
|
||||
u64 cookie = IEEE80211_SKB_CB(skb)->ack.cookie;
|
||||
struct ieee80211_sub_if_data *sdata;
|
||||
struct ieee80211_hdr *hdr = (void *)skb->data;
|
||||
- __be16 ethertype = 0;
|
||||
-
|
||||
- if (skb->len >= ETH_HLEN && skb->protocol == cpu_to_be16(ETH_P_802_3))
|
||||
- skb_copy_bits(skb, 2 * ETH_ALEN, ðertype, ETH_TLEN);
|
||||
|
||||
rcu_read_lock();
|
||||
sdata = ieee80211_sdata_from_skb(local, skb);
|
||||
if (sdata) {
|
||||
- if (ethertype == sdata->control_port_protocol ||
|
||||
- ethertype == cpu_to_be16(ETH_P_PREAUTH))
|
||||
+ if (skb->protocol == sdata->control_port_protocol ||
|
||||
+ skb->protocol == cpu_to_be16(ETH_P_PREAUTH))
|
||||
cfg80211_control_port_tx_status(&sdata->wdev,
|
||||
cookie,
|
||||
skb->data,
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -1195,9 +1195,7 @@ ieee80211_tx_prepare(struct ieee80211_su
|
||||
tx->sta = rcu_dereference(sdata->u.vlan.sta);
|
||||
if (!tx->sta && sdata->wdev.use_4addr)
|
||||
return TX_DROP;
|
||||
- } else if (info->flags & (IEEE80211_TX_INTFL_NL80211_FRAME_TX |
|
||||
- IEEE80211_TX_CTL_INJECTED) ||
|
||||
- tx->sdata->control_port_protocol == tx->skb->protocol) {
|
||||
+ } else if (tx->sdata->control_port_protocol == tx->skb->protocol) {
|
||||
tx->sta = sta_info_get_bss(sdata, hdr->addr1);
|
||||
}
|
||||
if (!tx->sta && !is_multicast_ether_addr(hdr->addr1))
|
||||
@@ -5421,6 +5419,7 @@ int ieee80211_tx_control_port(struct wip
|
||||
{
|
||||
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
||||
struct ieee80211_local *local = sdata->local;
|
||||
+ struct sta_info *sta;
|
||||
struct sk_buff *skb;
|
||||
struct ethhdr *ehdr;
|
||||
u32 ctrl_flags = 0;
|
||||
@@ -5443,8 +5442,7 @@ int ieee80211_tx_control_port(struct wip
|
||||
if (cookie)
|
||||
ctrl_flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;
|
||||
|
||||
- flags |= IEEE80211_TX_INTFL_NL80211_FRAME_TX |
|
||||
- IEEE80211_TX_CTL_INJECTED;
|
||||
+ flags |= IEEE80211_TX_INTFL_NL80211_FRAME_TX;
|
||||
|
||||
skb = dev_alloc_skb(local->hw.extra_tx_headroom +
|
||||
sizeof(struct ethhdr) + len);
|
||||
@@ -5461,10 +5459,25 @@ int ieee80211_tx_control_port(struct wip
|
||||
ehdr->h_proto = proto;
|
||||
|
||||
skb->dev = dev;
|
||||
- skb->protocol = htons(ETH_P_802_3);
|
||||
+ skb->protocol = proto;
|
||||
skb_reset_network_header(skb);
|
||||
skb_reset_mac_header(skb);
|
||||
|
||||
+ /* update QoS header to prioritize control port frames if possible,
|
||||
+ * priorization also happens for control port frames send over
|
||||
+ * AF_PACKET
|
||||
+ */
|
||||
+ rcu_read_lock();
|
||||
+
|
||||
+ if (ieee80211_lookup_ra_sta(sdata, skb, &sta) == 0 && !IS_ERR(sta)) {
|
||||
+ u16 queue = __ieee80211_select_queue(sdata, sta, skb);
|
||||
+
|
||||
+ skb_set_queue_mapping(skb, queue);
|
||||
+ skb_get_hash(skb);
|
||||
+ }
|
||||
+
|
||||
+ rcu_read_unlock();
|
||||
+
|
||||
/* mutex lock is only needed for incrementing the cookie counter */
|
||||
mutex_lock(&local->mtx);
|
||||
|
||||
@@ -28,7 +28,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
*
|
||||
* Transmit and frame generation functions.
|
||||
*/
|
||||
@@ -1403,8 +1403,17 @@ static void ieee80211_txq_enqueue(struct
|
||||
@@ -1401,8 +1401,17 @@ static void ieee80211_txq_enqueue(struct
|
||||
ieee80211_set_skb_enqueue_time(skb);
|
||||
|
||||
spin_lock_bh(&fq->lock);
|
||||
@@ -48,7 +48,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
spin_unlock_bh(&fq->lock);
|
||||
}
|
||||
|
||||
@@ -3846,6 +3855,9 @@ bool ieee80211_txq_airtime_check(struct
|
||||
@@ -3844,6 +3853,9 @@ bool ieee80211_txq_airtime_check(struct
|
||||
if (!txq->sta)
|
||||
return true;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -4173,6 +4173,9 @@ static bool ieee80211_tx_8023(struct iee
|
||||
@@ -4171,6 +4171,9 @@ static bool ieee80211_tx_8023(struct iee
|
||||
unsigned long flags;
|
||||
int q = info->hw_queue;
|
||||
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Thu, 17 Jun 2021 17:56:54 +0200
|
||||
Subject: [PATCH] mac80211: move A-MPDU session check from minstrel_ht to
|
||||
mac80211
|
||||
|
||||
This avoids calling back into tx handlers from within the rate control module.
|
||||
Preparation for deferring rate control until tx dequeue
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -6160,6 +6160,11 @@ enum rate_control_capabilities {
|
||||
* otherwise the NSS difference doesn't bother us.
|
||||
*/
|
||||
RATE_CTRL_CAPA_VHT_EXT_NSS_BW = BIT(0),
|
||||
+ /**
|
||||
+ * @RATE_CTRL_CAPA_AMPDU_TRIGGER:
|
||||
+ * mac80211 should start A-MPDU sessions on tx
|
||||
+ */
|
||||
+ RATE_CTRL_CAPA_AMPDU_TRIGGER = BIT(1),
|
||||
};
|
||||
|
||||
struct rate_control_ops {
|
||||
--- a/net/mac80211/rc80211_minstrel_ht.c
|
||||
+++ b/net/mac80211/rc80211_minstrel_ht.c
|
||||
@@ -1153,29 +1153,6 @@ minstrel_downgrade_prob_rate(struct mins
|
||||
}
|
||||
|
||||
static void
|
||||
-minstrel_aggr_check(struct ieee80211_sta *pubsta, struct sk_buff *skb)
|
||||
-{
|
||||
- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
|
||||
- struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
|
||||
- u16 tid;
|
||||
-
|
||||
- if (skb_get_queue_mapping(skb) == IEEE80211_AC_VO)
|
||||
- return;
|
||||
-
|
||||
- if (unlikely(!ieee80211_is_data_qos(hdr->frame_control)))
|
||||
- return;
|
||||
-
|
||||
- if (unlikely(skb->protocol == cpu_to_be16(ETH_P_PAE)))
|
||||
- return;
|
||||
-
|
||||
- tid = ieee80211_get_tid(hdr);
|
||||
- if (likely(sta->ampdu_mlme.tid_tx[tid]))
|
||||
- return;
|
||||
-
|
||||
- ieee80211_start_tx_ba_session(pubsta, tid, 0);
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
minstrel_ht_tx_status(void *priv, struct ieee80211_supported_band *sband,
|
||||
void *priv_sta, struct ieee80211_tx_status *st)
|
||||
{
|
||||
@@ -1477,10 +1454,6 @@ minstrel_ht_get_rate(void *priv, struct
|
||||
struct minstrel_priv *mp = priv;
|
||||
u16 sample_idx;
|
||||
|
||||
- if (!(info->flags & IEEE80211_TX_CTL_AMPDU) &&
|
||||
- !minstrel_ht_is_legacy_group(MI_RATE_GROUP(mi->max_prob_rate)))
|
||||
- minstrel_aggr_check(sta, txrc->skb);
|
||||
-
|
||||
info->flags |= mi->tx_flags;
|
||||
|
||||
#ifdef CPTCFG_MAC80211_DEBUGFS
|
||||
@@ -1894,6 +1867,7 @@ static u32 minstrel_ht_get_expected_thro
|
||||
|
||||
static const struct rate_control_ops mac80211_minstrel_ht = {
|
||||
.name = "minstrel_ht",
|
||||
+ .capa = RATE_CTRL_CAPA_AMPDU_TRIGGER,
|
||||
.tx_status_ext = minstrel_ht_tx_status,
|
||||
.get_rate = minstrel_ht_get_rate,
|
||||
.rate_init = minstrel_ht_rate_init,
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -3931,6 +3931,29 @@ void ieee80211_txq_schedule_start(struct
|
||||
}
|
||||
EXPORT_SYMBOL(ieee80211_txq_schedule_start);
|
||||
|
||||
+static void
|
||||
+ieee80211_aggr_check(struct ieee80211_sub_if_data *sdata,
|
||||
+ struct sta_info *sta,
|
||||
+ struct sk_buff *skb)
|
||||
+{
|
||||
+ struct rate_control_ref *ref = sdata->local->rate_ctrl;
|
||||
+ u16 tid;
|
||||
+
|
||||
+ if (!ref || !(ref->ops->capa & RATE_CTRL_CAPA_AMPDU_TRIGGER))
|
||||
+ return;
|
||||
+
|
||||
+ if (!sta || !sta->sta.ht_cap.ht_supported ||
|
||||
+ !sta->sta.wme || skb_get_queue_mapping(skb) == IEEE80211_AC_VO ||
|
||||
+ skb->protocol == sdata->control_port_protocol)
|
||||
+ return;
|
||||
+
|
||||
+ tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK;
|
||||
+ if (likely(sta->ampdu_mlme.tid_tx[tid]))
|
||||
+ return;
|
||||
+
|
||||
+ ieee80211_start_tx_ba_session(&sta->sta, tid, 0);
|
||||
+}
|
||||
+
|
||||
void __ieee80211_subif_start_xmit(struct sk_buff *skb,
|
||||
struct net_device *dev,
|
||||
u32 info_flags,
|
||||
@@ -3961,6 +3984,8 @@ void __ieee80211_subif_start_xmit(struct
|
||||
skb_get_hash(skb);
|
||||
}
|
||||
|
||||
+ ieee80211_aggr_check(sdata, sta, skb);
|
||||
+
|
||||
if (sta) {
|
||||
struct ieee80211_fast_tx *fast_tx;
|
||||
|
||||
@@ -4224,6 +4249,8 @@ static void ieee80211_8023_xmit(struct i
|
||||
|
||||
memset(info, 0, sizeof(*info));
|
||||
|
||||
+ ieee80211_aggr_check(sdata, sta, skb);
|
||||
+
|
||||
tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
|
||||
tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]);
|
||||
if (tid_tx) {
|
||||
@@ -0,0 +1,114 @@
|
||||
From: Ryder Lee <ryder.lee@mediatek.com>
|
||||
Date: Fri, 28 May 2021 14:05:41 +0800
|
||||
Subject: [PATCH] mac80211: call ieee80211_tx_h_rate_ctrl() when dequeue
|
||||
|
||||
Make ieee80211_tx_h_rate_ctrl() get called on dequeue to improve
|
||||
performance since it reduces the turnaround time for rate control.
|
||||
|
||||
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -1778,8 +1778,6 @@ static int invoke_tx_handlers_early(stru
|
||||
CALL_TXH(ieee80211_tx_h_ps_buf);
|
||||
CALL_TXH(ieee80211_tx_h_check_control_port_protocol);
|
||||
CALL_TXH(ieee80211_tx_h_select_key);
|
||||
- if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL))
|
||||
- CALL_TXH(ieee80211_tx_h_rate_ctrl);
|
||||
|
||||
txh_done:
|
||||
if (unlikely(res == TX_DROP)) {
|
||||
@@ -1812,6 +1810,9 @@ static int invoke_tx_handlers_late(struc
|
||||
goto txh_done;
|
||||
}
|
||||
|
||||
+ if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL))
|
||||
+ CALL_TXH(ieee80211_tx_h_rate_ctrl);
|
||||
+
|
||||
CALL_TXH(ieee80211_tx_h_michael_mic_add);
|
||||
CALL_TXH(ieee80211_tx_h_sequence);
|
||||
CALL_TXH(ieee80211_tx_h_fragment);
|
||||
@@ -3382,15 +3383,21 @@ out:
|
||||
* Can be called while the sta lock is held. Anything that can cause packets to
|
||||
* be generated will cause deadlock!
|
||||
*/
|
||||
-static void ieee80211_xmit_fast_finish(struct ieee80211_sub_if_data *sdata,
|
||||
- struct sta_info *sta, u8 pn_offs,
|
||||
- struct ieee80211_key *key,
|
||||
- struct sk_buff *skb)
|
||||
+static ieee80211_tx_result
|
||||
+ieee80211_xmit_fast_finish(struct ieee80211_sub_if_data *sdata,
|
||||
+ struct sta_info *sta, u8 pn_offs,
|
||||
+ struct ieee80211_key *key,
|
||||
+ struct ieee80211_tx_data *tx)
|
||||
{
|
||||
+ struct sk_buff *skb = tx->skb;
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
||||
struct ieee80211_hdr *hdr = (void *)skb->data;
|
||||
u8 tid = IEEE80211_NUM_TIDS;
|
||||
|
||||
+ if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL) &&
|
||||
+ ieee80211_tx_h_rate_ctrl(tx) != TX_CONTINUE)
|
||||
+ return TX_DROP;
|
||||
+
|
||||
if (key)
|
||||
info->control.hw_key = &key->conf;
|
||||
|
||||
@@ -3439,6 +3446,8 @@ static void ieee80211_xmit_fast_finish(s
|
||||
break;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ return TX_CONTINUE;
|
||||
}
|
||||
|
||||
static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,
|
||||
@@ -3542,24 +3551,17 @@ static bool ieee80211_xmit_fast(struct i
|
||||
tx.sta = sta;
|
||||
tx.key = fast_tx->key;
|
||||
|
||||
- if (!ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL)) {
|
||||
- tx.skb = skb;
|
||||
- r = ieee80211_tx_h_rate_ctrl(&tx);
|
||||
- skb = tx.skb;
|
||||
- tx.skb = NULL;
|
||||
-
|
||||
- if (r != TX_CONTINUE) {
|
||||
- if (r != TX_QUEUED)
|
||||
- kfree_skb(skb);
|
||||
- return true;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
if (ieee80211_queue_skb(local, sdata, sta, skb))
|
||||
return true;
|
||||
|
||||
- ieee80211_xmit_fast_finish(sdata, sta, fast_tx->pn_offs,
|
||||
- fast_tx->key, skb);
|
||||
+ tx.skb = skb;
|
||||
+ r = ieee80211_xmit_fast_finish(sdata, sta, fast_tx->pn_offs,
|
||||
+ fast_tx->key, &tx);
|
||||
+ tx.skb = NULL;
|
||||
+ if (r == TX_DROP) {
|
||||
+ kfree_skb(skb);
|
||||
+ return true;
|
||||
+ }
|
||||
|
||||
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
|
||||
sdata = container_of(sdata->bss,
|
||||
@@ -3670,8 +3672,12 @@ begin:
|
||||
(tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV))
|
||||
pn_offs = ieee80211_hdrlen(hdr->frame_control);
|
||||
|
||||
- ieee80211_xmit_fast_finish(sta->sdata, sta, pn_offs,
|
||||
- tx.key, skb);
|
||||
+ r = ieee80211_xmit_fast_finish(sta->sdata, sta, pn_offs,
|
||||
+ tx.key, &tx);
|
||||
+ if (r != TX_CONTINUE) {
|
||||
+ ieee80211_free_txskb(&local->hw, skb);
|
||||
+ goto begin;
|
||||
+ }
|
||||
} else {
|
||||
if (invoke_tx_handlers_late(&tx))
|
||||
goto begin;
|
||||
@@ -0,0 +1,119 @@
|
||||
From: Ryder Lee <ryder.lee@mediatek.com>
|
||||
Date: Fri, 28 May 2021 14:05:43 +0800
|
||||
Subject: [PATCH] mac80211: add rate control support for encap offload
|
||||
|
||||
The software rate control cannot deal with encap offload, so fix it.
|
||||
|
||||
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -2024,6 +2024,15 @@ static inline void ieee80211_tx_skb(stru
|
||||
ieee80211_tx_skb_tid(sdata, skb, 7);
|
||||
}
|
||||
|
||||
+static inline bool ieee80211_is_tx_data(struct sk_buff *skb)
|
||||
+{
|
||||
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
|
||||
+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
||||
+
|
||||
+ return info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP ||
|
||||
+ ieee80211_is_data(hdr->frame_control);
|
||||
+}
|
||||
+
|
||||
u32 ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action,
|
||||
struct ieee802_11_elems *elems,
|
||||
u64 filter, u32 crc, u8 *transmitter_bssid,
|
||||
--- a/net/mac80211/rate.c
|
||||
+++ b/net/mac80211/rate.c
|
||||
@@ -297,15 +297,11 @@ void ieee80211_check_rate_mask(struct ie
|
||||
static bool rc_no_data_or_no_ack_use_min(struct ieee80211_tx_rate_control *txrc)
|
||||
{
|
||||
struct sk_buff *skb = txrc->skb;
|
||||
- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
||||
- __le16 fc;
|
||||
-
|
||||
- fc = hdr->frame_control;
|
||||
|
||||
return (info->flags & (IEEE80211_TX_CTL_NO_ACK |
|
||||
IEEE80211_TX_CTL_USE_MINRATE)) ||
|
||||
- !ieee80211_is_data(fc);
|
||||
+ !ieee80211_is_tx_data(skb);
|
||||
}
|
||||
|
||||
static void rc_send_low_basicrate(struct ieee80211_tx_rate *rate,
|
||||
@@ -870,7 +866,6 @@ void ieee80211_get_tx_rates(struct ieee8
|
||||
int max_rates)
|
||||
{
|
||||
struct ieee80211_sub_if_data *sdata;
|
||||
- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
||||
struct ieee80211_supported_band *sband;
|
||||
|
||||
@@ -882,7 +877,7 @@ void ieee80211_get_tx_rates(struct ieee8
|
||||
sdata = vif_to_sdata(vif);
|
||||
sband = sdata->local->hw.wiphy->bands[info->band];
|
||||
|
||||
- if (ieee80211_is_data(hdr->frame_control))
|
||||
+ if (ieee80211_is_tx_data(skb))
|
||||
rate_control_apply_mask(sdata, sta, sband, dest, max_rates);
|
||||
|
||||
if (dest[0].idx < 0)
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -679,6 +679,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee8021
|
||||
u32 len;
|
||||
struct ieee80211_tx_rate_control txrc;
|
||||
struct ieee80211_sta_rates *ratetbl = NULL;
|
||||
+ bool encap = info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP;
|
||||
bool assoc = false;
|
||||
|
||||
memset(&txrc, 0, sizeof(txrc));
|
||||
@@ -720,7 +721,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee8021
|
||||
* just wants a probe response.
|
||||
*/
|
||||
if (tx->sdata->vif.bss_conf.use_short_preamble &&
|
||||
- (ieee80211_is_data(hdr->frame_control) ||
|
||||
+ (ieee80211_is_tx_data(tx->skb) ||
|
||||
(tx->sta && test_sta_flag(tx->sta, WLAN_STA_SHORT_PREAMBLE))))
|
||||
txrc.short_preamble = true;
|
||||
|
||||
@@ -742,7 +743,8 @@ ieee80211_tx_h_rate_ctrl(struct ieee8021
|
||||
"%s: Dropped data frame as no usable bitrate found while "
|
||||
"scanning and associated. Target station: "
|
||||
"%pM on %d GHz band\n",
|
||||
- tx->sdata->name, hdr->addr1,
|
||||
+ tx->sdata->name,
|
||||
+ encap ? ((struct ethhdr *)hdr)->h_dest : hdr->addr1,
|
||||
info->band ? 5 : 2))
|
||||
return TX_DROP;
|
||||
|
||||
@@ -776,7 +778,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee8021
|
||||
|
||||
if (txrc.reported_rate.idx < 0) {
|
||||
txrc.reported_rate = tx->rate;
|
||||
- if (tx->sta && ieee80211_is_data(hdr->frame_control))
|
||||
+ if (tx->sta && ieee80211_is_tx_data(tx->skb))
|
||||
tx->sta->tx_stats.last_rate = txrc.reported_rate;
|
||||
} else if (tx->sta)
|
||||
tx->sta->tx_stats.last_rate = txrc.reported_rate;
|
||||
@@ -3660,8 +3662,16 @@ begin:
|
||||
else
|
||||
info->flags &= ~IEEE80211_TX_CTL_AMPDU;
|
||||
|
||||
- if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)
|
||||
+ if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) {
|
||||
+ if (!ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL)) {
|
||||
+ r = ieee80211_tx_h_rate_ctrl(&tx);
|
||||
+ if (r != TX_CONTINUE) {
|
||||
+ ieee80211_free_txskb(&local->hw, skb);
|
||||
+ goto begin;
|
||||
+ }
|
||||
+ }
|
||||
goto encap_out;
|
||||
+ }
|
||||
|
||||
if (info->control.flags & IEEE80211_TX_CTRL_FAST_XMIT) {
|
||||
struct sta_info *sta = container_of(txq->sta, struct sta_info,
|
||||
@@ -0,0 +1,23 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Thu, 17 Jun 2021 12:05:54 +0200
|
||||
Subject: [PATCH] mac80211: minstrel_ht: fix sample time check
|
||||
|
||||
We need to skip sampling if the next sample time is after jiffies, not before.
|
||||
This patch fixes an issue where in some cases only very little sampling (or none
|
||||
at all) is performed, leading to really bad data rates
|
||||
|
||||
Fixes: 80d55154b2f8 ("mac80211: minstrel_ht: significantly redesign the rate probing strategy")
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/rc80211_minstrel_ht.c
|
||||
+++ b/net/mac80211/rc80211_minstrel_ht.c
|
||||
@@ -1466,7 +1466,7 @@ minstrel_ht_get_rate(void *priv, struct
|
||||
(info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO))
|
||||
return;
|
||||
|
||||
- if (time_is_before_jiffies(mi->sample_time))
|
||||
+ if (time_is_after_jiffies(mi->sample_time))
|
||||
return;
|
||||
|
||||
mi->sample_time = jiffies + MINSTREL_SAMPLE_INTERVAL;
|
||||
@@ -0,0 +1,51 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Sat, 19 Jun 2021 12:10:14 +0200
|
||||
Subject: [PATCH] mac80211: remove iwlwifi specific workaround that broke sta
|
||||
NDP tx
|
||||
|
||||
Sending nulldata packets is important for sw AP link probing and detecting
|
||||
4-address mode links. The checks that dropped these packets were apparently
|
||||
added to work around an iwlwifi firmware bug with multi-TID aggregation.
|
||||
|
||||
Fixes: 41cbb0f5a295 ("mac80211: add support for HE")
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
|
||||
@@ -1085,6 +1085,9 @@ static int iwl_mvm_tx_mpdu(struct iwl_mv
|
||||
if (WARN_ON_ONCE(mvmsta->sta_id == IWL_MVM_INVALID_STA))
|
||||
return -1;
|
||||
|
||||
+ if (unlikely(ieee80211_is_any_nullfunc(fc)) && sta->he_cap.has_he)
|
||||
+ return -1;
|
||||
+
|
||||
if (unlikely(ieee80211_is_probe_resp(fc)))
|
||||
iwl_mvm_probe_resp_set_noa(mvm, skb);
|
||||
|
||||
--- a/net/mac80211/mlme.c
|
||||
+++ b/net/mac80211/mlme.c
|
||||
@@ -1094,11 +1094,6 @@ void ieee80211_send_nullfunc(struct ieee
|
||||
struct ieee80211_hdr_3addr *nullfunc;
|
||||
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
|
||||
|
||||
- /* Don't send NDPs when STA is connected HE */
|
||||
- if (sdata->vif.type == NL80211_IFTYPE_STATION &&
|
||||
- !(ifmgd->flags & IEEE80211_STA_DISABLE_HE))
|
||||
- return;
|
||||
-
|
||||
skb = ieee80211_nullfunc_get(&local->hw, &sdata->vif,
|
||||
!ieee80211_hw_check(&local->hw, DOESNT_SUPPORT_QOS_NDP));
|
||||
if (!skb)
|
||||
@@ -1130,10 +1125,6 @@ static void ieee80211_send_4addr_nullfun
|
||||
if (WARN_ON(sdata->vif.type != NL80211_IFTYPE_STATION))
|
||||
return;
|
||||
|
||||
- /* Don't send NDPs when connected HE */
|
||||
- if (!(sdata->u.mgd.flags & IEEE80211_STA_DISABLE_HE))
|
||||
- return;
|
||||
-
|
||||
skb = dev_alloc_skb(local->hw.extra_tx_headroom + 30);
|
||||
if (!skb)
|
||||
return;
|
||||
@@ -0,0 +1,112 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Tue, 29 Jun 2021 13:25:09 +0200
|
||||
Subject: [PATCH] mac80211: fix starting aggregation sessions on mesh
|
||||
interfaces
|
||||
|
||||
The logic for starting aggregation sessions was recently moved from minstrel_ht
|
||||
to mac80211, into the subif tx handler just after the sta lookup.
|
||||
Unfortunately this didn't work for mesh interfaces, since the sta lookup is
|
||||
deferred until a much later point in time on those.
|
||||
Fix this by also calling the aggregation check right after the deferred sta
|
||||
lookup.
|
||||
|
||||
Fixes: 08a46c642001 ("mac80211: move A-MPDU session check from minstrel_ht to mac80211")
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -1159,6 +1159,29 @@ static bool ieee80211_tx_prep_agg(struct
|
||||
return queued;
|
||||
}
|
||||
|
||||
+static void
|
||||
+ieee80211_aggr_check(struct ieee80211_sub_if_data *sdata,
|
||||
+ struct sta_info *sta,
|
||||
+ struct sk_buff *skb)
|
||||
+{
|
||||
+ struct rate_control_ref *ref = sdata->local->rate_ctrl;
|
||||
+ u16 tid;
|
||||
+
|
||||
+ if (!ref || !(ref->ops->capa & RATE_CTRL_CAPA_AMPDU_TRIGGER))
|
||||
+ return;
|
||||
+
|
||||
+ if (!sta || !sta->sta.ht_cap.ht_supported ||
|
||||
+ !sta->sta.wme || skb_get_queue_mapping(skb) == IEEE80211_AC_VO ||
|
||||
+ skb->protocol == sdata->control_port_protocol)
|
||||
+ return;
|
||||
+
|
||||
+ tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK;
|
||||
+ if (likely(sta->ampdu_mlme.tid_tx[tid]))
|
||||
+ return;
|
||||
+
|
||||
+ ieee80211_start_tx_ba_session(&sta->sta, tid, 0);
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* initialises @tx
|
||||
* pass %NULL for the station if unknown, a valid pointer if known
|
||||
@@ -1172,6 +1195,7 @@ ieee80211_tx_prepare(struct ieee80211_su
|
||||
struct ieee80211_local *local = sdata->local;
|
||||
struct ieee80211_hdr *hdr;
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
||||
+ bool aggr_check = false;
|
||||
int tid;
|
||||
|
||||
memset(tx, 0, sizeof(*tx));
|
||||
@@ -1200,8 +1224,10 @@ ieee80211_tx_prepare(struct ieee80211_su
|
||||
} else if (tx->sdata->control_port_protocol == tx->skb->protocol) {
|
||||
tx->sta = sta_info_get_bss(sdata, hdr->addr1);
|
||||
}
|
||||
- if (!tx->sta && !is_multicast_ether_addr(hdr->addr1))
|
||||
+ if (!tx->sta && !is_multicast_ether_addr(hdr->addr1)) {
|
||||
tx->sta = sta_info_get(sdata, hdr->addr1);
|
||||
+ aggr_check = true;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (tx->sta && ieee80211_is_data_qos(hdr->frame_control) &&
|
||||
@@ -1211,8 +1237,12 @@ ieee80211_tx_prepare(struct ieee80211_su
|
||||
struct tid_ampdu_tx *tid_tx;
|
||||
|
||||
tid = ieee80211_get_tid(hdr);
|
||||
-
|
||||
tid_tx = rcu_dereference(tx->sta->ampdu_mlme.tid_tx[tid]);
|
||||
+ if (!tid_tx && aggr_check) {
|
||||
+ ieee80211_aggr_check(sdata, tx->sta, skb);
|
||||
+ tid_tx = rcu_dereference(tx->sta->ampdu_mlme.tid_tx[tid]);
|
||||
+ }
|
||||
+
|
||||
if (tid_tx) {
|
||||
bool queued;
|
||||
|
||||
@@ -3947,29 +3977,6 @@ void ieee80211_txq_schedule_start(struct
|
||||
}
|
||||
EXPORT_SYMBOL(ieee80211_txq_schedule_start);
|
||||
|
||||
-static void
|
||||
-ieee80211_aggr_check(struct ieee80211_sub_if_data *sdata,
|
||||
- struct sta_info *sta,
|
||||
- struct sk_buff *skb)
|
||||
-{
|
||||
- struct rate_control_ref *ref = sdata->local->rate_ctrl;
|
||||
- u16 tid;
|
||||
-
|
||||
- if (!ref || !(ref->ops->capa & RATE_CTRL_CAPA_AMPDU_TRIGGER))
|
||||
- return;
|
||||
-
|
||||
- if (!sta || !sta->sta.ht_cap.ht_supported ||
|
||||
- !sta->sta.wme || skb_get_queue_mapping(skb) == IEEE80211_AC_VO ||
|
||||
- skb->protocol == sdata->control_port_protocol)
|
||||
- return;
|
||||
-
|
||||
- tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK;
|
||||
- if (likely(sta->ampdu_mlme.tid_tx[tid]))
|
||||
- return;
|
||||
-
|
||||
- ieee80211_start_tx_ba_session(&sta->sta, tid, 0);
|
||||
-}
|
||||
-
|
||||
void __ieee80211_subif_start_xmit(struct sk_buff *skb,
|
||||
struct net_device *dev,
|
||||
u32 info_flags,
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -3736,6 +3736,7 @@ struct mgmt_frame_regs {
|
||||
@@ -3745,6 +3745,7 @@ struct mgmt_frame_regs {
|
||||
* (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
|
||||
*
|
||||
@@ -4058,6 +4059,7 @@ struct cfg80211_ops {
|
||||
@@ -4067,6 +4068,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);
|
||||
@@ -36,7 +36,7 @@
|
||||
u8 ps_dtim_period;
|
||||
--- a/include/uapi/linux/nl80211.h
|
||||
+++ b/include/uapi/linux/nl80211.h
|
||||
@@ -2531,6 +2531,9 @@ enum nl80211_commands {
|
||||
@@ -2560,6 +2560,9 @@ enum nl80211_commands {
|
||||
* disassoc events to indicate that an immediate reconnect to the AP
|
||||
* is desired.
|
||||
*
|
||||
@@ -46,9 +46,9 @@
|
||||
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
|
||||
* @NL80211_ATTR_MAX: highest attribute number currently defined
|
||||
* @__NL80211_ATTR_AFTER_LAST: internal use
|
||||
@@ -3022,6 +3025,8 @@ enum nl80211_attrs {
|
||||
@@ -3057,6 +3060,8 @@ enum nl80211_attrs {
|
||||
|
||||
NL80211_ATTR_RECONNECT_REQUESTED,
|
||||
NL80211_ATTR_DISABLE_HE,
|
||||
|
||||
+ NL80211_ATTR_WIPHY_ANTENNA_GAIN,
|
||||
+
|
||||
@@ -129,15 +129,15 @@
|
||||
local->hw.max_mtu = IEEE80211_MAX_DATA_LEN;
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -737,6 +737,7 @@ static const struct nla_policy nl80211_p
|
||||
[NL80211_ATTR_S1G_CAPABILITY_MASK] =
|
||||
NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN),
|
||||
@@ -740,6 +740,7 @@ static const struct nla_policy nl80211_p
|
||||
NLA_POLICY_RANGE(NLA_U8, NL80211_SAE_PWE_HUNT_AND_PECK,
|
||||
NL80211_SAE_PWE_BOTH),
|
||||
[NL80211_ATTR_RECONNECT_REQUESTED] = { .type = NLA_REJECT },
|
||||
+ [NL80211_ATTR_WIPHY_ANTENNA_GAIN] = { .type = NLA_U32 },
|
||||
};
|
||||
|
||||
/* policy for the key attributes */
|
||||
@@ -3245,6 +3246,20 @@ static int nl80211_set_wiphy(struct sk_b
|
||||
@@ -3248,6 +3249,20 @@ static int nl80211_set_wiphy(struct sk_b
|
||||
if (result)
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2021-05-15
|
||||
PKG_SOURCE_VERSION:=9d736545bb5ac9707e60b7900b7d6b290492e24d
|
||||
PKG_MIRROR_HASH:=8fd98f488579c18cfd8c442cff1796dcd70e2ecbc59c5d5b92ee8c0f06efafcf
|
||||
PKG_SOURCE_DATE:=2021-06-06
|
||||
PKG_SOURCE_VERSION:=22b690334c0f49b11534cc2e331c9d5e17c4a0bc
|
||||
PKG_MIRROR_HASH:=ff5e563935919d2e40c1e7254ef3bc06f7ecc5e69f8ddd12903e8f5de942d630
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
@@ -155,7 +155,7 @@ define KernelPackage/mt7615-common
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7615 wireless driver common code
|
||||
HIDDEN:=1
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac +kmod-hwmon-core
|
||||
FILES:= $(PKG_BUILD_DIR)/mt7615/mt7615-common.ko
|
||||
endef
|
||||
|
||||
@@ -213,7 +213,7 @@ endef
|
||||
define KernelPackage/mt7915e
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7915e wireless driver
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mt7615-common +@DRIVER_11AX_SUPPORT
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mt7615-common +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT
|
||||
FILES:= $(PKG_BUILD_DIR)/mt7915/mt7915e.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt7915e)
|
||||
endef
|
||||
|
||||
@@ -20,7 +20,6 @@ PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_CPE_ID:=cpe:/a:json-c_project:json-c
|
||||
|
||||
PKG_FLAGS := nonshared
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
|
||||
|
||||
|
||||
@@ -17,8 +17,6 @@ PKG_SOURCE_VERSION:=c291088f631d1694f7ba0444b59677b194348da8
|
||||
PKG_MIRROR_HASH:=99bcce12701bb34dadb39689d95c2c5cf1e27719d0ecfd645d3957a8947025ac
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_FLAGS := nonshared
|
||||
|
||||
PKG_LICENSE:=LGPL-2.1
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
|
||||
@@ -11,8 +11,6 @@ PKG_SOURCE_VERSION:=b14c4688612c05c78ce984d7bde633bce8703b1e
|
||||
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_FLAGS := nonshared
|
||||
|
||||
PKG_LICENSE:=ISC
|
||||
PKG_LICENSE_FILES:=
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libusb
|
||||
PKG_VERSION:=1.0.24
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=\
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From 369af149e3ad92514a2d24f112cedfeb7acaf558 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Dickens <christopher.a.dickens@gmail.com>
|
||||
Date: Sun, 13 Dec 2020 15:46:27 -0800
|
||||
Subject: [PATCH] Correct a typo in the Changelog and clean up a stray file
|
||||
|
||||
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
||||
---
|
||||
ChangeLog | 2 +-
|
||||
libusb/version_nano.h | 2 +-
|
||||
test | 0
|
||||
3 files changed, 2 insertions(+), 2 deletions(-)
|
||||
delete mode 100644 test
|
||||
|
||||
--- a/ChangeLog
|
||||
+++ b/ChangeLog
|
||||
@@ -12,7 +12,7 @@ visit: http://log.libusb.info
|
||||
* Darwin (macOS): use IOUSBDevice as darwin_device_class explicitly (#693)
|
||||
* Linux: Drop support for kernel older than 2.6.32
|
||||
* Linux: Provide an event thread name (#689)
|
||||
-* Linux: Wait until all USBs have been reaped before freeing them (#607)
|
||||
+* Linux: Wait until all URBs have been reaped before freeing them (#607)
|
||||
* NetBSD: Recognize device timeouts (#710)
|
||||
* OpenBSD: Allow opening ugen devices multiple times (#763)
|
||||
* OpenBSD: Support libusb_get_port_number() (#764)
|
||||
--- a/libusb/version_nano.h
|
||||
+++ b/libusb/version_nano.h
|
||||
@@ -1 +1 @@
|
||||
-#define LIBUSB_NANO 11584
|
||||
+#define LIBUSB_NANO 11585
|
||||
@@ -0,0 +1,61 @@
|
||||
From f6d2cb561402c3b6d3627c0eb89e009b503d9067 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Dickens <christopher.a.dickens@gmail.com>
|
||||
Date: Sun, 13 Dec 2020 15:49:19 -0800
|
||||
Subject: [PATCH] linux_usbfs: Fix parsing of descriptors for
|
||||
multi-configuration devices
|
||||
|
||||
Commit e2be556bd2 ("linux_usbfs: Parse config descriptors during device
|
||||
initialization") introduced a regression for devices with multiple
|
||||
configurations. The logic that verifies the reported length of the
|
||||
configuration descriptors failed to count the length of the
|
||||
configuration descriptor itself and would truncate the actual length by
|
||||
9 bytes, leading to a parsing error for subsequent descriptors.
|
||||
|
||||
Closes #825
|
||||
|
||||
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
||||
---
|
||||
libusb/os/linux_usbfs.c | 12 ++++++++----
|
||||
libusb/version_nano.h | 2 +-
|
||||
2 files changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/libusb/os/linux_usbfs.c
|
||||
+++ b/libusb/os/linux_usbfs.c
|
||||
@@ -641,7 +641,12 @@ static int seek_to_next_config(struct li
|
||||
uint8_t *buffer, size_t len)
|
||||
{
|
||||
struct usbi_descriptor_header *header;
|
||||
- int offset = 0;
|
||||
+ int offset;
|
||||
+
|
||||
+ /* Start seeking past the config descriptor */
|
||||
+ offset = LIBUSB_DT_CONFIG_SIZE;
|
||||
+ buffer += LIBUSB_DT_CONFIG_SIZE;
|
||||
+ len -= LIBUSB_DT_CONFIG_SIZE;
|
||||
|
||||
while (len > 0) {
|
||||
if (len < 2) {
|
||||
@@ -718,7 +723,7 @@ static int parse_config_descriptors(stru
|
||||
}
|
||||
|
||||
if (priv->sysfs_dir) {
|
||||
- /*
|
||||
+ /*
|
||||
* In sysfs wTotalLength is ignored, instead the kernel returns a
|
||||
* config descriptor with verified bLength fields, with descriptors
|
||||
* with an invalid bLength removed.
|
||||
@@ -727,8 +732,7 @@ static int parse_config_descriptors(stru
|
||||
int offset;
|
||||
|
||||
if (num_configs > 1 && idx < num_configs - 1) {
|
||||
- offset = seek_to_next_config(ctx, buffer + LIBUSB_DT_CONFIG_SIZE,
|
||||
- remaining - LIBUSB_DT_CONFIG_SIZE);
|
||||
+ offset = seek_to_next_config(ctx, buffer, remaining);
|
||||
if (offset < 0)
|
||||
return offset;
|
||||
sysfs_config_len = (uint16_t)offset;
|
||||
--- a/libusb/version_nano.h
|
||||
+++ b/libusb/version_nano.h
|
||||
@@ -1 +1 @@
|
||||
-#define LIBUSB_NANO 11585
|
||||
+#define LIBUSB_NANO 11586
|
||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wolfssl
|
||||
PKG_VERSION:=4.7.0-stable
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
|
||||
|
||||
50
package/libs/wolfssl/patches/200-ecc-rng.patch
Normal file
50
package/libs/wolfssl/patches/200-ecc-rng.patch
Normal file
@@ -0,0 +1,50 @@
|
||||
Since commit 6467de5a8840 ("Randomize z ordinates in scalar
|
||||
mult when timing resistant") wolfssl requires a RNG for an EC
|
||||
key when the hardened built option is selected.
|
||||
|
||||
wc_ecc_set_rng is only available when built hardened, so there
|
||||
is no safe way to install the RNG to the key regardless whether
|
||||
or not wolfssl is compiled hardened.
|
||||
|
||||
Always export wc_ecc_set_rng so tools such as hostapd can install
|
||||
RNG regardless of the built settings for wolfssl.
|
||||
|
||||
--- a/wolfcrypt/src/ecc.c
|
||||
+++ b/wolfcrypt/src/ecc.c
|
||||
@@ -10293,21 +10293,21 @@ void wc_ecc_fp_free(void)
|
||||
|
||||
#endif /* FP_ECC */
|
||||
|
||||
-#ifdef ECC_TIMING_RESISTANT
|
||||
int wc_ecc_set_rng(ecc_key* key, WC_RNG* rng)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
+#ifdef ECC_TIMING_RESISTANT
|
||||
if (key == NULL) {
|
||||
err = BAD_FUNC_ARG;
|
||||
}
|
||||
else {
|
||||
key->rng = rng;
|
||||
}
|
||||
+#endif
|
||||
|
||||
return err;
|
||||
}
|
||||
-#endif
|
||||
|
||||
#ifdef HAVE_ECC_ENCRYPT
|
||||
|
||||
--- a/wolfssl/wolfcrypt/ecc.h
|
||||
+++ b/wolfssl/wolfcrypt/ecc.h
|
||||
@@ -584,10 +584,8 @@ WOLFSSL_API
|
||||
void wc_ecc_fp_free(void);
|
||||
WOLFSSL_LOCAL
|
||||
void wc_ecc_fp_init(void);
|
||||
-#ifdef ECC_TIMING_RESISTANT
|
||||
WOLFSSL_API
|
||||
int wc_ecc_set_rng(ecc_key* key, WC_RNG* rng);
|
||||
-#endif
|
||||
|
||||
WOLFSSL_API
|
||||
int wc_ecc_set_curve(ecc_key* key, int keysize, int curve_id);
|
||||
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
|
||||
PKG_SOURCE_DATE:=2021-05-26
|
||||
PKG_SOURCE_VERSION:=899c2a4520526d43113f73cf673f20e2486a40fb
|
||||
PKG_MIRROR_HASH:=354905192b30af88ea953241ed332555e67cdb7e3b54dd139250bf1e6ad3a709
|
||||
PKG_SOURCE_DATE:=2021-07-26
|
||||
PKG_SOURCE_VERSION:=440eb0647708274cc8d7d9e7c2bb0cfdfba90023
|
||||
PKG_MIRROR_HASH:=eed957036ab608fdc49bdf801fc5b4405fcd2a3a5e5d3343ec39898e156c10e9
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=qos-scripts
|
||||
PKG_VERSION:=1.3.1
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
@@ -326,7 +326,8 @@ start_interface() {
|
||||
append cstr "$classnr:$prio:$avgrate:$pktsize:$pktdelay:$maxrate:$qdisc:$filter" "$N"
|
||||
done
|
||||
append ${prefix}q "$(tcrules)" "$N"
|
||||
export dev_${dir}="ip link set $dev up >&- 2>&-
|
||||
export dev_${dir}="ip link add ${dev} type ifb >&- 2>&-
|
||||
ip link set $dev up >&- 2>&-
|
||||
tc qdisc del dev $dev root >&- 2>&-
|
||||
tc qdisc add dev $dev root handle 1: hfsc default ${class_default}0
|
||||
tc class add dev $dev parent 1: classid 1:1 hfsc sc rate ${rate}kbit ul rate ${rate}kbit"
|
||||
|
||||
@@ -161,7 +161,7 @@ append_server() {
|
||||
}
|
||||
|
||||
append_rev_server() {
|
||||
xappend "--rev-server=$1"
|
||||
xappend "--rev-server=$1"
|
||||
}
|
||||
|
||||
append_address() {
|
||||
@@ -878,8 +878,16 @@ dnsmasq_start()
|
||||
append_bool "$cfg" noresolv "--no-resolv"
|
||||
append_bool "$cfg" localise_queries "--localise-queries"
|
||||
append_bool "$cfg" readethers "--read-ethers"
|
||||
append_bool "$cfg" dbus "--enable-dbus"
|
||||
append_bool "$cfg" ubus "--enable-ubus" 1
|
||||
|
||||
local instance_name="dnsmasq.$cfg"
|
||||
if [ "$cfg" = "$DEFAULT_INSTANCE" ]; then
|
||||
instance_name="dnsmasq"
|
||||
fi
|
||||
config_get_bool dbus "$cfg" "dbus" 0
|
||||
[ $dbus -gt 0 ] && xappend "--enable-dbus=uk.org.thekelleys.$instance_name"
|
||||
config_get_bool ubus "$cfg" "ubus" 1
|
||||
[ $ubus -gt 0 ] && xappend "--enable-ubus=$instance_name"
|
||||
|
||||
append_bool "$cfg" expandhosts "--expand-hosts"
|
||||
config_get tftp_root "$cfg" "tftp_root"
|
||||
[ -n "$tftp_root" ] && mkdir -p "$tftp_root" && append_bool "$cfg" enable_tftp "--enable-tftp"
|
||||
@@ -1106,7 +1114,7 @@ dnsmasq_start()
|
||||
procd_set_param respawn
|
||||
|
||||
procd_add_jail dnsmasq ubus log
|
||||
procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE $RFC6761FILE $DHCPBOGUSHOSTNAMEFILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom $dnsmasqconffile $dnsmasqconfdir $resolvdir $user_dhcpscript /etc/hosts /etc/ethers /sbin/hotplug-call $EXTRA_MOUNT $DHCPSCRIPT
|
||||
procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE $RFC6761FILE $DHCPBOGUSHOSTNAMEFILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom $dnsmasqconffile $dnsmasqconfdir $resolvdir $user_dhcpscript /etc/hosts /etc/ethers /sbin/hotplug-call $EXTRA_MOUNT $DHCPSCRIPT /tmp/hosts/
|
||||
procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile
|
||||
|
||||
procd_close_instance
|
||||
@@ -1155,6 +1163,7 @@ boot()
|
||||
start_service() {
|
||||
local instance="$1"
|
||||
local instance_found=0
|
||||
local first_instance=""
|
||||
|
||||
. /lib/functions/network.sh
|
||||
|
||||
@@ -1165,10 +1174,27 @@ start_service() {
|
||||
if [ -n "$instance" ] && [ "$instance" = "$name" ]; then
|
||||
instance_found=1
|
||||
fi
|
||||
if [ -z "$DEFAULT_INSTANCE" ]; then
|
||||
local disabled
|
||||
config_get_bool disabled "$name" disabled 0
|
||||
if [ "$disabled" -eq 0 ]; then
|
||||
# First enabled section will be assigned default instance name.
|
||||
# Unnamed sections get precedence over named sections.
|
||||
if expr "$cfg" : 'cfg[0-9a-f]*$' >/dev/null = "9"; then # See uci_fixup_section.
|
||||
DEFAULT_INSTANCE="$name" # Unnamed config section.
|
||||
elif [ -z "$first_instance" ]; then
|
||||
first_instance="$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
DEFAULT_INSTANCE=""
|
||||
config_load dhcp
|
||||
if [ -z "$DEFAULT_INSTANCE" ]; then
|
||||
DEFAULT_INSTANCE="$first_instance" # No unnamed config section was found.
|
||||
fi
|
||||
|
||||
if [ -n "$instance" ]; then
|
||||
[ "$instance_found" -gt 0 ] || return
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=hostapd
|
||||
PKG_RELEASE:=32
|
||||
PKG_RELEASE:=35
|
||||
|
||||
PKG_SOURCE_URL:=http://w1.fi/hostap.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
|
||||
@@ -92,7 +92,7 @@ hostapd_common_add_device_config() {
|
||||
config_add_array basic_rate
|
||||
config_add_array supported_rates
|
||||
|
||||
config_add_string country
|
||||
config_add_string country country3
|
||||
config_add_boolean country_ie doth
|
||||
config_add_boolean spectrum_mgmt_required
|
||||
config_add_int local_pwr_constraint
|
||||
@@ -114,7 +114,7 @@ hostapd_prepare_device_config() {
|
||||
|
||||
local base_cfg=
|
||||
|
||||
json_get_vars country country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \
|
||||
json_get_vars country country3 country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \
|
||||
acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density
|
||||
|
||||
hostapd_set_log_options base_cfg
|
||||
@@ -128,6 +128,7 @@ hostapd_prepare_device_config() {
|
||||
|
||||
[ -n "$country" ] && {
|
||||
append base_cfg "country_code=$country" "$N"
|
||||
[ -n "$country3" ] && append base_cfg "country3=$country3" "$N"
|
||||
|
||||
[ "$country_ie" -gt 0 ] && {
|
||||
append base_cfg "ieee80211d=1" "$N"
|
||||
@@ -251,6 +252,8 @@ hostapd_common_add_bss_config() {
|
||||
config_add_int acct_port
|
||||
config_add_int acct_interval
|
||||
|
||||
config_add_int bss_load_update_period chan_util_avg_period
|
||||
|
||||
config_add_string dae_client
|
||||
config_add_string dae_secret
|
||||
config_add_int dae_port
|
||||
@@ -281,7 +284,7 @@ hostapd_common_add_bss_config() {
|
||||
config_add_string wps_device_type wps_device_name wps_manufacturer wps_pin
|
||||
config_add_string multi_ap_backhaul_ssid multi_ap_backhaul_key
|
||||
|
||||
config_add_boolean wnm_sleep_mode bss_transition
|
||||
config_add_boolean wnm_sleep_mode wnm_sleep_mode_no_keys bss_transition
|
||||
config_add_int time_advertisement
|
||||
config_add_string time_zone
|
||||
|
||||
@@ -703,13 +706,17 @@ hostapd_set_bss_options() {
|
||||
append bss_conf "iapp_interface=$ifname" "$N"
|
||||
}
|
||||
|
||||
json_get_vars time_advertisement time_zone wnm_sleep_mode bss_transition
|
||||
json_get_vars time_advertisement time_zone wnm_sleep_mode wnm_sleep_mode_no_keys bss_transition
|
||||
set_default bss_transition 0
|
||||
set_default wnm_sleep_mode 0
|
||||
set_default wnm_sleep_mode_no_keys 0
|
||||
|
||||
[ -n "$time_advertisement" ] && append bss_conf "time_advertisement=$time_advertisement" "$N"
|
||||
[ -n "$time_zone" ] && append bss_conf "time_zone=$time_zone" "$N"
|
||||
[ "$wnm_sleep_mode" -eq "1" ] && append bss_conf "wnm_sleep_mode=1" "$N"
|
||||
if [ "$wnm_sleep_mode" -eq "1" ]; then
|
||||
append bss_conf "wnm_sleep_mode=1" "$N"
|
||||
[ "$wnm_sleep_mode_no_keys" -eq "1" ] && append bss_conf "wnm_sleep_mode_no_keys=1" "$N"
|
||||
fi
|
||||
[ "$bss_transition" -eq "1" ] && append bss_conf "bss_transition=1" "$N"
|
||||
|
||||
json_get_vars ieee80211k rrm_neighbor_report rrm_beacon_report
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
From 21ce83b4ae2b9563175fdb4fc4312096cc399cf8 Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Wed, 5 May 2021 00:44:34 +0200
|
||||
Subject: [PATCH] wolfssl: add RNG to EC key
|
||||
|
||||
Since upstream commit 6467de5a8840 ("Randomize z ordinates in
|
||||
scalar mult when timing resistant") WolfSSL requires a RNG for
|
||||
the EC key when built hardened which is the default.
|
||||
|
||||
Set the RNG for the EC key to fix connections for OWE clients.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
src/crypto/crypto_wolfssl.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/crypto/crypto_wolfssl.c b/src/crypto/crypto_wolfssl.c
|
||||
index 2e4bf8962..ed2528159 100644
|
||||
--- a/src/crypto/crypto_wolfssl.c
|
||||
+++ b/src/crypto/crypto_wolfssl.c
|
||||
@@ -1303,6 +1303,7 @@ int ecc_projective_add_point(ecc_point *P, ecc_point *Q, ecc_point *R,
|
||||
|
||||
struct crypto_ec {
|
||||
ecc_key key;
|
||||
+ WC_RNG rng;
|
||||
mp_int a;
|
||||
mp_int prime;
|
||||
mp_int order;
|
||||
@@ -1357,6 +1358,8 @@ struct crypto_ec * crypto_ec_init(int group)
|
||||
return NULL;
|
||||
|
||||
if (wc_ecc_init(&e->key) != 0 ||
|
||||
+ wc_InitRng(&e->rng) != 0 ||
|
||||
+ wc_ecc_set_rng(&e->key, &e->rng) != 0 ||
|
||||
wc_ecc_set_curve(&e->key, 0, curve_id) != 0 ||
|
||||
mp_init(&e->a) != MP_OKAY ||
|
||||
mp_init(&e->prime) != MP_OKAY ||
|
||||
@@ -1388,6 +1391,7 @@ void crypto_ec_deinit(struct crypto_ec* e)
|
||||
mp_clear(&e->order);
|
||||
mp_clear(&e->prime);
|
||||
mp_clear(&e->a);
|
||||
+ wc_FreeRng(&e->rng);
|
||||
wc_ecc_free(&e->key);
|
||||
os_free(e);
|
||||
}
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git
|
||||
PKG_SOURCE_DATE:=2021-01-06
|
||||
PKG_SOURCE_VERSION:=8d8a8cd35137ff0fa11b6be455fdd596a8d7d2e9
|
||||
PKG_MIRROR_HASH:=7149b4a434a35c1e64b20c708c0abbd381e034a2a1b4fbc1b7da0b039568b5b5
|
||||
PKG_SOURCE_DATE:=2021-07-18
|
||||
PKG_SOURCE_VERSION:=bc9d317f2921ae6b529f2c9f8de79b75992e206f
|
||||
PKG_MIRROR_HASH:=be96c4984821b8af95bfee1a29c082bb9eaa052cd3e03d8632ff02afd2debc81
|
||||
|
||||
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@@ -23,6 +23,8 @@ find_3g_iface() {
|
||||
fi
|
||||
}
|
||||
|
||||
[ "$ACTION" = add ] || [ "$ACTION" = remove ] || exit 0
|
||||
|
||||
case "$DEVICENAME" in
|
||||
tty*)
|
||||
[ -e "/dev/$DEVICENAME" ] || [ "$ACTION" = remove ] || exit 0
|
||||
|
||||
@@ -8,12 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=iw
|
||||
PKG_VERSION:=5.9
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=5.9-8fab0c9e
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@KERNEL/software/network/iw
|
||||
PKG_HASH:=293a07109aeb7e36267cf59e3ce52857e9ffae3a6666eb8ac77894b1839fe1f2
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/jberg/iw.git
|
||||
PKG_SOURCE_VERSION:=8fab0c9ee9db217587a58efcc37421c86edcb638
|
||||
PKG_MIRROR_HASH:=797b322bc03952f3127ae0a7da476c14ada1bbe9a9ae234a56dd6f864c568e16
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@@ -1,9 +1,99 @@
|
||||
--- a/nl80211.h
|
||||
+++ b/nl80211.h
|
||||
@@ -2527,6 +2527,13 @@ enum nl80211_commands {
|
||||
@@ -655,6 +655,9 @@
|
||||
* When a security association was established on an 802.1X network using
|
||||
* fast transition, this event should be followed by an
|
||||
* %NL80211_CMD_PORT_AUTHORIZED event.
|
||||
+ * Following a %NL80211_CMD_ROAM event userspace can issue
|
||||
+ * %NL80211_CMD_GET_SCAN in order to obtain the scan information for the
|
||||
+ * new BSS the card/driver roamed to.
|
||||
* @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify
|
||||
* userspace that a connection was dropped by the AP or due to other
|
||||
* reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and
|
||||
@@ -757,7 +760,8 @@
|
||||
* of any other interfaces, and other interfaces will again take
|
||||
* precedence when they are used.
|
||||
*
|
||||
- * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface.
|
||||
+ * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface
|
||||
+ * (no longer supported).
|
||||
*
|
||||
* @NL80211_CMD_SET_MULTICAST_TO_UNICAST: Configure if this AP should perform
|
||||
* multicast to unicast conversion. When enabled, all multicast packets
|
||||
@@ -1177,6 +1181,10 @@
|
||||
* includes the contents of the frame. %NL80211_ATTR_ACK flag is included
|
||||
* if the recipient acknowledged the frame.
|
||||
*
|
||||
+ * @NL80211_CMD_SET_SAR_SPECS: SAR power limitation configuration is
|
||||
+ * passed using %NL80211_ATTR_SAR_SPEC. %NL80211_ATTR_WIPHY is used to
|
||||
+ * specify the wiphy index to be applied to.
|
||||
+ *
|
||||
* @NL80211_CMD_MAX: highest used command number
|
||||
* @__NL80211_CMD_AFTER_LAST: internal use
|
||||
*/
|
||||
@@ -1407,6 +1415,8 @@ enum nl80211_commands {
|
||||
|
||||
NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS,
|
||||
|
||||
+ NL80211_CMD_SET_SAR_SPECS,
|
||||
+
|
||||
/* add new commands above here */
|
||||
|
||||
/* used to define NL80211_CMD_MAX below */
|
||||
@@ -1750,8 +1760,9 @@ enum nl80211_commands {
|
||||
* specify just a single bitrate, which is to be used for the beacon.
|
||||
* The driver must also specify support for this with the extended
|
||||
* features NL80211_EXT_FEATURE_BEACON_RATE_LEGACY,
|
||||
- * NL80211_EXT_FEATURE_BEACON_RATE_HT and
|
||||
- * NL80211_EXT_FEATURE_BEACON_RATE_VHT.
|
||||
+ * NL80211_EXT_FEATURE_BEACON_RATE_HT,
|
||||
+ * NL80211_EXT_FEATURE_BEACON_RATE_VHT and
|
||||
+ * NL80211_EXT_FEATURE_BEACON_RATE_HE.
|
||||
*
|
||||
* @NL80211_ATTR_FRAME_MATCH: A binary attribute which typically must contain
|
||||
* at least one byte, currently used with @NL80211_CMD_REGISTER_FRAME.
|
||||
@@ -1955,8 +1966,15 @@ enum nl80211_commands {
|
||||
* @NL80211_ATTR_PROBE_RESP: Probe Response template data. Contains the entire
|
||||
* probe-response frame. The DA field in the 802.11 header is zero-ed out,
|
||||
* to be filled by the FW.
|
||||
- * @NL80211_ATTR_DISABLE_HT: Force HT capable interfaces to disable
|
||||
- * this feature. Currently, only supported in mac80211 drivers.
|
||||
+ * @NL80211_ATTR_DISABLE_HT: Force HT capable interfaces to disable
|
||||
+ * this feature during association. This is a flag attribute.
|
||||
+ * Currently only supported in mac80211 drivers.
|
||||
+ * @NL80211_ATTR_DISABLE_VHT: Force VHT capable interfaces to disable
|
||||
+ * this feature during association. This is a flag attribute.
|
||||
+ * Currently only supported in mac80211 drivers.
|
||||
+ * @NL80211_ATTR_DISABLE_HE: Force HE capable interfaces to disable
|
||||
+ * this feature during association. This is a flag attribute.
|
||||
+ * Currently only supported in mac80211 drivers.
|
||||
* @NL80211_ATTR_HT_CAPABILITY_MASK: Specify which bits of the
|
||||
* ATTR_HT_CAPABILITY to which attention should be paid.
|
||||
* Currently, only mac80211 NICs support this feature.
|
||||
@@ -2077,7 +2095,8 @@ enum nl80211_commands {
|
||||
* until the channel switch event.
|
||||
* @NL80211_ATTR_CH_SWITCH_BLOCK_TX: flag attribute specifying that transmission
|
||||
* must be blocked on the current channel (before the channel switch
|
||||
- * operation).
|
||||
+ * operation). Also included in the channel switch started event if quiet
|
||||
+ * was requested by the AP.
|
||||
* @NL80211_ATTR_CSA_IES: Nested set of attributes containing the IE information
|
||||
* for the time while performing a channel switch.
|
||||
* @NL80211_ATTR_CNTDWN_OFFS_BEACON: An array of offsets (u16) to the channel
|
||||
@@ -2527,6 +2546,23 @@ enum nl80211_commands {
|
||||
* override mask. Used with NL80211_ATTR_S1G_CAPABILITY in
|
||||
* NL80211_CMD_ASSOCIATE or NL80211_CMD_CONNECT.
|
||||
*
|
||||
+ * @NL80211_ATTR_SAE_PWE: Indicates the mechanism(s) allowed for SAE PWE
|
||||
+ * derivation in WPA3-Personal networks which are using SAE authentication.
|
||||
+ * This is a u8 attribute that encapsulates one of the values from
|
||||
+ * &enum nl80211_sae_pwe_mechanism.
|
||||
+ *
|
||||
+ * @NL80211_ATTR_SAR_SPEC: SAR power limitation specification when
|
||||
+ * used with %NL80211_CMD_SET_SAR_SPECS. The message contains fields
|
||||
+ * of %nl80211_sar_attrs which specifies the sar type and related
|
||||
+ * sar specs. Sar specs contains array of %nl80211_sar_specs_attrs.
|
||||
+ *
|
||||
+ * @NL80211_ATTR_RECONNECT_REQUESTED: flag attribute, used with deauth and
|
||||
+ * disassoc events to indicate that an immediate reconnect to the AP
|
||||
+ * is desired.
|
||||
@@ -14,14 +104,199 @@
|
||||
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
|
||||
* @NL80211_ATTR_MAX: highest attribute number currently defined
|
||||
* @__NL80211_ATTR_AFTER_LAST: internal use
|
||||
@@ -3016,6 +3023,10 @@ enum nl80211_attrs {
|
||||
@@ -3016,6 +3052,16 @@ enum nl80211_attrs {
|
||||
NL80211_ATTR_S1G_CAPABILITY,
|
||||
NL80211_ATTR_S1G_CAPABILITY_MASK,
|
||||
|
||||
+ NL80211_ATTR_SAE_PWE,
|
||||
+
|
||||
+ NL80211_ATTR_RECONNECT_REQUESTED,
|
||||
+
|
||||
+ NL80211_ATTR_SAR_SPEC,
|
||||
+
|
||||
+ NL80211_ATTR_DISABLE_HE,
|
||||
+
|
||||
+ NL80211_ATTR_WIPHY_ANTENNA_GAIN,
|
||||
+
|
||||
/* add attributes here, update the policy in nl80211.c */
|
||||
|
||||
__NL80211_ATTR_AFTER_LAST,
|
||||
@@ -5896,6 +5942,19 @@ enum nl80211_feature_flags {
|
||||
* @NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP: Driver/device supports
|
||||
* unsolicited broadcast probe response transmission
|
||||
*
|
||||
+ * @NL80211_EXT_FEATURE_BEACON_RATE_HE: Driver supports beacon rate
|
||||
+ * configuration (AP/mesh) with HE rates.
|
||||
+ *
|
||||
+ * @NL80211_EXT_FEATURE_SECURE_LTF: Device supports secure LTF measurement
|
||||
+ * exchange protocol.
|
||||
+ *
|
||||
+ * @NL80211_EXT_FEATURE_SECURE_RTT: Device supports secure RTT measurement
|
||||
+ * exchange protocol.
|
||||
+ *
|
||||
+ * @NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE: Device supports management
|
||||
+ * frame protection for all management frames exchanged during the
|
||||
+ * negotiation and range measurement procedure.
|
||||
+ *
|
||||
* @NUM_NL80211_EXT_FEATURES: number of extended features.
|
||||
* @MAX_NL80211_EXT_FEATURES: highest extended feature index.
|
||||
*/
|
||||
@@ -5956,6 +6015,10 @@ enum nl80211_ext_feature_index {
|
||||
NL80211_EXT_FEATURE_SAE_OFFLOAD_AP,
|
||||
NL80211_EXT_FEATURE_FILS_DISCOVERY,
|
||||
NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP,
|
||||
+ NL80211_EXT_FEATURE_BEACON_RATE_HE,
|
||||
+ NL80211_EXT_FEATURE_SECURE_LTF,
|
||||
+ NL80211_EXT_FEATURE_SECURE_RTT,
|
||||
+ NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE,
|
||||
|
||||
/* add new features before the definition below */
|
||||
NUM_NL80211_EXT_FEATURES,
|
||||
@@ -6253,11 +6316,13 @@ struct nl80211_vendor_cmd_info {
|
||||
* @NL80211_TDLS_PEER_HT: TDLS peer is HT capable.
|
||||
* @NL80211_TDLS_PEER_VHT: TDLS peer is VHT capable.
|
||||
* @NL80211_TDLS_PEER_WMM: TDLS peer is WMM capable.
|
||||
+ * @NL80211_TDLS_PEER_HE: TDLS peer is HE capable.
|
||||
*/
|
||||
enum nl80211_tdls_peer_capability {
|
||||
NL80211_TDLS_PEER_HT = 1<<0,
|
||||
NL80211_TDLS_PEER_VHT = 1<<1,
|
||||
NL80211_TDLS_PEER_WMM = 1<<2,
|
||||
+ NL80211_TDLS_PEER_HE = 1<<3,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -6849,6 +6914,9 @@ enum nl80211_peer_measurement_ftm_capa {
|
||||
* if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor
|
||||
* %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based
|
||||
* ranging will be used.
|
||||
+ * @NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK: negotiate for LMR feedback. Only
|
||||
+ * valid if either %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED or
|
||||
+ * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
|
||||
*
|
||||
* @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal
|
||||
* @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number
|
||||
@@ -6867,6 +6935,7 @@ enum nl80211_peer_measurement_ftm_req {
|
||||
NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC,
|
||||
NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED,
|
||||
NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED,
|
||||
+ NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK,
|
||||
|
||||
/* keep last */
|
||||
NUM_NL80211_PMSR_FTM_REQ_ATTR,
|
||||
@@ -7124,4 +7193,115 @@ enum nl80211_unsol_bcast_probe_resp_attr
|
||||
NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX =
|
||||
__NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_LAST - 1
|
||||
};
|
||||
+
|
||||
+/**
|
||||
+ * enum nl80211_sae_pwe_mechanism - The mechanism(s) allowed for SAE PWE
|
||||
+ * derivation. Applicable only when WPA3-Personal SAE authentication is
|
||||
+ * used.
|
||||
+ *
|
||||
+ * @NL80211_SAE_PWE_UNSPECIFIED: not specified, used internally to indicate that
|
||||
+ * attribute is not present from userspace.
|
||||
+ * @NL80211_SAE_PWE_HUNT_AND_PECK: hunting-and-pecking loop only
|
||||
+ * @NL80211_SAE_PWE_HASH_TO_ELEMENT: hash-to-element only
|
||||
+ * @NL80211_SAE_PWE_BOTH: both hunting-and-pecking loop and hash-to-element
|
||||
+ * can be used.
|
||||
+ */
|
||||
+enum nl80211_sae_pwe_mechanism {
|
||||
+ NL80211_SAE_PWE_UNSPECIFIED,
|
||||
+ NL80211_SAE_PWE_HUNT_AND_PECK,
|
||||
+ NL80211_SAE_PWE_HASH_TO_ELEMENT,
|
||||
+ NL80211_SAE_PWE_BOTH,
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
+ * enum nl80211_sar_type - type of SAR specs
|
||||
+ *
|
||||
+ * @NL80211_SAR_TYPE_POWER: power limitation specified in 0.25dBm unit
|
||||
+ *
|
||||
+ */
|
||||
+enum nl80211_sar_type {
|
||||
+ NL80211_SAR_TYPE_POWER,
|
||||
+
|
||||
+ /* add new type here */
|
||||
+
|
||||
+ /* Keep last */
|
||||
+ NUM_NL80211_SAR_TYPE,
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
+ * enum nl80211_sar_attrs - Attributes for SAR spec
|
||||
+ *
|
||||
+ * @NL80211_SAR_ATTR_TYPE: the SAR type as defined in &enum nl80211_sar_type.
|
||||
+ *
|
||||
+ * @NL80211_SAR_ATTR_SPECS: Nested array of SAR power
|
||||
+ * limit specifications. Each specification contains a set
|
||||
+ * of %nl80211_sar_specs_attrs.
|
||||
+ *
|
||||
+ * For SET operation, it contains array of %NL80211_SAR_ATTR_SPECS_POWER
|
||||
+ * and %NL80211_SAR_ATTR_SPECS_RANGE_INDEX.
|
||||
+ *
|
||||
+ * For sar_capa dump, it contains array of
|
||||
+ * %NL80211_SAR_ATTR_SPECS_START_FREQ
|
||||
+ * and %NL80211_SAR_ATTR_SPECS_END_FREQ.
|
||||
+ *
|
||||
+ * @__NL80211_SAR_ATTR_LAST: Internal
|
||||
+ * @NL80211_SAR_ATTR_MAX: highest sar attribute
|
||||
+ *
|
||||
+ * These attributes are used with %NL80211_CMD_SET_SAR_SPEC
|
||||
+ */
|
||||
+enum nl80211_sar_attrs {
|
||||
+ __NL80211_SAR_ATTR_INVALID,
|
||||
+
|
||||
+ NL80211_SAR_ATTR_TYPE,
|
||||
+ NL80211_SAR_ATTR_SPECS,
|
||||
+
|
||||
+ __NL80211_SAR_ATTR_LAST,
|
||||
+ NL80211_SAR_ATTR_MAX = __NL80211_SAR_ATTR_LAST - 1,
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
+ * enum nl80211_sar_specs_attrs - Attributes for SAR power limit specs
|
||||
+ *
|
||||
+ * @NL80211_SAR_ATTR_SPECS_POWER: Required (s32)value to specify the actual
|
||||
+ * power limit value in units of 0.25 dBm if type is
|
||||
+ * NL80211_SAR_TYPE_POWER. (i.e., a value of 44 represents 11 dBm).
|
||||
+ * 0 means userspace doesn't have SAR limitation on this associated range.
|
||||
+ *
|
||||
+ * @NL80211_SAR_ATTR_SPECS_RANGE_INDEX: Required (u32) value to specify the
|
||||
+ * index of exported freq range table and the associated power limitation
|
||||
+ * is applied to this range.
|
||||
+ *
|
||||
+ * Userspace isn't required to set all the ranges advertised by WLAN driver,
|
||||
+ * and userspace can skip some certain ranges. These skipped ranges don't
|
||||
+ * have SAR limitations, and they are same as setting the
|
||||
+ * %NL80211_SAR_ATTR_SPECS_POWER to any unreasonable high value because any
|
||||
+ * value higher than regulatory allowed value just means SAR power
|
||||
+ * limitation is removed, but it's required to set at least one range.
|
||||
+ * It's not allowed to set duplicated range in one SET operation.
|
||||
+ *
|
||||
+ * Every SET operation overwrites previous SET operation.
|
||||
+ *
|
||||
+ * @NL80211_SAR_ATTR_SPECS_START_FREQ: Required (u32) value to specify the start
|
||||
+ * frequency of this range edge when registering SAR capability to wiphy.
|
||||
+ * It's not a channel center frequency. The unit is kHz.
|
||||
+ *
|
||||
+ * @NL80211_SAR_ATTR_SPECS_END_FREQ: Required (u32) value to specify the end
|
||||
+ * frequency of this range edge when registering SAR capability to wiphy.
|
||||
+ * It's not a channel center frequency. The unit is kHz.
|
||||
+ *
|
||||
+ * @__NL80211_SAR_ATTR_SPECS_LAST: Internal
|
||||
+ * @NL80211_SAR_ATTR_SPECS_MAX: highest sar specs attribute
|
||||
+ */
|
||||
+enum nl80211_sar_specs_attrs {
|
||||
+ __NL80211_SAR_ATTR_SPECS_INVALID,
|
||||
+
|
||||
+ NL80211_SAR_ATTR_SPECS_POWER,
|
||||
+ NL80211_SAR_ATTR_SPECS_RANGE_INDEX,
|
||||
+ NL80211_SAR_ATTR_SPECS_START_FREQ,
|
||||
+ NL80211_SAR_ATTR_SPECS_END_FREQ,
|
||||
+
|
||||
+ __NL80211_SAR_ATTR_SPECS_LAST,
|
||||
+ NL80211_SAR_ATTR_SPECS_MAX = __NL80211_SAR_ATTR_SPECS_LAST - 1,
|
||||
+};
|
||||
+
|
||||
#endif /* __LINUX_NL80211_H */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/event.c
|
||||
+++ b/event.c
|
||||
@@ -944,6 +944,7 @@ static int print_event(struct nl_msg *ms
|
||||
@@ -956,6 +956,7 @@ static int print_event(struct nl_msg *ms
|
||||
}
|
||||
|
||||
switch (gnlh->cmd) {
|
||||
@@ -8,7 +8,7 @@
|
||||
case NL80211_CMD_NEW_WIPHY:
|
||||
printf("renamed to %s\n", nla_get_string(tb[NL80211_ATTR_WIPHY_NAME]));
|
||||
break;
|
||||
@@ -979,6 +980,7 @@ static int print_event(struct nl_msg *ms
|
||||
@@ -991,6 +992,7 @@ static int print_event(struct nl_msg *ms
|
||||
case NL80211_CMD_SCHED_SCAN_RESULTS:
|
||||
printf("got scheduled scan results\n");
|
||||
break;
|
||||
@@ -16,7 +16,7 @@
|
||||
case NL80211_CMD_WIPHY_REG_CHANGE:
|
||||
case NL80211_CMD_REG_CHANGE:
|
||||
if (gnlh->cmd == NL80211_CMD_WIPHY_REG_CHANGE)
|
||||
@@ -1061,6 +1063,7 @@ static int print_event(struct nl_msg *ms
|
||||
@@ -1073,6 +1075,7 @@ static int print_event(struct nl_msg *ms
|
||||
mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
|
||||
printf("del station %s\n", macbuf);
|
||||
break;
|
||||
@@ -24,7 +24,7 @@
|
||||
case NL80211_CMD_JOIN_IBSS:
|
||||
mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
|
||||
printf("IBSS %s joined\n", macbuf);
|
||||
@@ -1254,9 +1257,9 @@ static int print_event(struct nl_msg *ms
|
||||
@@ -1271,9 +1274,9 @@ static int print_event(struct nl_msg *ms
|
||||
case NL80211_CMD_CH_SWITCH_NOTIFY:
|
||||
parse_ch_switch_notify(tb, gnlh->cmd);
|
||||
break;
|
||||
@@ -134,7 +134,7 @@
|
||||
{
|
||||
--- a/scan.c
|
||||
+++ b/scan.c
|
||||
@@ -1297,6 +1297,9 @@ static void print_ht_op(const uint8_t ty
|
||||
@@ -1306,6 +1306,9 @@ static void print_ht_op(const uint8_t ty
|
||||
printf("\t\t * secondary channel offset: %s\n",
|
||||
ht_secondary_offset[data[1] & 0x3]);
|
||||
printf("\t\t * STA channel width: %s\n", sta_chan_width[(data[1] & 0x4)>>2]);
|
||||
@@ -144,7 +144,7 @@
|
||||
printf("\t\t * RIFS: %d\n", (data[1] & 0x8)>>3);
|
||||
printf("\t\t * HT protection: %s\n", protection[data[2] & 0x3]);
|
||||
printf("\t\t * non-GF present: %d\n", (data[2] & 0x4) >> 2);
|
||||
@@ -1707,6 +1710,14 @@ static void print_ie(const struct ie_pri
|
||||
@@ -1716,6 +1719,14 @@ static void print_ie(const struct ie_pri
|
||||
|
||||
static const struct ie_print ieprinters[] = {
|
||||
[0] = { "SSID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), },
|
||||
@@ -159,7 +159,7 @@
|
||||
[1] = { "Supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), },
|
||||
[3] = { "DS Parameter set", print_ds, 1, 1, BIT(PRINT_SCAN), },
|
||||
[5] = { "TIM", print_tim, 4, 255, BIT(PRINT_SCAN), },
|
||||
@@ -1716,26 +1727,20 @@ static const struct ie_print ieprinters[
|
||||
@@ -1725,26 +1736,20 @@ static const struct ie_print ieprinters[
|
||||
[32] = { "Power constraint", print_powerconstraint, 1, 1, BIT(PRINT_SCAN), },
|
||||
[35] = { "TPC report", print_tpcreport, 2, 2, BIT(PRINT_SCAN), },
|
||||
[42] = { "ERP", print_erp, 1, 255, BIT(PRINT_SCAN), },
|
||||
@@ -187,15 +187,15 @@
|
||||
};
|
||||
|
||||
static void print_wifi_wpa(const uint8_t type, uint8_t len, const uint8_t *data,
|
||||
@@ -2279,6 +2284,7 @@ void print_ies(unsigned char *ie, int ie
|
||||
@@ -2326,6 +2331,7 @@ void print_ies(unsigned char *ie, int ie
|
||||
ieprinters[ie[0]].flags & BIT(ptype)) {
|
||||
print_ie(&ieprinters[ie[0]],
|
||||
ie[0], ie[1], ie + 2, &ie_buffer);
|
||||
+#ifdef IW_FULL
|
||||
} else if (ie[0] == 221 /* vendor */) {
|
||||
print_vendor(ie[1], ie + 2, unknown, ptype);
|
||||
} else if (unknown) {
|
||||
@@ -2288,6 +2294,7 @@ void print_ies(unsigned char *ie, int ie
|
||||
} else if (ie[0] == 255 /* extension */) {
|
||||
@@ -2337,6 +2343,7 @@ void print_ies(unsigned char *ie, int ie
|
||||
for (i=0; i<ie[1]; i++)
|
||||
printf(" %.2x", ie[2+i]);
|
||||
printf("\n");
|
||||
@@ -203,7 +203,7 @@
|
||||
}
|
||||
ielen -= ie[1] + 2;
|
||||
ie += ie[1] + 2;
|
||||
@@ -2328,6 +2335,7 @@ static void print_capa_non_dmg(__u16 cap
|
||||
@@ -2377,6 +2384,7 @@ static void print_capa_non_dmg(__u16 cap
|
||||
printf(" ESS");
|
||||
if (capa & WLAN_CAPABILITY_IBSS)
|
||||
printf(" IBSS");
|
||||
@@ -211,7 +211,7 @@
|
||||
if (capa & WLAN_CAPABILITY_CF_POLLABLE)
|
||||
printf(" CfPollable");
|
||||
if (capa & WLAN_CAPABILITY_CF_POLL_REQUEST)
|
||||
@@ -2356,6 +2364,7 @@ static void print_capa_non_dmg(__u16 cap
|
||||
@@ -2405,6 +2413,7 @@ static void print_capa_non_dmg(__u16 cap
|
||||
printf(" DelayedBACK");
|
||||
if (capa & WLAN_CAPABILITY_IMM_BACK)
|
||||
printf(" ImmediateBACK");
|
||||
@@ -219,7 +219,7 @@
|
||||
}
|
||||
|
||||
static int print_bss_handler(struct nl_msg *msg, void *arg)
|
||||
@@ -2440,8 +2449,10 @@ static int print_bss_handler(struct nl_m
|
||||
@@ -2489,8 +2498,10 @@ static int print_bss_handler(struct nl_m
|
||||
if (bss[NL80211_BSS_FREQUENCY]) {
|
||||
int freq = nla_get_u32(bss[NL80211_BSS_FREQUENCY]);
|
||||
printf("\tfreq: %d\n", freq);
|
||||
@@ -230,7 +230,7 @@
|
||||
}
|
||||
if (bss[NL80211_BSS_BEACON_INTERVAL])
|
||||
printf("\tbeacon interval: %d TUs\n",
|
||||
@@ -2635,6 +2646,7 @@ static int handle_stop_sched_scan(struct
|
||||
@@ -2684,6 +2695,7 @@ static int handle_stop_sched_scan(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
COMMAND(scan, sched_start,
|
||||
SCHED_SCAN_OPTIONS,
|
||||
NL80211_CMD_START_SCHED_SCAN, 0, CIB_NETDEV, handle_start_sched_scan,
|
||||
@@ -2645,3 +2657,4 @@ COMMAND(scan, sched_start,
|
||||
@@ -2694,3 +2706,4 @@ COMMAND(scan, sched_start,
|
||||
COMMAND(scan, sched_stop, "",
|
||||
NL80211_CMD_STOP_SCHED_SCAN, 0, CIB_NETDEV, handle_stop_sched_scan,
|
||||
"Stop an ongoing scheduled scan.");
|
||||
|
||||
@@ -7,25 +7,17 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libiwinfo
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2.1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git
|
||||
PKG_SOURCE_DATE:=2021-01-31
|
||||
PKG_SOURCE_VERSION:=4a32b33e9606f1bc1125f4bc24b0581349e55f2e
|
||||
PKG_MIRROR_HASH:=414e5d150efaadba21103e66f862be66a94dcf83c16a2850f7c05051a9b0739d
|
||||
PKG_SOURCE_DATE:=2021-04-30
|
||||
PKG_SOURCE_VERSION:=c45f0b584b4b86f8250f90ea19afca271c114fa2
|
||||
PKG_MIRROR_HASH:=24ad04791254a0523cd15a4fec6116d9ff121e006c93e5e41459f91347b33ec2
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
PKG_FLAGS := nonshared
|
||||
|
||||
PKG_CONFIG_DEPENDS := \
|
||||
CONFIG_PACKAGE_kmod-brcm-wl \
|
||||
CONFIG_PACKAGE_kmod-brcm-wl-mini \
|
||||
CONFIG_PACKAGE_kmod-brcm-wl-mimo \
|
||||
CONFIG_PACKAGE_kmod-cfg80211
|
||||
|
||||
IWINFO_ABI_VERSION:=20210106
|
||||
IWINFO_ABI_VERSION:=20210430
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -34,13 +26,13 @@ define Package/libiwinfo
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Generalized Wireless Information Library (iwinfo)
|
||||
DEPENDS:=+PACKAGE_kmod-cfg80211:libnl-tiny +libuci +libubus
|
||||
DEPENDS:=+libnl-tiny +libuci +libubus +libiwinfo-data
|
||||
ABI_VERSION:=$(IWINFO_ABI_VERSION)
|
||||
endef
|
||||
|
||||
define Package/libiwinfo/description
|
||||
Wireless information library with consistent interface for proprietary Broadcom,
|
||||
nl80211 and wext driver interfaces.
|
||||
Wireless information library with simplified API for nl80211
|
||||
and wext driver interfaces.
|
||||
endef
|
||||
|
||||
|
||||
@@ -58,6 +50,12 @@ define Package/libiwinfo-lua/description
|
||||
endef
|
||||
|
||||
|
||||
define Package/libiwinfo-data
|
||||
TITLE:=libiwinfo Lua binding
|
||||
HIDDEN:=1
|
||||
endef
|
||||
|
||||
|
||||
define Package/iwinfo
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
@@ -73,12 +71,6 @@ endef
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
IWINFO_BACKENDS := \
|
||||
$(if $(CONFIG_PACKAGE_kmod-brcm-wl),wl) \
|
||||
$(if $(CONFIG_PACKAGE_kmod-brcm-wl-mini),wl) \
|
||||
$(if $(CONFIG_PACKAGE_kmod-brcm-wl-mimo),wl) \
|
||||
$(if $(CONFIG_PACKAGE_kmod-cfg80211),nl80211)
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include/libnl-tiny \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
@@ -88,7 +80,7 @@ MAKE_FLAGS += \
|
||||
FPIC="$(FPIC)" \
|
||||
CFLAGS="$(TARGET_CFLAGS)" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
BACKENDS="$(IWINFO_BACKENDS)" \
|
||||
BACKENDS="nl80211" \
|
||||
SOVERSION="$(IWINFO_ABI_VERSION)"
|
||||
|
||||
define Build/InstallDev
|
||||
@@ -104,8 +96,6 @@ endef
|
||||
define Package/libiwinfo/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libiwinfo.so.$(IWINFO_ABI_VERSION) $(1)/usr/lib/libiwinfo.so.$(IWINFO_ABI_VERSION)
|
||||
$(INSTALL_DIR) $(1)/usr/share/libiwinfo
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/hardware.txt $(1)/usr/share/libiwinfo/hardware.txt
|
||||
endef
|
||||
|
||||
define Package/libiwinfo-lua/install
|
||||
@@ -113,6 +103,11 @@ define Package/libiwinfo-lua/install
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo.so $(1)/usr/lib/lua/iwinfo.so
|
||||
endef
|
||||
|
||||
define Package/libiwinfo-data/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/libiwinfo
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/hardware.txt $(1)/usr/share/libiwinfo/devices.txt
|
||||
endef
|
||||
|
||||
define Package/iwinfo/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo $(1)/usr/bin/iwinfo
|
||||
@@ -120,4 +115,5 @@ endef
|
||||
|
||||
$(eval $(call BuildPackage,libiwinfo))
|
||||
$(eval $(call BuildPackage,libiwinfo-lua))
|
||||
$(eval $(call BuildPackage,libiwinfo-data))
|
||||
$(eval $(call BuildPackage,iwinfo))
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From a0a0e02dd91d14a50155390d5fd3b95d6ec87bf4 Mon Sep 17 00:00:00 2001
|
||||
From: Jo-Philipp Wich <jo@mein.io>
|
||||
Date: Sun, 11 Jul 2021 15:56:35 +0200
|
||||
Subject: [PATCH] iwinfo: rename hardware.txt to devices.txt
|
||||
|
||||
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
||||
---
|
||||
include/iwinfo.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/iwinfo.h b/include/iwinfo.h
|
||||
index f7097cc..8469ee7 100644
|
||||
--- a/include/iwinfo.h
|
||||
+++ b/include/iwinfo.h
|
||||
@@ -255,7 +255,7 @@ struct iwinfo_hardware_entry {
|
||||
|
||||
extern const struct iwinfo_iso3166_label IWINFO_ISO3166_NAMES[];
|
||||
|
||||
-#define IWINFO_HARDWARE_FILE "/usr/share/libiwinfo/hardware.txt"
|
||||
+#define IWINFO_HARDWARE_FILE "/usr/share/libiwinfo/devices.txt"
|
||||
|
||||
|
||||
struct iwinfo_ops {
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -5,9 +5,9 @@ PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git
|
||||
PKG_SOURCE_DATE:=2021-06-03
|
||||
PKG_SOURCE_VERSION:=a8cf678230ed163ff7a07eb1e2c872f9d655460a
|
||||
PKG_MIRROR_HASH:=aee34cd1c1aa0f1a459dda0b2c6cbdb6b66e67147ebd1bcbb2a16a2ef923d008
|
||||
PKG_SOURCE_DATE:=2021-06-30
|
||||
PKG_SOURCE_VERSION:=4fc532c8a55ba8217ad67d7fd47c5eb9a8aba044
|
||||
PKG_MIRROR_HASH:=a5c8205f2e2b2f1f9ad687592e66a6e2bf8900dc54cfe3ceefe6c297d18971a8
|
||||
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
@@ -15,7 +15,6 @@ PKG_LICENSE:=LGPL-2.1
|
||||
PKG_LICENSE_FILES:=
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
PKG_FLAGS := nonshared
|
||||
PKG_ASLR_PIE_REGULAR:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -23,8 +23,6 @@ PKG_LICENSE_FILES:=
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
PKG_BUILD_PARALLEL:=0
|
||||
PKG_FLAGS := nonshared
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
|
||||
@@ -30,7 +30,12 @@ get_dhcp_ntp_servers() {
|
||||
|
||||
validate_ntp_section() {
|
||||
uci_load_validate system timeserver "$1" "$2" \
|
||||
'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0' 'use_dhcp:bool:1' 'dhcp_interface:list(string)'
|
||||
'dhcp_interface:list(string)' \
|
||||
'enable_server:bool:0' \
|
||||
'enabled:bool:1' \
|
||||
'interface:string' \
|
||||
'server:list(host)' \
|
||||
'use_dhcp:bool:1'
|
||||
}
|
||||
|
||||
start_ntpd_instance() {
|
||||
@@ -49,7 +54,17 @@ start_ntpd_instance() {
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG" -n -N
|
||||
[ "$enable_server" = "1" ] && procd_append_param command -l
|
||||
if [ "$enable_server" = "1" ]; then
|
||||
procd_append_param command -l
|
||||
[ -n "$interface" ] && {
|
||||
local ifname
|
||||
|
||||
network_get_device ifname "$interface" || \
|
||||
ifname="$interface"
|
||||
procd_append_param command -I "$ifname"
|
||||
procd_append_param netdev "$ifname"
|
||||
}
|
||||
fi
|
||||
[ -x "$HOTPLUG_SCRIPT" ] && procd_append_param command -S "$HOTPLUG_SCRIPT"
|
||||
for peer in $server; do
|
||||
procd_append_param command -p $peer
|
||||
@@ -71,11 +86,12 @@ start_ntpd_instance() {
|
||||
}
|
||||
|
||||
start_service() {
|
||||
. /lib/functions/network.sh
|
||||
validate_ntp_section ntp start_ntpd_instance
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
local script name use_dhcp
|
||||
local script name use_dhcp enable_server interface
|
||||
|
||||
script=$(readlink -f "$initscript")
|
||||
name=$(basename ${script:-$initscript})
|
||||
@@ -98,5 +114,17 @@ service_triggers() {
|
||||
fi
|
||||
}
|
||||
|
||||
config_get_bool enable_server ntp enable_server 0
|
||||
config_get interface ntp interface
|
||||
|
||||
[ $enable_server -eq 1 ] && [ -n "$interface" ] && {
|
||||
local ifname
|
||||
|
||||
network_get_device ifname "$interface" || \
|
||||
ifname="$interface"
|
||||
procd_add_interface_trigger "interface.*" "$ifname" \
|
||||
/etc/init.d/"$name" reload
|
||||
}
|
||||
|
||||
procd_add_validation validate_ntp_section
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ PKG_SOURCE_URL:=http://www.lua.org/ftp/ \
|
||||
http://www.tecgraf.puc-rio.br/lua/ftp/
|
||||
PKG_HASH:=2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_FLAGS := nonshared
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=COPYRIGHT
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ugps
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ugps.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2020-08-29
|
||||
PKG_SOURCE_VERSION:=511a5b3c84fa715ef0305cf26c98619c12a4867a
|
||||
PKG_MIRROR_HASH:=551d57b4c18da4c4695fa2f7a959c25a03be35d14cf872785e7db740f12366e2
|
||||
PKG_SOURCE_DATE:=2021-06-08
|
||||
PKG_SOURCE_VERSION:=5e88403fc0d39ae8a270d2c6c6e9c8a4d5232cf3
|
||||
PKG_MIRROR_HASH:=a3dfc2cc6def3b634d8b7cda9139926be3d876cf2faa5251c4821987954442a5
|
||||
|
||||
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
||||
PKG_LICENSE:=GPL-2.0+
|
||||
|
||||
@@ -16,11 +16,16 @@ start_service() {
|
||||
local disabled="$(uci get gps.@gps[-1].disabled || echo 0)"
|
||||
|
||||
[ "$disabled" == "0" ] || return
|
||||
[ "$tty" ] || return
|
||||
|
||||
[ -c "$tty" ] || {
|
||||
tty="/dev/$tty"
|
||||
[ -c "$tty" ] || return
|
||||
}
|
||||
case "$tty" in
|
||||
"/"*)
|
||||
true
|
||||
;;
|
||||
*)
|
||||
tty="/dev/$tty"
|
||||
;;
|
||||
esac
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG"
|
||||
|
||||
@@ -18,19 +18,33 @@ work_dir = Path(getenv("WORK_DIR"))
|
||||
|
||||
output = {}
|
||||
|
||||
|
||||
def get_initial_output(image_info):
|
||||
# preserve existing profiles.json
|
||||
if output_path.is_file():
|
||||
profiles = json.loads(output_path.read_text())
|
||||
if profiles["version_code"] == image_info["version_code"]:
|
||||
return profiles
|
||||
return image_info
|
||||
|
||||
|
||||
for json_file in work_dir.glob("*.json"):
|
||||
image_info = json.loads(json_file.read_text())
|
||||
|
||||
if not output:
|
||||
output.update(image_info)
|
||||
output = get_initial_output(image_info)
|
||||
|
||||
# get first and only profile in json file
|
||||
device_id, profile = next(iter(image_info["profiles"].items()))
|
||||
if device_id not in output["profiles"]:
|
||||
output["profiles"][device_id] = profile
|
||||
else:
|
||||
# get first (and only) profile in json file
|
||||
device_id = next(iter(image_info["profiles"].keys()))
|
||||
if device_id not in output["profiles"]:
|
||||
output["profiles"].update(image_info["profiles"])
|
||||
else:
|
||||
output["profiles"][device_id]["images"].append(
|
||||
image_info["profiles"][device_id]["images"][0]
|
||||
)
|
||||
output["profiles"][device_id]["images"].extend(profile["images"])
|
||||
|
||||
# make image lists unique by name, keep last/latest
|
||||
for device_id, profile in output.get("profiles", {}).items():
|
||||
profile["images"] = list({e["name"]: e for e in profile["images"]}.values())
|
||||
|
||||
|
||||
if output:
|
||||
default_packages, output["arch_packages"] = run(
|
||||
|
||||
@@ -43,7 +43,7 @@ produce a noisy warning.
|
||||
hcd->msi_enabled = 1;
|
||||
--- a/drivers/usb/host/xhci.h
|
||||
+++ b/drivers/usb/host/xhci.h
|
||||
@@ -1883,6 +1883,7 @@ struct xhci_hcd {
|
||||
@@ -1884,6 +1884,7 @@ struct xhci_hcd {
|
||||
struct xhci_hub usb2_rhub;
|
||||
struct xhci_hub usb3_rhub;
|
||||
/* support xHCI 1.0 spec USB2 hardware LPM */
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
struct fis_image_desc {
|
||||
unsigned char name[16]; // Null terminated name
|
||||
uint32_t flash_base; // Address within FLASH of image
|
||||
@@ -67,6 +69,7 @@ static int parse_redboot_partitions(stru
|
||||
@@ -72,6 +74,7 @@ static int parse_redboot_partitions(stru
|
||||
const struct mtd_partition **pparts,
|
||||
struct mtd_part_parser_data *data)
|
||||
{
|
||||
@@ -17,7 +17,7 @@
|
||||
int nrparts = 0;
|
||||
struct fis_image_desc *buf;
|
||||
struct mtd_partition *parts;
|
||||
@@ -234,14 +237,15 @@ static int parse_redboot_partitions(stru
|
||||
@@ -239,14 +242,15 @@ static int parse_redboot_partitions(stru
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -35,7 +35,7 @@
|
||||
#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
|
||||
if (nulllen > 0) {
|
||||
strcpy(nullname, nullstring);
|
||||
@@ -260,6 +264,8 @@ static int parse_redboot_partitions(stru
|
||||
@@ -265,6 +269,8 @@ static int parse_redboot_partitions(stru
|
||||
}
|
||||
#endif
|
||||
for ( ; i<nrparts; i++) {
|
||||
@@ -44,7 +44,7 @@
|
||||
parts[i].size = fl->img->size;
|
||||
parts[i].offset = fl->img->flash_base;
|
||||
parts[i].name = names;
|
||||
@@ -293,6 +299,13 @@ static int parse_redboot_partitions(stru
|
||||
@@ -298,6 +304,13 @@ static int parse_redboot_partitions(stru
|
||||
fl = fl->next;
|
||||
kfree(tmp_fl);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/mtd/parsers/redboot.c
|
||||
+++ b/drivers/mtd/parsers/redboot.c
|
||||
@@ -88,12 +88,18 @@ static int parse_redboot_partitions(stru
|
||||
@@ -93,12 +93,18 @@ static int parse_redboot_partitions(stru
|
||||
|
||||
parse_redboot_of(master);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
return -EIO;
|
||||
}
|
||||
offset -= master->erasesize;
|
||||
@@ -106,10 +112,6 @@ static int parse_redboot_partitions(stru
|
||||
@@ -111,10 +117,6 @@ static int parse_redboot_partitions(stru
|
||||
goto nogood;
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
printk(KERN_NOTICE "Searching for RedBoot partition table in %s at offset 0x%lx\n",
|
||||
master->name, offset);
|
||||
@@ -182,6 +184,11 @@ static int parse_redboot_partitions(stru
|
||||
@@ -187,6 +189,11 @@ static int parse_redboot_partitions(stru
|
||||
}
|
||||
if (i == numslots) {
|
||||
/* Didn't find it */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/mtd/parsers/redboot.c
|
||||
+++ b/drivers/mtd/parsers/redboot.c
|
||||
@@ -65,6 +65,22 @@ static void parse_redboot_of(struct mtd_
|
||||
@@ -70,6 +70,22 @@ static void parse_redboot_of(struct mtd_
|
||||
directory = dirblock;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
static int parse_redboot_partitions(struct mtd_info *master,
|
||||
const struct mtd_partition **pparts,
|
||||
struct mtd_part_parser_data *data)
|
||||
@@ -81,6 +97,7 @@ static int parse_redboot_partitions(stru
|
||||
@@ -86,6 +102,7 @@ static int parse_redboot_partitions(stru
|
||||
int namelen = 0;
|
||||
int nulllen = 0;
|
||||
int numslots;
|
||||
@@ -31,7 +31,7 @@
|
||||
unsigned long offset;
|
||||
#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
|
||||
static char nullstring[] = "unallocated";
|
||||
@@ -195,7 +212,10 @@ static int parse_redboot_partitions(stru
|
||||
@@ -200,7 +217,10 @@ static int parse_redboot_partitions(stru
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
struct fis_list *new_fl, **prev;
|
||||
|
||||
if (buf[i].name[0] == 0xff) {
|
||||
@@ -271,12 +291,13 @@ static int parse_redboot_partitions(stru
|
||||
@@ -276,12 +296,13 @@ static int parse_redboot_partitions(stru
|
||||
}
|
||||
#endif
|
||||
for ( ; i<nrparts; i++) {
|
||||
@@ -59,7 +59,7 @@
|
||||
strcpy(names, fl->img->name);
|
||||
#ifdef CONFIG_MTD_REDBOOT_PARTS_READONLY
|
||||
if (!memcmp(names, "RedBoot", 8) ||
|
||||
@@ -306,7 +327,9 @@ static int parse_redboot_partitions(stru
|
||||
@@ -311,7 +332,9 @@ static int parse_redboot_partitions(stru
|
||||
fl = fl->next;
|
||||
kfree(tmp_fl);
|
||||
}
|
||||
|
||||
@@ -90,6 +90,7 @@ CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_74X164=y
|
||||
CONFIG_GPIO_ATH79=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
# CONFIG_GPIO_LATCH is not set
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDWARE_WATCHPOINTS=y
|
||||
CONFIG_HAS_DMA=y
|
||||
@@ -172,6 +173,7 @@ CONFIG_MTD_CFI_GEOMETRY=y
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
|
||||
# CONFIG_MTD_NAND_RB91X is not set
|
||||
CONFIG_MTD_PARSER_CYBERTAN=y
|
||||
CONFIG_MTD_PHYSMAP=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
|
||||
@@ -0,0 +1,218 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "ar9344.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
compatible = "mikrotik,routerboard-912uag-2hpnd", "qca,ar9342";
|
||||
model = "MikroTik RouterBOARD 912UAG-2HPnD";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
};
|
||||
|
||||
gpio_latch: gpio_latch {
|
||||
compatible = "gpio-latch";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>,
|
||||
<&gpio 1 GPIO_ACTIVE_HIGH>,
|
||||
<&gpio 2 GPIO_ACTIVE_HIGH>,
|
||||
<&gpio 3 GPIO_ACTIVE_HIGH>,
|
||||
<0>, /* Not connected */
|
||||
<&gpio 13 GPIO_ACTIVE_HIGH>,
|
||||
<&gpio 14 GPIO_ACTIVE_HIGH>,
|
||||
<&gpio 15 GPIO_ACTIVE_HIGH>,
|
||||
<&gpio 11 GPIO_ACTIVE_LOW>; /* Latch Enable */
|
||||
};
|
||||
|
||||
nand_gpio {
|
||||
compatible = "mikrotik,rb91x-nand";
|
||||
|
||||
gpios = <&gpio_latch 3 GPIO_ACTIVE_HIGH>, /* Read */
|
||||
<&gpio 4 GPIO_ACTIVE_HIGH>, /* Ready (RDY) */
|
||||
<&gpio_latch 5 GPIO_ACTIVE_LOW>, /* Chip Enable (nCE) */
|
||||
<&gpio_latch 6 GPIO_ACTIVE_HIGH>, /* Command Latch Enable (CLE) */
|
||||
<&gpio_latch 7 GPIO_ACTIVE_HIGH>, /* Address Latch Enable (ALE) */
|
||||
<&gpio 12 GPIO_ACTIVE_LOW>, /* Read/Write Enable (nRW) */
|
||||
<&gpio_latch 8 GPIO_ACTIVE_LOW>; /* Latch Enable (nLE) */
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "booter";
|
||||
reg = <0x0 0x0040000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "kernel";
|
||||
reg = <0x0040000 0x03c0000>;
|
||||
};
|
||||
|
||||
partition@400000 {
|
||||
label = "ubi";
|
||||
reg = <0x0400000 0x7c00000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_power: power {
|
||||
label = "green:power";
|
||||
gpios = <&gpio_latch 1 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
user {
|
||||
label = "green:user";
|
||||
gpios = <&gpio_latch 2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led1 {
|
||||
label = "green:led1";
|
||||
gpios = <&ssr 0 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led2 {
|
||||
label = "green:led2";
|
||||
gpios = <&ssr 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led3 {
|
||||
label = "green:led3";
|
||||
gpios = <&ssr 2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led4 {
|
||||
label = "green:led4";
|
||||
gpios = <&ssr 3 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led5 {
|
||||
label = "green:led5";
|
||||
gpios = <&ssr 4 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-export {
|
||||
compatible = "gpio-export";
|
||||
|
||||
beeper {
|
||||
gpio-export,name = "beeper";
|
||||
gpio-export,output = <1>; /* Must be 1 to avoid EMI induced clicking noise */
|
||||
gpios = <&ssr 5 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
usb_power {
|
||||
gpio-export,name = "power-usb";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&ssr 6 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
pcie_power {
|
||||
gpio-export,name = "power-pcie";
|
||||
gpio-export,output = <0>;
|
||||
gpios = <&ssr 7 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
compatible = "qca,ar7100-spi";
|
||||
|
||||
cs-gpios = <0>, <&gpio_latch 0 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "mikrotik,routerboot-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "routerboot";
|
||||
reg = <0x0 0x0>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
hard_config: hard_config {
|
||||
read-only;
|
||||
};
|
||||
|
||||
bios {
|
||||
size = <0x1000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
soft_config {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ssr: ssr@1 {
|
||||
compatible = "fairchild,74hc595";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
registers-number = <1>;
|
||||
reg = <1>;
|
||||
spi-max-frequency = <50000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
phy-mask = <0>;
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
phy-mode = "rgmii-id";
|
||||
phy-handle = <&phy0>;
|
||||
pll-data = <0x02000000 0x00000101 0x00001313>;
|
||||
|
||||
gmac-config {
|
||||
device = <&gmac>;
|
||||
rgmii-gmac0 = <1>;
|
||||
rgmii-enabled = <1>;
|
||||
rxd-delay = <1>;
|
||||
txd-delay = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
qca,no-eeprom;
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_phy {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/mtd/partitions/uimage.h>
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
@@ -59,20 +60,9 @@
|
||||
partition@40000 {
|
||||
label = "firmware";
|
||||
reg = <0x040000 0x780000>;
|
||||
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "kernel";
|
||||
reg = <0x000000 0x300000>;
|
||||
};
|
||||
|
||||
partition@300000 {
|
||||
label = "rootfs";
|
||||
reg = <0x300000 0x480000>;
|
||||
};
|
||||
compatible = "openwrt,uimage", "denx,uimage";
|
||||
openwrt,ih-magic = <IH_MAGIC_OKLI>;
|
||||
openwrt,offset = <0x3000>;
|
||||
};
|
||||
|
||||
partition@7c0000 {
|
||||
|
||||
122
target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
Normal file
122
target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
Normal file
@@ -0,0 +1,122 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qca953x.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
compatible = "joyit,jt-or750i", "qca,qca9531";
|
||||
model = "Joy-IT JT-OR750i";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_status_green;
|
||||
led-failsafe = &led_status_red;
|
||||
led-running = &led_status_green;
|
||||
led-upgrade = &led_status_red;
|
||||
label-mac-device = ð0;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&jtag_disable_pins &pinmux_led_eth_pins>;
|
||||
|
||||
led_status_green: status_green {
|
||||
label = "green:status";
|
||||
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
led_status_red: status_red {
|
||||
label = "red:status";
|
||||
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pinmux {
|
||||
pinmux_led_eth_pins: pinmux_led_eth_pins {
|
||||
pinctrl-single,bits = \
|
||||
/* GPIO 4: LED_LINK_5 (WAN) */ \
|
||||
<0x04 0x0000002d 0x000000ff>, \
|
||||
/* GPIO 14: LED_LINK_2 (LAN 3) */ \
|
||||
/* GPIO 15: LED_LINK_3 (LAN 2) */ \
|
||||
<0x0c 0x2b2a0000 0xffff0000>, \
|
||||
/* GPIO 16: LED_LINK_4 (LAN 1) */ \
|
||||
<0x10 0x0000002c 0x000000ff>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
label = "firmware";
|
||||
reg = <0x50000 0xfa0000>;
|
||||
compatible = "denx,uimage";
|
||||
};
|
||||
|
||||
art: partition@ff0000 {
|
||||
label = "art";
|
||||
reg = <0xff0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
phy-handle = <&swphy4>;
|
||||
|
||||
mtd-mac-address = <&art 0x0>;
|
||||
};
|
||||
|
||||
ð1 {
|
||||
mtd-mac-address = <&art 0x6>;
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
mtd-cal-data = <&art 0x1000>;
|
||||
};
|
||||
203
target/linux/ath79/files/drivers/gpio/gpio-latch.c
Normal file
203
target/linux/ath79/files/drivers/gpio/gpio-latch.c
Normal file
@@ -0,0 +1,203 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* GPIO latch driver
|
||||
*
|
||||
* Copyright (C) 2014 Gabor Juhos <juhosg@openwrt.org>
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/gpio/driver.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#define GPIO_LATCH_DRIVER_NAME "gpio-latch"
|
||||
#define GPIO_LATCH_LINES 9
|
||||
|
||||
struct gpio_latch_chip {
|
||||
struct gpio_chip gc;
|
||||
struct mutex mutex;
|
||||
struct mutex latch_mutex;
|
||||
bool latch_enabled;
|
||||
int le_gpio;
|
||||
bool le_active_low;
|
||||
struct gpio_desc *gpios[GPIO_LATCH_LINES];
|
||||
};
|
||||
|
||||
static inline struct gpio_latch_chip *to_gpio_latch_chip(struct gpio_chip *gc)
|
||||
{
|
||||
return container_of(gc, struct gpio_latch_chip, gc);
|
||||
}
|
||||
|
||||
static void gpio_latch_lock(struct gpio_latch_chip *glc, bool enable)
|
||||
{
|
||||
mutex_lock(&glc->mutex);
|
||||
|
||||
if (enable)
|
||||
glc->latch_enabled = true;
|
||||
|
||||
if (glc->latch_enabled)
|
||||
mutex_lock(&glc->latch_mutex);
|
||||
}
|
||||
|
||||
static void gpio_latch_unlock(struct gpio_latch_chip *glc, bool disable)
|
||||
{
|
||||
if (glc->latch_enabled)
|
||||
mutex_unlock(&glc->latch_mutex);
|
||||
|
||||
if (disable)
|
||||
glc->latch_enabled = true;
|
||||
|
||||
mutex_unlock(&glc->mutex);
|
||||
}
|
||||
|
||||
static int
|
||||
gpio_latch_get(struct gpio_chip *gc, unsigned offset)
|
||||
{
|
||||
struct gpio_latch_chip *glc = to_gpio_latch_chip(gc);
|
||||
int ret;
|
||||
|
||||
gpio_latch_lock(glc, false);
|
||||
ret = gpiod_get_value(glc->gpios[offset]);
|
||||
gpio_latch_unlock(glc, false);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
gpio_latch_set(struct gpio_chip *gc, unsigned offset, int value)
|
||||
{
|
||||
struct gpio_latch_chip *glc = to_gpio_latch_chip(gc);
|
||||
bool enable_latch = false;
|
||||
bool disable_latch = false;
|
||||
|
||||
if (offset == glc->le_gpio) {
|
||||
enable_latch = value ^ glc->le_active_low;
|
||||
disable_latch = !enable_latch;
|
||||
}
|
||||
|
||||
gpio_latch_lock(glc, enable_latch);
|
||||
gpiod_set_raw_value(glc->gpios[offset], value);
|
||||
gpio_latch_unlock(glc, disable_latch);
|
||||
}
|
||||
|
||||
static int
|
||||
gpio_latch_direction_output(struct gpio_chip *gc, unsigned offset, int value)
|
||||
{
|
||||
struct gpio_latch_chip *glc = to_gpio_latch_chip(gc);
|
||||
bool enable_latch = false;
|
||||
bool disable_latch = false;
|
||||
int ret;
|
||||
|
||||
if (offset == glc->le_gpio) {
|
||||
enable_latch = value ^ glc->le_active_low;
|
||||
disable_latch = !enable_latch;
|
||||
}
|
||||
|
||||
gpio_latch_lock(glc, enable_latch);
|
||||
ret = gpiod_direction_output_raw(glc->gpios[offset], value);
|
||||
gpio_latch_unlock(glc, disable_latch);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int gpio_latch_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct gpio_latch_chip *glc;
|
||||
struct gpio_chip *gc;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct device_node *of_node = dev->of_node;
|
||||
int i, n;
|
||||
|
||||
glc = devm_kzalloc(dev, sizeof(*glc), GFP_KERNEL);
|
||||
if (!glc)
|
||||
return -ENOMEM;
|
||||
|
||||
mutex_init(&glc->mutex);
|
||||
mutex_init(&glc->latch_mutex);
|
||||
|
||||
n = gpiod_count(dev, NULL);
|
||||
if (n <= 0) {
|
||||
dev_err(dev, "failed to get gpios: %d\n", n);
|
||||
return n;
|
||||
} else if (n != GPIO_LATCH_LINES) {
|
||||
dev_err(dev, "expected %d gpios\n", GPIO_LATCH_LINES);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
glc->gpios[i] = devm_gpiod_get_index_optional(dev, NULL, i,
|
||||
GPIOD_OUT_LOW);
|
||||
if (IS_ERR(glc->gpios[i])) {
|
||||
dev_err(dev, "failed to get gpio %d: %d\n", i,
|
||||
PTR_ERR(glc->gpios[i]));
|
||||
return PTR_ERR(glc->gpios[i]);
|
||||
}
|
||||
}
|
||||
|
||||
glc->le_gpio = 8;
|
||||
glc->le_active_low = gpiod_is_active_low(glc->gpios[glc->le_gpio]);
|
||||
|
||||
if (!glc->gpios[glc->le_gpio]) {
|
||||
dev_err(dev, "missing required latch-enable gpio %d\n",
|
||||
glc->le_gpio);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
gc = &glc->gc;
|
||||
gc->label = GPIO_LATCH_DRIVER_NAME;
|
||||
gc->can_sleep = true;
|
||||
gc->base = -1;
|
||||
gc->ngpio = GPIO_LATCH_LINES;
|
||||
gc->get = gpio_latch_get;
|
||||
gc->set = gpio_latch_set;
|
||||
gc->direction_output = gpio_latch_direction_output;
|
||||
gc->of_node = of_node;
|
||||
|
||||
platform_set_drvdata(pdev, glc);
|
||||
|
||||
i = gpiochip_add(&glc->gc);
|
||||
if (i) {
|
||||
dev_err(dev, "gpiochip_add() failed: %d\n", i);
|
||||
return i;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gpio_latch_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct gpio_latch_chip *glc = platform_get_drvdata(pdev);
|
||||
|
||||
gpiochip_remove(&glc->gc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id gpio_latch_match[] = {
|
||||
{ .compatible = GPIO_LATCH_DRIVER_NAME },
|
||||
{},
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(of, gpio_latch_match);
|
||||
|
||||
static struct platform_driver gpio_latch_driver = {
|
||||
.probe = gpio_latch_probe,
|
||||
.remove = gpio_latch_remove,
|
||||
.driver = {
|
||||
.name = GPIO_LATCH_DRIVER_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = gpio_latch_match,
|
||||
},
|
||||
};
|
||||
|
||||
module_platform_driver(gpio_latch_driver);
|
||||
|
||||
MODULE_DESCRIPTION("GPIO latch driver");
|
||||
MODULE_AUTHOR("Gabor Juhos <juhosg@openwrt.org>");
|
||||
MODULE_AUTHOR("Denis Kalashnikov <denis281089@gmail.com>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_ALIAS("platform:" GPIO_LATCH_DRIVER_NAME);
|
||||
@@ -1266,7 +1266,6 @@ static int ar934x_nfc_setup_hwecc(struct ar934x_nfc *nfc)
|
||||
* Writing a subpage separately is not supported, because
|
||||
* the controller only does ECC on full-page accesses.
|
||||
*/
|
||||
nand->options = NAND_NO_SUBPAGE_WRITE;
|
||||
|
||||
nand->ecc.size = 512;
|
||||
nand->ecc.bytes = 7;
|
||||
@@ -1325,6 +1324,9 @@ static int ar934x_nfc_attach_chip(struct nand_chip *nand)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (mtd->writesize == 2048)
|
||||
nand->options |= NAND_NO_SUBPAGE_WRITE;
|
||||
|
||||
if (nand->ecc.mode == NAND_ECC_HW) {
|
||||
ret = ar934x_nfc_setup_hwecc(nfc);
|
||||
if (ret)
|
||||
|
||||
375
target/linux/ath79/files/drivers/mtd/nand/raw/rb91x_nand.c
Normal file
375
target/linux/ath79/files/drivers/mtd/nand/raw/rb91x_nand.c
Normal file
@@ -0,0 +1,375 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* MikroTik RB91x NAND flash driver
|
||||
*
|
||||
* Main part is copied from original driver written by Gabor Juhos.
|
||||
*
|
||||
* Copyright (C) 2013-2014 Gabor Juhos <juhosg@openwrt.org>
|
||||
*/
|
||||
|
||||
/*
|
||||
* WARNING: to speed up NAND reading/writing we are working with SoC GPIO
|
||||
* controller registers directly -- not through standard GPIO API.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mtd/rawnand.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/of_platform.h>
|
||||
|
||||
#include <asm/mach-ath79/ar71xx_regs.h>
|
||||
|
||||
/* Bit masks for NAND data lines in ath79 gpio 32-bit register */
|
||||
#define RB91X_NAND_NRW_BIT BIT(12)
|
||||
#define RB91X_NAND_DATA_BITS (BIT(0) | BIT(1) | BIT(2) | BIT(3) | BIT(4) \
|
||||
| BIT(13) | BIT(14) | BIT(15))
|
||||
#define RB91X_NAND_LOW_DATA_MASK 0x1f
|
||||
#define RB91X_NAND_HIGH_DATA_MASK 0xe0
|
||||
#define RB91X_NAND_HIGH_DATA_SHIFT 8
|
||||
|
||||
enum rb91x_nand_gpios {
|
||||
RB91X_NAND_READ,/* Read */
|
||||
RB91X_NAND_RDY, /* NAND Ready */
|
||||
RB91X_NAND_NCE, /* Chip Enable. Active low */
|
||||
RB91X_NAND_CLE, /* Command Latch Enable */
|
||||
RB91X_NAND_ALE, /* Address Latch Enable */
|
||||
RB91X_NAND_NRW, /* Read/Write. Active low */
|
||||
RB91X_NAND_NLE, /* Latch Enable. Active low */
|
||||
|
||||
RB91X_NAND_GPIOS,
|
||||
};
|
||||
|
||||
struct rb91x_nand_drvdata {
|
||||
struct nand_chip chip;
|
||||
struct device *dev;
|
||||
struct gpio_desc **gpio;
|
||||
void __iomem *ath79_gpio_base;
|
||||
};
|
||||
|
||||
static inline void rb91x_nand_latch_lock(struct rb91x_nand_drvdata *drvdata,
|
||||
int lock)
|
||||
{
|
||||
gpiod_set_value_cansleep(drvdata->gpio[RB91X_NAND_NLE], lock);
|
||||
}
|
||||
|
||||
static int rb91x_ooblayout_ecc(struct mtd_info *mtd, int section,
|
||||
struct mtd_oob_region *oobregion)
|
||||
{
|
||||
switch (section) {
|
||||
case 0:
|
||||
oobregion->offset = 8;
|
||||
oobregion->length = 3;
|
||||
return 0;
|
||||
case 1:
|
||||
oobregion->offset = 13;
|
||||
oobregion->length = 3;
|
||||
return 0;
|
||||
default:
|
||||
return -ERANGE;
|
||||
}
|
||||
}
|
||||
|
||||
static int rb91x_ooblayout_free(struct mtd_info *mtd, int section,
|
||||
struct mtd_oob_region *oobregion)
|
||||
{
|
||||
switch (section) {
|
||||
case 0:
|
||||
oobregion->offset = 0;
|
||||
oobregion->length = 4;
|
||||
return 0;
|
||||
case 1:
|
||||
oobregion->offset = 4;
|
||||
oobregion->length = 1;
|
||||
return 0;
|
||||
case 2:
|
||||
oobregion->offset = 6;
|
||||
oobregion->length = 2;
|
||||
return 0;
|
||||
case 3:
|
||||
oobregion->offset = 11;
|
||||
oobregion->length = 2;
|
||||
return 0;
|
||||
default:
|
||||
return -ERANGE;
|
||||
}
|
||||
}
|
||||
|
||||
static const struct mtd_ooblayout_ops rb91x_nand_ecclayout_ops = {
|
||||
.ecc = rb91x_ooblayout_ecc,
|
||||
.free = rb91x_ooblayout_free,
|
||||
};
|
||||
|
||||
static void rb91x_nand_write(struct rb91x_nand_drvdata *drvdata,
|
||||
const u8 *buf,
|
||||
unsigned len)
|
||||
{
|
||||
void __iomem *base = drvdata->ath79_gpio_base;
|
||||
u32 oe_reg;
|
||||
u32 out_reg;
|
||||
u32 out;
|
||||
unsigned i;
|
||||
|
||||
rb91x_nand_latch_lock(drvdata, 1);
|
||||
|
||||
oe_reg = __raw_readl(base + AR71XX_GPIO_REG_OE);
|
||||
out_reg = __raw_readl(base + AR71XX_GPIO_REG_OUT);
|
||||
|
||||
/* Set data lines to output mode */
|
||||
__raw_writel(oe_reg & ~(RB91X_NAND_DATA_BITS | RB91X_NAND_NRW_BIT),
|
||||
base + AR71XX_GPIO_REG_OE);
|
||||
|
||||
out = out_reg & ~(RB91X_NAND_DATA_BITS | RB91X_NAND_NRW_BIT);
|
||||
for (i = 0; i != len; i++) {
|
||||
u32 data;
|
||||
|
||||
data = (buf[i] & RB91X_NAND_HIGH_DATA_MASK) <<
|
||||
RB91X_NAND_HIGH_DATA_SHIFT;
|
||||
data |= buf[i] & RB91X_NAND_LOW_DATA_MASK;
|
||||
data |= out;
|
||||
__raw_writel(data, base + AR71XX_GPIO_REG_OUT);
|
||||
|
||||
/* Deactivate WE line */
|
||||
data |= RB91X_NAND_NRW_BIT;
|
||||
__raw_writel(data, base + AR71XX_GPIO_REG_OUT);
|
||||
/* Flush write */
|
||||
__raw_readl(base + AR71XX_GPIO_REG_OUT);
|
||||
}
|
||||
|
||||
/* Restore registers */
|
||||
__raw_writel(out_reg, base + AR71XX_GPIO_REG_OUT);
|
||||
__raw_writel(oe_reg, base + AR71XX_GPIO_REG_OE);
|
||||
/* Flush write */
|
||||
__raw_readl(base + AR71XX_GPIO_REG_OUT);
|
||||
|
||||
rb91x_nand_latch_lock(drvdata, 0);
|
||||
}
|
||||
|
||||
static void rb91x_nand_read(struct rb91x_nand_drvdata *drvdata,
|
||||
u8 *read_buf,
|
||||
unsigned len)
|
||||
{
|
||||
void __iomem *base = drvdata->ath79_gpio_base;
|
||||
u32 oe_reg;
|
||||
u32 out_reg;
|
||||
unsigned i;
|
||||
|
||||
/* Enable read mode */
|
||||
gpiod_set_value_cansleep(drvdata->gpio[RB91X_NAND_READ], 1);
|
||||
|
||||
rb91x_nand_latch_lock(drvdata, 1);
|
||||
|
||||
/* Save registers */
|
||||
oe_reg = __raw_readl(base + AR71XX_GPIO_REG_OE);
|
||||
out_reg = __raw_readl(base + AR71XX_GPIO_REG_OUT);
|
||||
|
||||
/* Set data lines to input mode */
|
||||
__raw_writel(oe_reg | RB91X_NAND_DATA_BITS,
|
||||
base + AR71XX_GPIO_REG_OE);
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
u32 in;
|
||||
u8 data;
|
||||
|
||||
/* Activate RE line */
|
||||
__raw_writel(RB91X_NAND_NRW_BIT, base + AR71XX_GPIO_REG_CLEAR);
|
||||
/* Flush write */
|
||||
__raw_readl(base + AR71XX_GPIO_REG_CLEAR);
|
||||
|
||||
/* Read input lines */
|
||||
in = __raw_readl(base + AR71XX_GPIO_REG_IN);
|
||||
|
||||
/* Deactivate RE line */
|
||||
__raw_writel(RB91X_NAND_NRW_BIT, base + AR71XX_GPIO_REG_SET);
|
||||
|
||||
data = (in & RB91X_NAND_LOW_DATA_MASK);
|
||||
data |= (in >> RB91X_NAND_HIGH_DATA_SHIFT) &
|
||||
RB91X_NAND_HIGH_DATA_MASK;
|
||||
|
||||
read_buf[i] = data;
|
||||
}
|
||||
|
||||
/* Restore registers */
|
||||
__raw_writel(out_reg, base + AR71XX_GPIO_REG_OUT);
|
||||
__raw_writel(oe_reg, base + AR71XX_GPIO_REG_OE);
|
||||
/* Flush write */
|
||||
__raw_readl(base + AR71XX_GPIO_REG_OUT);
|
||||
|
||||
rb91x_nand_latch_lock(drvdata, 0);
|
||||
|
||||
/* Disable read mode */
|
||||
gpiod_set_value_cansleep(drvdata->gpio[RB91X_NAND_READ], 0);
|
||||
}
|
||||
|
||||
static int rb91x_nand_dev_ready(struct nand_chip *chip)
|
||||
{
|
||||
struct rb91x_nand_drvdata *drvdata = (struct rb91x_nand_drvdata *)(chip->priv);
|
||||
|
||||
return gpiod_get_value_cansleep(drvdata->gpio[RB91X_NAND_RDY]);
|
||||
}
|
||||
|
||||
static void rb91x_nand_cmd_ctrl(struct nand_chip *chip, int cmd,
|
||||
unsigned int ctrl)
|
||||
{
|
||||
struct rb91x_nand_drvdata *drvdata = chip->priv;
|
||||
|
||||
if (ctrl & NAND_CTRL_CHANGE) {
|
||||
gpiod_set_value_cansleep(drvdata->gpio[RB91X_NAND_CLE],
|
||||
(ctrl & NAND_CLE) ? 1 : 0);
|
||||
gpiod_set_value_cansleep(drvdata->gpio[RB91X_NAND_ALE],
|
||||
(ctrl & NAND_ALE) ? 1 : 0);
|
||||
gpiod_set_value_cansleep(drvdata->gpio[RB91X_NAND_NCE],
|
||||
(ctrl & NAND_NCE) ? 1 : 0);
|
||||
}
|
||||
|
||||
if (cmd != NAND_CMD_NONE) {
|
||||
u8 t = cmd;
|
||||
|
||||
rb91x_nand_write(drvdata, &t, 1);
|
||||
}
|
||||
}
|
||||
|
||||
static u8 rb91x_nand_read_byte(struct nand_chip *chip)
|
||||
{
|
||||
u8 data = 0xff;
|
||||
|
||||
rb91x_nand_read(chip->priv, &data, 1);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
static void rb91x_nand_read_buf(struct nand_chip *chip, u8 *buf, int len)
|
||||
{
|
||||
rb91x_nand_read(chip->priv, buf, len);
|
||||
}
|
||||
|
||||
static void rb91x_nand_write_buf(struct nand_chip *chip, const u8 *buf, int len)
|
||||
{
|
||||
rb91x_nand_write(chip->priv, buf, len);
|
||||
}
|
||||
|
||||
static void rb91x_nand_release(struct rb91x_nand_drvdata *drvdata)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)
|
||||
mtd_device_unregister(nand_to_mtd(&drvdata->chip));
|
||||
nand_cleanup(&drvdata->chip);
|
||||
#else
|
||||
nand_release(&drvdata->chip);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int rb91x_nand_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct rb91x_nand_drvdata *drvdata;
|
||||
struct mtd_info *mtd;
|
||||
int r;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct gpio_descs *gpios;
|
||||
|
||||
drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
|
||||
if (!drvdata)
|
||||
return -ENOMEM;
|
||||
|
||||
platform_set_drvdata(pdev, drvdata);
|
||||
|
||||
gpios = gpiod_get_array(dev, NULL, GPIOD_OUT_LOW);
|
||||
if (IS_ERR(gpios)) {
|
||||
dev_err(dev, "failed to get gpios: %d\n", (int)gpios);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (gpios->ndescs != RB91X_NAND_GPIOS) {
|
||||
dev_err(dev, "expected %d gpios\n", RB91X_NAND_GPIOS);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
drvdata->gpio = gpios->desc;
|
||||
|
||||
gpiod_direction_input(drvdata->gpio[RB91X_NAND_RDY]);
|
||||
|
||||
drvdata->ath79_gpio_base = ioremap(AR71XX_GPIO_BASE, AR71XX_GPIO_SIZE);
|
||||
|
||||
drvdata->dev = dev;
|
||||
|
||||
drvdata->chip.priv = drvdata;
|
||||
|
||||
drvdata->chip.legacy.cmd_ctrl = rb91x_nand_cmd_ctrl;
|
||||
drvdata->chip.legacy.dev_ready = rb91x_nand_dev_ready;
|
||||
drvdata->chip.legacy.read_byte = rb91x_nand_read_byte;
|
||||
drvdata->chip.legacy.write_buf = rb91x_nand_write_buf;
|
||||
drvdata->chip.legacy.read_buf = rb91x_nand_read_buf;
|
||||
|
||||
drvdata->chip.legacy.chip_delay = 25;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0)
|
||||
drvdata->chip.ecc.engine_type = NAND_ECC_ENGINE_TYPE_SOFT;
|
||||
drvdata->chip.ecc.algo = NAND_ECC_ALGO_HAMMING;
|
||||
#else
|
||||
drvdata->chip.ecc.mode = NAND_ECC_SOFT;
|
||||
drvdata->chip.ecc.algo = NAND_ECC_HAMMING;
|
||||
#endif
|
||||
drvdata->chip.options = NAND_NO_SUBPAGE_WRITE;
|
||||
|
||||
r = nand_scan(&drvdata->chip, 1);
|
||||
if (r) {
|
||||
dev_err(dev, "nand_scan() failed: %d\n", r);
|
||||
return r;
|
||||
}
|
||||
|
||||
mtd = nand_to_mtd(&drvdata->chip);
|
||||
mtd->dev.parent = dev;
|
||||
mtd_set_of_node(mtd, dev->of_node);
|
||||
mtd->owner = THIS_MODULE;
|
||||
if (mtd->writesize == 512)
|
||||
mtd_set_ooblayout(mtd, &rb91x_nand_ecclayout_ops);
|
||||
|
||||
r = mtd_device_register(mtd, NULL, 0);
|
||||
if (r) {
|
||||
dev_err(dev, "mtd_device_register() failed: %d\n",
|
||||
r);
|
||||
goto err_release_nand;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_release_nand:
|
||||
rb91x_nand_release(drvdata);
|
||||
return r;
|
||||
}
|
||||
|
||||
static int rb91x_nand_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct rb91x_nand_drvdata *drvdata = platform_get_drvdata(pdev);
|
||||
|
||||
rb91x_nand_release(drvdata);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id rb91x_nand_match[] = {
|
||||
{ .compatible = "mikrotik,rb91x-nand" },
|
||||
{},
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(of, rb91x_nand_match);
|
||||
|
||||
static struct platform_driver rb91x_nand_driver = {
|
||||
.probe = rb91x_nand_probe,
|
||||
.remove = rb91x_nand_remove,
|
||||
.driver = {
|
||||
.name = "rb91x-nand",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = rb91x_nand_match,
|
||||
},
|
||||
};
|
||||
|
||||
module_platform_driver(rb91x_nand_driver);
|
||||
|
||||
MODULE_DESCRIPTION("MikrotTik RB91x NAND flash driver");
|
||||
MODULE_VERSION(DRV_VERSION);
|
||||
MODULE_AUTHOR("Gabor Juhos <juhosg@openwrt.org>");
|
||||
MODULE_AUTHOR("Denis Kalashnikov <denis281089@gmail.com>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
@@ -220,6 +220,9 @@ glinet,gl-x750)
|
||||
hak5,lan-turtle)
|
||||
ucidef_set_led_netdev "wan" "WAN" "orange:system" "eth1"
|
||||
;;
|
||||
joyit,jt-or750i)
|
||||
ucidef_set_led_default "ath10k" "ath10k-disable" "ath10k-phy0" "0"
|
||||
;;
|
||||
meraki,mr12|\
|
||||
tplink,cpe210-v2|\
|
||||
tplink,cpe210-v3)
|
||||
|
||||
@@ -270,6 +270,11 @@ ath79_setup_interfaces()
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
|
||||
;;
|
||||
joyit,jt-or750i)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:3" "3:lan:2" "4:lan:1"
|
||||
;;
|
||||
librerouter,librerouter-v1)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "5:wan" "6@eth1" "4:lan"
|
||||
|
||||
@@ -24,6 +24,7 @@ case "$FIRMWARE" in
|
||||
comfast,cf-wr650ac-v1|\
|
||||
comfast,cf-wr650ac-v2|\
|
||||
devolo,magic-2-wifi|\
|
||||
joyit,jt-or750i|\
|
||||
qxwlan,e1700ac-v2-8m|\
|
||||
qxwlan,e1700ac-v2-16m|\
|
||||
qxwlan,e600gac-v2-8m|\
|
||||
|
||||
@@ -1343,6 +1343,15 @@ define Device/jjplus_ja76pf2
|
||||
endef
|
||||
TARGET_DEVICES += jjplus_ja76pf2
|
||||
|
||||
define Device/joyit_jt-or750i
|
||||
SOC := qca9531
|
||||
DEVICE_VENDOR := Joy-IT
|
||||
DEVICE_MODEL := JT-OR750i
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct
|
||||
IMAGE_SIZE := 16000k
|
||||
endef
|
||||
TARGET_DEVICES += joyit_jt-or750i
|
||||
|
||||
define Device/librerouter_librerouter-v1
|
||||
SOC := qca9558
|
||||
DEVICE_VENDOR := Librerouter
|
||||
|
||||
@@ -9,6 +9,15 @@ define Device/mikrotik_routerboard-493g
|
||||
endef
|
||||
TARGET_DEVICES += mikrotik_routerboard-493g
|
||||
|
||||
define Device/mikrotik_routerboard-912uag-2hpnd
|
||||
$(Device/mikrotik_nand)
|
||||
SOC := ar9342
|
||||
DEVICE_MODEL := RouterBOARD 912UAG-2HPnD
|
||||
DEVICE_PACKAGES += kmod-usb-ehci kmod-usb2
|
||||
SUPPORTED_DEVICES += rb-912uag-2hpnd
|
||||
endef
|
||||
TARGET_DEVICES += mikrotik_routerboard-912uag-2hpnd
|
||||
|
||||
define Device/mikrotik_routerboard-921gs-5hpacd-15s
|
||||
$(Device/mikrotik_nand)
|
||||
SOC := qca9558
|
||||
|
||||
@@ -15,6 +15,7 @@ ath79_setup_interfaces()
|
||||
ucidef_add_switch "switch1" \
|
||||
"0@eth1" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3"
|
||||
;;
|
||||
mikrotik,routerboard-912uag-2hpnd|\
|
||||
mikrotik,routerboard-921gs-5hpacd-15s|\
|
||||
mikrotik,routerboard-lhg-2nd|\
|
||||
mikrotik,routerboard-sxt-5nd-r2|\
|
||||
@@ -37,6 +38,7 @@ ath79_setup_macs()
|
||||
local mac_base="$(cat /sys/firmware/mikrotik/hard_config/mac_base)"
|
||||
|
||||
case "$board" in
|
||||
mikrotik,routerboard-912uag-2hpnd|\
|
||||
mikrotik,routerboard-921gs-5hpacd-15s|\
|
||||
mikrotik,routerboard-lhg-2nd|\
|
||||
mikrotik,routerboard-sxt-5nd-r2|\
|
||||
|
||||
@@ -23,6 +23,7 @@ board=$(board_name)
|
||||
case "$FIRMWARE" in
|
||||
"ath9k-eeprom-ahb-18100000.wmac.bin")
|
||||
case $board in
|
||||
mikrotik,routerboard-912uag-2hpnd|\
|
||||
mikrotik,routerboard-lhg-2nd|\
|
||||
mikrotik,routerboard-sxt-5nd-r2|\
|
||||
mikrotik,routerboard-wapr-2nd)
|
||||
|
||||
@@ -32,6 +32,7 @@ platform_do_upgrade() {
|
||||
|
||||
case "$board" in
|
||||
mikrotik,routerboard-493g|\
|
||||
mikrotik,routerboard-912uag-2hpnd|\
|
||||
mikrotik,routerboard-921gs-5hpacd-15s|\
|
||||
mikrotik,routerboard-922uags-5hpacd|\
|
||||
mikrotik,routerboard-sxt-5nd-r2)
|
||||
|
||||
@@ -15,6 +15,7 @@ CONFIG_MTD_NAND_AR934X=y
|
||||
CONFIG_MTD_NAND_CORE=y
|
||||
CONFIG_MTD_NAND_ECC=y
|
||||
CONFIG_MTD_NAND_RB4XX=y
|
||||
CONFIG_MTD_NAND_RB91X=y
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_ROUTERBOOT_PARTS=y
|
||||
CONFIG_MTD_SPI_NAND=y
|
||||
|
||||
@@ -13,7 +13,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
|
||||
--- a/drivers/leds/Kconfig
|
||||
+++ b/drivers/leds/Kconfig
|
||||
@@ -823,6 +823,17 @@ config LEDS_LM36274
|
||||
@@ -824,6 +824,17 @@ config LEDS_LM36274
|
||||
Say Y to enable the LM36274 LED driver for TI LMU devices.
|
||||
This supports the LED device LM36274.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/mtd/parsers/redboot.c
|
||||
+++ b/drivers/mtd/parsers/redboot.c
|
||||
@@ -85,12 +85,18 @@ static int parse_redboot_partitions(stru
|
||||
@@ -90,12 +90,18 @@ static int parse_redboot_partitions(stru
|
||||
|
||||
parse_redboot_of(master);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
return -EIO;
|
||||
}
|
||||
offset -= master->erasesize;
|
||||
@@ -103,10 +109,6 @@ static int parse_redboot_partitions(stru
|
||||
@@ -108,10 +114,6 @@ static int parse_redboot_partitions(stru
|
||||
goto nogood;
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
printk(KERN_NOTICE "Searching for RedBoot partition table in %s at offset 0x%lx\n",
|
||||
master->name, offset);
|
||||
@@ -179,6 +181,11 @@ static int parse_redboot_partitions(stru
|
||||
@@ -184,6 +186,11 @@ static int parse_redboot_partitions(stru
|
||||
}
|
||||
if (i == numslots) {
|
||||
/* Didn't find it */
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
PHY capabilities are currently read from the fiber status page, thus
|
||||
Linux won't advertise 10 / 100 Base-T operation modes, effectively
|
||||
limiting operation to 1000 Base-T.
|
||||
|
||||
Statically set the PHYs capabilities, avoiding autodetection.
|
||||
|
||||
The issue itself is properly fixed kernel upstream, however backporting
|
||||
efforts to OpenWrt master resulted in breaking the fiber operation for
|
||||
another target.
|
||||
|
||||
This is currently only known to be necessary for the Ubiquiti
|
||||
UniFi AC series, so enabling it in the ath79 target should not
|
||||
break somewhere else.
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -497,7 +497,7 @@ static struct phy_driver at803x_driver[]
|
||||
.get_wol = at803x_get_wol,
|
||||
.suspend = at803x_suspend,
|
||||
.resume = at803x_resume,
|
||||
- /* PHY_GBIT_FEATURES */
|
||||
+ .features = PHY_GBIT_FEATURES,
|
||||
.read_status = at803x_read_status,
|
||||
.aneg_done = at803x_aneg_done,
|
||||
.ack_interrupt = &at803x_ack_interrupt,
|
||||
@@ -214,7 +214,7 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/ipv6.h>
|
||||
#include <linux/icmpv6.h>
|
||||
@@ -849,10 +850,10 @@ static void tcp_v6_send_response(const s
|
||||
@@ -864,10 +865,10 @@ static void tcp_v6_send_response(const s
|
||||
topt = (__be32 *)(t1 + 1);
|
||||
|
||||
if (tsecr) {
|
||||
@@ -267,7 +267,7 @@
|
||||
case IPV6_2292HOPOPTS:
|
||||
--- a/net/ipv6/exthdrs.c
|
||||
+++ b/net/ipv6/exthdrs.c
|
||||
@@ -752,7 +752,7 @@ static bool ipv6_hop_jumbo(struct sk_buf
|
||||
@@ -751,7 +751,7 @@ static bool ipv6_hop_jumbo(struct sk_buf
|
||||
goto drop;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
+obj-$(CONFIG_MFD_RB4XX_CPLD) += rb4xx-cpld.o
|
||||
--- a/drivers/gpio/Kconfig
|
||||
+++ b/drivers/gpio/Kconfig
|
||||
@@ -1406,6 +1406,12 @@ config GPIO_SODAVILLE
|
||||
@@ -1408,6 +1408,12 @@ config GPIO_SODAVILLE
|
||||
help
|
||||
Say Y here to support Intel Sodaville GPIO.
|
||||
|
||||
|
||||
44
target/linux/ath79/patches-5.4/939-mikrotik-rb91x.patch
Normal file
44
target/linux/ath79/patches-5.4/939-mikrotik-rb91x.patch
Normal file
@@ -0,0 +1,44 @@
|
||||
--- a/drivers/mtd/nand/raw/Kconfig
|
||||
+++ b/drivers/mtd/nand/raw/Kconfig
|
||||
@@ -559,4 +559,8 @@ config MTD_NAND_RB4XX
|
||||
Enables support for the NAND flash chip on Mikrotik Routerboard
|
||||
RB4xx series.
|
||||
|
||||
+config MTD_NAND_RB91X
|
||||
+ tristate "MikroTik RB91x NAND driver support"
|
||||
+ depends on ATH79 && MTD_RAW_NAND
|
||||
+
|
||||
endif # MTD_RAW_NAND
|
||||
--- a/drivers/mtd/nand/raw/Makefile
|
||||
+++ b/drivers/mtd/nand/raw/Makefile
|
||||
@@ -59,6 +59,7 @@ obj-$(CONFIG_MTD_NAND_STM32_FMC2) += stm
|
||||
obj-$(CONFIG_MTD_NAND_MESON) += meson_nand.o
|
||||
obj-$(CONFIG_MTD_NAND_AR934X) += ar934x_nand.o
|
||||
obj-$(CONFIG_MTD_NAND_RB4XX) += nand_rb4xx.o
|
||||
+obj-$(CONFIG_MTD_NAND_RB91X) += rb91x_nand.o
|
||||
|
||||
nand-objs := nand_base.o nand_legacy.o nand_bbt.o nand_timings.o nand_ids.o
|
||||
nand-objs += nand_onfi.o
|
||||
--- a/drivers/gpio/Kconfig
|
||||
+++ b/drivers/gpio/Kconfig
|
||||
@@ -130,6 +130,10 @@ config GPIO_ATH79
|
||||
Select this option to enable GPIO driver for
|
||||
Atheros AR71XX/AR724X/AR913X SoC devices.
|
||||
|
||||
+config GPIO_LATCH
|
||||
+ tristate "MikroTik RouterBOARD GPIO latch support"
|
||||
+ depends on ATH79
|
||||
+
|
||||
config GPIO_RASPBERRYPI_EXP
|
||||
tristate "Raspberry Pi 3 GPIO Expander"
|
||||
default RASPBERRYPI_FIRMWARE
|
||||
--- a/drivers/gpio/Makefile
|
||||
+++ b/drivers/gpio/Makefile
|
||||
@@ -67,6 +67,7 @@ obj-$(CONFIG_GPIO_IT87) += gpio-it87.o
|
||||
obj-$(CONFIG_GPIO_IXP4XX) += gpio-ixp4xx.o
|
||||
obj-$(CONFIG_GPIO_JANZ_TTL) += gpio-janz-ttl.o
|
||||
obj-$(CONFIG_GPIO_KEMPLD) += gpio-kempld.o
|
||||
+obj-$(CONFIG_GPIO_LATCH) += gpio-latch.o
|
||||
obj-$(CONFIG_GPIO_LOONGSON1) += gpio-loongson1.o
|
||||
obj-$(CONFIG_GPIO_LOONGSON) += gpio-loongson.o
|
||||
obj-$(CONFIG_GPIO_LP3943) += gpio-lp3943.o
|
||||
@@ -20,7 +20,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
|
||||
--- a/drivers/dma/Kconfig
|
||||
+++ b/drivers/dma/Kconfig
|
||||
@@ -133,7 +133,7 @@ config COH901318
|
||||
@@ -134,7 +134,7 @@ config COH901318
|
||||
|
||||
config DMA_BCM2835
|
||||
tristate "BCM2835 DMA engine support"
|
||||
|
||||
@@ -1040,7 +1040,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
}
|
||||
--- a/drivers/usb/core/hub.c
|
||||
+++ b/drivers/usb/core/hub.c
|
||||
@@ -5319,7 +5319,7 @@ static void port_event(struct usb_hub *h
|
||||
@@ -5369,7 +5369,7 @@ static void port_event(struct usb_hub *h
|
||||
port_dev->over_current_count++;
|
||||
port_over_current_notify(port_dev);
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
static int bcm2708_fb_register(struct bcm2708_fb *fb)
|
||||
--- a/drivers/video/fbdev/core/fbmem.c
|
||||
+++ b/drivers/video/fbdev/core/fbmem.c
|
||||
@@ -1076,6 +1076,30 @@ fb_blank(struct fb_info *info, int blank
|
||||
@@ -1074,6 +1074,30 @@ fb_blank(struct fb_info *info, int blank
|
||||
}
|
||||
EXPORT_SYMBOL(fb_blank);
|
||||
|
||||
@@ -265,7 +265,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
@@ -1084,6 +1108,7 @@ static long do_fb_ioctl(struct fb_info *
|
||||
@@ -1082,6 +1106,7 @@ static long do_fb_ioctl(struct fb_info *
|
||||
struct fb_fix_screeninfo fix;
|
||||
struct fb_cmap cmap_from;
|
||||
struct fb_cmap_user cmap;
|
||||
@@ -273,7 +273,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
void __user *argp = (void __user *)arg;
|
||||
long ret = 0;
|
||||
|
||||
@@ -1159,6 +1184,15 @@ static long do_fb_ioctl(struct fb_info *
|
||||
@@ -1157,6 +1182,15 @@ static long do_fb_ioctl(struct fb_info *
|
||||
unlock_fb_info(info);
|
||||
console_unlock();
|
||||
break;
|
||||
@@ -289,7 +289,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
default:
|
||||
lock_fb_info(info);
|
||||
fb = info->fbops;
|
||||
@@ -1304,6 +1338,7 @@ static long fb_compat_ioctl(struct file
|
||||
@@ -1302,6 +1336,7 @@ static long fb_compat_ioctl(struct file
|
||||
case FBIOPAN_DISPLAY:
|
||||
case FBIOGET_CON2FBMAP:
|
||||
case FBIOPUT_CON2FBMAP:
|
||||
|
||||
@@ -178,7 +178,7 @@ Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
|
||||
|
||||
--- a/drivers/dma/Kconfig
|
||||
+++ b/drivers/dma/Kconfig
|
||||
@@ -133,7 +133,7 @@ config COH901318
|
||||
@@ -134,7 +134,7 @@ config COH901318
|
||||
|
||||
config DMA_BCM2835
|
||||
tristate "BCM2835 DMA engine support"
|
||||
@@ -187,7 +187,7 @@ Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
|
||||
select DMA_ENGINE
|
||||
select DMA_VIRTUAL_CHANNELS
|
||||
|
||||
@@ -608,6 +608,10 @@ config UNIPHIER_MDMAC
|
||||
@@ -609,6 +609,10 @@ config UNIPHIER_MDMAC
|
||||
UniPhier platform. This DMA controller is used as the external
|
||||
DMA engine of the SD/eMMC controllers of the LD4, Pro4, sLD8 SoCs.
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ Signed-off-by: Yaroslav Rosomakho <yaroslavros@gmail.com>
|
||||
static inline int mmc_blk_part_switch(struct mmc_card *card,
|
||||
unsigned int part_type);
|
||||
|
||||
@@ -2884,6 +2891,7 @@ static int mmc_blk_probe(struct mmc_card
|
||||
@@ -2892,6 +2899,7 @@ static int mmc_blk_probe(struct mmc_card
|
||||
{
|
||||
struct mmc_blk_data *md, *part_md;
|
||||
char cap_str[10];
|
||||
@@ -230,7 +230,7 @@ Signed-off-by: Yaroslav Rosomakho <yaroslavros@gmail.com>
|
||||
|
||||
/*
|
||||
* Check that the card supports the command class(es) we need.
|
||||
@@ -2891,7 +2899,16 @@ static int mmc_blk_probe(struct mmc_card
|
||||
@@ -2899,7 +2907,16 @@ static int mmc_blk_probe(struct mmc_card
|
||||
if (!(card->csd.cmdclass & CCC_BLOCK_READ))
|
||||
return -ENODEV;
|
||||
|
||||
@@ -248,7 +248,7 @@ Signed-off-by: Yaroslav Rosomakho <yaroslavros@gmail.com>
|
||||
|
||||
card->complete_wq = alloc_workqueue("mmc_complete",
|
||||
WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
|
||||
@@ -2906,9 +2923,14 @@ static int mmc_blk_probe(struct mmc_card
|
||||
@@ -2914,9 +2931,14 @@ static int mmc_blk_probe(struct mmc_card
|
||||
|
||||
string_get_size((u64)get_capacity(md->disk), 512, STRING_UNITS_2,
|
||||
cap_str, sizeof(cap_str));
|
||||
@@ -267,7 +267,7 @@ Signed-off-by: Yaroslav Rosomakho <yaroslavros@gmail.com>
|
||||
goto out;
|
||||
--- a/drivers/mmc/core/core.c
|
||||
+++ b/drivers/mmc/core/core.c
|
||||
@@ -1922,7 +1922,8 @@ EXPORT_SYMBOL(mmc_erase);
|
||||
@@ -1925,7 +1925,8 @@ EXPORT_SYMBOL(mmc_erase);
|
||||
int mmc_can_erase(struct mmc_card *card)
|
||||
{
|
||||
if ((card->host->caps & MMC_CAP_ERASE) &&
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 0f95a2f2688ff44dc7080beaa2076741a0bdf510 Mon Sep 17 00:00:00 2001
|
||||
From 2b13c54592135b6fab269517ed687fa9f80bf8e5 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Mon, 27 Nov 2017 17:14:54 +0000
|
||||
Subject: [PATCH] cgroup: Disable cgroup "memory" by default
|
||||
@@ -12,34 +12,46 @@ See: https://github.com/raspberrypi/linux/issues/1950
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
---
|
||||
kernel/cgroup/cgroup.c | 30 ++++++++++++++++++++++++++++++
|
||||
1 file changed, 30 insertions(+)
|
||||
kernel/cgroup/cgroup.c | 38 ++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 38 insertions(+)
|
||||
|
||||
--- a/kernel/cgroup/cgroup.c
|
||||
+++ b/kernel/cgroup/cgroup.c
|
||||
@@ -5722,6 +5722,8 @@ int __init cgroup_init_early(void)
|
||||
@@ -5721,6 +5721,9 @@ int __init cgroup_init_early(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u16 cgroup_disable_mask __initdata;
|
||||
+static u16 cgroup_enable_mask __initdata;
|
||||
+static int __init cgroup_disable(char *str);
|
||||
|
||||
+
|
||||
/**
|
||||
* cgroup_init - cgroup initialization
|
||||
@@ -5761,6 +5763,12 @@ int __init cgroup_init(void)
|
||||
*
|
||||
@@ -5759,6 +5762,12 @@ int __init cgroup_init(void)
|
||||
|
||||
mutex_unlock(&cgroup_mutex);
|
||||
|
||||
+ /* Apply an implicit disable... */
|
||||
+ /*
|
||||
+ * Apply an implicit disable, knowing that an explicit enable will
|
||||
+ * prevent if from doing anything.
|
||||
+ */
|
||||
+ cgroup_disable("memory");
|
||||
+
|
||||
+ /* ...knowing that an explicit enable will override it. */
|
||||
+ cgroup_disable_mask &= ~cgroup_enable_mask;
|
||||
+
|
||||
for_each_subsys(ss, ssid) {
|
||||
if (ss->early_init) {
|
||||
struct cgroup_subsys_state *css =
|
||||
@@ -6180,6 +6188,28 @@ static int __init cgroup_disable(char *s
|
||||
@@ -6168,6 +6177,10 @@ static int __init cgroup_disable(char *s
|
||||
strcmp(token, ss->legacy_name))
|
||||
continue;
|
||||
|
||||
+ /* An explicit cgroup_enable overrides a disable */
|
||||
+ if (cgroup_enable_mask & (1 << i))
|
||||
+ continue;
|
||||
+
|
||||
static_branch_disable(cgroup_subsys_enabled_key[i]);
|
||||
pr_info("Disabling %s control group subsystem\n",
|
||||
ss->name);
|
||||
@@ -6177,6 +6190,31 @@ static int __init cgroup_disable(char *s
|
||||
}
|
||||
__setup("cgroup_disable=", cgroup_disable);
|
||||
|
||||
@@ -59,6 +71,9 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
+ continue;
|
||||
+
|
||||
+ cgroup_enable_mask |= 1 << i;
|
||||
+ static_branch_enable(cgroup_subsys_enabled_key[i]);
|
||||
+ pr_info("Enabling %s control group subsystem\n",
|
||||
+ ss->name);
|
||||
+ }
|
||||
+ }
|
||||
+ return 1;
|
||||
|
||||
@@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/spi/spi-bcm2835.c
|
||||
+++ b/drivers/spi/spi-bcm2835.c
|
||||
@@ -1230,31 +1230,6 @@ static int bcm2835_spi_setup(struct spi_
|
||||
@@ -1236,31 +1236,6 @@ static int bcm2835_spi_setup(struct spi_
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
|
||||
|
||||
switch (state->csi_lanes_in_use) {
|
||||
case 1:
|
||||
@@ -2054,6 +2063,7 @@ static int tc358743_probe(struct i2c_cli
|
||||
@@ -2055,6 +2064,7 @@ static int tc358743_probe(struct i2c_cli
|
||||
if (pdata) {
|
||||
state->pdata = *pdata;
|
||||
state->bus.flags = V4L2_MBUS_CSI2_CONTINUOUS_CLOCK;
|
||||
|
||||
@@ -21,7 +21,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
*/
|
||||
bps_pr_lane = 2 * endpoint.link_frequencies[0];
|
||||
if (bps_pr_lane < 62500000U || bps_pr_lane > 1000000000U) {
|
||||
@@ -1990,23 +1991,41 @@ static int tc358743_probe_of(struct tc35
|
||||
@@ -1991,23 +1992,41 @@ static int tc358743_probe_of(struct tc35
|
||||
state->pdata.refclk_hz * state->pdata.pll_prd;
|
||||
|
||||
/*
|
||||
|
||||
@@ -78,7 +78,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
static void i2c_wr16(struct v4l2_subdev *sd, u16 reg, u16 val)
|
||||
{
|
||||
i2c_wrreg(sd, reg, val, 2);
|
||||
@@ -2064,6 +2081,7 @@ static int tc358743_probe(struct i2c_cli
|
||||
@@ -2065,6 +2082,7 @@ static int tc358743_probe(struct i2c_cli
|
||||
struct tc358743_platform_data *pdata = client->dev.platform_data;
|
||||
struct v4l2_subdev *sd;
|
||||
u16 irq_mask = MASK_HDMI_MSK | MASK_CSI_MSK;
|
||||
@@ -86,7 +86,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
int err;
|
||||
|
||||
if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
|
||||
@@ -2096,7 +2114,8 @@ static int tc358743_probe(struct i2c_cli
|
||||
@@ -2097,7 +2115,8 @@ static int tc358743_probe(struct i2c_cli
|
||||
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
|
||||
|
||||
/* i2c access */
|
||||
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
|
||||
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
|
||||
@@ -2149,7 +2149,7 @@ static void bcmgenet_init_tx_ring(struct
|
||||
@@ -2150,7 +2150,7 @@ static void bcmgenet_init_tx_ring(struct
|
||||
|
||||
bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_PROD_INDEX);
|
||||
bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_CONS_INDEX);
|
||||
@@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
/* Disable rate control for now */
|
||||
bcmgenet_tdma_ring_writel(priv, index, flow_period_val,
|
||||
TDMA_FLOW_PERIOD);
|
||||
@@ -3573,9 +3573,12 @@ static int bcmgenet_probe(struct platfor
|
||||
@@ -3574,9 +3574,12 @@ static int bcmgenet_probe(struct platfor
|
||||
netif_set_real_num_rx_queues(priv->dev, priv->hw_params->rx_queues + 1);
|
||||
|
||||
/* Set default coalescing parameters */
|
||||
|
||||
@@ -23,7 +23,7 @@ Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
|
||||
/* Read as many bytes as possible from FIFO */
|
||||
bcm2835_rd_fifo(bs);
|
||||
/* Write as many bytes as possible to FIFO */
|
||||
@@ -1281,7 +1285,8 @@ static int bcm2835_spi_probe(struct plat
|
||||
@@ -1287,7 +1291,8 @@ static int bcm2835_spi_probe(struct plat
|
||||
bcm2835_wr(bs, BCM2835_SPI_CS,
|
||||
BCM2835_SPI_CS_CLEAR_RX | BCM2835_SPI_CS_CLEAR_TX);
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI)
|
||||
--- a/drivers/usb/host/xhci-ring.c
|
||||
+++ b/drivers/usb/host/xhci-ring.c
|
||||
@@ -527,7 +527,10 @@ void xhci_find_new_dequeue_state(struct
|
||||
@@ -550,7 +550,10 @@ void xhci_find_new_dequeue_state(struct
|
||||
struct xhci_virt_ep *ep = &dev->eps[ep_index];
|
||||
struct xhci_ring *ep_ring;
|
||||
struct xhci_segment *new_seg;
|
||||
@@ -48,7 +48,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
dma_addr_t addr;
|
||||
u64 hw_dequeue;
|
||||
bool cycle_found = false;
|
||||
@@ -565,7 +568,28 @@ void xhci_find_new_dequeue_state(struct
|
||||
@@ -588,7 +591,28 @@ void xhci_find_new_dequeue_state(struct
|
||||
hw_dequeue = xhci_get_hw_deq(xhci, dev, ep_index, stream_id);
|
||||
new_seg = ep_ring->deq_seg;
|
||||
new_deq = ep_ring->dequeue;
|
||||
@@ -80,7 +80,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
/*
|
||||
--- a/drivers/usb/host/xhci.h
|
||||
+++ b/drivers/usb/host/xhci.h
|
||||
@@ -1873,6 +1873,7 @@ struct xhci_hcd {
|
||||
@@ -1874,6 +1874,7 @@ struct xhci_hcd {
|
||||
#define XHCI_DEFAULT_PM_RUNTIME_ALLOW BIT_ULL(33)
|
||||
#define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34)
|
||||
#define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35)
|
||||
|
||||
@@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
#define USB_VENDOR_ID_BELKIN 0x050d
|
||||
#define USB_DEVICE_ID_FLIP_KVM 0x3201
|
||||
|
||||
@@ -1259,6 +1262,9 @@
|
||||
@@ -1261,6 +1264,9 @@
|
||||
#define USB_VENDOR_ID_XAT 0x2505
|
||||
#define USB_DEVICE_ID_XAT_CSR 0x0220
|
||||
|
||||
@@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL },
|
||||
@@ -190,6 +191,7 @@ static const struct hid_device_id hid_qu
|
||||
@@ -192,6 +193,7 @@ static const struct hid_device_id hid_qu
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD2, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT },
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user