Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
42668c51f5
@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.15 = .164
|
||||
LINUX_KERNEL_HASH-5.15.164 = ec6098faed64b8a47ba1772e812a6eb444385f7aa3c60d3e4739ab2fd3b29186
|
||||
LINUX_VERSION-5.15 = .167
|
||||
LINUX_KERNEL_HASH-5.15.167 = b1751f18ece3df08d502dd87a9ab1a317dc0f9486355bf8ee62ba6af0b35da30
|
||||
|
||||
@ -37,7 +37,7 @@ ac_cv_func_rindex=yes
|
||||
ac_cv_func_setlocale=yes
|
||||
ac_cv_func_setgrent_void=yes
|
||||
ac_cv_func_setpgrp_void=yes
|
||||
ac_cv_func_setresuid=no
|
||||
ac_cv_func_setresuid=yes
|
||||
ac_cv_func_setvbuf_reversed=no
|
||||
ac_cv_func_stat_empty_string_bug=no
|
||||
ac_cv_func_stat_ignores_trailing_slash=no
|
||||
|
||||
@ -804,6 +804,7 @@ define KernelPackage/mtdtests
|
||||
$(LINUX_DIR)/drivers/mtd/tests/mtd_speedtest.ko \
|
||||
$(LINUX_DIR)/drivers/mtd/tests/mtd_stresstest.ko \
|
||||
$(LINUX_DIR)/drivers/mtd/tests/mtd_subpagetest.ko \
|
||||
$(LINUX_DIR)/drivers/mtd/tests/mtd_test.ko \
|
||||
$(LINUX_DIR)/drivers/mtd/tests/mtd_torturetest.ko
|
||||
endef
|
||||
|
||||
|
||||
@ -10,13 +10,13 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=6.1.102-1
|
||||
PKG_VERSION:=6.1.110-1
|
||||
PKG_RELEASE:=1
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v6.1.102/
|
||||
PKG_HASH:=c03fd1ed946e5e4b756145ffad7a73fa821630f22c5d442456db16c96be2c9b2
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v6.1.110/
|
||||
PKG_HASH:=2415bc529ca25be0aa597f9638d8b6fc4138080bbaea96881a38101896df6703
|
||||
|
||||
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
|
||||
|
||||
@ -20,7 +20,7 @@ Link: https://lore.kernel.org/r/20221006005842.8599-1-quic_periyasa@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -6418,18 +6418,16 @@ static int ath11k_mac_op_add_interface(s
|
||||
@@ -6425,18 +6425,16 @@ static int ath11k_mac_op_add_interface(s
|
||||
|
||||
ath11k_dp_vdev_tx_attach(ar, arvif);
|
||||
|
||||
@ -42,7 +42,7 @@ Link: https://lore.kernel.org/r/20221006005842.8599-1-quic_periyasa@quicinc.com
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
|
||||
return 0;
|
||||
@@ -6454,7 +6452,6 @@ err_vdev_del:
|
||||
@@ -6461,7 +6459,6 @@ err_vdev_del:
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
|
||||
err:
|
||||
|
||||
@ -90,7 +90,7 @@ Link: https://lore.kernel.org/r/20221007051130.6067-1-quic_mpubbise@quicinc.com
|
||||
|
||||
exit:
|
||||
kfree(arg.chan_list);
|
||||
@@ -9065,6 +9087,9 @@ static int __ath11k_mac_register(struct
|
||||
@@ -9072,6 +9094,9 @@ static int __ath11k_mac_register(struct
|
||||
NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP);
|
||||
}
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ Link: https://lore.kernel.org/r/20221011095346.3901-1-quic_ssreeela@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -6230,6 +6230,40 @@ void ath11k_mac_11d_scan_stop_all(struct
|
||||
@@ -6237,6 +6237,40 @@ void ath11k_mac_11d_scan_stop_all(struct
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ Link: https://lore.kernel.org/r/20221011095346.3901-1-quic_ssreeela@quicinc.com
|
||||
static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
@@ -6465,10 +6499,7 @@ err_peer_del:
|
||||
@@ -6472,10 +6506,7 @@ err_peer_del:
|
||||
}
|
||||
|
||||
err_vdev_del:
|
||||
@ -74,7 +74,7 @@ Link: https://lore.kernel.org/r/20221011095346.3901-1-quic_ssreeela@quicinc.com
|
||||
spin_lock_bh(&ar->data_lock);
|
||||
list_del(&arvif->list);
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
@@ -6496,7 +6527,6 @@ static void ath11k_mac_op_remove_interfa
|
||||
@@ -6503,7 +6534,6 @@ static void ath11k_mac_op_remove_interfa
|
||||
struct ath11k *ar = hw->priv;
|
||||
struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
@ -82,7 +82,7 @@ Link: https://lore.kernel.org/r/20221011095346.3901-1-quic_ssreeela@quicinc.com
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
@@ -6517,29 +6547,13 @@ static void ath11k_mac_op_remove_interfa
|
||||
@@ -6524,29 +6554,13 @@ static void ath11k_mac_op_remove_interfa
|
||||
arvif->vdev_id, ret);
|
||||
}
|
||||
|
||||
|
||||
@ -96,7 +96,7 @@ Link: https://lore.kernel.org/r/20221104085403.11025-1-quic_youghand@quicinc.com
|
||||
struct ath11k_hw_ops {
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -8007,6 +8007,7 @@ ath11k_mac_op_reconfig_complete(struct i
|
||||
@@ -8014,6 +8014,7 @@ ath11k_mac_op_reconfig_complete(struct i
|
||||
struct ath11k *ar = hw->priv;
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
int recovery_count;
|
||||
@ -104,7 +104,7 @@ Link: https://lore.kernel.org/r/20221104085403.11025-1-quic_youghand@quicinc.com
|
||||
|
||||
if (reconfig_type != IEEE80211_RECONFIG_TYPE_RESTART)
|
||||
return;
|
||||
@@ -8042,6 +8043,12 @@ ath11k_mac_op_reconfig_complete(struct i
|
||||
@@ -8049,6 +8050,12 @@ ath11k_mac_op_reconfig_complete(struct i
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "reset success\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -146,7 +146,7 @@ Link: https://lore.kernel.org/r/20221220044435.10506-1-quic_rajkbhag@quicinc.com
|
||||
if (changed & BSS_CHANGED_FILS_DISCOVERY ||
|
||||
changed & BSS_CHANGED_UNSOL_BCAST_PROBE_RESP)
|
||||
ath11k_mac_fils_discovery(arvif, info);
|
||||
@@ -9118,6 +9132,10 @@ static int __ath11k_mac_register(struct
|
||||
@@ -9125,6 +9139,10 @@ static int __ath11k_mac_register(struct
|
||||
wiphy_ext_feature_set(ar->hw->wiphy,
|
||||
NL80211_EXT_FEATURE_SET_SCAN_DWELL);
|
||||
|
||||
|
||||
@ -179,7 +179,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q
|
||||
ath11k_control_beaconing(arvif, info);
|
||||
|
||||
if (arvif->is_up && vif->bss_conf.he_support &&
|
||||
@@ -5389,6 +5512,10 @@ static int ath11k_mac_copy_he_cap(struct
|
||||
@@ -5388,6 +5511,10 @@ static int ath11k_mac_copy_he_cap(struct
|
||||
|
||||
he_cap_elem->mac_cap_info[1] &=
|
||||
IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_MASK;
|
||||
@ -190,7 +190,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q
|
||||
|
||||
he_cap_elem->phy_cap_info[5] &=
|
||||
~IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK;
|
||||
@@ -6023,69 +6150,6 @@ ath11k_mac_setup_vdev_create_params(stru
|
||||
@@ -6030,69 +6157,6 @@ ath11k_mac_setup_vdev_create_params(stru
|
||||
}
|
||||
}
|
||||
|
||||
@ -260,7 +260,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q
|
||||
static void ath11k_mac_op_update_vif_offload(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
@@ -6754,7 +6818,6 @@ ath11k_mac_vdev_start_restart(struct ath
|
||||
@@ -6761,7 +6825,6 @@ ath11k_mac_vdev_start_restart(struct ath
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
struct wmi_vdev_start_req_arg arg = {};
|
||||
const struct cfg80211_chan_def *chandef = &ctx->def;
|
||||
@ -268,7 +268,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q
|
||||
int ret = 0;
|
||||
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
@@ -6795,15 +6858,6 @@ ath11k_mac_vdev_start_restart(struct ath
|
||||
@@ -6802,15 +6865,6 @@ ath11k_mac_vdev_start_restart(struct ath
|
||||
spin_lock_bh(&ab->base_lock);
|
||||
arg.regdomain = ar->ab->dfs_region;
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
|
||||
@ -17,7 +17,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-4-git-send-email-quic_msinada@q
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -5480,6 +5480,27 @@ static __le16 ath11k_mac_setup_he_6ghz_c
|
||||
@@ -5479,6 +5479,27 @@ static __le16 ath11k_mac_setup_he_6ghz_c
|
||||
return cpu_to_le16(bcap->he_6ghz_capa);
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-4-git-send-email-quic_msinada@q
|
||||
static int ath11k_mac_copy_he_cap(struct ath11k *ar,
|
||||
struct ath11k_pdev_cap *cap,
|
||||
struct ieee80211_sband_iftype_data *data,
|
||||
@@ -5541,18 +5562,7 @@ static int ath11k_mac_copy_he_cap(struct
|
||||
@@ -5540,18 +5561,7 @@ static int ath11k_mac_copy_he_cap(struct
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-5-git-send-email-quic_msinada@q
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -5485,20 +5485,36 @@ static void ath11k_mac_set_hemcsmap(stru
|
||||
@@ -5484,20 +5484,36 @@ static void ath11k_mac_set_hemcsmap(stru
|
||||
struct ieee80211_sta_he_cap *he_cap,
|
||||
int band)
|
||||
{
|
||||
|
||||
@ -36,7 +36,7 @@ Link: https://lore.kernel.org/r/20221219053844.4084486-1-quic_mkenna@quicinc.com
|
||||
static int ath11k_hw_mac_id_to_pdev_id_ipq8074(struct ath11k_hw_params *hw,
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -9179,6 +9179,11 @@ static int __ath11k_mac_register(struct
|
||||
@@ -9186,6 +9186,11 @@ static int __ath11k_mac_register(struct
|
||||
goto err_free_if_combs;
|
||||
}
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ Link: https://lore.kernel.org/r/20230309164434.32660-1-quic_hprem@quicinc.com
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3038,39 +3015,51 @@ static int ath11k_dp_rx_reap_mon_status_
|
||||
@@ -3037,39 +3014,51 @@ static int ath11k_dp_rx_reap_mon_status_
|
||||
|
||||
spin_lock_bh(&rx_ring->idr_lock);
|
||||
skb = idr_find(&rx_ring->bufs_idr, buf_id);
|
||||
|
||||
@ -106,7 +106,7 @@ Link: https://lore.kernel.org/r/20230317072034.8217-1-quic_gjothira@quicinc.com
|
||||
(vif->type == NL80211_IFTYPE_AP ||
|
||||
vif->type == NL80211_IFTYPE_MESH_POINT)) {
|
||||
arvif->ftm_responder = info->ftm_responder;
|
||||
@@ -9239,7 +9239,7 @@ static int __ath11k_mac_register(struct
|
||||
@@ -9246,7 +9246,7 @@ static int __ath11k_mac_register(struct
|
||||
wiphy_ext_feature_set(ar->hw->wiphy,
|
||||
NL80211_EXT_FEATURE_SET_SCAN_DWELL);
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ Link: https://lore.kernel.org/r/20230328071150.29645-1-quic_tamizhr@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -6682,6 +6682,11 @@ static void ath11k_mac_op_remove_interfa
|
||||
@@ -6689,6 +6689,11 @@ static void ath11k_mac_op_remove_interfa
|
||||
ath11k_dbg(ab, ATH11K_DBG_MAC, "mac remove interface (vdev %d)\n",
|
||||
arvif->vdev_id);
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ Link: https://lore.kernel.org/r/20230405090425.1351-1-kvalo@kernel.org
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
@@ -3115,8 +3115,11 @@ int ath11k_peer_rx_frag_setup(struct ath
|
||||
@@ -3114,8 +3114,11 @@ int ath11k_peer_rx_frag_setup(struct ath
|
||||
int i;
|
||||
|
||||
tfm = crypto_alloc_shash("michael_mic", 0, 0);
|
||||
|
||||
@ -18,7 +18,7 @@ Link: https://lore.kernel.org/r/20230403184155.8670-3-quic_nmaran@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
@@ -3607,7 +3607,7 @@ static int ath11k_dp_rx_frag_h_mpdu(stru
|
||||
@@ -3606,7 +3606,7 @@ static int ath11k_dp_rx_frag_h_mpdu(stru
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ Link: https://lore.kernel.org/r/1681762947-13882-1-git-send-email-quic_msinada@q
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -5582,10 +5582,6 @@ static int ath11k_mac_copy_he_cap(struct
|
||||
@@ -5581,10 +5581,6 @@ static int ath11k_mac_copy_he_cap(struct
|
||||
|
||||
he_cap_elem->mac_cap_info[1] &=
|
||||
IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_MASK;
|
||||
|
||||
@ -56,7 +56,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-2-quic_alokad@quicinc.com
|
||||
#define ATH11K_QUEUE_LEN 4096
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -9006,19 +9006,23 @@ static int ath11k_mac_setup_iface_combin
|
||||
@@ -9013,19 +9013,23 @@ static int ath11k_mac_setup_iface_combin
|
||||
|
||||
static const u8 ath11k_if_types_ext_capa[] = {
|
||||
[0] = WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING,
|
||||
@ -80,7 +80,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-2-quic_alokad@quicinc.com
|
||||
};
|
||||
|
||||
static const struct wiphy_iftype_ext_capab ath11k_iftypes_ext_capa[] = {
|
||||
@@ -9256,6 +9260,9 @@ static int __ath11k_mac_register(struct
|
||||
@@ -9263,6 +9267,9 @@ static int __ath11k_mac_register(struct
|
||||
wiphy_ext_feature_set(ar->hw->wiphy,
|
||||
NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER);
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-3-quic_alokad@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -6178,17 +6178,62 @@ static void ath11k_mac_op_stop(struct ie
|
||||
@@ -6185,17 +6185,62 @@ static void ath11k_mac_op_stop(struct ie
|
||||
atomic_set(&ar->num_pending_mgmt_tx, 0);
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-3-quic_alokad@quicinc.com
|
||||
|
||||
if (pdev->cap.supported_bands & WMI_HOST_WLAN_2G_CAP) {
|
||||
params->chains[NL80211_BAND_2GHZ].tx = ar->num_tx_chains;
|
||||
@@ -6203,6 +6248,7 @@ ath11k_mac_setup_vdev_create_params(stru
|
||||
@@ -6210,6 +6255,7 @@ ath11k_mac_setup_vdev_create_params(stru
|
||||
params->chains[NL80211_BAND_6GHZ].tx = ar->num_tx_chains;
|
||||
params->chains[NL80211_BAND_6GHZ].rx = ar->num_rx_chains;
|
||||
}
|
||||
@ -97,7 +97,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-3-quic_alokad@quicinc.com
|
||||
}
|
||||
|
||||
static void ath11k_mac_op_update_vif_offload(struct ieee80211_hw *hw,
|
||||
@@ -6497,7 +6543,12 @@ static int ath11k_mac_op_add_interface(s
|
||||
@@ -6504,7 +6550,12 @@ static int ath11k_mac_op_add_interface(s
|
||||
for (i = 0; i < ARRAY_SIZE(vif->hw_queue); i++)
|
||||
vif->hw_queue[i] = i % (ATH11K_HW_MAX_QUEUES - 1);
|
||||
|
||||
@ -111,7 +111,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-3-quic_alokad@quicinc.com
|
||||
|
||||
ret = ath11k_wmi_vdev_create(ar, vif->addr, &vdev_param);
|
||||
if (ret) {
|
||||
@@ -6902,6 +6953,17 @@ ath11k_mac_vdev_start_restart(struct ath
|
||||
@@ -6909,6 +6960,17 @@ ath11k_mac_vdev_start_restart(struct ath
|
||||
arg.pref_tx_streams = ar->num_tx_chains;
|
||||
arg.pref_rx_streams = ar->num_rx_chains;
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-5-quic_alokad@quicinc.com
|
||||
if (ret) {
|
||||
ath11k_warn(ar->ab, "failed to set vdev %d up: %d\n",
|
||||
arvif->vdev_id, ret);
|
||||
@@ -7130,7 +7138,8 @@ ath11k_mac_update_vif_chan(struct ath11k
|
||||
@@ -7137,7 +7145,8 @@ ath11k_mac_update_vif_chan(struct ath11k
|
||||
int n_vifs)
|
||||
{
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
@ -73,7 +73,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-5-quic_alokad@quicinc.com
|
||||
int ret;
|
||||
int i;
|
||||
bool monitor_vif = false;
|
||||
@@ -7184,8 +7193,15 @@ ath11k_mac_update_vif_chan(struct ath11k
|
||||
@@ -7191,8 +7200,15 @@ ath11k_mac_update_vif_chan(struct ath11k
|
||||
ath11k_warn(ab, "failed to update bcn tmpl during csa: %d\n",
|
||||
ret);
|
||||
|
||||
@ -90,7 +90,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-5-quic_alokad@quicinc.com
|
||||
if (ret) {
|
||||
ath11k_warn(ab, "failed to bring vdev up %d: %d\n",
|
||||
arvif->vdev_id, ret);
|
||||
@@ -7303,7 +7319,8 @@ static int ath11k_start_vdev_delay(struc
|
||||
@@ -7310,7 +7326,8 @@ static int ath11k_start_vdev_delay(struc
|
||||
}
|
||||
|
||||
if (arvif->vdev_type == WMI_VDEV_TYPE_MONITOR) {
|
||||
|
||||
@ -31,7 +31,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-2-quic_mkenna@quicinc.com
|
||||
*/
|
||||
|
||||
#include <net/mac80211.h>
|
||||
@@ -4335,6 +4335,20 @@ exit:
|
||||
@@ -4334,6 +4334,20 @@ exit:
|
||||
}
|
||||
|
||||
static int
|
||||
@ -52,7 +52,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-2-quic_mkenna@quicinc.com
|
||||
ath11k_mac_bitrate_mask_num_vht_rates(struct ath11k *ar,
|
||||
enum nl80211_band band,
|
||||
const struct cfg80211_bitrate_mask *mask)
|
||||
@@ -7788,20 +7802,6 @@ static void ath11k_mac_op_flush(struct i
|
||||
@@ -7795,20 +7809,6 @@ static void ath11k_mac_op_flush(struct i
|
||||
ath11k_mac_flush_tx_complete(ar);
|
||||
}
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -4477,6 +4477,54 @@ ath11k_mac_set_peer_he_fixed_rate(struct
|
||||
@@ -4476,6 +4476,54 @@ ath11k_mac_set_peer_he_fixed_rate(struct
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
static int ath11k_station_assoc(struct ath11k *ar,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta,
|
||||
@@ -4488,7 +4536,7 @@ static int ath11k_station_assoc(struct a
|
||||
@@ -4487,7 +4535,7 @@ static int ath11k_station_assoc(struct a
|
||||
struct cfg80211_chan_def def;
|
||||
enum nl80211_band band;
|
||||
struct cfg80211_bitrate_mask *mask;
|
||||
@ -91,7 +91,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
|
||||
@@ -4516,6 +4564,7 @@ static int ath11k_station_assoc(struct a
|
||||
@@ -4515,6 +4563,7 @@ static int ath11k_station_assoc(struct a
|
||||
|
||||
num_vht_rates = ath11k_mac_bitrate_mask_num_vht_rates(ar, band, mask);
|
||||
num_he_rates = ath11k_mac_bitrate_mask_num_he_rates(ar, band, mask);
|
||||
@ -99,7 +99,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
|
||||
/* If single VHT/HE rate is configured (by set_bitrate_mask()),
|
||||
* peer_assoc will disable VHT/HE. This is now enabled by a peer specific
|
||||
@@ -4532,6 +4581,11 @@ static int ath11k_station_assoc(struct a
|
||||
@@ -4531,6 +4580,11 @@ static int ath11k_station_assoc(struct a
|
||||
band);
|
||||
if (ret)
|
||||
return ret;
|
||||
@ -111,7 +111,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
}
|
||||
|
||||
/* Re-assoc is run only to update supported rates for given station. It
|
||||
@@ -4605,7 +4659,7 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
@@ -4604,7 +4658,7 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
const u16 *vht_mcs_mask;
|
||||
const u16 *he_mcs_mask;
|
||||
u32 changed, bw, nss, smps, bw_prev;
|
||||
@ -120,7 +120,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
const struct cfg80211_bitrate_mask *mask;
|
||||
struct peer_assoc_params peer_arg;
|
||||
enum wmi_phy_mode peer_phymode;
|
||||
@@ -4721,6 +4775,8 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
@@ -4720,6 +4774,8 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
|
||||
if (changed & IEEE80211_RC_SUPP_RATES_CHANGED) {
|
||||
mask = &arvif->bitrate_mask;
|
||||
@ -129,7 +129,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
num_vht_rates = ath11k_mac_bitrate_mask_num_vht_rates(ar, band,
|
||||
mask);
|
||||
num_he_rates = ath11k_mac_bitrate_mask_num_he_rates(ar, band,
|
||||
@@ -4743,6 +4799,9 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
@@ -4742,6 +4798,9 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
} else if (sta->deflink.he_cap.has_he && num_he_rates == 1) {
|
||||
ath11k_mac_set_peer_he_fixed_rate(arvif, sta, mask,
|
||||
band);
|
||||
|
||||
@ -226,7 +226,7 @@ Link: https://lore.kernel.org/r/20230517135934.16408-4-quic_rajkbhag@quicinc.com
|
||||
|
||||
if (pdev && pdev->pdev_id == pdev_id)
|
||||
return (pdev->ar ? pdev->ar : NULL);
|
||||
@@ -6268,6 +6271,11 @@ static int ath11k_mac_op_start(struct ie
|
||||
@@ -6275,6 +6278,11 @@ static int ath11k_mac_op_start(struct ie
|
||||
struct ath11k_pdev *pdev = ar->pdev;
|
||||
int ret;
|
||||
|
||||
@ -238,7 +238,7 @@ Link: https://lore.kernel.org/r/20230517135934.16408-4-quic_rajkbhag@quicinc.com
|
||||
ath11k_mac_drain_tx(ar);
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
|
||||
@@ -6282,6 +6290,7 @@ static int ath11k_mac_op_start(struct ie
|
||||
@@ -6289,6 +6297,7 @@ static int ath11k_mac_op_start(struct ie
|
||||
case ATH11K_STATE_RESTARTED:
|
||||
case ATH11K_STATE_WEDGED:
|
||||
case ATH11K_STATE_ON:
|
||||
|
||||
@ -8,7 +8,7 @@ Subject: [PATCH] mac80211: allow scans in access point mode (for site survey)
|
||||
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -2733,6 +2733,8 @@ static int ieee80211_scan(struct wiphy *
|
||||
@@ -2734,6 +2734,8 @@ static int ieee80211_scan(struct wiphy *
|
||||
*/
|
||||
fallthrough;
|
||||
case NL80211_IFTYPE_AP:
|
||||
|
||||
@ -36,7 +36,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.remove_interface = ar5523_remove_interface,
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -8592,6 +8592,7 @@ err_fallback:
|
||||
@@ -8599,6 +8599,7 @@ err_fallback:
|
||||
|
||||
static const struct ieee80211_ops ath11k_ops = {
|
||||
.tx = ath11k_mac_op_tx,
|
||||
|
||||
@ -11,7 +11,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -4358,9 +4358,6 @@ static int ieee80211_get_txq_stats(struc
|
||||
@@ -4359,9 +4359,6 @@ static int ieee80211_get_txq_stats(struc
|
||||
struct ieee80211_sub_if_data *sdata;
|
||||
int ret = 0;
|
||||
|
||||
@ -36,7 +36,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/net/mac80211/debugfs_netdev.c
|
||||
+++ b/net/mac80211/debugfs_netdev.c
|
||||
@@ -677,8 +677,7 @@ static void add_common_files(struct ieee
|
||||
@@ -675,8 +675,7 @@ static void add_common_files(struct ieee
|
||||
DEBUGFS_ADD(rc_rateidx_vht_mcs_mask_5ghz);
|
||||
DEBUGFS_ADD(hw_queues);
|
||||
|
||||
@ -63,7 +63,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
NL80211_EXT_FEATURE_AQL))
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -2302,7 +2302,6 @@ void ieee80211_wake_queue_by_reason(stru
|
||||
@@ -2301,7 +2301,6 @@ void ieee80211_wake_queue_by_reason(stru
|
||||
void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue,
|
||||
enum queue_stop_reason reason,
|
||||
bool refcounted);
|
||||
@ -73,7 +73,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
void ieee80211_add_pending_skbs(struct ieee80211_local *local,
|
||||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -460,12 +460,6 @@ static void ieee80211_do_stop(struct iee
|
||||
@@ -481,12 +481,6 @@ static void ieee80211_do_stop(struct iee
|
||||
if (cancel_scan)
|
||||
ieee80211_scan_cancel(local);
|
||||
|
||||
@ -86,7 +86,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
ieee80211_roc_purge(local, sdata);
|
||||
|
||||
switch (sdata->vif.type) {
|
||||
@@ -813,25 +807,6 @@ static void ieee80211_uninit(struct net_
|
||||
@@ -834,25 +828,6 @@ static void ieee80211_uninit(struct net_
|
||||
ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev));
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
static void
|
||||
ieee80211_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats)
|
||||
{
|
||||
@@ -845,7 +820,6 @@ static const struct net_device_ops ieee8
|
||||
@@ -866,7 +841,6 @@ static const struct net_device_ops ieee8
|
||||
.ndo_start_xmit = ieee80211_subif_start_xmit,
|
||||
.ndo_set_rx_mode = ieee80211_set_multicast_list,
|
||||
.ndo_set_mac_address = ieee80211_change_mac,
|
||||
@ -120,7 +120,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.ndo_get_stats64 = ieee80211_get_stats64,
|
||||
};
|
||||
|
||||
@@ -967,7 +941,6 @@ static const struct net_device_ops ieee8
|
||||
@@ -988,7 +962,6 @@ static const struct net_device_ops ieee8
|
||||
.ndo_start_xmit = ieee80211_subif_start_xmit_8023,
|
||||
.ndo_set_rx_mode = ieee80211_set_multicast_list,
|
||||
.ndo_set_mac_address = ieee80211_change_mac,
|
||||
@ -128,7 +128,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.ndo_get_stats64 = ieee80211_get_stats64,
|
||||
#if LINUX_VERSION_IS_GEQ(5,13,0)
|
||||
.ndo_fill_forward_path = ieee80211_netdev_fill_forward_path,
|
||||
@@ -1471,35 +1444,6 @@ int ieee80211_do_open(struct wireless_de
|
||||
@@ -1492,35 +1465,6 @@ int ieee80211_do_open(struct wireless_de
|
||||
|
||||
ieee80211_recalc_ps(local);
|
||||
|
||||
@ -164,7 +164,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
set_bit(SDATA_STATE_RUNNING, &sdata->state);
|
||||
|
||||
return 0;
|
||||
@@ -1529,17 +1473,12 @@ static void ieee80211_if_setup(struct ne
|
||||
@@ -1550,17 +1494,12 @@ static void ieee80211_if_setup(struct ne
|
||||
{
|
||||
ether_setup(dev);
|
||||
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
|
||||
@ -183,7 +183,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
static void ieee80211_iface_process_skb(struct ieee80211_local *local,
|
||||
struct ieee80211_sub_if_data *sdata,
|
||||
struct sk_buff *skb)
|
||||
@@ -2124,9 +2063,7 @@ int ieee80211_if_add(struct ieee80211_lo
|
||||
@@ -2145,9 +2084,7 @@ int ieee80211_if_add(struct ieee80211_lo
|
||||
struct net_device *ndev = NULL;
|
||||
struct ieee80211_sub_if_data *sdata = NULL;
|
||||
struct txq_info *txqi;
|
||||
@ -193,7 +193,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
ASSERT_RTNL();
|
||||
|
||||
@@ -2149,30 +2086,18 @@ int ieee80211_if_add(struct ieee80211_lo
|
||||
@@ -2170,30 +2107,18 @@ int ieee80211_if_add(struct ieee80211_lo
|
||||
sizeof(void *));
|
||||
int txq_size = 0;
|
||||
|
||||
@ -317,7 +317,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
int i;
|
||||
|
||||
sta = kzalloc(sizeof(*sta) + hw->sta_data_size, gfp);
|
||||
@@ -600,21 +599,18 @@ __sta_info_alloc(struct ieee80211_sub_if
|
||||
@@ -603,21 +602,18 @@ __sta_info_alloc(struct ieee80211_sub_if
|
||||
|
||||
sta->last_connected = ktime_get_seconds();
|
||||
|
||||
@ -348,7 +348,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
}
|
||||
|
||||
if (sta_prepare_rate_control(local, sta, gfp))
|
||||
@@ -688,8 +684,7 @@ __sta_info_alloc(struct ieee80211_sub_if
|
||||
@@ -691,8 +687,7 @@ __sta_info_alloc(struct ieee80211_sub_if
|
||||
return sta;
|
||||
|
||||
free_txq:
|
||||
@ -358,7 +358,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
free:
|
||||
sta_info_free_link(&sta->deflink);
|
||||
#ifdef CPTCFG_MAC80211_MESH
|
||||
@@ -1965,9 +1960,6 @@ ieee80211_sta_ps_deliver_response(struct
|
||||
@@ -1982,9 +1977,6 @@ ieee80211_sta_ps_deliver_response(struct
|
||||
* TIM recalculation.
|
||||
*/
|
||||
|
||||
@ -368,7 +368,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
for (tid = 0; tid < ARRAY_SIZE(sta->sta.txq); tid++) {
|
||||
if (!sta->sta.txq[tid] ||
|
||||
!(driver_release_tids & BIT(tid)) ||
|
||||
@@ -2452,7 +2444,7 @@ static void sta_set_tidstats(struct sta_
|
||||
@@ -2469,7 +2461,7 @@ static void sta_set_tidstats(struct sta_
|
||||
tidstats->tx_msdu_failed = sta->deflink.status_stats.msdu_failed[tid];
|
||||
}
|
||||
|
||||
@ -377,7 +377,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
spin_lock_bh(&local->fq.lock);
|
||||
rcu_read_lock();
|
||||
|
||||
@@ -2780,9 +2772,6 @@ unsigned long ieee80211_sta_last_active(
|
||||
@@ -2797,9 +2789,6 @@ unsigned long ieee80211_sta_last_active(
|
||||
|
||||
static void sta_update_codel_params(struct sta_info *sta, u32 thr)
|
||||
{
|
||||
|
||||
@ -80,7 +80,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -2197,6 +2197,7 @@ int ieee80211_if_add(struct ieee80211_lo
|
||||
@@ -2218,6 +2218,7 @@ int ieee80211_if_add(struct ieee80211_lo
|
||||
ndev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
|
||||
ndev->hw_features |= ndev->features &
|
||||
MAC80211_SUPPORTED_FEATURES_TX;
|
||||
|
||||
@ -1,87 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Thu, 1 Dec 2022 14:57:30 +0100
|
||||
Subject: [PATCH] wifi: mac80211: fix and simplify unencrypted drop check for
|
||||
mesh
|
||||
|
||||
ieee80211_drop_unencrypted is called from ieee80211_rx_h_mesh_fwding and
|
||||
ieee80211_frame_allowed.
|
||||
|
||||
Since ieee80211_rx_h_mesh_fwding can forward packets for other mesh nodes
|
||||
and is called earlier, it needs to check the decryptions status and if the
|
||||
packet is using the control protocol on its own, instead of deferring to
|
||||
the later call from ieee80211_frame_allowed.
|
||||
|
||||
Because of that, ieee80211_drop_unencrypted has a mesh specific check
|
||||
that skips over the mesh header in order to check the payload protocol.
|
||||
This code is invalid when called from ieee80211_frame_allowed, since that
|
||||
happens after the 802.11->802.3 conversion.
|
||||
|
||||
Fix this by moving the mesh specific check directly into
|
||||
ieee80211_rx_h_mesh_fwding.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
Link: https://lore.kernel.org/r/20221201135730.19723-1-nbd@nbd.name
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2405,7 +2405,6 @@ static int ieee80211_802_1x_port_control
|
||||
|
||||
static int ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc)
|
||||
{
|
||||
- struct ieee80211_hdr *hdr = (void *)rx->skb->data;
|
||||
struct sk_buff *skb = rx->skb;
|
||||
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
|
||||
|
||||
@@ -2416,31 +2415,6 @@ static int ieee80211_drop_unencrypted(st
|
||||
if (status->flag & RX_FLAG_DECRYPTED)
|
||||
return 0;
|
||||
|
||||
- /* check mesh EAPOL frames first */
|
||||
- if (unlikely(rx->sta && ieee80211_vif_is_mesh(&rx->sdata->vif) &&
|
||||
- ieee80211_is_data(fc))) {
|
||||
- struct ieee80211s_hdr *mesh_hdr;
|
||||
- u16 hdr_len = ieee80211_hdrlen(fc);
|
||||
- u16 ethertype_offset;
|
||||
- __be16 ethertype;
|
||||
-
|
||||
- if (!ether_addr_equal(hdr->addr1, rx->sdata->vif.addr))
|
||||
- goto drop_check;
|
||||
-
|
||||
- /* make sure fixed part of mesh header is there, also checks skb len */
|
||||
- if (!pskb_may_pull(rx->skb, hdr_len + 6))
|
||||
- goto drop_check;
|
||||
-
|
||||
- mesh_hdr = (struct ieee80211s_hdr *)(skb->data + hdr_len);
|
||||
- ethertype_offset = hdr_len + ieee80211_get_mesh_hdrlen(mesh_hdr) +
|
||||
- sizeof(rfc1042_header);
|
||||
-
|
||||
- if (skb_copy_bits(rx->skb, ethertype_offset, ðertype, 2) == 0 &&
|
||||
- ethertype == rx->sdata->control_port_protocol)
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
-drop_check:
|
||||
/* Drop unencrypted frames if key is set. */
|
||||
if (unlikely(!ieee80211_has_protected(fc) &&
|
||||
!ieee80211_is_any_nullfunc(fc) &&
|
||||
@@ -2898,8 +2872,16 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
|
||||
hdr = (struct ieee80211_hdr *) skb->data;
|
||||
mesh_hdr = (struct ieee80211s_hdr *) (skb->data + hdrlen);
|
||||
|
||||
- if (ieee80211_drop_unencrypted(rx, hdr->frame_control))
|
||||
- return RX_DROP_MONITOR;
|
||||
+ if (ieee80211_drop_unencrypted(rx, hdr->frame_control)) {
|
||||
+ int offset = hdrlen + ieee80211_get_mesh_hdrlen(mesh_hdr) +
|
||||
+ sizeof(rfc1042_header);
|
||||
+ __be16 ethertype;
|
||||
+
|
||||
+ if (!ether_addr_equal(hdr->addr1, rx->sdata->vif.addr) ||
|
||||
+ skb_copy_bits(rx->skb, offset, ðertype, 2) != 0 ||
|
||||
+ ethertype != rx->sdata->control_port_protocol)
|
||||
+ return RX_DROP_MONITOR;
|
||||
+ }
|
||||
|
||||
/* frame is in RMC, don't forward */
|
||||
if (ieee80211_is_data(hdr->frame_control) &&
|
||||
@ -1,25 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Fri, 2 Dec 2022 13:53:11 +0100
|
||||
Subject: [PATCH] wifi: cfg80211: move A-MSDU check in
|
||||
ieee80211_data_to_8023_exthdr
|
||||
|
||||
When parsing the outer A-MSDU header, don't check for inner bridge tunnel
|
||||
or RFC1042 headers. This is handled by ieee80211_amsdu_to_8023s already.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/wireless/util.c
|
||||
+++ b/net/wireless/util.c
|
||||
@@ -631,8 +631,9 @@ int ieee80211_data_to_8023_exthdr(struct
|
||||
break;
|
||||
}
|
||||
|
||||
- if (likely(skb_copy_bits(skb, hdrlen, &payload, sizeof(payload)) == 0 &&
|
||||
- ((!is_amsdu && ether_addr_equal(payload.hdr, rfc1042_header) &&
|
||||
+ if (likely(!is_amsdu &&
|
||||
+ skb_copy_bits(skb, hdrlen, &payload, sizeof(payload)) == 0 &&
|
||||
+ ((ether_addr_equal(payload.hdr, rfc1042_header) &&
|
||||
payload.proto != htons(ETH_P_AARP) &&
|
||||
payload.proto != htons(ETH_P_IPX)) ||
|
||||
ether_addr_equal(payload.hdr, bridge_tunnel_header)))) {
|
||||
@ -1,76 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Fri, 2 Dec 2022 13:54:15 +0100
|
||||
Subject: [PATCH] wifi: cfg80211: factor out bridge tunnel / RFC1042 header
|
||||
check
|
||||
|
||||
The same check is done in multiple places, unify it.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/wireless/util.c
|
||||
+++ b/net/wireless/util.c
|
||||
@@ -542,6 +542,21 @@ unsigned int ieee80211_get_mesh_hdrlen(s
|
||||
}
|
||||
EXPORT_SYMBOL(ieee80211_get_mesh_hdrlen);
|
||||
|
||||
+static bool ieee80211_get_8023_tunnel_proto(const void *hdr, __be16 *proto)
|
||||
+{
|
||||
+ const __be16 *hdr_proto = hdr + ETH_ALEN;
|
||||
+
|
||||
+ if (!(ether_addr_equal(hdr, rfc1042_header) &&
|
||||
+ *hdr_proto != htons(ETH_P_AARP) &&
|
||||
+ *hdr_proto != htons(ETH_P_IPX)) &&
|
||||
+ !ether_addr_equal(hdr, bridge_tunnel_header))
|
||||
+ return false;
|
||||
+
|
||||
+ *proto = *hdr_proto;
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
int ieee80211_data_to_8023_exthdr(struct sk_buff *skb, struct ethhdr *ehdr,
|
||||
const u8 *addr, enum nl80211_iftype iftype,
|
||||
u8 data_offset, bool is_amsdu)
|
||||
@@ -633,14 +648,9 @@ int ieee80211_data_to_8023_exthdr(struct
|
||||
|
||||
if (likely(!is_amsdu &&
|
||||
skb_copy_bits(skb, hdrlen, &payload, sizeof(payload)) == 0 &&
|
||||
- ((ether_addr_equal(payload.hdr, rfc1042_header) &&
|
||||
- payload.proto != htons(ETH_P_AARP) &&
|
||||
- payload.proto != htons(ETH_P_IPX)) ||
|
||||
- ether_addr_equal(payload.hdr, bridge_tunnel_header)))) {
|
||||
- /* remove RFC1042 or Bridge-Tunnel encapsulation and
|
||||
- * replace EtherType */
|
||||
+ ieee80211_get_8023_tunnel_proto(&payload, &tmp.h_proto))) {
|
||||
+ /* remove RFC1042 or Bridge-Tunnel encapsulation */
|
||||
hdrlen += ETH_ALEN + 2;
|
||||
- tmp.h_proto = payload.proto;
|
||||
skb_postpull_rcsum(skb, &payload, ETH_ALEN + 2);
|
||||
} else {
|
||||
tmp.h_proto = htons(skb->len - hdrlen);
|
||||
@@ -756,8 +766,6 @@ void ieee80211_amsdu_to_8023s(struct sk_
|
||||
{
|
||||
unsigned int hlen = ALIGN(extra_headroom, 4);
|
||||
struct sk_buff *frame = NULL;
|
||||
- u16 ethertype;
|
||||
- u8 *payload;
|
||||
int offset = 0, remaining;
|
||||
struct ethhdr eth;
|
||||
bool reuse_frag = skb->head_frag && !skb_has_frag_list(skb);
|
||||
@@ -811,14 +819,8 @@ void ieee80211_amsdu_to_8023s(struct sk_
|
||||
frame->dev = skb->dev;
|
||||
frame->priority = skb->priority;
|
||||
|
||||
- payload = frame->data;
|
||||
- ethertype = (payload[6] << 8) | payload[7];
|
||||
- if (likely((ether_addr_equal(payload, rfc1042_header) &&
|
||||
- ethertype != ETH_P_AARP && ethertype != ETH_P_IPX) ||
|
||||
- ether_addr_equal(payload, bridge_tunnel_header))) {
|
||||
- eth.h_proto = htons(ethertype);
|
||||
+ if (likely(ieee80211_get_8023_tunnel_proto(frame->data, ð.h_proto)))
|
||||
skb_pull(frame, ETH_ALEN + 2);
|
||||
- }
|
||||
|
||||
memcpy(skb_push(frame, sizeof(eth)), ð, sizeof(eth));
|
||||
__skb_queue_tail(list, frame);
|
||||
@ -1,54 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Fri, 2 Dec 2022 17:01:46 +0100
|
||||
Subject: [PATCH] wifi: mac80211: remove mesh forwarding congestion check
|
||||
|
||||
Now that all drivers use iTXQ, it does not make sense to check to drop
|
||||
tx forwarding packets when the driver has stopped the queues.
|
||||
fq_codel will take care of dropping packets when the queues fill up
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/debugfs_netdev.c
|
||||
+++ b/net/mac80211/debugfs_netdev.c
|
||||
@@ -603,8 +603,6 @@ IEEE80211_IF_FILE(fwded_mcast, u.mesh.ms
|
||||
IEEE80211_IF_FILE(fwded_unicast, u.mesh.mshstats.fwded_unicast, DEC);
|
||||
IEEE80211_IF_FILE(fwded_frames, u.mesh.mshstats.fwded_frames, DEC);
|
||||
IEEE80211_IF_FILE(dropped_frames_ttl, u.mesh.mshstats.dropped_frames_ttl, DEC);
|
||||
-IEEE80211_IF_FILE(dropped_frames_congestion,
|
||||
- u.mesh.mshstats.dropped_frames_congestion, DEC);
|
||||
IEEE80211_IF_FILE(dropped_frames_no_route,
|
||||
u.mesh.mshstats.dropped_frames_no_route, DEC);
|
||||
|
||||
@@ -740,7 +738,6 @@ static void add_mesh_stats(struct ieee80
|
||||
MESHSTATS_ADD(fwded_frames);
|
||||
MESHSTATS_ADD(dropped_frames_ttl);
|
||||
MESHSTATS_ADD(dropped_frames_no_route);
|
||||
- MESHSTATS_ADD(dropped_frames_congestion);
|
||||
#undef MESHSTATS_ADD
|
||||
}
|
||||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -333,7 +333,6 @@ struct mesh_stats {
|
||||
__u32 fwded_frames; /* Mesh total forwarded frames */
|
||||
__u32 dropped_frames_ttl; /* Not transmitted since mesh_ttl == 0*/
|
||||
__u32 dropped_frames_no_route; /* Not transmitted, no route found */
|
||||
- __u32 dropped_frames_congestion;/* Not forwarded due to congestion */
|
||||
};
|
||||
|
||||
#define PREQ_Q_F_START 0x1
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2932,11 +2932,6 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
|
||||
return RX_CONTINUE;
|
||||
|
||||
ac = ieee802_1d_to_ac[skb->priority];
|
||||
- q = sdata->vif.hw_queue[ac];
|
||||
- if (ieee80211_queue_stopped(&local->hw, q)) {
|
||||
- IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_congestion);
|
||||
- return RX_DROP_MONITOR;
|
||||
- }
|
||||
skb_set_queue_mapping(skb, ac);
|
||||
|
||||
if (!--mesh_hdr->ttl) {
|
||||
@ -1,753 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Tue, 6 Dec 2022 11:15:02 +0100
|
||||
Subject: [PATCH] wifi: mac80211: fix receiving A-MSDU frames on mesh
|
||||
interfaces
|
||||
|
||||
The current mac80211 mesh A-MSDU receive path fails to parse A-MSDU packets
|
||||
on mesh interfaces, because it assumes that the Mesh Control field is always
|
||||
directly after the 802.11 header.
|
||||
802.11-2020 9.3.2.2.2 Figure 9-70 shows that the Mesh Control field is
|
||||
actually part of the A-MSDU subframe header.
|
||||
This makes more sense, since it allows packets for multiple different
|
||||
destinations to be included in the same A-MSDU, as long as RA and TID are
|
||||
still the same.
|
||||
Another issue is the fact that the A-MSDU subframe length field was apparently
|
||||
accidentally defined as little-endian in the standard.
|
||||
|
||||
In order to fix this, the mesh forwarding path needs happen at a different
|
||||
point in the receive path.
|
||||
|
||||
ieee80211_data_to_8023_exthdr is changed to ignore the mesh control field
|
||||
and leave it in after the ethernet header. This also affects the source/dest
|
||||
MAC address fields, which now in the case of mesh point to the mesh SA/DA.
|
||||
|
||||
ieee80211_amsdu_to_8023s is changed to deal with the endian difference and
|
||||
to add the Mesh Control length to the subframe length, since it's not covered
|
||||
by the MSDU length field.
|
||||
|
||||
With these changes, the mac80211 will get the same packet structure for
|
||||
converted regular data packets and unpacked A-MSDU subframes.
|
||||
|
||||
The mesh forwarding checks are now only performed after the A-MSDU decap.
|
||||
For locally received packets, the Mesh Control header is stripped away.
|
||||
For forwarded packets, a new 802.11 header gets added.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c
|
||||
@@ -33,7 +33,7 @@ static int mwifiex_11n_dispatch_amsdu_pk
|
||||
skb_trim(skb, le16_to_cpu(local_rx_pd->rx_pkt_length));
|
||||
|
||||
ieee80211_amsdu_to_8023s(skb, &list, priv->curr_addr,
|
||||
- priv->wdev.iftype, 0, NULL, NULL);
|
||||
+ priv->wdev.iftype, 0, NULL, NULL, false);
|
||||
|
||||
while (!skb_queue_empty(&list)) {
|
||||
struct rx_packet_hdr *rx_hdr;
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -6324,11 +6324,36 @@ static inline int ieee80211_data_to_8023
|
||||
* @extra_headroom: The hardware extra headroom for SKBs in the @list.
|
||||
* @check_da: DA to check in the inner ethernet header, or NULL
|
||||
* @check_sa: SA to check in the inner ethernet header, or NULL
|
||||
+ * @mesh_control: A-MSDU subframe header includes the mesh control field
|
||||
*/
|
||||
void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list,
|
||||
const u8 *addr, enum nl80211_iftype iftype,
|
||||
const unsigned int extra_headroom,
|
||||
- const u8 *check_da, const u8 *check_sa);
|
||||
+ const u8 *check_da, const u8 *check_sa,
|
||||
+ bool mesh_control);
|
||||
+
|
||||
+/**
|
||||
+ * ieee80211_get_8023_tunnel_proto - get RFC1042 or bridge tunnel encap protocol
|
||||
+ *
|
||||
+ * Check for RFC1042 or bridge tunnel header and fetch the encapsulated
|
||||
+ * protocol.
|
||||
+ *
|
||||
+ * @hdr: pointer to the MSDU payload
|
||||
+ * @proto: destination pointer to store the protocol
|
||||
+ * Return: true if encapsulation was found
|
||||
+ */
|
||||
+bool ieee80211_get_8023_tunnel_proto(const void *hdr, __be16 *proto);
|
||||
+
|
||||
+/**
|
||||
+ * ieee80211_strip_8023_mesh_hdr - strip mesh header from converted 802.3 frames
|
||||
+ *
|
||||
+ * Strip the mesh header, which was left in by ieee80211_data_to_8023 as part
|
||||
+ * of the MSDU data. Also move any source/destination addresses from the mesh
|
||||
+ * header to the ethernet header (if present).
|
||||
+ *
|
||||
+ * @skb: The 802.3 frame with embedded mesh header
|
||||
+ */
|
||||
+int ieee80211_strip_8023_mesh_hdr(struct sk_buff *skb);
|
||||
|
||||
/**
|
||||
* cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2726,6 +2726,174 @@ ieee80211_deliver_skb(struct ieee80211_r
|
||||
}
|
||||
}
|
||||
|
||||
+static ieee80211_rx_result
|
||||
+ieee80211_rx_mesh_data(struct ieee80211_sub_if_data *sdata, struct sta_info *sta,
|
||||
+ struct sk_buff *skb)
|
||||
+{
|
||||
+#ifdef CPTCFG_MAC80211_MESH
|
||||
+ struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
|
||||
+ struct ieee80211_local *local = sdata->local;
|
||||
+ uint16_t fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_DATA;
|
||||
+ struct ieee80211_hdr hdr = {
|
||||
+ .frame_control = cpu_to_le16(fc)
|
||||
+ };
|
||||
+ struct ieee80211_hdr *fwd_hdr;
|
||||
+ struct ieee80211s_hdr *mesh_hdr;
|
||||
+ struct ieee80211_tx_info *info;
|
||||
+ struct sk_buff *fwd_skb;
|
||||
+ struct ethhdr *eth;
|
||||
+ bool multicast;
|
||||
+ int tailroom = 0;
|
||||
+ int hdrlen, mesh_hdrlen;
|
||||
+ u8 *qos;
|
||||
+
|
||||
+ if (!ieee80211_vif_is_mesh(&sdata->vif))
|
||||
+ return RX_CONTINUE;
|
||||
+
|
||||
+ if (!pskb_may_pull(skb, sizeof(*eth) + 6))
|
||||
+ return RX_DROP_MONITOR;
|
||||
+
|
||||
+ mesh_hdr = (struct ieee80211s_hdr *)(skb->data + sizeof(*eth));
|
||||
+ mesh_hdrlen = ieee80211_get_mesh_hdrlen(mesh_hdr);
|
||||
+
|
||||
+ if (!pskb_may_pull(skb, sizeof(*eth) + mesh_hdrlen))
|
||||
+ return RX_DROP_MONITOR;
|
||||
+
|
||||
+ eth = (struct ethhdr *)skb->data;
|
||||
+ multicast = is_multicast_ether_addr(eth->h_dest);
|
||||
+
|
||||
+ mesh_hdr = (struct ieee80211s_hdr *)(eth + 1);
|
||||
+ if (!mesh_hdr->ttl)
|
||||
+ return RX_DROP_MONITOR;
|
||||
+
|
||||
+ /* frame is in RMC, don't forward */
|
||||
+ if (is_multicast_ether_addr(eth->h_dest) &&
|
||||
+ mesh_rmc_check(sdata, eth->h_source, mesh_hdr))
|
||||
+ return RX_DROP_MONITOR;
|
||||
+
|
||||
+ /* Frame has reached destination. Don't forward */
|
||||
+ if (ether_addr_equal(sdata->vif.addr, eth->h_dest))
|
||||
+ goto rx_accept;
|
||||
+
|
||||
+ if (!ifmsh->mshcfg.dot11MeshForwarding) {
|
||||
+ if (is_multicast_ether_addr(eth->h_dest))
|
||||
+ goto rx_accept;
|
||||
+
|
||||
+ return RX_DROP_MONITOR;
|
||||
+ }
|
||||
+
|
||||
+ /* forward packet */
|
||||
+ if (sdata->crypto_tx_tailroom_needed_cnt)
|
||||
+ tailroom = IEEE80211_ENCRYPT_TAILROOM;
|
||||
+
|
||||
+ if (!--mesh_hdr->ttl) {
|
||||
+ if (multicast)
|
||||
+ goto rx_accept;
|
||||
+
|
||||
+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_ttl);
|
||||
+ return RX_DROP_MONITOR;
|
||||
+ }
|
||||
+
|
||||
+ if (mesh_hdr->flags & MESH_FLAGS_AE) {
|
||||
+ struct mesh_path *mppath;
|
||||
+ char *proxied_addr;
|
||||
+
|
||||
+ if (multicast)
|
||||
+ proxied_addr = mesh_hdr->eaddr1;
|
||||
+ else if ((mesh_hdr->flags & MESH_FLAGS_AE) == MESH_FLAGS_AE_A5_A6)
|
||||
+ /* has_a4 already checked in ieee80211_rx_mesh_check */
|
||||
+ proxied_addr = mesh_hdr->eaddr2;
|
||||
+ else
|
||||
+ return RX_DROP_MONITOR;
|
||||
+
|
||||
+ rcu_read_lock();
|
||||
+ mppath = mpp_path_lookup(sdata, proxied_addr);
|
||||
+ if (!mppath) {
|
||||
+ mpp_path_add(sdata, proxied_addr, eth->h_source);
|
||||
+ } else {
|
||||
+ spin_lock_bh(&mppath->state_lock);
|
||||
+ if (!ether_addr_equal(mppath->mpp, eth->h_source))
|
||||
+ memcpy(mppath->mpp, eth->h_source, ETH_ALEN);
|
||||
+ mppath->exp_time = jiffies;
|
||||
+ spin_unlock_bh(&mppath->state_lock);
|
||||
+ }
|
||||
+ rcu_read_unlock();
|
||||
+ }
|
||||
+
|
||||
+ skb_set_queue_mapping(skb, ieee802_1d_to_ac[skb->priority]);
|
||||
+
|
||||
+ ieee80211_fill_mesh_addresses(&hdr, &hdr.frame_control,
|
||||
+ eth->h_dest, eth->h_source);
|
||||
+ hdrlen = ieee80211_hdrlen(hdr.frame_control);
|
||||
+ if (multicast) {
|
||||
+ int extra_head = sizeof(struct ieee80211_hdr) - sizeof(*eth);
|
||||
+
|
||||
+ fwd_skb = skb_copy_expand(skb, local->tx_headroom + extra_head +
|
||||
+ IEEE80211_ENCRYPT_HEADROOM,
|
||||
+ tailroom, GFP_ATOMIC);
|
||||
+ if (!fwd_skb)
|
||||
+ goto rx_accept;
|
||||
+ } else {
|
||||
+ fwd_skb = skb;
|
||||
+ skb = NULL;
|
||||
+
|
||||
+ if (skb_cow_head(fwd_skb, hdrlen - sizeof(struct ethhdr)))
|
||||
+ return RX_DROP_UNUSABLE;
|
||||
+ }
|
||||
+
|
||||
+ fwd_hdr = skb_push(fwd_skb, hdrlen - sizeof(struct ethhdr));
|
||||
+ memcpy(fwd_hdr, &hdr, hdrlen - 2);
|
||||
+ qos = ieee80211_get_qos_ctl(fwd_hdr);
|
||||
+ qos[0] = qos[1] = 0;
|
||||
+
|
||||
+ skb_reset_mac_header(fwd_skb);
|
||||
+ hdrlen += mesh_hdrlen;
|
||||
+ if (ieee80211_get_8023_tunnel_proto(fwd_skb->data + hdrlen,
|
||||
+ &fwd_skb->protocol))
|
||||
+ hdrlen += ETH_ALEN;
|
||||
+ else
|
||||
+ fwd_skb->protocol = htons(fwd_skb->len - hdrlen);
|
||||
+ skb_set_network_header(fwd_skb, hdrlen);
|
||||
+
|
||||
+ info = IEEE80211_SKB_CB(fwd_skb);
|
||||
+ memset(info, 0, sizeof(*info));
|
||||
+ info->control.flags |= IEEE80211_TX_INTCFL_NEED_TXPROCESSING;
|
||||
+ info->control.vif = &sdata->vif;
|
||||
+ info->control.jiffies = jiffies;
|
||||
+ if (multicast) {
|
||||
+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_mcast);
|
||||
+ memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN);
|
||||
+ /* update power mode indication when forwarding */
|
||||
+ ieee80211_mps_set_frame_flags(sdata, NULL, fwd_hdr);
|
||||
+ } else if (!mesh_nexthop_lookup(sdata, fwd_skb)) {
|
||||
+ /* mesh power mode flags updated in mesh_nexthop_lookup */
|
||||
+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_unicast);
|
||||
+ } else {
|
||||
+ /* unable to resolve next hop */
|
||||
+ if (sta)
|
||||
+ mesh_path_error_tx(sdata, ifmsh->mshcfg.element_ttl,
|
||||
+ hdr.addr3, 0,
|
||||
+ WLAN_REASON_MESH_PATH_NOFORWARD,
|
||||
+ sta->sta.addr);
|
||||
+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_no_route);
|
||||
+ kfree_skb(fwd_skb);
|
||||
+ goto rx_accept;
|
||||
+ }
|
||||
+
|
||||
+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_frames);
|
||||
+ fwd_skb->dev = sdata->dev;
|
||||
+ ieee80211_add_pending_skb(local, fwd_skb);
|
||||
+
|
||||
+rx_accept:
|
||||
+ if (!skb)
|
||||
+ return RX_QUEUED;
|
||||
+
|
||||
+ ieee80211_strip_8023_mesh_hdr(skb);
|
||||
+#endif
|
||||
+
|
||||
+ return RX_CONTINUE;
|
||||
+}
|
||||
+
|
||||
static ieee80211_rx_result debug_noinline
|
||||
__ieee80211_rx_h_amsdu(struct ieee80211_rx_data *rx, u8 data_offset)
|
||||
{
|
||||
@@ -2734,8 +2902,10 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
|
||||
__le16 fc = hdr->frame_control;
|
||||
struct sk_buff_head frame_list;
|
||||
+ static ieee80211_rx_result res;
|
||||
struct ethhdr ethhdr;
|
||||
const u8 *check_da = ethhdr.h_dest, *check_sa = ethhdr.h_source;
|
||||
+ bool mesh = false;
|
||||
|
||||
if (unlikely(ieee80211_has_a4(hdr->frame_control))) {
|
||||
check_da = NULL;
|
||||
@@ -2752,6 +2922,8 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
|
||||
break;
|
||||
case NL80211_IFTYPE_MESH_POINT:
|
||||
check_sa = NULL;
|
||||
+ check_da = NULL;
|
||||
+ mesh = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -2769,17 +2941,29 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
|
||||
ieee80211_amsdu_to_8023s(skb, &frame_list, dev->dev_addr,
|
||||
rx->sdata->vif.type,
|
||||
rx->local->hw.extra_tx_headroom,
|
||||
- check_da, check_sa);
|
||||
+ check_da, check_sa, mesh);
|
||||
|
||||
while (!skb_queue_empty(&frame_list)) {
|
||||
rx->skb = __skb_dequeue(&frame_list);
|
||||
|
||||
- if (!ieee80211_frame_allowed(rx, fc)) {
|
||||
- dev_kfree_skb(rx->skb);
|
||||
+ res = ieee80211_rx_mesh_data(rx->sdata, rx->sta, rx->skb);
|
||||
+ switch (res) {
|
||||
+ case RX_QUEUED:
|
||||
continue;
|
||||
+ case RX_CONTINUE:
|
||||
+ break;
|
||||
+ default:
|
||||
+ goto free;
|
||||
}
|
||||
|
||||
+ if (!ieee80211_frame_allowed(rx, fc))
|
||||
+ goto free;
|
||||
+
|
||||
ieee80211_deliver_skb(rx);
|
||||
+ continue;
|
||||
+
|
||||
+free:
|
||||
+ dev_kfree_skb(rx->skb);
|
||||
}
|
||||
|
||||
return RX_QUEUED;
|
||||
@@ -2812,6 +2996,8 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx
|
||||
if (!rx->sdata->u.mgd.use_4addr)
|
||||
return RX_DROP_UNUSABLE;
|
||||
break;
|
||||
+ case NL80211_IFTYPE_MESH_POINT:
|
||||
+ break;
|
||||
default:
|
||||
return RX_DROP_UNUSABLE;
|
||||
}
|
||||
@@ -2840,155 +3026,6 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx
|
||||
return __ieee80211_rx_h_amsdu(rx, 0);
|
||||
}
|
||||
|
||||
-#ifdef CPTCFG_MAC80211_MESH
|
||||
-static ieee80211_rx_result
|
||||
-ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
|
||||
-{
|
||||
- struct ieee80211_hdr *fwd_hdr, *hdr;
|
||||
- struct ieee80211_tx_info *info;
|
||||
- struct ieee80211s_hdr *mesh_hdr;
|
||||
- struct sk_buff *skb = rx->skb, *fwd_skb;
|
||||
- struct ieee80211_local *local = rx->local;
|
||||
- struct ieee80211_sub_if_data *sdata = rx->sdata;
|
||||
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
|
||||
- u16 ac, q, hdrlen;
|
||||
- int tailroom = 0;
|
||||
-
|
||||
- hdr = (struct ieee80211_hdr *) skb->data;
|
||||
- hdrlen = ieee80211_hdrlen(hdr->frame_control);
|
||||
-
|
||||
- /* make sure fixed part of mesh header is there, also checks skb len */
|
||||
- if (!pskb_may_pull(rx->skb, hdrlen + 6))
|
||||
- return RX_DROP_MONITOR;
|
||||
-
|
||||
- mesh_hdr = (struct ieee80211s_hdr *) (skb->data + hdrlen);
|
||||
-
|
||||
- /* make sure full mesh header is there, also checks skb len */
|
||||
- if (!pskb_may_pull(rx->skb,
|
||||
- hdrlen + ieee80211_get_mesh_hdrlen(mesh_hdr)))
|
||||
- return RX_DROP_MONITOR;
|
||||
-
|
||||
- /* reload pointers */
|
||||
- hdr = (struct ieee80211_hdr *) skb->data;
|
||||
- mesh_hdr = (struct ieee80211s_hdr *) (skb->data + hdrlen);
|
||||
-
|
||||
- if (ieee80211_drop_unencrypted(rx, hdr->frame_control)) {
|
||||
- int offset = hdrlen + ieee80211_get_mesh_hdrlen(mesh_hdr) +
|
||||
- sizeof(rfc1042_header);
|
||||
- __be16 ethertype;
|
||||
-
|
||||
- if (!ether_addr_equal(hdr->addr1, rx->sdata->vif.addr) ||
|
||||
- skb_copy_bits(rx->skb, offset, ðertype, 2) != 0 ||
|
||||
- ethertype != rx->sdata->control_port_protocol)
|
||||
- return RX_DROP_MONITOR;
|
||||
- }
|
||||
-
|
||||
- /* frame is in RMC, don't forward */
|
||||
- if (ieee80211_is_data(hdr->frame_control) &&
|
||||
- is_multicast_ether_addr(hdr->addr1) &&
|
||||
- mesh_rmc_check(rx->sdata, hdr->addr3, mesh_hdr))
|
||||
- return RX_DROP_MONITOR;
|
||||
-
|
||||
- if (!ieee80211_is_data(hdr->frame_control))
|
||||
- return RX_CONTINUE;
|
||||
-
|
||||
- if (!mesh_hdr->ttl)
|
||||
- return RX_DROP_MONITOR;
|
||||
-
|
||||
- if (mesh_hdr->flags & MESH_FLAGS_AE) {
|
||||
- struct mesh_path *mppath;
|
||||
- char *proxied_addr;
|
||||
- char *mpp_addr;
|
||||
-
|
||||
- if (is_multicast_ether_addr(hdr->addr1)) {
|
||||
- mpp_addr = hdr->addr3;
|
||||
- proxied_addr = mesh_hdr->eaddr1;
|
||||
- } else if ((mesh_hdr->flags & MESH_FLAGS_AE) ==
|
||||
- MESH_FLAGS_AE_A5_A6) {
|
||||
- /* has_a4 already checked in ieee80211_rx_mesh_check */
|
||||
- mpp_addr = hdr->addr4;
|
||||
- proxied_addr = mesh_hdr->eaddr2;
|
||||
- } else {
|
||||
- return RX_DROP_MONITOR;
|
||||
- }
|
||||
-
|
||||
- rcu_read_lock();
|
||||
- mppath = mpp_path_lookup(sdata, proxied_addr);
|
||||
- if (!mppath) {
|
||||
- mpp_path_add(sdata, proxied_addr, mpp_addr);
|
||||
- } else {
|
||||
- spin_lock_bh(&mppath->state_lock);
|
||||
- if (!ether_addr_equal(mppath->mpp, mpp_addr))
|
||||
- memcpy(mppath->mpp, mpp_addr, ETH_ALEN);
|
||||
- mppath->exp_time = jiffies;
|
||||
- spin_unlock_bh(&mppath->state_lock);
|
||||
- }
|
||||
- rcu_read_unlock();
|
||||
- }
|
||||
-
|
||||
- /* Frame has reached destination. Don't forward */
|
||||
- if (!is_multicast_ether_addr(hdr->addr1) &&
|
||||
- ether_addr_equal(sdata->vif.addr, hdr->addr3))
|
||||
- return RX_CONTINUE;
|
||||
-
|
||||
- ac = ieee802_1d_to_ac[skb->priority];
|
||||
- skb_set_queue_mapping(skb, ac);
|
||||
-
|
||||
- if (!--mesh_hdr->ttl) {
|
||||
- if (!is_multicast_ether_addr(hdr->addr1))
|
||||
- IEEE80211_IFSTA_MESH_CTR_INC(ifmsh,
|
||||
- dropped_frames_ttl);
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- if (!ifmsh->mshcfg.dot11MeshForwarding)
|
||||
- goto out;
|
||||
-
|
||||
- if (sdata->crypto_tx_tailroom_needed_cnt)
|
||||
- tailroom = IEEE80211_ENCRYPT_TAILROOM;
|
||||
-
|
||||
- fwd_skb = skb_copy_expand(skb, local->tx_headroom +
|
||||
- IEEE80211_ENCRYPT_HEADROOM,
|
||||
- tailroom, GFP_ATOMIC);
|
||||
- if (!fwd_skb)
|
||||
- goto out;
|
||||
-
|
||||
- fwd_skb->dev = sdata->dev;
|
||||
- fwd_hdr = (struct ieee80211_hdr *) fwd_skb->data;
|
||||
- fwd_hdr->frame_control &= ~cpu_to_le16(IEEE80211_FCTL_RETRY);
|
||||
- info = IEEE80211_SKB_CB(fwd_skb);
|
||||
- memset(info, 0, sizeof(*info));
|
||||
- info->control.flags |= IEEE80211_TX_INTCFL_NEED_TXPROCESSING;
|
||||
- info->control.vif = &rx->sdata->vif;
|
||||
- info->control.jiffies = jiffies;
|
||||
- if (is_multicast_ether_addr(fwd_hdr->addr1)) {
|
||||
- IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_mcast);
|
||||
- memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN);
|
||||
- /* update power mode indication when forwarding */
|
||||
- ieee80211_mps_set_frame_flags(sdata, NULL, fwd_hdr);
|
||||
- } else if (!mesh_nexthop_lookup(sdata, fwd_skb)) {
|
||||
- /* mesh power mode flags updated in mesh_nexthop_lookup */
|
||||
- IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_unicast);
|
||||
- } else {
|
||||
- /* unable to resolve next hop */
|
||||
- mesh_path_error_tx(sdata, ifmsh->mshcfg.element_ttl,
|
||||
- fwd_hdr->addr3, 0,
|
||||
- WLAN_REASON_MESH_PATH_NOFORWARD,
|
||||
- fwd_hdr->addr2);
|
||||
- IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_no_route);
|
||||
- kfree_skb(fwd_skb);
|
||||
- return RX_DROP_MONITOR;
|
||||
- }
|
||||
-
|
||||
- IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_frames);
|
||||
- ieee80211_add_pending_skb(local, fwd_skb);
|
||||
- out:
|
||||
- if (is_multicast_ether_addr(hdr->addr1))
|
||||
- return RX_CONTINUE;
|
||||
- return RX_DROP_MONITOR;
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
static ieee80211_rx_result debug_noinline
|
||||
ieee80211_rx_h_data(struct ieee80211_rx_data *rx)
|
||||
{
|
||||
@@ -2997,6 +3034,7 @@ ieee80211_rx_h_data(struct ieee80211_rx_
|
||||
struct net_device *dev = sdata->dev;
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
|
||||
__le16 fc = hdr->frame_control;
|
||||
+ static ieee80211_rx_result res;
|
||||
bool port_control;
|
||||
int err;
|
||||
|
||||
@@ -3023,6 +3061,10 @@ ieee80211_rx_h_data(struct ieee80211_rx_
|
||||
if (unlikely(err))
|
||||
return RX_DROP_UNUSABLE;
|
||||
|
||||
+ res = ieee80211_rx_mesh_data(rx->sdata, rx->sta, rx->skb);
|
||||
+ if (res != RX_CONTINUE)
|
||||
+ return res;
|
||||
+
|
||||
if (!ieee80211_frame_allowed(rx, fc))
|
||||
return RX_DROP_MONITOR;
|
||||
|
||||
@@ -3997,10 +4039,6 @@ static void ieee80211_rx_handlers(struct
|
||||
CALL_RXH(ieee80211_rx_h_defragment);
|
||||
CALL_RXH(ieee80211_rx_h_michael_mic_verify);
|
||||
/* must be after MMIC verify so header is counted in MPDU mic */
|
||||
-#ifdef CPTCFG_MAC80211_MESH
|
||||
- if (ieee80211_vif_is_mesh(&rx->sdata->vif))
|
||||
- CALL_RXH(ieee80211_rx_h_mesh_fwding);
|
||||
-#endif
|
||||
CALL_RXH(ieee80211_rx_h_amsdu);
|
||||
CALL_RXH(ieee80211_rx_h_data);
|
||||
|
||||
--- a/net/wireless/util.c
|
||||
+++ b/net/wireless/util.c
|
||||
@@ -542,7 +542,7 @@ unsigned int ieee80211_get_mesh_hdrlen(s
|
||||
}
|
||||
EXPORT_SYMBOL(ieee80211_get_mesh_hdrlen);
|
||||
|
||||
-static bool ieee80211_get_8023_tunnel_proto(const void *hdr, __be16 *proto)
|
||||
+bool ieee80211_get_8023_tunnel_proto(const void *hdr, __be16 *proto)
|
||||
{
|
||||
const __be16 *hdr_proto = hdr + ETH_ALEN;
|
||||
|
||||
@@ -556,6 +556,49 @@ static bool ieee80211_get_8023_tunnel_pr
|
||||
|
||||
return true;
|
||||
}
|
||||
+EXPORT_SYMBOL(ieee80211_get_8023_tunnel_proto);
|
||||
+
|
||||
+int ieee80211_strip_8023_mesh_hdr(struct sk_buff *skb)
|
||||
+{
|
||||
+ const void *mesh_addr;
|
||||
+ struct {
|
||||
+ struct ethhdr eth;
|
||||
+ u8 flags;
|
||||
+ } payload;
|
||||
+ int hdrlen;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = skb_copy_bits(skb, 0, &payload, sizeof(payload));
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ hdrlen = sizeof(payload.eth) + __ieee80211_get_mesh_hdrlen(payload.flags);
|
||||
+
|
||||
+ if (likely(pskb_may_pull(skb, hdrlen + 8) &&
|
||||
+ ieee80211_get_8023_tunnel_proto(skb->data + hdrlen,
|
||||
+ &payload.eth.h_proto)))
|
||||
+ hdrlen += ETH_ALEN + 2;
|
||||
+ else if (!pskb_may_pull(skb, hdrlen))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ mesh_addr = skb->data + sizeof(payload.eth) + ETH_ALEN;
|
||||
+ switch (payload.flags & MESH_FLAGS_AE) {
|
||||
+ case MESH_FLAGS_AE_A4:
|
||||
+ memcpy(&payload.eth.h_source, mesh_addr, ETH_ALEN);
|
||||
+ break;
|
||||
+ case MESH_FLAGS_AE_A5_A6:
|
||||
+ memcpy(&payload.eth.h_dest, mesh_addr, 2 * ETH_ALEN);
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ pskb_pull(skb, hdrlen - sizeof(payload.eth));
|
||||
+ memcpy(skb->data, &payload.eth, sizeof(payload.eth));
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+EXPORT_SYMBOL(ieee80211_strip_8023_mesh_hdr);
|
||||
|
||||
int ieee80211_data_to_8023_exthdr(struct sk_buff *skb, struct ethhdr *ehdr,
|
||||
const u8 *addr, enum nl80211_iftype iftype,
|
||||
@@ -568,7 +611,6 @@ int ieee80211_data_to_8023_exthdr(struct
|
||||
} payload;
|
||||
struct ethhdr tmp;
|
||||
u16 hdrlen;
|
||||
- u8 mesh_flags = 0;
|
||||
|
||||
if (unlikely(!ieee80211_is_data_present(hdr->frame_control)))
|
||||
return -1;
|
||||
@@ -589,12 +631,6 @@ int ieee80211_data_to_8023_exthdr(struct
|
||||
memcpy(tmp.h_dest, ieee80211_get_DA(hdr), ETH_ALEN);
|
||||
memcpy(tmp.h_source, ieee80211_get_SA(hdr), ETH_ALEN);
|
||||
|
||||
- if (iftype == NL80211_IFTYPE_MESH_POINT &&
|
||||
- skb_copy_bits(skb, hdrlen, &mesh_flags, 1) < 0)
|
||||
- return -1;
|
||||
-
|
||||
- mesh_flags &= MESH_FLAGS_AE;
|
||||
-
|
||||
switch (hdr->frame_control &
|
||||
cpu_to_le16(IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) {
|
||||
case cpu_to_le16(IEEE80211_FCTL_TODS):
|
||||
@@ -608,17 +644,6 @@ int ieee80211_data_to_8023_exthdr(struct
|
||||
iftype != NL80211_IFTYPE_AP_VLAN &&
|
||||
iftype != NL80211_IFTYPE_STATION))
|
||||
return -1;
|
||||
- if (iftype == NL80211_IFTYPE_MESH_POINT) {
|
||||
- if (mesh_flags == MESH_FLAGS_AE_A4)
|
||||
- return -1;
|
||||
- if (mesh_flags == MESH_FLAGS_AE_A5_A6 &&
|
||||
- skb_copy_bits(skb, hdrlen +
|
||||
- offsetof(struct ieee80211s_hdr, eaddr1),
|
||||
- tmp.h_dest, 2 * ETH_ALEN) < 0)
|
||||
- return -1;
|
||||
-
|
||||
- hdrlen += __ieee80211_get_mesh_hdrlen(mesh_flags);
|
||||
- }
|
||||
break;
|
||||
case cpu_to_le16(IEEE80211_FCTL_FROMDS):
|
||||
if ((iftype != NL80211_IFTYPE_STATION &&
|
||||
@@ -627,16 +652,6 @@ int ieee80211_data_to_8023_exthdr(struct
|
||||
(is_multicast_ether_addr(tmp.h_dest) &&
|
||||
ether_addr_equal(tmp.h_source, addr)))
|
||||
return -1;
|
||||
- if (iftype == NL80211_IFTYPE_MESH_POINT) {
|
||||
- if (mesh_flags == MESH_FLAGS_AE_A5_A6)
|
||||
- return -1;
|
||||
- if (mesh_flags == MESH_FLAGS_AE_A4 &&
|
||||
- skb_copy_bits(skb, hdrlen +
|
||||
- offsetof(struct ieee80211s_hdr, eaddr1),
|
||||
- tmp.h_source, ETH_ALEN) < 0)
|
||||
- return -1;
|
||||
- hdrlen += __ieee80211_get_mesh_hdrlen(mesh_flags);
|
||||
- }
|
||||
break;
|
||||
case cpu_to_le16(0):
|
||||
if (iftype != NL80211_IFTYPE_ADHOC &&
|
||||
@@ -646,7 +661,7 @@ int ieee80211_data_to_8023_exthdr(struct
|
||||
break;
|
||||
}
|
||||
|
||||
- if (likely(!is_amsdu &&
|
||||
+ if (likely(!is_amsdu && iftype != NL80211_IFTYPE_MESH_POINT &&
|
||||
skb_copy_bits(skb, hdrlen, &payload, sizeof(payload)) == 0 &&
|
||||
ieee80211_get_8023_tunnel_proto(&payload, &tmp.h_proto))) {
|
||||
/* remove RFC1042 or Bridge-Tunnel encapsulation */
|
||||
@@ -722,7 +737,8 @@ __ieee80211_amsdu_copy_frag(struct sk_bu
|
||||
|
||||
static struct sk_buff *
|
||||
__ieee80211_amsdu_copy(struct sk_buff *skb, unsigned int hlen,
|
||||
- int offset, int len, bool reuse_frag)
|
||||
+ int offset, int len, bool reuse_frag,
|
||||
+ int min_len)
|
||||
{
|
||||
struct sk_buff *frame;
|
||||
int cur_len = len;
|
||||
@@ -736,7 +752,7 @@ __ieee80211_amsdu_copy(struct sk_buff *s
|
||||
* in the stack later.
|
||||
*/
|
||||
if (reuse_frag)
|
||||
- cur_len = min_t(int, len, 32);
|
||||
+ cur_len = min_t(int, len, min_len);
|
||||
|
||||
/*
|
||||
* Allocate and reserve two bytes more for payload
|
||||
@@ -746,6 +762,7 @@ __ieee80211_amsdu_copy(struct sk_buff *s
|
||||
if (!frame)
|
||||
return NULL;
|
||||
|
||||
+ frame->priority = skb->priority;
|
||||
skb_reserve(frame, hlen + sizeof(struct ethhdr) + 2);
|
||||
skb_copy_bits(skb, offset, skb_put(frame, cur_len), cur_len);
|
||||
|
||||
@@ -762,23 +779,37 @@ __ieee80211_amsdu_copy(struct sk_buff *s
|
||||
void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list,
|
||||
const u8 *addr, enum nl80211_iftype iftype,
|
||||
const unsigned int extra_headroom,
|
||||
- const u8 *check_da, const u8 *check_sa)
|
||||
+ const u8 *check_da, const u8 *check_sa,
|
||||
+ bool mesh_control)
|
||||
{
|
||||
unsigned int hlen = ALIGN(extra_headroom, 4);
|
||||
struct sk_buff *frame = NULL;
|
||||
int offset = 0, remaining;
|
||||
- struct ethhdr eth;
|
||||
+ struct {
|
||||
+ struct ethhdr eth;
|
||||
+ uint8_t flags;
|
||||
+ } hdr;
|
||||
bool reuse_frag = skb->head_frag && !skb_has_frag_list(skb);
|
||||
bool reuse_skb = false;
|
||||
bool last = false;
|
||||
+ int copy_len = sizeof(hdr.eth);
|
||||
+
|
||||
+ if (iftype == NL80211_IFTYPE_MESH_POINT)
|
||||
+ copy_len = sizeof(hdr);
|
||||
|
||||
while (!last) {
|
||||
unsigned int subframe_len;
|
||||
- int len;
|
||||
+ int len, mesh_len = 0;
|
||||
u8 padding;
|
||||
|
||||
- skb_copy_bits(skb, offset, ð, sizeof(eth));
|
||||
- len = ntohs(eth.h_proto);
|
||||
+ skb_copy_bits(skb, offset, &hdr, copy_len);
|
||||
+ if (iftype == NL80211_IFTYPE_MESH_POINT)
|
||||
+ mesh_len = __ieee80211_get_mesh_hdrlen(hdr.flags);
|
||||
+ if (mesh_control)
|
||||
+ len = le16_to_cpu(*(__le16 *)&hdr.eth.h_proto) + mesh_len;
|
||||
+ else
|
||||
+ len = ntohs(hdr.eth.h_proto);
|
||||
+
|
||||
subframe_len = sizeof(struct ethhdr) + len;
|
||||
padding = (4 - subframe_len) & 0x3;
|
||||
|
||||
@@ -787,16 +818,16 @@ void ieee80211_amsdu_to_8023s(struct sk_
|
||||
if (subframe_len > remaining)
|
||||
goto purge;
|
||||
/* mitigate A-MSDU aggregation injection attacks */
|
||||
- if (ether_addr_equal(eth.h_dest, rfc1042_header))
|
||||
+ if (ether_addr_equal(hdr.eth.h_dest, rfc1042_header))
|
||||
goto purge;
|
||||
|
||||
offset += sizeof(struct ethhdr);
|
||||
last = remaining <= subframe_len + padding;
|
||||
|
||||
/* FIXME: should we really accept multicast DA? */
|
||||
- if ((check_da && !is_multicast_ether_addr(eth.h_dest) &&
|
||||
- !ether_addr_equal(check_da, eth.h_dest)) ||
|
||||
- (check_sa && !ether_addr_equal(check_sa, eth.h_source))) {
|
||||
+ if ((check_da && !is_multicast_ether_addr(hdr.eth.h_dest) &&
|
||||
+ !ether_addr_equal(check_da, hdr.eth.h_dest)) ||
|
||||
+ (check_sa && !ether_addr_equal(check_sa, hdr.eth.h_source))) {
|
||||
offset += len + padding;
|
||||
continue;
|
||||
}
|
||||
@@ -808,7 +839,7 @@ void ieee80211_amsdu_to_8023s(struct sk_
|
||||
reuse_skb = true;
|
||||
} else {
|
||||
frame = __ieee80211_amsdu_copy(skb, hlen, offset, len,
|
||||
- reuse_frag);
|
||||
+ reuse_frag, 32 + mesh_len);
|
||||
if (!frame)
|
||||
goto purge;
|
||||
|
||||
@@ -819,10 +850,11 @@ void ieee80211_amsdu_to_8023s(struct sk_
|
||||
frame->dev = skb->dev;
|
||||
frame->priority = skb->priority;
|
||||
|
||||
- if (likely(ieee80211_get_8023_tunnel_proto(frame->data, ð.h_proto)))
|
||||
+ if (likely(iftype != NL80211_IFTYPE_MESH_POINT &&
|
||||
+ ieee80211_get_8023_tunnel_proto(frame->data, &hdr.eth.h_proto)))
|
||||
skb_pull(frame, ETH_ALEN + 2);
|
||||
|
||||
- memcpy(skb_push(frame, sizeof(eth)), ð, sizeof(eth));
|
||||
+ memcpy(skb_push(frame, sizeof(hdr.eth)), &hdr.eth, sizeof(hdr.eth));
|
||||
__skb_queue_tail(list, frame);
|
||||
}
|
||||
|
||||
@ -1,145 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Fri, 9 Dec 2022 21:15:04 +0100
|
||||
Subject: [PATCH] wifi: mac80211: add a workaround for receiving
|
||||
non-standard mesh A-MSDU
|
||||
|
||||
At least ath10k and ath11k supported hardware (maybe more) does not implement
|
||||
mesh A-MSDU aggregation in a standard compliant way.
|
||||
802.11-2020 9.3.2.2.2 declares that the Mesh Control field is part of the
|
||||
A-MSDU header. As such, its length must not be included in the subframe
|
||||
length field.
|
||||
Hardware affected by this bug treats the mesh control field as part of the
|
||||
MSDU data and sets the length accordingly.
|
||||
In order to avoid packet loss, keep track of which stations are affected
|
||||
by this and take it into account when converting A-MSDU to 802.3 + mesh control
|
||||
packets.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -6310,6 +6310,19 @@ static inline int ieee80211_data_to_8023
|
||||
}
|
||||
|
||||
/**
|
||||
+ * ieee80211_is_valid_amsdu - check if subframe lengths of an A-MSDU are valid
|
||||
+ *
|
||||
+ * This is used to detect non-standard A-MSDU frames, e.g. the ones generated
|
||||
+ * by ath10k and ath11k, where the subframe length includes the length of the
|
||||
+ * mesh control field.
|
||||
+ *
|
||||
+ * @skb: The input A-MSDU frame without any headers.
|
||||
+ * @mesh_hdr: use standard compliant mesh A-MSDU subframe header
|
||||
+ * Returns: true if subframe header lengths are valid for the @mesh_hdr mode
|
||||
+ */
|
||||
+bool ieee80211_is_valid_amsdu(struct sk_buff *skb, bool mesh_hdr);
|
||||
+
|
||||
+/**
|
||||
* ieee80211_amsdu_to_8023s - decode an IEEE 802.11n A-MSDU frame
|
||||
*
|
||||
* Decode an IEEE 802.11 A-MSDU and convert it to a list of 802.3 frames.
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2905,7 +2905,6 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
|
||||
static ieee80211_rx_result res;
|
||||
struct ethhdr ethhdr;
|
||||
const u8 *check_da = ethhdr.h_dest, *check_sa = ethhdr.h_source;
|
||||
- bool mesh = false;
|
||||
|
||||
if (unlikely(ieee80211_has_a4(hdr->frame_control))) {
|
||||
check_da = NULL;
|
||||
@@ -2923,7 +2922,6 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
|
||||
case NL80211_IFTYPE_MESH_POINT:
|
||||
check_sa = NULL;
|
||||
check_da = NULL;
|
||||
- mesh = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -2938,10 +2936,21 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
|
||||
data_offset, true))
|
||||
return RX_DROP_UNUSABLE;
|
||||
|
||||
+ if (rx->sta && rx->sta->amsdu_mesh_control < 0) {
|
||||
+ bool valid_std = ieee80211_is_valid_amsdu(skb, true);
|
||||
+ bool valid_nonstd = ieee80211_is_valid_amsdu(skb, false);
|
||||
+
|
||||
+ if (valid_std && !valid_nonstd)
|
||||
+ rx->sta->amsdu_mesh_control = 1;
|
||||
+ else if (valid_nonstd && !valid_std)
|
||||
+ rx->sta->amsdu_mesh_control = 0;
|
||||
+ }
|
||||
+
|
||||
ieee80211_amsdu_to_8023s(skb, &frame_list, dev->dev_addr,
|
||||
rx->sdata->vif.type,
|
||||
rx->local->hw.extra_tx_headroom,
|
||||
- check_da, check_sa, mesh);
|
||||
+ check_da, check_sa,
|
||||
+ rx->sta->amsdu_mesh_control);
|
||||
|
||||
while (!skb_queue_empty(&frame_list)) {
|
||||
rx->skb = __skb_dequeue(&frame_list);
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -594,6 +594,9 @@ __sta_info_alloc(struct ieee80211_sub_if
|
||||
|
||||
sta->sta_state = IEEE80211_STA_NONE;
|
||||
|
||||
+ if (sdata->vif.type == NL80211_IFTYPE_MESH_POINT)
|
||||
+ sta->amsdu_mesh_control = -1;
|
||||
+
|
||||
/* Mark TID as unreserved */
|
||||
sta->reserved_tid = IEEE80211_TID_UNRESERVED;
|
||||
|
||||
--- a/net/mac80211/sta_info.h
|
||||
+++ b/net/mac80211/sta_info.h
|
||||
@@ -702,6 +702,7 @@ struct sta_info {
|
||||
struct codel_params cparams;
|
||||
|
||||
u8 reserved_tid;
|
||||
+ s8 amsdu_mesh_control;
|
||||
|
||||
struct cfg80211_chan_def tdls_chandef;
|
||||
|
||||
--- a/net/wireless/util.c
|
||||
+++ b/net/wireless/util.c
|
||||
@@ -776,6 +776,38 @@ __ieee80211_amsdu_copy(struct sk_buff *s
|
||||
return frame;
|
||||
}
|
||||
|
||||
+bool ieee80211_is_valid_amsdu(struct sk_buff *skb, bool mesh_hdr)
|
||||
+{
|
||||
+ int offset = 0, remaining, subframe_len, padding;
|
||||
+
|
||||
+ for (offset = 0; offset < skb->len; offset += subframe_len + padding) {
|
||||
+ struct {
|
||||
+ __be16 len;
|
||||
+ u8 mesh_flags;
|
||||
+ } hdr;
|
||||
+ u16 len;
|
||||
+
|
||||
+ if (skb_copy_bits(skb, offset + 2 * ETH_ALEN, &hdr, sizeof(hdr)) < 0)
|
||||
+ return false;
|
||||
+
|
||||
+ if (mesh_hdr)
|
||||
+ len = le16_to_cpu(*(__le16 *)&hdr.len) +
|
||||
+ __ieee80211_get_mesh_hdrlen(hdr.mesh_flags);
|
||||
+ else
|
||||
+ len = ntohs(hdr.len);
|
||||
+
|
||||
+ subframe_len = sizeof(struct ethhdr) + len;
|
||||
+ padding = (4 - subframe_len) & 0x3;
|
||||
+ remaining = skb->len - offset;
|
||||
+
|
||||
+ if (subframe_len > remaining)
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
+EXPORT_SYMBOL(ieee80211_is_valid_amsdu);
|
||||
+
|
||||
void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list,
|
||||
const u8 *addr, enum nl80211_iftype iftype,
|
||||
const unsigned int extra_headroom,
|
||||
@ -698,7 +698,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2797,6 +2797,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
@@ -2778,6 +2778,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
if (mesh_hdr->flags & MESH_FLAGS_AE) {
|
||||
struct mesh_path *mppath;
|
||||
char *proxied_addr;
|
||||
@ -706,7 +706,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
if (multicast)
|
||||
proxied_addr = mesh_hdr->eaddr1;
|
||||
@@ -2812,11 +2813,18 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
@@ -2793,11 +2794,18 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
mpp_path_add(sdata, proxied_addr, eth->h_source);
|
||||
} else {
|
||||
spin_lock_bh(&mppath->state_lock);
|
||||
|
||||
@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
ieee80211_fill_mesh_addresses(&hdr, &hdr.frame_control,
|
||||
eth->h_dest, eth->h_source);
|
||||
hdrlen = ieee80211_hdrlen(hdr.frame_control);
|
||||
@@ -2868,6 +2931,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
@@ -2871,6 +2934,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
info->control.flags |= IEEE80211_TX_INTCFL_NEED_TXPROCESSING;
|
||||
info->control.vif = &sdata->vif;
|
||||
info->control.jiffies = jiffies;
|
||||
@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (multicast) {
|
||||
IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_mcast);
|
||||
memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN);
|
||||
@@ -2889,7 +2953,6 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
@@ -2892,7 +2956,6 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
}
|
||||
|
||||
IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_frames);
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Mon, 20 Feb 2023 12:50:50 +0100
|
||||
Subject: [PATCH] mac80211: fix mesh forwarding
|
||||
|
||||
Linearize packets (needed for forwarding A-MSDU subframes).
|
||||
Fix network header offset to fix flow dissector (and fair queueing).
|
||||
|
||||
Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces")
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2910,6 +2910,9 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
|
||||
if (skb_cow_head(fwd_skb, hdrlen - sizeof(struct ethhdr)))
|
||||
return RX_DROP_UNUSABLE;
|
||||
+
|
||||
+ if (skb_linearize(fwd_skb))
|
||||
+ return RX_DROP_UNUSABLE;
|
||||
}
|
||||
|
||||
fwd_hdr = skb_push(fwd_skb, hdrlen - sizeof(struct ethhdr));
|
||||
@@ -2924,7 +2927,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
hdrlen += ETH_ALEN;
|
||||
else
|
||||
fwd_skb->protocol = htons(fwd_skb->len - hdrlen);
|
||||
- skb_set_network_header(fwd_skb, hdrlen);
|
||||
+ skb_set_network_header(fwd_skb, hdrlen + 2);
|
||||
|
||||
info = IEEE80211_SKB_CB(fwd_skb);
|
||||
memset(info, 0, sizeof(*info));
|
||||
@ -1,52 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Sun, 26 Feb 2023 20:30:20 +0100
|
||||
Subject: [PATCH] wifi: mac80211: fix mesh path discovery based on unicast
|
||||
packets
|
||||
|
||||
If a packet has reached its intended destination, it was bumped to the code
|
||||
that accepts it, without first checking if a mesh_path needs to be created
|
||||
based on the discovered source.
|
||||
Fix this by moving the destination address check further down
|
||||
|
||||
Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces")
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2830,17 +2830,6 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
mesh_rmc_check(sdata, eth->h_source, mesh_hdr))
|
||||
return RX_DROP_MONITOR;
|
||||
|
||||
- /* Frame has reached destination. Don't forward */
|
||||
- if (ether_addr_equal(sdata->vif.addr, eth->h_dest))
|
||||
- goto rx_accept;
|
||||
-
|
||||
- if (!ifmsh->mshcfg.dot11MeshForwarding) {
|
||||
- if (is_multicast_ether_addr(eth->h_dest))
|
||||
- goto rx_accept;
|
||||
-
|
||||
- return RX_DROP_MONITOR;
|
||||
- }
|
||||
-
|
||||
/* forward packet */
|
||||
if (sdata->crypto_tx_tailroom_needed_cnt)
|
||||
tailroom = IEEE80211_ENCRYPT_TAILROOM;
|
||||
@@ -2887,6 +2876,17 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
+ /* Frame has reached destination. Don't forward */
|
||||
+ if (ether_addr_equal(sdata->vif.addr, eth->h_dest))
|
||||
+ goto rx_accept;
|
||||
+
|
||||
+ if (!ifmsh->mshcfg.dot11MeshForwarding) {
|
||||
+ if (is_multicast_ether_addr(eth->h_dest))
|
||||
+ goto rx_accept;
|
||||
+
|
||||
+ return RX_DROP_MONITOR;
|
||||
+ }
|
||||
+
|
||||
skb_set_queue_mapping(skb, ieee802_1d_to_ac[skb->priority]);
|
||||
|
||||
if (!multicast &&
|
||||
@ -34,7 +34,7 @@ Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
|
||||
* @tid: the TID to BA on.
|
||||
--- a/net/mac80211/agg-tx.c
|
||||
+++ b/net/mac80211/agg-tx.c
|
||||
@@ -554,6 +554,23 @@ void ieee80211_tx_ba_session_handle_star
|
||||
@@ -550,6 +550,23 @@ void ieee80211_tx_ba_session_handle_star
|
||||
ieee80211_send_addba_with_timeout(sta, tid_tx);
|
||||
}
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
MAC80211_SUPPORTED_FEATURES_RX)
|
||||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -813,6 +813,21 @@ ieee80211_get_stats64(struct net_device
|
||||
@@ -834,6 +834,21 @@ ieee80211_get_stats64(struct net_device
|
||||
dev_fetch_sw_netstats(stats, dev->tstats);
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static const struct net_device_ops ieee80211_dataif_ops = {
|
||||
.ndo_open = ieee80211_open,
|
||||
.ndo_stop = ieee80211_stop,
|
||||
@@ -821,6 +836,7 @@ static const struct net_device_ops ieee8
|
||||
@@ -842,6 +857,7 @@ static const struct net_device_ops ieee8
|
||||
.ndo_set_rx_mode = ieee80211_set_multicast_list,
|
||||
.ndo_set_mac_address = ieee80211_change_mac,
|
||||
.ndo_get_stats64 = ieee80211_get_stats64,
|
||||
@ -105,7 +105,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
};
|
||||
|
||||
#if LINUX_VERSION_IS_GEQ(5,2,0)
|
||||
@@ -945,6 +961,7 @@ static const struct net_device_ops ieee8
|
||||
@@ -966,6 +982,7 @@ static const struct net_device_ops ieee8
|
||||
#if LINUX_VERSION_IS_GEQ(5,13,0)
|
||||
.ndo_fill_forward_path = ieee80211_netdev_fill_forward_path,
|
||||
#endif
|
||||
|
||||
@ -1,50 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Sun, 26 Mar 2023 17:11:34 +0200
|
||||
Subject: [PATCH] wifi: mac80211: fix receiving mesh packets in forwarding=0
|
||||
networks
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When forwarding is set to 0, frames are typically sent with ttl=1.
|
||||
Move the ttl decrement check below the check for local receive in order to
|
||||
fix packet drops.
|
||||
|
||||
Reported-by: Thomas Hühn <thomas.huehn@hs-nordhausen.de>
|
||||
Reported-by: Nick Hainke <vincent@systemli.org>
|
||||
Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces")
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2834,14 +2834,6 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
if (sdata->crypto_tx_tailroom_needed_cnt)
|
||||
tailroom = IEEE80211_ENCRYPT_TAILROOM;
|
||||
|
||||
- if (!--mesh_hdr->ttl) {
|
||||
- if (multicast)
|
||||
- goto rx_accept;
|
||||
-
|
||||
- IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_ttl);
|
||||
- return RX_DROP_MONITOR;
|
||||
- }
|
||||
-
|
||||
if (mesh_hdr->flags & MESH_FLAGS_AE) {
|
||||
struct mesh_path *mppath;
|
||||
char *proxied_addr;
|
||||
@@ -2880,6 +2872,14 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
if (ether_addr_equal(sdata->vif.addr, eth->h_dest))
|
||||
goto rx_accept;
|
||||
|
||||
+ if (!--mesh_hdr->ttl) {
|
||||
+ if (multicast)
|
||||
+ goto rx_accept;
|
||||
+
|
||||
+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_ttl);
|
||||
+ return RX_DROP_MONITOR;
|
||||
+ }
|
||||
+
|
||||
if (!ifmsh->mshcfg.dot11MeshForwarding) {
|
||||
if (is_multicast_ether_addr(eth->h_dest))
|
||||
goto rx_accept;
|
||||
@ -19,7 +19,7 @@ Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
|
||||
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -1276,6 +1276,14 @@ static void __sta_info_destroy_part2(str
|
||||
@@ -1290,6 +1290,14 @@ static void __sta_info_destroy_part2(str
|
||||
WARN_ON_ONCE(ret);
|
||||
}
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
|
||||
struct ieee80211_channel_switch *ch_switch)
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -1281,8 +1281,12 @@ static void __sta_info_destroy_part2(str
|
||||
@@ -1295,8 +1295,12 @@ static void __sta_info_destroy_part2(str
|
||||
* frames sitting on hardware queues might be sent out without
|
||||
* any encryption at all.
|
||||
*/
|
||||
|
||||
@ -129,7 +129,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
}
|
||||
|
||||
new = kzalloc(size, GFP_KERNEL);
|
||||
@@ -3395,8 +3395,11 @@ cfg80211_beacon_dup(struct cfg80211_beac
|
||||
@@ -3396,8 +3396,11 @@ cfg80211_beacon_dup(struct cfg80211_beac
|
||||
|
||||
len = beacon->head_len + beacon->tail_len + beacon->beacon_ies_len +
|
||||
beacon->proberesp_ies_len + beacon->assocresp_ies_len +
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Tue, 11 Jul 2023 13:30:12 +0200
|
||||
Subject: [PATCH] wifi: cfg80211: fix receving mesh packets without RFC1042
|
||||
header
|
||||
|
||||
Fix ethernet header length field after stripping the mesh header
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Link: https://lore.kernel.org/all/CT5GNZSK28AI.2K6M69OXM9RW5@syracuse/
|
||||
Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces")
|
||||
Reported-by: Nicolas Escande <nico.escande@gmail.com>
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/wireless/util.c
|
||||
+++ b/net/wireless/util.c
|
||||
@@ -580,6 +580,8 @@ int ieee80211_strip_8023_mesh_hdr(struct
|
||||
hdrlen += ETH_ALEN + 2;
|
||||
else if (!pskb_may_pull(skb, hdrlen))
|
||||
return -EINVAL;
|
||||
+ else
|
||||
+ payload.eth.h_proto = htons(skb->len - hdrlen);
|
||||
|
||||
mesh_addr = skb->data + sizeof(payload.eth) + ETH_ALEN;
|
||||
switch (payload.flags & MESH_FLAGS_AE) {
|
||||
@ -113,7 +113,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
{
|
||||
--- a/net/wireless/core.h
|
||||
+++ b/net/wireless/core.h
|
||||
@@ -491,6 +491,8 @@ void cfg80211_set_dfs_state(struct wiphy
|
||||
@@ -497,6 +497,8 @@ void cfg80211_set_dfs_state(struct wiphy
|
||||
enum nl80211_dfs_state dfs_state);
|
||||
|
||||
void cfg80211_dfs_channels_update_work(struct work_struct *work);
|
||||
|
||||
@ -76,7 +76,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/net/wireless/core.h
|
||||
+++ b/net/wireless/core.h
|
||||
@@ -277,6 +277,8 @@ struct cfg80211_event {
|
||||
@@ -283,6 +283,8 @@ struct cfg80211_event {
|
||||
} ij;
|
||||
struct {
|
||||
u8 bssid[ETH_ALEN];
|
||||
@ -85,7 +85,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
} pa;
|
||||
};
|
||||
};
|
||||
@@ -421,7 +423,8 @@ int cfg80211_disconnect(struct cfg80211_
|
||||
@@ -427,7 +429,8 @@ int cfg80211_disconnect(struct cfg80211_
|
||||
bool wextev);
|
||||
void __cfg80211_roamed(struct wireless_dev *wdev,
|
||||
struct cfg80211_roam_info *info);
|
||||
@ -97,7 +97,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
void cfg80211_autodisconnect_wk(struct work_struct *work);
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -17993,7 +17993,8 @@ void nl80211_send_roamed(struct cfg80211
|
||||
@@ -18024,7 +18024,8 @@ void nl80211_send_roamed(struct cfg80211
|
||||
}
|
||||
|
||||
void nl80211_send_port_authorized(struct cfg80211_registered_device *rdev,
|
||||
@ -107,7 +107,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
{
|
||||
struct sk_buff *msg;
|
||||
void *hdr;
|
||||
@@ -18013,6 +18014,11 @@ void nl80211_send_port_authorized(struct
|
||||
@@ -18044,6 +18045,11 @@ void nl80211_send_port_authorized(struct
|
||||
nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, bssid))
|
||||
goto nla_put_failure;
|
||||
|
||||
@ -176,7 +176,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
* Use the wdev event list so that if there are pending
|
||||
--- a/net/wireless/util.c
|
||||
+++ b/net/wireless/util.c
|
||||
@@ -1059,7 +1059,9 @@ void cfg80211_process_wdev_events(struct
|
||||
@@ -1065,7 +1065,9 @@ void cfg80211_process_wdev_events(struct
|
||||
__cfg80211_leave(wiphy_to_rdev(wdev->wiphy), wdev);
|
||||
break;
|
||||
case EVENT_PORT_AUTHORIZED:
|
||||
|
||||
@ -94,7 +94,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
@@ -2389,6 +2389,13 @@ static void sta_stats_decode_rate(struct
|
||||
@@ -2403,6 +2403,13 @@ static void sta_stats_decode_rate(struct
|
||||
rinfo->he_ru_alloc = STA_STATS_GET(HE_RU, rate);
|
||||
rinfo->he_dcm = STA_STATS_GET(HE_DCM, rate);
|
||||
break;
|
||||
@ -110,7 +110,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/net/mac80211/sta_info.h
|
||||
+++ b/net/mac80211/sta_info.h
|
||||
@@ -930,6 +930,7 @@ enum sta_stats_type {
|
||||
@@ -936,6 +936,7 @@ enum sta_stats_type {
|
||||
STA_STATS_RATE_TYPE_VHT,
|
||||
STA_STATS_RATE_TYPE_HE,
|
||||
STA_STATS_RATE_TYPE_S1G,
|
||||
@ -118,7 +118,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
};
|
||||
|
||||
#define STA_STATS_FIELD_HT_MCS GENMASK( 7, 0)
|
||||
@@ -939,12 +940,16 @@ enum sta_stats_type {
|
||||
@@ -945,12 +946,16 @@ enum sta_stats_type {
|
||||
#define STA_STATS_FIELD_VHT_NSS GENMASK( 7, 4)
|
||||
#define STA_STATS_FIELD_HE_MCS GENMASK( 3, 0)
|
||||
#define STA_STATS_FIELD_HE_NSS GENMASK( 7, 4)
|
||||
@ -141,7 +141,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
#define STA_STATS_FIELD(_n, _v) FIELD_PREP(STA_STATS_FIELD_ ## _n, _v)
|
||||
#define STA_STATS_GET(_n, _v) FIELD_GET(STA_STATS_FIELD_ ## _n, _v)
|
||||
@@ -983,6 +988,13 @@ static inline u32 sta_stats_encode_rate(
|
||||
@@ -989,6 +994,13 @@ static inline u32 sta_stats_encode_rate(
|
||||
r |= STA_STATS_FIELD(HE_RU, s->he_ru);
|
||||
r |= STA_STATS_FIELD(HE_DCM, s->he_dcm);
|
||||
break;
|
||||
|
||||
@ -62,7 +62,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
bool mu_mimo_owner;
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -4196,7 +4196,7 @@ static int ieee80211_set_ap_chanwidth(st
|
||||
@@ -4197,7 +4197,7 @@ static int ieee80211_set_ap_chanwidth(st
|
||||
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
||||
struct ieee80211_link_data *link;
|
||||
int ret;
|
||||
|
||||
@ -107,7 +107,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
NUM_NL80211_EXT_FEATURES,
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -819,6 +819,7 @@ static const struct nla_policy nl80211_p
|
||||
@@ -829,6 +829,7 @@ static const struct nla_policy nl80211_p
|
||||
[NL80211_ATTR_MLD_ADDR] = NLA_POLICY_EXACT_LEN(ETH_ALEN),
|
||||
[NL80211_ATTR_MLO_SUPPORT] = { .type = NLA_FLAG },
|
||||
[NL80211_ATTR_MAX_NUM_AKM_SUITES] = { .type = NLA_REJECT },
|
||||
@ -115,7 +115,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
};
|
||||
|
||||
/* policy for the key attributes */
|
||||
@@ -3187,6 +3188,21 @@ static bool nl80211_can_set_dev_channel(
|
||||
@@ -3197,6 +3198,21 @@ static bool nl80211_can_set_dev_channel(
|
||||
wdev->iftype == NL80211_IFTYPE_P2P_GO;
|
||||
}
|
||||
|
||||
@ -137,7 +137,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
int nl80211_parse_chandef(struct cfg80211_registered_device *rdev,
|
||||
struct genl_info *info,
|
||||
struct cfg80211_chan_def *chandef)
|
||||
@@ -5938,6 +5954,14 @@ static int nl80211_start_ap(struct sk_bu
|
||||
@@ -5969,6 +5985,14 @@ static int nl80211_start_ap(struct sk_bu
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -152,7 +152,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, ¶ms->chandef,
|
||||
wdev->iftype)) {
|
||||
err = -EINVAL;
|
||||
@@ -10076,6 +10100,14 @@ skip_beacons:
|
||||
@@ -10107,6 +10131,14 @@ skip_beacons:
|
||||
if (info->attrs[NL80211_ATTR_CH_SWITCH_BLOCK_TX])
|
||||
params.block_tx = true;
|
||||
|
||||
|
||||
@ -91,7 +91,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
* ieee80211_operating_class_to_band - convert operating class to band
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -3611,7 +3611,8 @@ static int __ieee80211_csa_finalize(stru
|
||||
@@ -3612,7 +3612,8 @@ static int __ieee80211_csa_finalize(stru
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@ -101,7 +101,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -3883,7 +3884,7 @@ __ieee80211_channel_switch(struct wiphy
|
||||
@@ -3884,7 +3885,7 @@ __ieee80211_channel_switch(struct wiphy
|
||||
|
||||
cfg80211_ch_switch_started_notify(sdata->dev,
|
||||
&sdata->deflink.csa_chandef, 0,
|
||||
@ -132,7 +132,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
/* use driver's channel switch callback */
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -19054,7 +19054,7 @@ static void nl80211_ch_switch_notify(str
|
||||
@@ -19085,7 +19085,7 @@ static void nl80211_ch_switch_notify(str
|
||||
struct cfg80211_chan_def *chandef,
|
||||
gfp_t gfp,
|
||||
enum nl80211_commands notif,
|
||||
@ -141,7 +141,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
{
|
||||
struct wireless_dev *wdev = netdev->ieee80211_ptr;
|
||||
struct sk_buff *msg;
|
||||
@@ -19088,6 +19088,9 @@ static void nl80211_ch_switch_notify(str
|
||||
@@ -19119,6 +19119,9 @@ static void nl80211_ch_switch_notify(str
|
||||
goto nla_put_failure;
|
||||
}
|
||||
|
||||
@ -151,7 +151,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
genlmsg_end(msg, hdr);
|
||||
|
||||
genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0,
|
||||
@@ -19100,7 +19103,7 @@ static void nl80211_ch_switch_notify(str
|
||||
@@ -19131,7 +19134,7 @@ static void nl80211_ch_switch_notify(str
|
||||
|
||||
void cfg80211_ch_switch_notify(struct net_device *dev,
|
||||
struct cfg80211_chan_def *chandef,
|
||||
@ -160,7 +160,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
{
|
||||
struct wireless_dev *wdev = dev->ieee80211_ptr;
|
||||
struct wiphy *wiphy = wdev->wiphy;
|
||||
@@ -19109,7 +19112,7 @@ void cfg80211_ch_switch_notify(struct ne
|
||||
@@ -19140,7 +19143,7 @@ void cfg80211_ch_switch_notify(struct ne
|
||||
ASSERT_WDEV_LOCK(wdev);
|
||||
WARN_INVALID_LINK_ID(wdev, link_id);
|
||||
|
||||
@ -169,7 +169,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
switch (wdev->iftype) {
|
||||
case NL80211_IFTYPE_STATION:
|
||||
@@ -19137,14 +19140,15 @@ void cfg80211_ch_switch_notify(struct ne
|
||||
@@ -19168,14 +19171,15 @@ void cfg80211_ch_switch_notify(struct ne
|
||||
cfg80211_sched_dfs_chan_update(rdev);
|
||||
|
||||
nl80211_ch_switch_notify(rdev, dev, link_id, chandef, GFP_KERNEL,
|
||||
@ -187,7 +187,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
{
|
||||
struct wireless_dev *wdev = dev->ieee80211_ptr;
|
||||
struct wiphy *wiphy = wdev->wiphy;
|
||||
@@ -19153,11 +19157,13 @@ void cfg80211_ch_switch_started_notify(s
|
||||
@@ -19184,11 +19188,13 @@ void cfg80211_ch_switch_started_notify(s
|
||||
ASSERT_WDEV_LOCK(wdev);
|
||||
WARN_INVALID_LINK_ID(wdev, link_id);
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
if (sdata->vif.type == NL80211_IFTYPE_AP &&
|
||||
params->mbssid_config.tx_wdev) {
|
||||
err = ieee80211_set_ap_mbssid_options(sdata,
|
||||
@@ -3570,6 +3575,12 @@ static int __ieee80211_csa_finalize(stru
|
||||
@@ -3571,6 +3576,12 @@ static int __ieee80211_csa_finalize(stru
|
||||
lockdep_assert_held(&local->mtx);
|
||||
lockdep_assert_held(&local->chanctx_mtx);
|
||||
|
||||
@ -72,7 +72,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
/*
|
||||
* using reservation isn't immediate as it may be deferred until later
|
||||
* with multi-vif. once reservation is complete it will re-schedule the
|
||||
@@ -3612,7 +3623,7 @@ static int __ieee80211_csa_finalize(stru
|
||||
@@ -3613,7 +3624,7 @@ static int __ieee80211_csa_finalize(stru
|
||||
return err;
|
||||
|
||||
cfg80211_ch_switch_notify(sdata->dev, &sdata->deflink.csa_chandef, 0,
|
||||
@ -81,7 +81,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -3874,9 +3885,13 @@ __ieee80211_channel_switch(struct wiphy
|
||||
@@ -3875,9 +3886,13 @@ __ieee80211_channel_switch(struct wiphy
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
if (sdata->deflink.csa_block_tx)
|
||||
ieee80211_stop_vif_queues(local, sdata,
|
||||
@@ -3884,7 +3899,8 @@ __ieee80211_channel_switch(struct wiphy
|
||||
@@ -3885,7 +3900,8 @@ __ieee80211_channel_switch(struct wiphy
|
||||
|
||||
cfg80211_ch_switch_started_notify(sdata->dev,
|
||||
&sdata->deflink.csa_chandef, 0,
|
||||
|
||||
@ -132,7 +132,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
|
||||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -521,7 +521,7 @@ static void ieee80211_do_stop(struct iee
|
||||
@@ -542,7 +542,7 @@ static void ieee80211_do_stop(struct iee
|
||||
cancel_work_sync(&sdata->recalc_smps);
|
||||
|
||||
sdata_lock(sdata);
|
||||
@ -141,7 +141,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
"destroying interface with valid links 0x%04x\n",
|
||||
sdata->vif.valid_links);
|
||||
|
||||
@@ -1834,7 +1834,7 @@ static int ieee80211_runtime_change_ifty
|
||||
@@ -1855,7 +1855,7 @@ static int ieee80211_runtime_change_ifty
|
||||
return -EBUSY;
|
||||
|
||||
/* for now, don't support changing while links exist */
|
||||
|
||||
@ -1,69 +0,0 @@
|
||||
From 1b7c710a8e912d54a24742ed5a87a047be64141a Mon Sep 17 00:00:00 2001
|
||||
From: Rameshkumar Sundaram <quic_ramess@quicinc.com>
|
||||
Date: Tue, 7 Feb 2023 17:11:46 +0530
|
||||
Subject: [PATCH 350/351] wifi: mac80211: Allow NSS change only up to
|
||||
capability
|
||||
|
||||
Stations can update bandwidth/NSS change in
|
||||
VHT action frame with action type Operating Mode Notification.
|
||||
(IEEE Std 802.11-2020 - 9.4.1.53 Operating Mode field)
|
||||
|
||||
For Operating Mode Notification, an RX NSS change to a value
|
||||
greater than AP's maximum NSS should not be allowed.
|
||||
During fuzz testing, by forcefully sending VHT Op. mode notif.
|
||||
frames from STA with random rx_nss values, it is found that AP
|
||||
accepts rx_nss values greater that APs maximum NSS instead of
|
||||
discarding such NSS change.
|
||||
|
||||
Hence allow NSS change only up to maximum NSS that is negotiated
|
||||
and capped to AP's capability during association.
|
||||
|
||||
Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20230207114146.10567-1-quic_ramess@quicinc.com
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
(cherry picked from commit 57b341e9ab13e5688491bfd54f8b5502416c8905)
|
||||
---
|
||||
net/mac80211/vht.c | 25 ++++++++++++++++++++-----
|
||||
1 file changed, 20 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/net/mac80211/vht.c
|
||||
+++ b/net/mac80211/vht.c
|
||||
@@ -637,7 +637,7 @@ u32 __ieee80211_vht_handle_opmode(struct
|
||||
enum ieee80211_sta_rx_bandwidth new_bw;
|
||||
struct sta_opmode_info sta_opmode = {};
|
||||
u32 changed = 0;
|
||||
- u8 nss;
|
||||
+ u8 nss, cur_nss;
|
||||
|
||||
/* ignore - no support for BF yet */
|
||||
if (opmode & IEEE80211_OPMODE_NOTIF_RX_NSS_TYPE_BF)
|
||||
@@ -648,10 +648,25 @@ u32 __ieee80211_vht_handle_opmode(struct
|
||||
nss += 1;
|
||||
|
||||
if (link_sta->pub->rx_nss != nss) {
|
||||
- link_sta->pub->rx_nss = nss;
|
||||
- sta_opmode.rx_nss = nss;
|
||||
- changed |= IEEE80211_RC_NSS_CHANGED;
|
||||
- sta_opmode.changed |= STA_OPMODE_N_SS_CHANGED;
|
||||
+ cur_nss = link_sta->pub->rx_nss;
|
||||
+ /* Reset rx_nss and call ieee80211_sta_set_rx_nss() which
|
||||
+ * will set the same to max nss value calculated based on capability.
|
||||
+ */
|
||||
+ link_sta->pub->rx_nss = 0;
|
||||
+ ieee80211_sta_set_rx_nss(link_sta);
|
||||
+ /* Do not allow an nss change to rx_nss greater than max_nss
|
||||
+ * negotiated and capped to APs capability during association.
|
||||
+ */
|
||||
+ if (nss <= link_sta->pub->rx_nss) {
|
||||
+ link_sta->pub->rx_nss = nss;
|
||||
+ sta_opmode.rx_nss = nss;
|
||||
+ changed |= IEEE80211_RC_NSS_CHANGED;
|
||||
+ sta_opmode.changed |= STA_OPMODE_N_SS_CHANGED;
|
||||
+ } else {
|
||||
+ link_sta->pub->rx_nss = cur_nss;
|
||||
+ pr_warn_ratelimited("Ignoring NSS change in VHT Operating Mode Notification from %pM with invalid nss %d",
|
||||
+ link_sta->pub->addr, nss);
|
||||
+ }
|
||||
}
|
||||
|
||||
switch (opmode & IEEE80211_OPMODE_NOTIF_CHANWIDTH_MASK) {
|
||||
@ -1,186 +0,0 @@
|
||||
From 32d043fc10f1814e421c0ff90c0ee6b303f2821c Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Wed, 28 Feb 2024 12:01:57 +0100
|
||||
Subject: [PATCH 351/351] wifi: mac80211: track capability/opmode NSS
|
||||
separately
|
||||
|
||||
We're currently tracking rx_nss for each station, and that
|
||||
is meant to be initialized to the capability NSS and later
|
||||
reduced by the operating mode notification NSS.
|
||||
|
||||
However, we're mixing up capabilities and operating mode
|
||||
NSS in the same variable. This forces us to recalculate
|
||||
the NSS capability on operating mode notification RX,
|
||||
which is a bit strange; due to the previous fix I had to
|
||||
never keep rx_nss as zero, it also means that the capa is
|
||||
never taken into account properly.
|
||||
|
||||
Fix all this by storing the capability value, that can be
|
||||
recalculated unconditionally whenever needed, and storing
|
||||
the operating mode notification NSS separately, taking it
|
||||
into account when assigning the final rx_nss value.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Fixes: dd6c064cfc3f ("wifi: mac80211: set station RX-NSS on reconfig")
|
||||
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
|
||||
Link: https://msgid.link/20240228120157.0e1c41924d1d.I0acaa234e0267227b7e3ef81a59117c8792116bc@changeid
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
(cherry picked from commit a8bca3e9371dc5e276af4168be099b2a05554c2a)
|
||||
---
|
||||
net/mac80211/cfg.c | 2 +-
|
||||
net/mac80211/ieee80211_i.h | 2 +-
|
||||
net/mac80211/rate.c | 2 +-
|
||||
net/mac80211/sta_info.h | 6 ++++-
|
||||
net/mac80211/vht.c | 46 ++++++++++++++++++--------------------
|
||||
5 files changed, 30 insertions(+), 28 deletions(-)
|
||||
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -1836,7 +1836,7 @@ static int sta_link_apply_parameters(str
|
||||
sband->band);
|
||||
}
|
||||
|
||||
- ieee80211_sta_set_rx_nss(link_sta);
|
||||
+ ieee80211_sta_init_nss(link_sta);
|
||||
|
||||
return ret;
|
||||
}
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -2103,7 +2103,7 @@ enum ieee80211_sta_rx_bandwidth
|
||||
ieee80211_sta_cap_rx_bw(struct link_sta_info *link_sta);
|
||||
enum ieee80211_sta_rx_bandwidth
|
||||
ieee80211_sta_cur_vht_bw(struct link_sta_info *link_sta);
|
||||
-void ieee80211_sta_set_rx_nss(struct link_sta_info *link_sta);
|
||||
+void ieee80211_sta_init_nss(struct link_sta_info *link_sta);
|
||||
enum ieee80211_sta_rx_bandwidth
|
||||
ieee80211_chan_width_to_rx_bw(enum nl80211_chan_width width);
|
||||
enum nl80211_chan_width
|
||||
--- a/net/mac80211/rate.c
|
||||
+++ b/net/mac80211/rate.c
|
||||
@@ -37,7 +37,7 @@ void rate_control_rate_init(struct sta_i
|
||||
struct ieee80211_supported_band *sband;
|
||||
struct ieee80211_chanctx_conf *chanctx_conf;
|
||||
|
||||
- ieee80211_sta_set_rx_nss(&sta->deflink);
|
||||
+ ieee80211_sta_init_nss(&sta->deflink);
|
||||
|
||||
if (!ref)
|
||||
return;
|
||||
--- a/net/mac80211/sta_info.h
|
||||
+++ b/net/mac80211/sta_info.h
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright 2002-2005, Devicescape Software, Inc.
|
||||
* Copyright 2013-2014 Intel Mobile Communications GmbH
|
||||
* Copyright(c) 2015-2017 Intel Deutschland GmbH
|
||||
- * Copyright(c) 2020-2022 Intel Corporation
|
||||
+ * Copyright(c) 2020-2024 Intel Corporation
|
||||
*/
|
||||
|
||||
#ifndef STA_INFO_H
|
||||
@@ -485,6 +485,8 @@ struct ieee80211_fragment_cache {
|
||||
* same for non-MLD STA. This is used as key for searching link STA
|
||||
* @link_id: Link ID uniquely identifying the link STA. This is 0 for non-MLD
|
||||
* and set to the corresponding vif LinkId for MLD STA
|
||||
+ * @op_mode_nss: NSS limit as set by operating mode notification, or 0
|
||||
+ * @capa_nss: NSS limit as determined by local and peer capabilities
|
||||
* @link_hash_node: hash node for rhashtable
|
||||
* @sta: Points to the STA info
|
||||
* @gtk: group keys negotiated with this station, if any
|
||||
@@ -520,6 +522,8 @@ struct link_sta_info {
|
||||
u8 addr[ETH_ALEN];
|
||||
u8 link_id;
|
||||
|
||||
+ u8 op_mode_nss, capa_nss;
|
||||
+
|
||||
struct rhlist_head link_hash_node;
|
||||
|
||||
struct sta_info *sta;
|
||||
--- a/net/mac80211/vht.c
|
||||
+++ b/net/mac80211/vht.c
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* Portions of this file
|
||||
* Copyright(c) 2015 - 2016 Intel Deutschland GmbH
|
||||
- * Copyright (C) 2018 - 2023 Intel Corporation
|
||||
+ * Copyright (C) 2018 - 2024 Intel Corporation
|
||||
*/
|
||||
|
||||
#include <linux/ieee80211.h>
|
||||
@@ -541,15 +541,11 @@ ieee80211_sta_cur_vht_bw(struct link_sta
|
||||
return bw;
|
||||
}
|
||||
|
||||
-void ieee80211_sta_set_rx_nss(struct link_sta_info *link_sta)
|
||||
+void ieee80211_sta_init_nss(struct link_sta_info *link_sta)
|
||||
{
|
||||
u8 ht_rx_nss = 0, vht_rx_nss = 0, he_rx_nss = 0, eht_rx_nss = 0, rx_nss;
|
||||
bool support_160;
|
||||
|
||||
- /* if we received a notification already don't overwrite it */
|
||||
- if (link_sta->pub->rx_nss)
|
||||
- return;
|
||||
-
|
||||
if (link_sta->pub->eht_cap.has_eht) {
|
||||
int i;
|
||||
const u8 *rx_nss_mcs = (void *)&link_sta->pub->eht_cap.eht_mcs_nss_supp;
|
||||
@@ -627,7 +623,15 @@ void ieee80211_sta_set_rx_nss(struct lin
|
||||
rx_nss = max(vht_rx_nss, ht_rx_nss);
|
||||
rx_nss = max(he_rx_nss, rx_nss);
|
||||
rx_nss = max(eht_rx_nss, rx_nss);
|
||||
- link_sta->pub->rx_nss = max_t(u8, 1, rx_nss);
|
||||
+ rx_nss = max_t(u8, 1, rx_nss);
|
||||
+ link_sta->capa_nss = rx_nss;
|
||||
+
|
||||
+ /* that shouldn't be set yet, but we can handle it anyway */
|
||||
+ if (link_sta->op_mode_nss)
|
||||
+ link_sta->pub->rx_nss =
|
||||
+ min_t(u8, rx_nss, link_sta->op_mode_nss);
|
||||
+ else
|
||||
+ link_sta->pub->rx_nss = rx_nss;
|
||||
}
|
||||
|
||||
u32 __ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata,
|
||||
@@ -637,7 +641,7 @@ u32 __ieee80211_vht_handle_opmode(struct
|
||||
enum ieee80211_sta_rx_bandwidth new_bw;
|
||||
struct sta_opmode_info sta_opmode = {};
|
||||
u32 changed = 0;
|
||||
- u8 nss, cur_nss;
|
||||
+ u8 nss;
|
||||
|
||||
/* ignore - no support for BF yet */
|
||||
if (opmode & IEEE80211_OPMODE_NOTIF_RX_NSS_TYPE_BF)
|
||||
@@ -647,23 +651,17 @@ u32 __ieee80211_vht_handle_opmode(struct
|
||||
nss >>= IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT;
|
||||
nss += 1;
|
||||
|
||||
- if (link_sta->pub->rx_nss != nss) {
|
||||
- cur_nss = link_sta->pub->rx_nss;
|
||||
- /* Reset rx_nss and call ieee80211_sta_set_rx_nss() which
|
||||
- * will set the same to max nss value calculated based on capability.
|
||||
- */
|
||||
- link_sta->pub->rx_nss = 0;
|
||||
- ieee80211_sta_set_rx_nss(link_sta);
|
||||
- /* Do not allow an nss change to rx_nss greater than max_nss
|
||||
- * negotiated and capped to APs capability during association.
|
||||
- */
|
||||
- if (nss <= link_sta->pub->rx_nss) {
|
||||
- link_sta->pub->rx_nss = nss;
|
||||
- sta_opmode.rx_nss = nss;
|
||||
- changed |= IEEE80211_RC_NSS_CHANGED;
|
||||
- sta_opmode.changed |= STA_OPMODE_N_SS_CHANGED;
|
||||
+ if (link_sta->op_mode_nss != nss) {
|
||||
+ if (nss <= link_sta->capa_nss) {
|
||||
+ link_sta->op_mode_nss = nss;
|
||||
+
|
||||
+ if (nss != link_sta->pub->rx_nss) {
|
||||
+ link_sta->pub->rx_nss = nss;
|
||||
+ changed |= IEEE80211_RC_NSS_CHANGED;
|
||||
+ sta_opmode.rx_nss = link_sta->pub->rx_nss;
|
||||
+ sta_opmode.changed |= STA_OPMODE_N_SS_CHANGED;
|
||||
+ }
|
||||
} else {
|
||||
- link_sta->pub->rx_nss = cur_nss;
|
||||
pr_warn_ratelimited("Ignoring NSS change in VHT Operating Mode Notification from %pM with invalid nss %d",
|
||||
link_sta->pub->addr, nss);
|
||||
}
|
||||
@ -56,7 +56,7 @@
|
||||
__NL80211_ATTR_AFTER_LAST,
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -3078,6 +3078,19 @@ static int ieee80211_get_tx_power(struct
|
||||
@@ -3079,6 +3079,19 @@ static int ieee80211_get_tx_power(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@
|
||||
static void ieee80211_rfkill_poll(struct wiphy *wiphy)
|
||||
{
|
||||
struct ieee80211_local *local = wiphy_priv(wiphy);
|
||||
@@ -5008,6 +5021,7 @@ const struct cfg80211_ops mac80211_confi
|
||||
@@ -5009,6 +5022,7 @@ const struct cfg80211_ops mac80211_confi
|
||||
.set_wiphy_params = ieee80211_set_wiphy_params,
|
||||
.set_tx_power = ieee80211_set_tx_power,
|
||||
.get_tx_power = ieee80211_get_tx_power,
|
||||
@ -128,7 +128,7 @@
|
||||
local->hw.max_mtu = IEEE80211_MAX_DATA_LEN;
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -820,6 +820,7 @@ static const struct nla_policy nl80211_p
|
||||
@@ -830,6 +830,7 @@ static const struct nla_policy nl80211_p
|
||||
[NL80211_ATTR_MLO_SUPPORT] = { .type = NLA_FLAG },
|
||||
[NL80211_ATTR_MAX_NUM_AKM_SUITES] = { .type = NLA_REJECT },
|
||||
[NL80211_ATTR_PUNCT_BITMAP] = NLA_POLICY_RANGE(NLA_U8, 0, 0xffff),
|
||||
@ -136,7 +136,7 @@
|
||||
};
|
||||
|
||||
/* policy for the key attributes */
|
||||
@@ -3547,6 +3548,22 @@ static int nl80211_set_wiphy(struct sk_b
|
||||
@@ -3584,6 +3585,22 @@ static int nl80211_set_wiphy(struct sk_b
|
||||
if (result)
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -2368,6 +2368,13 @@ static void sta_stats_decode_rate(struct
|
||||
@@ -2382,6 +2382,13 @@ static void sta_stats_decode_rate(struct
|
||||
|
||||
sband = local->hw.wiphy->bands[band];
|
||||
|
||||
|
||||
@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mbedtls
|
||||
PKG_VERSION:=2.28.8
|
||||
PKG_VERSION:=2.28.9
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_FLAGS:=no-mips16 gc-sections no-lto
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=4fef7de0d8d542510d726d643350acb3cdb9dc76ad45611b59c9aa08372b4213
|
||||
PKG_HASH:=e4dbcf86a4fb31506482888560f02b161e0ecfb82fee0643abcfc86abee5817e
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=gpl-2.0.txt
|
||||
|
||||
@ -22,7 +22,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
* If the verification couldn't be completed, the flag value is
|
||||
--- a/library/x509_crt.c
|
||||
+++ b/library/x509_crt.c
|
||||
@@ -45,6 +45,10 @@
|
||||
@@ -46,6 +46,10 @@
|
||||
|
||||
#if defined(MBEDTLS_HAVE_TIME)
|
||||
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
|
||||
@ -33,7 +33,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
@@ -2990,6 +2994,61 @@ find_parent:
|
||||
@@ -2991,6 +2995,61 @@ find_parent:
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
/*
|
||||
* Check for CN match
|
||||
*/
|
||||
@@ -3010,24 +3069,51 @@ static int x509_crt_check_cn(const mbedt
|
||||
@@ -3011,24 +3070,51 @@ static int x509_crt_check_cn(const mbedt
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3038,31 +3124,23 @@ static void x509_crt_verify_name(const m
|
||||
@@ -3039,31 +3125,23 @@ static void x509_crt_verify_name(const m
|
||||
uint32_t *flags)
|
||||
{
|
||||
const mbedtls_x509_name *name;
|
||||
|
||||
@ -179,6 +179,8 @@ define Build/InstallDev
|
||||
$(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' -e 's/$$$$INCS //g' \
|
||||
$(2)/bin/ncursesw6-config
|
||||
ln -sf $(STAGING_DIR)/host/bin/ncursesw6-config $(1)/usr/bin/ncursesw6-config
|
||||
$(SED) 's,$(TOOLCHAIN_DIR),$(STAGING_DIR),g' \
|
||||
$(1)/usr/lib/pkgconfig/ncursesw.pc
|
||||
endef
|
||||
|
||||
define Host/Compile
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=openssl
|
||||
PKG_VERSION:=3.0.14
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=3.0.15
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_FLAGS:=no-mips16 gc-sections no-lto
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
@ -26,7 +26,7 @@ PKG_SOURCE_URL:= \
|
||||
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \
|
||||
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/old/$(PKG_BASE)/
|
||||
|
||||
PKG_HASH:=eeca035d4dd4e84fc25846d952da6297484afa0650a6f84c682e39df3a4123ca
|
||||
PKG_HASH:=23c666d0edf20f14249b3d8f0368acaee9ab585b09e1de82107c66e1f3ec9533
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ucode
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=https://github.com/jow-/ucode.git
|
||||
@ -26,7 +26,7 @@ include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
CMAKE_OPTIONS += \
|
||||
-DSOVERSION=$(PKG_ABI_VERSION)
|
||||
-DSOVERSION=$(PKG_ABI_VERSION) \
|
||||
-DCMAKE_SKIP_RPATH=FALSE \
|
||||
-DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib"
|
||||
|
||||
|
||||
@ -76,6 +76,7 @@ CONFIG_ARM64_ERRATUM_2441007=y
|
||||
CONFIG_ARM64_ERRATUM_2441009=y
|
||||
CONFIG_ARM64_ERRATUM_2457168=y
|
||||
CONFIG_ARM64_ERRATUM_2658417=y
|
||||
CONFIG_ARM64_ERRATUM_3194386=y
|
||||
CONFIG_ARM64_ERRATUM_819472=y
|
||||
CONFIG_ARM64_ERRATUM_824069=y
|
||||
CONFIG_ARM64_ERRATUM_826319=y
|
||||
|
||||
@ -9,7 +9,7 @@ SVN-Revision: 33385
|
||||
|
||||
--- a/drivers/mtd/nand/raw/Kconfig
|
||||
+++ b/drivers/mtd/nand/raw/Kconfig
|
||||
@@ -555,4 +555,12 @@ config MTD_NAND_DISKONCHIP_BBTWRITE
|
||||
@@ -554,4 +554,12 @@ config MTD_NAND_DISKONCHIP_BBTWRITE
|
||||
load time (assuming you build diskonchip as a module) with the module
|
||||
parameter "inftl_bbt_write=1".
|
||||
|
||||
|
||||
@ -259,7 +259,7 @@ SVN-Revision: 35130
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/ipv6.h>
|
||||
#include <linux/icmpv6.h>
|
||||
@@ -946,10 +947,10 @@ static void tcp_v6_send_response(const s
|
||||
@@ -943,10 +944,10 @@ static void tcp_v6_send_response(const s
|
||||
topt = (__be32 *)(t1 + 1);
|
||||
|
||||
if (tsecr) {
|
||||
@ -337,9 +337,9 @@ SVN-Revision: 35130
|
||||
#endif /* _LINUX_TYPES_H */
|
||||
--- a/net/ipv4/af_inet.c
|
||||
+++ b/net/ipv4/af_inet.c
|
||||
@@ -1491,8 +1491,8 @@ struct sk_buff *inet_gro_receive(struct
|
||||
@@ -1490,8 +1490,8 @@ struct sk_buff *inet_gro_receive(struct
|
||||
if (unlikely(ip_fast_csum((u8 *)iph, 5)))
|
||||
goto out_unlock;
|
||||
goto out;
|
||||
|
||||
- id = ntohl(*(__be32 *)&iph->id);
|
||||
- flush = (u16)((ntohl(*(__be32 *)iph) ^ skb_gro_len(skb)) | (id & ~IP_DF));
|
||||
@ -579,7 +579,7 @@ SVN-Revision: 35130
|
||||
goto next_ht;
|
||||
--- a/net/ipv6/ip6_offload.c
|
||||
+++ b/net/ipv6/ip6_offload.c
|
||||
@@ -241,7 +241,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
|
||||
@@ -240,7 +240,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
|
||||
continue;
|
||||
|
||||
iph2 = (struct ipv6hdr *)(p->data + off);
|
||||
@ -858,7 +858,7 @@ SVN-Revision: 35130
|
||||
|
||||
--- a/net/ipv4/tcp_offload.c
|
||||
+++ b/net/ipv4/tcp_offload.c
|
||||
@@ -223,7 +223,7 @@ struct sk_buff *tcp_gro_receive(struct l
|
||||
@@ -226,7 +226,7 @@ struct sk_buff *tcp_gro_receive(struct l
|
||||
|
||||
th2 = tcp_hdr(p);
|
||||
|
||||
@ -867,7 +867,7 @@ SVN-Revision: 35130
|
||||
NAPI_GRO_CB(p)->same_flow = 0;
|
||||
continue;
|
||||
}
|
||||
@@ -241,8 +241,8 @@ found:
|
||||
@@ -244,8 +244,8 @@ found:
|
||||
~(TCP_FLAG_CWR | TCP_FLAG_FIN | TCP_FLAG_PSH));
|
||||
flush |= (__force int)(th->ack_seq ^ th2->ack_seq);
|
||||
for (i = sizeof(*th); i < thlen; i += 4)
|
||||
|
||||
@ -97,7 +97,7 @@ Submitted-by: Christopher Hill <ch6574@gmail.com>
|
||||
obj-$(CONFIG_GPIO_RDA) += gpio-rda.o
|
||||
--- a/drivers/mtd/nand/raw/Kconfig
|
||||
+++ b/drivers/mtd/nand/raw/Kconfig
|
||||
@@ -563,4 +563,11 @@ config MTD_NAND_AR934X
|
||||
@@ -562,4 +562,11 @@ config MTD_NAND_AR934X
|
||||
Enables support for NAND controller on Qualcomm Atheros SoCs.
|
||||
This controller is found on AR934x and QCA955x SoCs.
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
|
||||
obj-$(CONFIG_GPIO_RDA) += gpio-rda.o
|
||||
--- a/drivers/mtd/nand/raw/Kconfig
|
||||
+++ b/drivers/mtd/nand/raw/Kconfig
|
||||
@@ -570,4 +570,10 @@ config MTD_NAND_RB4XX
|
||||
@@ -569,4 +569,10 @@ config MTD_NAND_RB4XX
|
||||
Enables support for the NAND flash chip on Mikrotik Routerboard
|
||||
RB4xx series.
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ This reverts commit 83b2a8fe43bda0c11981ad6afa5dd0104d78be28.
|
||||
|
||||
--- a/drivers/spi/spidev.c
|
||||
+++ b/drivers/spi/spidev.c
|
||||
@@ -413,7 +413,6 @@ spidev_ioctl(struct file *filp, unsigned
|
||||
@@ -412,7 +412,6 @@ spidev_ioctl(struct file *filp, unsigned
|
||||
else
|
||||
retval = get_user(tmp, (u32 __user *)arg);
|
||||
if (retval == 0) {
|
||||
@ -19,7 +19,7 @@ This reverts commit 83b2a8fe43bda0c11981ad6afa5dd0104d78be28.
|
||||
u32 save = spi->mode;
|
||||
|
||||
if (tmp & ~SPI_MODE_MASK) {
|
||||
@@ -421,10 +420,6 @@ spidev_ioctl(struct file *filp, unsigned
|
||||
@@ -420,10 +419,6 @@ spidev_ioctl(struct file *filp, unsigned
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -24,16 +24,16 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
--- a/net/bluetooth/smp.c
|
||||
+++ b/net/bluetooth/smp.c
|
||||
@@ -2214,7 +2214,7 @@ mackey_and_ltk:
|
||||
@@ -2208,7 +2208,7 @@ mackey_and_ltk:
|
||||
if (err)
|
||||
return SMP_UNSPECIFIED;
|
||||
|
||||
- if (smp->method == REQ_OOB) {
|
||||
+ if (smp->method == JUST_WORKS || smp->method == REQ_OOB) {
|
||||
if (hcon->out) {
|
||||
if (test_bit(SMP_FLAG_INITIATOR, &smp->flags)) {
|
||||
sc_dhkey_check(smp);
|
||||
SMP_ALLOW_CMD(smp, SMP_CMD_DHKEY_CHECK);
|
||||
@@ -2229,9 +2229,6 @@ mackey_and_ltk:
|
||||
@@ -2223,9 +2223,6 @@ mackey_and_ltk:
|
||||
confirm_hint = 0;
|
||||
|
||||
confirm:
|
||||
|
||||
@ -13,12 +13,12 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/spi/spidev.c
|
||||
+++ b/drivers/spi/spidev.c
|
||||
@@ -759,7 +759,7 @@ static int spidev_probe(struct spi_devic
|
||||
* compatible string, it is a Linux implementation thing
|
||||
* rather than a description of the hardware.
|
||||
*/
|
||||
- WARN(spi->dev.of_node &&
|
||||
+ WARN(0 && spi->dev.of_node &&
|
||||
of_device_is_compatible(spi->dev.of_node, "spidev"),
|
||||
"%pOF: buggy DT: spidev listed directly in DT\n", spi->dev.of_node);
|
||||
@@ -698,7 +698,7 @@ MODULE_DEVICE_TABLE(spi, spidev_spi_ids)
|
||||
*/
|
||||
static int spidev_of_check(struct device *dev)
|
||||
{
|
||||
- if (device_property_match_string(dev, "compatible", "spidev") < 0)
|
||||
+ if (1 || device_property_match_string(dev, "compatible", "spidev") < 0)
|
||||
return 0;
|
||||
|
||||
dev_err(dev, "spidev listed directly in DT is not supported\n");
|
||||
|
||||
@ -125,7 +125,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
* non-error returns are a promise to giveback() the urb later
|
||||
* we drop ownership so next owner (or urb unlink) can get it
|
||||
*/
|
||||
@@ -5472,6 +5575,7 @@ static const struct hc_driver xhci_hc_dr
|
||||
@@ -5474,6 +5577,7 @@ static const struct hc_driver xhci_hc_dr
|
||||
.endpoint_reset = xhci_endpoint_reset,
|
||||
.check_bandwidth = xhci_check_bandwidth,
|
||||
.reset_bandwidth = xhci_reset_bandwidth,
|
||||
|
||||
@ -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
|
||||
|
||||
@@ -1324,6 +1327,9 @@
|
||||
@@ -1332,6 +1335,9 @@
|
||||
#define USB_VENDOR_ID_XAT 0x2505
|
||||
#define USB_DEVICE_ID_XAT_CSR 0x0220
|
||||
|
||||
|
||||
@ -24,4 +24,4 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
+ QUIRK_FLAG_DISABLE_AUTOSUSPEND | QUIRK_FLAG_GET_SAMPLE_RATE),
|
||||
DEVICE_FLG(0x0b0e, 0x0349, /* Jabra 550a */
|
||||
QUIRK_FLAG_CTL_MSG_DELAY_1M),
|
||||
DEVICE_FLG(0x0ecb, 0x205c, /* JBL Quantum610 Wireless */
|
||||
DEVICE_FLG(0x0c45, 0x6340, /* Sonix HD USB Camera */
|
||||
|
||||
@ -15,11 +15,11 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
--- a/drivers/spi/spidev.c
|
||||
+++ b/drivers/spi/spidev.c
|
||||
@@ -678,6 +678,7 @@ static const struct file_operations spid
|
||||
@@ -677,6 +677,7 @@ static const struct file_operations spid
|
||||
static struct class *spidev_class;
|
||||
|
||||
static const struct spi_device_id spidev_spi_ids[] = {
|
||||
+ { .name = "spidev" },
|
||||
{ .name = "bh2228fv" },
|
||||
{ .name = "dh2228fv" },
|
||||
{ .name = "ltc2488" },
|
||||
{ .name = "sx1301" },
|
||||
|
||||
@ -82,7 +82,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1247,9 +1284,14 @@ static const u16 bcm_sf2_4908_reg_offset
|
||||
@@ -1249,9 +1286,14 @@ static const u16 bcm_sf2_4908_reg_offset
|
||||
[REG_SPHY_CNTRL] = 0x24,
|
||||
[REG_CROSSBAR] = 0xc8,
|
||||
[REG_RGMII_11_CNTRL] = 0x014c,
|
||||
|
||||
@ -29,7 +29,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
|
||||
--- a/drivers/net/dsa/bcm_sf2.c
|
||||
+++ b/drivers/net/dsa/bcm_sf2.c
|
||||
@@ -1548,10 +1548,14 @@ static int bcm_sf2_sw_probe(struct platf
|
||||
@@ -1550,10 +1550,14 @@ static int bcm_sf2_sw_probe(struct platf
|
||||
rev = reg_readl(priv, REG_PHY_REVISION);
|
||||
priv->hw_params.gphy_rev = rev & PHY_REVISION_MASK;
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
|
||||
--- a/drivers/net/dsa/bcm_sf2.c
|
||||
+++ b/drivers/net/dsa/bcm_sf2.c
|
||||
@@ -1562,6 +1562,12 @@ static int bcm_sf2_sw_probe(struct platf
|
||||
@@ -1564,6 +1564,12 @@ static int bcm_sf2_sw_probe(struct platf
|
||||
priv->hw_params.core_rev >> 8, priv->hw_params.core_rev & 0xff,
|
||||
priv->irq0, priv->irq1);
|
||||
|
||||
|
||||
@ -582,7 +582,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
endmenu
|
||||
--- a/mm/huge_memory.c
|
||||
+++ b/mm/huge_memory.c
|
||||
@@ -2366,7 +2366,8 @@ static void __split_huge_page_tail(struc
|
||||
@@ -2362,7 +2362,8 @@ static void __split_huge_page_tail(struc
|
||||
#ifdef CONFIG_64BIT
|
||||
(1L << PG_arch_2) |
|
||||
#endif
|
||||
@ -594,7 +594,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
VM_BUG_ON_PAGE(tail > 2 && page_tail->mapping != TAIL_MAPPING,
|
||||
--- a/mm/memcontrol.c
|
||||
+++ b/mm/memcontrol.c
|
||||
@@ -5179,6 +5179,7 @@ static void __mem_cgroup_free(struct mem
|
||||
@@ -5199,6 +5199,7 @@ static void __mem_cgroup_free(struct mem
|
||||
|
||||
static void mem_cgroup_free(struct mem_cgroup *memcg)
|
||||
{
|
||||
@ -602,17 +602,17 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
memcg_wb_domain_exit(memcg);
|
||||
__mem_cgroup_free(memcg);
|
||||
}
|
||||
@@ -5242,6 +5243,7 @@ static struct mem_cgroup *mem_cgroup_all
|
||||
memcg->deferred_split_queue.split_queue_len = 0;
|
||||
#endif
|
||||
@@ -5262,6 +5263,7 @@ static struct mem_cgroup *mem_cgroup_all
|
||||
spin_lock(&memcg_idr_lock);
|
||||
idr_replace(&mem_cgroup_idr, memcg, memcg->id.id);
|
||||
spin_unlock(&memcg_idr_lock);
|
||||
+ lru_gen_init_memcg(memcg);
|
||||
return memcg;
|
||||
fail:
|
||||
mem_cgroup_id_remove(memcg);
|
||||
--- a/mm/memory.c
|
||||
+++ b/mm/memory.c
|
||||
@@ -4805,6 +4805,27 @@ static inline void mm_account_fault(stru
|
||||
@@ -4804,6 +4804,27 @@ static inline void mm_account_fault(stru
|
||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
|
||||
}
|
||||
|
||||
@ -640,7 +640,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
/*
|
||||
* By the time we get here, we already hold the mm semaphore
|
||||
*
|
||||
@@ -4836,11 +4857,15 @@ vm_fault_t handle_mm_fault(struct vm_are
|
||||
@@ -4835,11 +4856,15 @@ vm_fault_t handle_mm_fault(struct vm_are
|
||||
if (flags & FAULT_FLAG_USER)
|
||||
mem_cgroup_enter_user_fault();
|
||||
|
||||
|
||||
@ -414,7 +414,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
/* forking complete and child started to run, tell ptracer */
|
||||
--- a/kernel/sched/core.c
|
||||
+++ b/kernel/sched/core.c
|
||||
@@ -5014,6 +5014,7 @@ context_switch(struct rq *rq, struct tas
|
||||
@@ -5011,6 +5011,7 @@ context_switch(struct rq *rq, struct tas
|
||||
* finish_task_switch()'s mmdrop().
|
||||
*/
|
||||
switch_mm_irqs_off(prev->active_mm, next->mm, next);
|
||||
@ -424,7 +424,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
/* will mmdrop() in finish_task_switch(). */
|
||||
--- a/mm/memcontrol.c
|
||||
+++ b/mm/memcontrol.c
|
||||
@@ -6213,6 +6213,30 @@ static void mem_cgroup_move_task(void)
|
||||
@@ -6233,6 +6233,30 @@ static void mem_cgroup_move_task(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -455,7 +455,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
static int seq_puts_memcg_tunable(struct seq_file *m, unsigned long value)
|
||||
{
|
||||
if (value == PAGE_COUNTER_MAX)
|
||||
@@ -6556,6 +6580,7 @@ struct cgroup_subsys memory_cgrp_subsys
|
||||
@@ -6576,6 +6600,7 @@ struct cgroup_subsys memory_cgrp_subsys
|
||||
.css_reset = mem_cgroup_css_reset,
|
||||
.css_rstat_flush = mem_cgroup_css_rstat_flush,
|
||||
.can_attach = mem_cgroup_can_attach,
|
||||
|
||||
@ -92,7 +92,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
mark_page_accessed(page);
|
||||
}
|
||||
rss[mm_counter(page)]--;
|
||||
@@ -4808,8 +4808,8 @@ static inline void mm_account_fault(stru
|
||||
@@ -4807,8 +4807,8 @@ static inline void mm_account_fault(stru
|
||||
#ifdef CONFIG_LRU_GEN
|
||||
static void lru_gen_enter_fault(struct vm_area_struct *vma)
|
||||
{
|
||||
|
||||
@ -328,7 +328,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
if (order > 0)
|
||||
return 0;
|
||||
|
||||
@@ -5322,6 +5335,7 @@ static int mem_cgroup_css_online(struct
|
||||
@@ -5342,6 +5355,7 @@ static int mem_cgroup_css_online(struct
|
||||
if (unlikely(mem_cgroup_is_root(memcg)))
|
||||
queue_delayed_work(system_unbound_wq, &stats_flush_dwork,
|
||||
2UL*HZ);
|
||||
@ -336,7 +336,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -5348,6 +5362,7 @@ static void mem_cgroup_css_offline(struc
|
||||
@@ -5368,6 +5382,7 @@ static void mem_cgroup_css_offline(struc
|
||||
memcg_offline_kmem(memcg);
|
||||
reparent_shrinker_deferred(memcg);
|
||||
wb_memcg_offline(memcg);
|
||||
@ -344,7 +344,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
|
||||
drain_all_stock(memcg);
|
||||
|
||||
@@ -5359,6 +5374,7 @@ static void mem_cgroup_css_released(stru
|
||||
@@ -5379,6 +5394,7 @@ static void mem_cgroup_css_released(stru
|
||||
struct mem_cgroup *memcg = mem_cgroup_from_css(css);
|
||||
|
||||
invalidate_reclaim_iterators(memcg);
|
||||
|
||||
@ -48,7 +48,7 @@ Signed-off-by: Alexei Starovoitov <ast@kernel.org>
|
||||
int xdp_rxq_info_reg(struct xdp_rxq_info *xdp_rxq,
|
||||
--- a/net/core/xdp.c
|
||||
+++ b/net/core/xdp.c
|
||||
@@ -407,12 +407,38 @@ static void __xdp_return(void *data, str
|
||||
@@ -405,12 +405,38 @@ static void __xdp_return(void *data, str
|
||||
|
||||
void xdp_return_frame(struct xdp_frame *xdpf)
|
||||
{
|
||||
@ -87,7 +87,7 @@ Signed-off-by: Alexei Starovoitov <ast@kernel.org>
|
||||
__xdp_return(xdpf->data, &xdpf->mem, true, NULL);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xdp_return_frame_rx_napi);
|
||||
@@ -448,7 +474,7 @@ void xdp_return_frame_bulk(struct xdp_fr
|
||||
@@ -446,7 +472,7 @@ void xdp_return_frame_bulk(struct xdp_fr
|
||||
struct xdp_mem_allocator *xa;
|
||||
|
||||
if (mem->type != MEM_TYPE_PAGE_POOL) {
|
||||
@ -96,7 +96,7 @@ Signed-off-by: Alexei Starovoitov <ast@kernel.org>
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -467,12 +493,38 @@ void xdp_return_frame_bulk(struct xdp_fr
|
||||
@@ -465,12 +491,38 @@ void xdp_return_frame_bulk(struct xdp_fr
|
||||
bq->xa = rhashtable_lookup(mem_id_ht, &mem->id, mem_id_rht_params);
|
||||
}
|
||||
|
||||
|
||||
@ -304,7 +304,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
--- a/drivers/net/dsa/bcm_sf2.c
|
||||
+++ b/drivers/net/dsa/bcm_sf2.c
|
||||
@@ -692,7 +692,7 @@ static void bcm_sf2_sw_validate(struct d
|
||||
@@ -694,7 +694,7 @@ static void bcm_sf2_sw_validate(struct d
|
||||
state->interface != PHY_INTERFACE_MODE_GMII &&
|
||||
state->interface != PHY_INTERFACE_MODE_INTERNAL &&
|
||||
state->interface != PHY_INTERFACE_MODE_MOCA) {
|
||||
@ -313,7 +313,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (port != core_readl(priv, CORE_IMP0_PRT_ID))
|
||||
dev_err(ds->dev,
|
||||
"Unsupported interface: %d for port %d\n",
|
||||
@@ -720,10 +720,8 @@ static void bcm_sf2_sw_validate(struct d
|
||||
@@ -722,10 +722,8 @@ static void bcm_sf2_sw_validate(struct d
|
||||
phylink_set(mask, 100baseT_Half);
|
||||
phylink_set(mask, 100baseT_Full);
|
||||
|
||||
@ -877,7 +877,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
ethtool_link_ksettings_add_link_mode(ks, supported, FEC_RS);
|
||||
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
|
||||
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
|
||||
@@ -1565,7 +1565,7 @@ static void axienet_validate(struct phyl
|
||||
@@ -1566,7 +1566,7 @@ static void axienet_validate(struct phyl
|
||||
netdev_warn(ndev, "Cannot use PHY mode %s, supported: %s\n",
|
||||
phy_modes(state->interface),
|
||||
phy_modes(lp->phy_mode));
|
||||
@ -886,7 +886,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1598,10 +1598,8 @@ static void axienet_validate(struct phyl
|
||||
@@ -1599,10 +1599,8 @@ static void axienet_validate(struct phyl
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -263,7 +263,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
__ETHTOOL_A_LINKMODES_CNT,
|
||||
--- a/net/ethtool/ioctl.c
|
||||
+++ b/net/ethtool/ioctl.c
|
||||
@@ -559,6 +559,7 @@ static int ethtool_get_link_ksettings(st
|
||||
@@ -562,6 +562,7 @@ static int ethtool_get_link_ksettings(st
|
||||
= __ETHTOOL_LINK_MODE_MASK_NU32;
|
||||
link_ksettings.base.master_slave_cfg = MASTER_SLAVE_CFG_UNSUPPORTED;
|
||||
link_ksettings.base.master_slave_state = MASTER_SLAVE_STATE_UNSUPPORTED;
|
||||
|
||||
@ -22,7 +22,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/dsa/b53/b53_common.c
|
||||
+++ b/drivers/net/dsa/b53/b53_common.c
|
||||
@@ -2300,7 +2300,7 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2303,7 +2303,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM5325_DEVICE_ID,
|
||||
.dev_name = "BCM5325",
|
||||
.vlans = 16,
|
||||
@ -31,7 +31,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.arl_bins = 2,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 5,
|
||||
@@ -2311,7 +2311,7 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2314,7 +2314,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM5365_DEVICE_ID,
|
||||
.dev_name = "BCM5365",
|
||||
.vlans = 256,
|
||||
@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.arl_bins = 2,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 5,
|
||||
@@ -2322,7 +2322,7 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2325,7 +2325,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM5389_DEVICE_ID,
|
||||
.dev_name = "BCM5389",
|
||||
.vlans = 4096,
|
||||
@ -49,7 +49,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@@ -2336,7 +2336,7 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2339,7 +2339,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM5395_DEVICE_ID,
|
||||
.dev_name = "BCM5395",
|
||||
.vlans = 4096,
|
||||
@ -58,7 +58,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@@ -2350,7 +2350,7 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2353,7 +2353,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM5397_DEVICE_ID,
|
||||
.dev_name = "BCM5397",
|
||||
.vlans = 4096,
|
||||
@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@@ -2364,7 +2364,7 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2367,7 +2367,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM5398_DEVICE_ID,
|
||||
.dev_name = "BCM5398",
|
||||
.vlans = 4096,
|
||||
@ -76,7 +76,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@@ -2378,7 +2378,7 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2381,7 +2381,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM53115_DEVICE_ID,
|
||||
.dev_name = "BCM53115",
|
||||
.vlans = 4096,
|
||||
@ -85,7 +85,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
@@ -2392,7 +2392,7 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2395,7 +2395,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM53125_DEVICE_ID,
|
||||
.dev_name = "BCM53125",
|
||||
.vlans = 4096,
|
||||
@ -94,7 +94,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@@ -2434,7 +2434,7 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2437,7 +2437,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM53010_DEVICE_ID,
|
||||
.dev_name = "BCM53010",
|
||||
.vlans = 4096,
|
||||
@ -103,7 +103,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@@ -2476,7 +2476,7 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2479,7 +2479,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM53018_DEVICE_ID,
|
||||
.dev_name = "BCM53018",
|
||||
.vlans = 4096,
|
||||
@ -112,7 +112,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@@ -2490,7 +2490,7 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2493,7 +2493,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM53019_DEVICE_ID,
|
||||
.dev_name = "BCM53019",
|
||||
.vlans = 4096,
|
||||
@ -121,7 +121,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@@ -2632,7 +2632,6 @@ static int b53_switch_init(struct b53_de
|
||||
@@ -2635,7 +2635,6 @@ static int b53_switch_init(struct b53_de
|
||||
dev->cpu_port = 5;
|
||||
}
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/dsa/b53/b53_common.c
|
||||
+++ b/drivers/net/dsa/b53/b53_common.c
|
||||
@@ -2298,7 +2298,6 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2301,7 +2301,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 2,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 5,
|
||||
@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.duplex_reg = B53_DUPLEX_STAT_FE,
|
||||
},
|
||||
{
|
||||
@@ -2309,7 +2308,6 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2312,7 +2311,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 2,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 5,
|
||||
@ -35,7 +35,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.duplex_reg = B53_DUPLEX_STAT_FE,
|
||||
},
|
||||
{
|
||||
@@ -2320,7 +2318,6 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2323,7 +2321,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@ -43,7 +43,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2334,7 +2331,6 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2337,7 +2334,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@ -51,7 +51,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2348,7 +2344,6 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2351,7 +2347,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@ -59,7 +59,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.vta_regs = B53_VTA_REGS_9798,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2362,7 +2357,6 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2365,7 +2360,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.vta_regs = B53_VTA_REGS_9798,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2377,7 +2371,6 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2380,7 +2374,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_buckets = 1024,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.imp_port = 8,
|
||||
@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
.jumbo_size_reg = B53_JUMBO_MAX_SIZE,
|
||||
@@ -2390,7 +2383,6 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2393,7 +2386,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@ -83,7 +83,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2404,7 +2396,6 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2407,7 +2399,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@ -91,7 +91,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2418,7 +2409,6 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2421,7 +2412,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@ -99,7 +99,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.vta_regs = B53_VTA_REGS_63XX,
|
||||
.duplex_reg = B53_DUPLEX_STAT_63XX,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK_63XX,
|
||||
@@ -2432,7 +2422,6 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2435,7 +2425,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@ -107,7 +107,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2446,7 +2435,6 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2449,7 +2438,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2460,7 +2448,6 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2463,7 +2451,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@ -123,7 +123,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2474,7 +2461,6 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2477,7 +2464,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@ -131,7 +131,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2488,7 +2474,6 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2491,7 +2477,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@ -139,7 +139,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2502,7 +2487,6 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2505,7 +2490,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@ -147,7 +147,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2516,7 +2500,6 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2519,7 +2503,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@ -155,7 +155,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2545,7 +2528,6 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2548,7 +2531,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@ -163,7 +163,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2559,7 +2541,6 @@ static const struct b53_chip_data b53_sw
|
||||
@@ -2562,7 +2544,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 256,
|
||||
.imp_port = 8,
|
||||
@ -171,7 +171,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2585,7 +2566,6 @@ static int b53_switch_init(struct b53_de
|
||||
@@ -2588,7 +2569,6 @@ static int b53_switch_init(struct b53_de
|
||||
dev->vta_regs[2] = chip->vta_regs[2];
|
||||
dev->jumbo_pm_reg = chip->jumbo_pm_reg;
|
||||
dev->imp_port = chip->imp_port;
|
||||
@ -179,7 +179,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
dev->num_vlans = chip->vlans;
|
||||
dev->num_arl_bins = chip->arl_bins;
|
||||
dev->num_arl_buckets = chip->arl_buckets;
|
||||
@@ -2617,13 +2597,6 @@ static int b53_switch_init(struct b53_de
|
||||
@@ -2620,13 +2600,6 @@ static int b53_switch_init(struct b53_de
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
static void stmmac_tx_timer_arm(struct stmmac_priv *priv, u32 queue);
|
||||
static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue);
|
||||
|
||||
@@ -1713,9 +1716,6 @@ static int __init_dma_rx_desc_rings(stru
|
||||
@@ -1715,9 +1718,6 @@ static int __init_dma_rx_desc_rings(stru
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
/* Setup the chained descriptor addresses */
|
||||
if (priv->mode == STMMAC_CHAIN_MODE) {
|
||||
if (priv->extend_desc)
|
||||
@@ -1821,12 +1821,6 @@ static int __init_dma_tx_desc_rings(stru
|
||||
@@ -1823,12 +1823,6 @@ static int __init_dma_tx_desc_rings(stru
|
||||
tx_q->tx_skbuff[i] = NULL;
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2695,10 +2689,7 @@ static void stmmac_tx_err(struct stmmac_
|
||||
@@ -2697,10 +2691,7 @@ static void stmmac_tx_err(struct stmmac_
|
||||
stmmac_stop_tx_dma(priv, chan);
|
||||
dma_free_tx_skbufs(priv, chan);
|
||||
stmmac_clear_tx_descriptors(priv, chan);
|
||||
@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||
tx_q->dma_tx_phy, chan);
|
||||
stmmac_start_tx_dma(priv, chan);
|
||||
@@ -3783,6 +3774,8 @@ static int stmmac_open(struct net_device
|
||||
@@ -3785,6 +3776,8 @@ static int stmmac_open(struct net_device
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
ret = stmmac_hw_setup(dev, true);
|
||||
if (ret < 0) {
|
||||
netdev_err(priv->dev, "%s: Hw setup failed\n", __func__);
|
||||
@@ -6412,6 +6405,7 @@ void stmmac_enable_rx_queue(struct stmma
|
||||
@@ -6414,6 +6407,7 @@ void stmmac_enable_rx_queue(struct stmma
|
||||
return;
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
stmmac_clear_rx_descriptors(priv, queue);
|
||||
|
||||
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||
@@ -6473,6 +6467,7 @@ void stmmac_enable_tx_queue(struct stmma
|
||||
@@ -6475,6 +6469,7 @@ void stmmac_enable_tx_queue(struct stmma
|
||||
return;
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
stmmac_clear_tx_descriptors(priv, queue);
|
||||
|
||||
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||
@@ -7400,6 +7395,25 @@ int stmmac_suspend(struct device *dev)
|
||||
@@ -7402,6 +7397,25 @@ int stmmac_suspend(struct device *dev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(stmmac_suspend);
|
||||
|
||||
@ -113,7 +113,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
/**
|
||||
* stmmac_reset_queues_param - reset queue parameters
|
||||
* @priv: device pointer
|
||||
@@ -7410,22 +7424,11 @@ static void stmmac_reset_queues_param(st
|
||||
@@ -7412,22 +7426,11 @@ static void stmmac_reset_queues_param(st
|
||||
u32 tx_cnt = priv->plat->tx_queues_to_use;
|
||||
u32 queue;
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
@@ -3837,8 +3837,6 @@ static int stmmac_release(struct net_dev
|
||||
@@ -3839,8 +3839,6 @@ static int stmmac_release(struct net_dev
|
||||
struct stmmac_priv *priv = netdev_priv(dev);
|
||||
u32 chan;
|
||||
|
||||
@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
if (device_may_wakeup(priv->device))
|
||||
phylink_speed_down(priv->phylink, false);
|
||||
/* Stop and disconnect the PHY */
|
||||
@@ -3850,6 +3848,8 @@ static int stmmac_release(struct net_dev
|
||||
@@ -3852,6 +3850,8 @@ static int stmmac_release(struct net_dev
|
||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||
hrtimer_cancel(&priv->tx_queue[chan].txtimer);
|
||||
|
||||
|
||||
@ -189,7 +189,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
if (tx_q->dirty_tx != tx_q->cur_tx)
|
||||
return -EBUSY; /* still unfinished work */
|
||||
@@ -1310,7 +1310,7 @@ static void stmmac_display_rx_rings(stru
|
||||
@@ -1312,7 +1312,7 @@ static void stmmac_display_rx_rings(stru
|
||||
|
||||
/* Display RX rings */
|
||||
for (queue = 0; queue < rx_cnt; queue++) {
|
||||
@ -198,7 +198,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
pr_info("\tRX Queue %u rings\n", queue);
|
||||
|
||||
@@ -1323,7 +1323,7 @@ static void stmmac_display_rx_rings(stru
|
||||
@@ -1325,7 +1325,7 @@ static void stmmac_display_rx_rings(stru
|
||||
}
|
||||
|
||||
/* Display RX ring */
|
||||
@ -207,7 +207,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
rx_q->dma_rx_phy, desc_size);
|
||||
}
|
||||
}
|
||||
@@ -1337,7 +1337,7 @@ static void stmmac_display_tx_rings(stru
|
||||
@@ -1339,7 +1339,7 @@ static void stmmac_display_tx_rings(stru
|
||||
|
||||
/* Display TX rings */
|
||||
for (queue = 0; queue < tx_cnt; queue++) {
|
||||
@ -216,7 +216,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
pr_info("\tTX Queue %d rings\n", queue);
|
||||
|
||||
@@ -1352,7 +1352,7 @@ static void stmmac_display_tx_rings(stru
|
||||
@@ -1354,7 +1354,7 @@ static void stmmac_display_tx_rings(stru
|
||||
desc_size = sizeof(struct dma_desc);
|
||||
}
|
||||
|
||||
@ -225,7 +225,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
tx_q->dma_tx_phy, desc_size);
|
||||
}
|
||||
}
|
||||
@@ -1393,21 +1393,21 @@ static int stmmac_set_bfsize(int mtu, in
|
||||
@@ -1395,21 +1395,21 @@ static int stmmac_set_bfsize(int mtu, in
|
||||
*/
|
||||
static void stmmac_clear_rx_descriptors(struct stmmac_priv *priv, u32 queue)
|
||||
{
|
||||
@ -253,7 +253,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1419,12 +1419,12 @@ static void stmmac_clear_rx_descriptors(
|
||||
@@ -1421,12 +1421,12 @@ static void stmmac_clear_rx_descriptors(
|
||||
*/
|
||||
static void stmmac_clear_tx_descriptors(struct stmmac_priv *priv, u32 queue)
|
||||
{
|
||||
@ -269,7 +269,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct dma_desc *p;
|
||||
|
||||
if (priv->extend_desc)
|
||||
@@ -1472,7 +1472,7 @@ static void stmmac_clear_descriptors(str
|
||||
@@ -1474,7 +1474,7 @@ static void stmmac_clear_descriptors(str
|
||||
static int stmmac_init_rx_buffers(struct stmmac_priv *priv, struct dma_desc *p,
|
||||
int i, gfp_t flags, u32 queue)
|
||||
{
|
||||
@ -278,7 +278,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i];
|
||||
|
||||
if (!buf->page) {
|
||||
@@ -1497,7 +1497,7 @@ static int stmmac_init_rx_buffers(struct
|
||||
@@ -1499,7 +1499,7 @@ static int stmmac_init_rx_buffers(struct
|
||||
buf->addr = page_pool_get_dma_addr(buf->page) + buf->page_offset;
|
||||
|
||||
stmmac_set_desc_addr(priv, p, buf->addr);
|
||||
@ -287,7 +287,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
stmmac_init_desc3(priv, p);
|
||||
|
||||
return 0;
|
||||
@@ -1511,7 +1511,7 @@ static int stmmac_init_rx_buffers(struct
|
||||
@@ -1513,7 +1513,7 @@ static int stmmac_init_rx_buffers(struct
|
||||
*/
|
||||
static void stmmac_free_rx_buffer(struct stmmac_priv *priv, u32 queue, int i)
|
||||
{
|
||||
@ -296,7 +296,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i];
|
||||
|
||||
if (buf->page)
|
||||
@@ -1531,7 +1531,7 @@ static void stmmac_free_rx_buffer(struct
|
||||
@@ -1533,7 +1533,7 @@ static void stmmac_free_rx_buffer(struct
|
||||
*/
|
||||
static void stmmac_free_tx_buffer(struct stmmac_priv *priv, u32 queue, int i)
|
||||
{
|
||||
@ -305,7 +305,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
if (tx_q->tx_skbuff_dma[i].buf &&
|
||||
tx_q->tx_skbuff_dma[i].buf_type != STMMAC_TXBUF_T_XDP_TX) {
|
||||
@@ -1576,17 +1576,17 @@ static void dma_free_rx_skbufs(struct st
|
||||
@@ -1578,17 +1578,17 @@ static void dma_free_rx_skbufs(struct st
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -326,7 +326,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct dma_desc *p;
|
||||
int ret;
|
||||
|
||||
@@ -1613,10 +1613,10 @@ static int stmmac_alloc_rx_buffers(struc
|
||||
@@ -1615,10 +1615,10 @@ static int stmmac_alloc_rx_buffers(struc
|
||||
*/
|
||||
static void dma_free_rx_xskbufs(struct stmmac_priv *priv, u32 queue)
|
||||
{
|
||||
@ -339,7 +339,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i];
|
||||
|
||||
if (!buf->xdp)
|
||||
@@ -1629,10 +1629,10 @@ static void dma_free_rx_xskbufs(struct s
|
||||
@@ -1631,10 +1631,10 @@ static void dma_free_rx_xskbufs(struct s
|
||||
|
||||
static int stmmac_alloc_rx_buffers_zc(struct stmmac_priv *priv, u32 queue)
|
||||
{
|
||||
@ -352,7 +352,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct stmmac_rx_buffer *buf;
|
||||
dma_addr_t dma_addr;
|
||||
struct dma_desc *p;
|
||||
@@ -1675,7 +1675,7 @@ static struct xsk_buff_pool *stmmac_get_
|
||||
@@ -1677,7 +1677,7 @@ static struct xsk_buff_pool *stmmac_get_
|
||||
*/
|
||||
static int __init_dma_rx_desc_rings(struct stmmac_priv *priv, u32 queue, gfp_t flags)
|
||||
{
|
||||
@ -361,7 +361,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
int ret;
|
||||
|
||||
netif_dbg(priv, probe, priv->dev,
|
||||
@@ -1721,11 +1721,11 @@ static int __init_dma_rx_desc_rings(stru
|
||||
@@ -1723,11 +1723,11 @@ static int __init_dma_rx_desc_rings(stru
|
||||
if (priv->extend_desc)
|
||||
stmmac_mode_init(priv, rx_q->dma_erx,
|
||||
rx_q->dma_rx_phy,
|
||||
@ -375,7 +375,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -1752,7 +1752,7 @@ static int init_dma_rx_desc_rings(struct
|
||||
@@ -1754,7 +1754,7 @@ static int init_dma_rx_desc_rings(struct
|
||||
|
||||
err_init_rx_buffers:
|
||||
while (queue >= 0) {
|
||||
@ -384,7 +384,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
if (rx_q->xsk_pool)
|
||||
dma_free_rx_xskbufs(priv, queue);
|
||||
@@ -1781,7 +1781,7 @@ err_init_rx_buffers:
|
||||
@@ -1783,7 +1783,7 @@ err_init_rx_buffers:
|
||||
*/
|
||||
static int __init_dma_tx_desc_rings(struct stmmac_priv *priv, u32 queue)
|
||||
{
|
||||
@ -393,7 +393,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
int i;
|
||||
|
||||
netif_dbg(priv, probe, priv->dev,
|
||||
@@ -1793,16 +1793,16 @@ static int __init_dma_tx_desc_rings(stru
|
||||
@@ -1795,16 +1795,16 @@ static int __init_dma_tx_desc_rings(stru
|
||||
if (priv->extend_desc)
|
||||
stmmac_mode_init(priv, tx_q->dma_etx,
|
||||
tx_q->dma_tx_phy,
|
||||
@ -413,7 +413,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct dma_desc *p;
|
||||
|
||||
if (priv->extend_desc)
|
||||
@@ -1872,12 +1872,12 @@ static int init_dma_desc_rings(struct ne
|
||||
@@ -1874,12 +1874,12 @@ static int init_dma_desc_rings(struct ne
|
||||
*/
|
||||
static void dma_free_tx_skbufs(struct stmmac_priv *priv, u32 queue)
|
||||
{
|
||||
@ -428,7 +428,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
stmmac_free_tx_buffer(priv, queue, i);
|
||||
|
||||
if (tx_q->xsk_pool && tx_q->xsk_frames_done) {
|
||||
@@ -1907,7 +1907,7 @@ static void stmmac_free_tx_skbufs(struct
|
||||
@@ -1909,7 +1909,7 @@ static void stmmac_free_tx_skbufs(struct
|
||||
*/
|
||||
static void __free_dma_rx_desc_resources(struct stmmac_priv *priv, u32 queue)
|
||||
{
|
||||
@ -437,7 +437,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
/* Release the DMA RX socket buffers */
|
||||
if (rx_q->xsk_pool)
|
||||
@@ -1920,11 +1920,11 @@ static void __free_dma_rx_desc_resources
|
||||
@@ -1922,11 +1922,11 @@ static void __free_dma_rx_desc_resources
|
||||
|
||||
/* Free DMA regions of consistent memory previously allocated */
|
||||
if (!priv->extend_desc)
|
||||
@ -451,7 +451,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
sizeof(struct dma_extended_desc),
|
||||
rx_q->dma_erx, rx_q->dma_rx_phy);
|
||||
|
||||
@@ -1953,7 +1953,7 @@ static void free_dma_rx_desc_resources(s
|
||||
@@ -1955,7 +1955,7 @@ static void free_dma_rx_desc_resources(s
|
||||
*/
|
||||
static void __free_dma_tx_desc_resources(struct stmmac_priv *priv, u32 queue)
|
||||
{
|
||||
@ -460,7 +460,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
size_t size;
|
||||
void *addr;
|
||||
|
||||
@@ -1971,7 +1971,7 @@ static void __free_dma_tx_desc_resources
|
||||
@@ -1973,7 +1973,7 @@ static void __free_dma_tx_desc_resources
|
||||
addr = tx_q->dma_tx;
|
||||
}
|
||||
|
||||
@ -469,7 +469,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
dma_free_coherent(priv->device, size, addr, tx_q->dma_tx_phy);
|
||||
|
||||
@@ -2000,7 +2000,7 @@ static void free_dma_tx_desc_resources(s
|
||||
@@ -2002,7 +2002,7 @@ static void free_dma_tx_desc_resources(s
|
||||
*/
|
||||
static int __alloc_dma_rx_desc_resources(struct stmmac_priv *priv, u32 queue)
|
||||
{
|
||||
@ -478,7 +478,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct stmmac_channel *ch = &priv->channel[queue];
|
||||
bool xdp_prog = stmmac_xdp_is_enabled(priv);
|
||||
struct page_pool_params pp_params = { 0 };
|
||||
@@ -2012,8 +2012,8 @@ static int __alloc_dma_rx_desc_resources
|
||||
@@ -2014,8 +2014,8 @@ static int __alloc_dma_rx_desc_resources
|
||||
rx_q->priv_data = priv;
|
||||
|
||||
pp_params.flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV;
|
||||
@ -489,7 +489,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
pp_params.order = ilog2(num_pages);
|
||||
pp_params.nid = dev_to_node(priv->device);
|
||||
pp_params.dev = priv->device;
|
||||
@@ -2028,7 +2028,7 @@ static int __alloc_dma_rx_desc_resources
|
||||
@@ -2030,7 +2030,7 @@ static int __alloc_dma_rx_desc_resources
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -498,7 +498,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
sizeof(*rx_q->buf_pool),
|
||||
GFP_KERNEL);
|
||||
if (!rx_q->buf_pool)
|
||||
@@ -2036,7 +2036,7 @@ static int __alloc_dma_rx_desc_resources
|
||||
@@ -2038,7 +2038,7 @@ static int __alloc_dma_rx_desc_resources
|
||||
|
||||
if (priv->extend_desc) {
|
||||
rx_q->dma_erx = dma_alloc_coherent(priv->device,
|
||||
@ -507,7 +507,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
sizeof(struct dma_extended_desc),
|
||||
&rx_q->dma_rx_phy,
|
||||
GFP_KERNEL);
|
||||
@@ -2045,7 +2045,7 @@ static int __alloc_dma_rx_desc_resources
|
||||
@@ -2047,7 +2047,7 @@ static int __alloc_dma_rx_desc_resources
|
||||
|
||||
} else {
|
||||
rx_q->dma_rx = dma_alloc_coherent(priv->device,
|
||||
@ -516,7 +516,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
sizeof(struct dma_desc),
|
||||
&rx_q->dma_rx_phy,
|
||||
GFP_KERNEL);
|
||||
@@ -2102,20 +2102,20 @@ err_dma:
|
||||
@@ -2104,20 +2104,20 @@ err_dma:
|
||||
*/
|
||||
static int __alloc_dma_tx_desc_resources(struct stmmac_priv *priv, u32 queue)
|
||||
{
|
||||
@ -540,7 +540,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
sizeof(struct sk_buff *),
|
||||
GFP_KERNEL);
|
||||
if (!tx_q->tx_skbuff)
|
||||
@@ -2128,7 +2128,7 @@ static int __alloc_dma_tx_desc_resources
|
||||
@@ -2130,7 +2130,7 @@ static int __alloc_dma_tx_desc_resources
|
||||
else
|
||||
size = sizeof(struct dma_desc);
|
||||
|
||||
@ -549,7 +549,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
addr = dma_alloc_coherent(priv->device, size,
|
||||
&tx_q->dma_tx_phy, GFP_KERNEL);
|
||||
@@ -2372,7 +2372,7 @@ static void stmmac_dma_operation_mode(st
|
||||
@@ -2374,7 +2374,7 @@ static void stmmac_dma_operation_mode(st
|
||||
|
||||
/* configure all channels */
|
||||
for (chan = 0; chan < rx_channels_count; chan++) {
|
||||
@ -558,7 +558,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
u32 buf_size;
|
||||
|
||||
qmode = priv->plat->rx_queues_cfg[chan].mode_to_use;
|
||||
@@ -2387,7 +2387,7 @@ static void stmmac_dma_operation_mode(st
|
||||
@@ -2389,7 +2389,7 @@ static void stmmac_dma_operation_mode(st
|
||||
chan);
|
||||
} else {
|
||||
stmmac_set_dma_bfsize(priv, priv->ioaddr,
|
||||
@ -567,7 +567,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
chan);
|
||||
}
|
||||
}
|
||||
@@ -2403,7 +2403,7 @@ static void stmmac_dma_operation_mode(st
|
||||
@@ -2405,7 +2405,7 @@ static void stmmac_dma_operation_mode(st
|
||||
static bool stmmac_xdp_xmit_zc(struct stmmac_priv *priv, u32 queue, u32 budget)
|
||||
{
|
||||
struct netdev_queue *nq = netdev_get_tx_queue(priv->dev, queue);
|
||||
@ -576,7 +576,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct xsk_buff_pool *pool = tx_q->xsk_pool;
|
||||
unsigned int entry = tx_q->cur_tx;
|
||||
struct dma_desc *tx_desc = NULL;
|
||||
@@ -2478,7 +2478,7 @@ static bool stmmac_xdp_xmit_zc(struct st
|
||||
@@ -2480,7 +2480,7 @@ static bool stmmac_xdp_xmit_zc(struct st
|
||||
|
||||
stmmac_enable_dma_transmission(priv, priv->ioaddr);
|
||||
|
||||
@ -585,7 +585,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
entry = tx_q->cur_tx;
|
||||
}
|
||||
|
||||
@@ -2504,7 +2504,7 @@ static bool stmmac_xdp_xmit_zc(struct st
|
||||
@@ -2506,7 +2506,7 @@ static bool stmmac_xdp_xmit_zc(struct st
|
||||
*/
|
||||
static int stmmac_tx_clean(struct stmmac_priv *priv, int budget, u32 queue)
|
||||
{
|
||||
@ -594,7 +594,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
unsigned int bytes_compl = 0, pkts_compl = 0;
|
||||
unsigned int entry, xmits = 0, count = 0;
|
||||
|
||||
@@ -2517,7 +2517,7 @@ static int stmmac_tx_clean(struct stmmac
|
||||
@@ -2519,7 +2519,7 @@ static int stmmac_tx_clean(struct stmmac
|
||||
entry = tx_q->dirty_tx;
|
||||
|
||||
/* Try to clean all TX complete frame in 1 shot */
|
||||
@ -603,7 +603,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct xdp_frame *xdpf;
|
||||
struct sk_buff *skb;
|
||||
struct dma_desc *p;
|
||||
@@ -2617,7 +2617,7 @@ static int stmmac_tx_clean(struct stmmac
|
||||
@@ -2619,7 +2619,7 @@ static int stmmac_tx_clean(struct stmmac
|
||||
|
||||
stmmac_release_tx_desc(priv, p, priv->mode);
|
||||
|
||||
@ -612,7 +612,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
tx_q->dirty_tx = entry;
|
||||
|
||||
@@ -2682,7 +2682,7 @@ static int stmmac_tx_clean(struct stmmac
|
||||
@@ -2684,7 +2684,7 @@ static int stmmac_tx_clean(struct stmmac
|
||||
*/
|
||||
static void stmmac_tx_err(struct stmmac_priv *priv, u32 chan)
|
||||
{
|
||||
@ -621,7 +621,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
netif_tx_stop_queue(netdev_get_tx_queue(priv->dev, chan));
|
||||
|
||||
@@ -2749,8 +2749,8 @@ static int stmmac_napi_check(struct stmm
|
||||
@@ -2751,8 +2751,8 @@ static int stmmac_napi_check(struct stmm
|
||||
{
|
||||
int status = stmmac_dma_interrupt_status(priv, priv->ioaddr,
|
||||
&priv->xstats, chan, dir);
|
||||
@ -632,7 +632,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct stmmac_channel *ch = &priv->channel[chan];
|
||||
struct napi_struct *rx_napi;
|
||||
struct napi_struct *tx_napi;
|
||||
@@ -2926,7 +2926,7 @@ static int stmmac_init_dma_engine(struct
|
||||
@@ -2928,7 +2928,7 @@ static int stmmac_init_dma_engine(struct
|
||||
|
||||
/* DMA RX Channel Configuration */
|
||||
for (chan = 0; chan < rx_channels_count; chan++) {
|
||||
@ -641,7 +641,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||
rx_q->dma_rx_phy, chan);
|
||||
@@ -2940,7 +2940,7 @@ static int stmmac_init_dma_engine(struct
|
||||
@@ -2942,7 +2942,7 @@ static int stmmac_init_dma_engine(struct
|
||||
|
||||
/* DMA TX Channel Configuration */
|
||||
for (chan = 0; chan < tx_channels_count; chan++) {
|
||||
@ -650,7 +650,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||
tx_q->dma_tx_phy, chan);
|
||||
@@ -2955,7 +2955,7 @@ static int stmmac_init_dma_engine(struct
|
||||
@@ -2957,7 +2957,7 @@ static int stmmac_init_dma_engine(struct
|
||||
|
||||
static void stmmac_tx_timer_arm(struct stmmac_priv *priv, u32 queue)
|
||||
{
|
||||
@ -659,7 +659,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
hrtimer_start(&tx_q->txtimer,
|
||||
STMMAC_COAL_TIMER(priv->tx_coal_timer[queue]),
|
||||
@@ -3005,7 +3005,7 @@ static void stmmac_init_coalesce(struct
|
||||
@@ -3007,7 +3007,7 @@ static void stmmac_init_coalesce(struct
|
||||
u32 chan;
|
||||
|
||||
for (chan = 0; chan < tx_channel_count; chan++) {
|
||||
@ -668,7 +668,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
priv->tx_coal_frames[chan] = STMMAC_TX_FRAMES;
|
||||
priv->tx_coal_timer[chan] = STMMAC_COAL_TX_TIMER;
|
||||
@@ -3027,12 +3027,12 @@ static void stmmac_set_rings_length(stru
|
||||
@@ -3029,12 +3029,12 @@ static void stmmac_set_rings_length(stru
|
||||
/* set TX ring length */
|
||||
for (chan = 0; chan < tx_channels_count; chan++)
|
||||
stmmac_set_tx_ring_len(priv, priv->ioaddr,
|
||||
@ -683,7 +683,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3367,7 +3367,7 @@ static int stmmac_hw_setup(struct net_de
|
||||
@@ -3369,7 +3369,7 @@ static int stmmac_hw_setup(struct net_de
|
||||
/* Enable TSO */
|
||||
if (priv->tso) {
|
||||
for (chan = 0; chan < tx_cnt; chan++) {
|
||||
@ -692,7 +692,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
/* TSO and TBS cannot co-exist */
|
||||
if (tx_q->tbs & STMMAC_TBS_AVAIL)
|
||||
@@ -3389,7 +3389,7 @@ static int stmmac_hw_setup(struct net_de
|
||||
@@ -3391,7 +3391,7 @@ static int stmmac_hw_setup(struct net_de
|
||||
|
||||
/* TBS */
|
||||
for (chan = 0; chan < tx_cnt; chan++) {
|
||||
@ -701,7 +701,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
int enable = tx_q->tbs & STMMAC_TBS_AVAIL;
|
||||
|
||||
stmmac_enable_tbs(priv, priv->ioaddr, enable, chan);
|
||||
@@ -3433,7 +3433,7 @@ static void stmmac_free_irq(struct net_d
|
||||
@@ -3435,7 +3435,7 @@ static void stmmac_free_irq(struct net_d
|
||||
for (j = irq_idx - 1; j >= 0; j--) {
|
||||
if (priv->tx_irq[j] > 0) {
|
||||
irq_set_affinity_hint(priv->tx_irq[j], NULL);
|
||||
@ -710,7 +710,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
}
|
||||
irq_idx = priv->plat->rx_queues_to_use;
|
||||
@@ -3442,7 +3442,7 @@ static void stmmac_free_irq(struct net_d
|
||||
@@ -3444,7 +3444,7 @@ static void stmmac_free_irq(struct net_d
|
||||
for (j = irq_idx - 1; j >= 0; j--) {
|
||||
if (priv->rx_irq[j] > 0) {
|
||||
irq_set_affinity_hint(priv->rx_irq[j], NULL);
|
||||
@ -719,7 +719,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3576,7 +3576,7 @@ static int stmmac_request_irq_multi_msi(
|
||||
@@ -3578,7 +3578,7 @@ static int stmmac_request_irq_multi_msi(
|
||||
sprintf(int_name, "%s:%s-%d", dev->name, "rx", i);
|
||||
ret = request_irq(priv->rx_irq[i],
|
||||
stmmac_msi_intr_rx,
|
||||
@ -728,7 +728,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
if (unlikely(ret < 0)) {
|
||||
netdev_err(priv->dev,
|
||||
"%s: alloc rx-%d MSI %d (error: %d)\n",
|
||||
@@ -3599,7 +3599,7 @@ static int stmmac_request_irq_multi_msi(
|
||||
@@ -3601,7 +3601,7 @@ static int stmmac_request_irq_multi_msi(
|
||||
sprintf(int_name, "%s:%s-%d", dev->name, "tx", i);
|
||||
ret = request_irq(priv->tx_irq[i],
|
||||
stmmac_msi_intr_tx,
|
||||
@ -737,7 +737,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
if (unlikely(ret < 0)) {
|
||||
netdev_err(priv->dev,
|
||||
"%s: alloc tx-%d MSI %d (error: %d)\n",
|
||||
@@ -3730,21 +3730,21 @@ static int stmmac_open(struct net_device
|
||||
@@ -3732,21 +3732,21 @@ static int stmmac_open(struct net_device
|
||||
bfsize = 0;
|
||||
|
||||
if (bfsize < BUF_SIZE_16KiB)
|
||||
@ -766,7 +766,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
int tbs_en = priv->plat->tx_queues_cfg[chan].tbs_en;
|
||||
|
||||
/* Setup per-TXQ tbs flag before TX descriptor alloc */
|
||||
@@ -3802,7 +3802,7 @@ irq_error:
|
||||
@@ -3804,7 +3804,7 @@ irq_error:
|
||||
phylink_stop(priv->phylink);
|
||||
|
||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||
@ -775,7 +775,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
stmmac_hw_teardown(dev);
|
||||
init_error:
|
||||
@@ -3846,7 +3846,7 @@ static int stmmac_release(struct net_dev
|
||||
@@ -3848,7 +3848,7 @@ static int stmmac_release(struct net_dev
|
||||
stmmac_disable_all_queues(priv);
|
||||
|
||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||
@ -784,7 +784,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
netif_tx_disable(dev);
|
||||
|
||||
@@ -3910,7 +3910,7 @@ static bool stmmac_vlan_insert(struct st
|
||||
@@ -3912,7 +3912,7 @@ static bool stmmac_vlan_insert(struct st
|
||||
return false;
|
||||
|
||||
stmmac_set_tx_owner(priv, p);
|
||||
@ -793,7 +793,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3928,7 +3928,7 @@ static bool stmmac_vlan_insert(struct st
|
||||
@@ -3930,7 +3930,7 @@ static bool stmmac_vlan_insert(struct st
|
||||
static void stmmac_tso_allocator(struct stmmac_priv *priv, dma_addr_t des,
|
||||
int total_len, bool last_segment, u32 queue)
|
||||
{
|
||||
@ -802,7 +802,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct dma_desc *desc;
|
||||
u32 buff_size;
|
||||
int tmp_len;
|
||||
@@ -3939,7 +3939,7 @@ static void stmmac_tso_allocator(struct
|
||||
@@ -3941,7 +3941,7 @@ static void stmmac_tso_allocator(struct
|
||||
dma_addr_t curr_addr;
|
||||
|
||||
tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx,
|
||||
@ -811,7 +811,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]);
|
||||
|
||||
if (tx_q->tbs & STMMAC_TBS_AVAIL)
|
||||
@@ -3967,7 +3967,7 @@ static void stmmac_tso_allocator(struct
|
||||
@@ -3969,7 +3969,7 @@ static void stmmac_tso_allocator(struct
|
||||
|
||||
static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue)
|
||||
{
|
||||
@ -820,7 +820,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
int desc_size;
|
||||
|
||||
if (likely(priv->extend_desc))
|
||||
@@ -4029,7 +4029,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
|
||||
@@ -4031,7 +4031,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
|
||||
dma_addr_t des;
|
||||
int i;
|
||||
|
||||
@ -829,7 +829,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
first_tx = tx_q->cur_tx;
|
||||
|
||||
/* Compute header lengths */
|
||||
@@ -4069,7 +4069,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
|
||||
@@ -4071,7 +4071,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
|
||||
stmmac_set_mss(priv, mss_desc, mss);
|
||||
tx_q->mss = mss;
|
||||
tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx,
|
||||
@ -838,7 +838,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]);
|
||||
}
|
||||
|
||||
@@ -4181,7 +4181,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
|
||||
@@ -4183,7 +4183,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
|
||||
* ndo_start_xmit will fill this descriptor the next time it's
|
||||
* called and stmmac_tx_clean may clean up to this descriptor.
|
||||
*/
|
||||
@ -847,7 +847,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
if (unlikely(stmmac_tx_avail(priv, queue) <= (MAX_SKB_FRAGS + 1))) {
|
||||
netif_dbg(priv, hw, priv->dev, "%s: stop transmitted packets\n",
|
||||
@@ -4269,7 +4269,7 @@ static netdev_tx_t stmmac_xmit(struct sk
|
||||
@@ -4271,7 +4271,7 @@ static netdev_tx_t stmmac_xmit(struct sk
|
||||
int entry, first_tx;
|
||||
dma_addr_t des;
|
||||
|
||||
@ -856,7 +856,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
first_tx = tx_q->cur_tx;
|
||||
|
||||
if (priv->tx_path_in_lpi_mode && priv->eee_sw_timer_en)
|
||||
@@ -4332,7 +4332,7 @@ static netdev_tx_t stmmac_xmit(struct sk
|
||||
@@ -4334,7 +4334,7 @@ static netdev_tx_t stmmac_xmit(struct sk
|
||||
int len = skb_frag_size(frag);
|
||||
bool last_segment = (i == (nfrags - 1));
|
||||
|
||||
@ -865,7 +865,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
WARN_ON(tx_q->tx_skbuff[entry]);
|
||||
|
||||
if (likely(priv->extend_desc))
|
||||
@@ -4403,7 +4403,7 @@ static netdev_tx_t stmmac_xmit(struct sk
|
||||
@@ -4405,7 +4405,7 @@ static netdev_tx_t stmmac_xmit(struct sk
|
||||
* ndo_start_xmit will fill this descriptor the next time it's
|
||||
* called and stmmac_tx_clean may clean up to this descriptor.
|
||||
*/
|
||||
@ -874,7 +874,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
tx_q->cur_tx = entry;
|
||||
|
||||
if (netif_msg_pktdata(priv)) {
|
||||
@@ -4515,7 +4515,7 @@ static void stmmac_rx_vlan(struct net_de
|
||||
@@ -4517,7 +4517,7 @@ static void stmmac_rx_vlan(struct net_de
|
||||
*/
|
||||
static inline void stmmac_rx_refill(struct stmmac_priv *priv, u32 queue)
|
||||
{
|
||||
@ -883,7 +883,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
int dirty = stmmac_rx_dirty(priv, queue);
|
||||
unsigned int entry = rx_q->dirty_rx;
|
||||
|
||||
@@ -4565,7 +4565,7 @@ static inline void stmmac_rx_refill(stru
|
||||
@@ -4567,7 +4567,7 @@ static inline void stmmac_rx_refill(stru
|
||||
dma_wmb();
|
||||
stmmac_set_rx_owner(priv, p, use_rx_wd);
|
||||
|
||||
@ -892,7 +892,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
rx_q->dirty_rx = entry;
|
||||
rx_q->rx_tail_addr = rx_q->dma_rx_phy +
|
||||
@@ -4593,12 +4593,12 @@ static unsigned int stmmac_rx_buf1_len(s
|
||||
@@ -4595,12 +4595,12 @@ static unsigned int stmmac_rx_buf1_len(s
|
||||
|
||||
/* First descriptor, not last descriptor and not split header */
|
||||
if (status & rx_not_ls)
|
||||
@ -907,7 +907,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
|
||||
static unsigned int stmmac_rx_buf2_len(struct stmmac_priv *priv,
|
||||
@@ -4614,7 +4614,7 @@ static unsigned int stmmac_rx_buf2_len(s
|
||||
@@ -4616,7 +4616,7 @@ static unsigned int stmmac_rx_buf2_len(s
|
||||
|
||||
/* Not last descriptor */
|
||||
if (status & rx_not_ls)
|
||||
@ -916,7 +916,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
plen = stmmac_get_rx_frame_len(priv, p, coe);
|
||||
|
||||
@@ -4625,7 +4625,7 @@ static unsigned int stmmac_rx_buf2_len(s
|
||||
@@ -4627,7 +4627,7 @@ static unsigned int stmmac_rx_buf2_len(s
|
||||
static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue,
|
||||
struct xdp_frame *xdpf, bool dma_map)
|
||||
{
|
||||
@ -925,7 +925,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
unsigned int entry = tx_q->cur_tx;
|
||||
struct dma_desc *tx_desc;
|
||||
dma_addr_t dma_addr;
|
||||
@@ -4688,7 +4688,7 @@ static int stmmac_xdp_xmit_xdpf(struct s
|
||||
@@ -4690,7 +4690,7 @@ static int stmmac_xdp_xmit_xdpf(struct s
|
||||
|
||||
stmmac_enable_dma_transmission(priv, priv->ioaddr);
|
||||
|
||||
@ -934,7 +934,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
tx_q->cur_tx = entry;
|
||||
|
||||
return STMMAC_XDP_TX;
|
||||
@@ -4862,7 +4862,7 @@ static void stmmac_dispatch_skb_zc(struc
|
||||
@@ -4864,7 +4864,7 @@ static void stmmac_dispatch_skb_zc(struc
|
||||
|
||||
static bool stmmac_rx_refill_zc(struct stmmac_priv *priv, u32 queue, u32 budget)
|
||||
{
|
||||
@ -943,7 +943,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
unsigned int entry = rx_q->dirty_rx;
|
||||
struct dma_desc *rx_desc = NULL;
|
||||
bool ret = true;
|
||||
@@ -4905,7 +4905,7 @@ static bool stmmac_rx_refill_zc(struct s
|
||||
@@ -4907,7 +4907,7 @@ static bool stmmac_rx_refill_zc(struct s
|
||||
dma_wmb();
|
||||
stmmac_set_rx_owner(priv, rx_desc, use_rx_wd);
|
||||
|
||||
@ -952,7 +952,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
|
||||
if (rx_desc) {
|
||||
@@ -4920,7 +4920,7 @@ static bool stmmac_rx_refill_zc(struct s
|
||||
@@ -4922,7 +4922,7 @@ static bool stmmac_rx_refill_zc(struct s
|
||||
|
||||
static int stmmac_rx_zc(struct stmmac_priv *priv, int limit, u32 queue)
|
||||
{
|
||||
@ -961,7 +961,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
unsigned int count = 0, error = 0, len = 0;
|
||||
int dirty = stmmac_rx_dirty(priv, queue);
|
||||
unsigned int next_entry = rx_q->cur_rx;
|
||||
@@ -4942,7 +4942,7 @@ static int stmmac_rx_zc(struct stmmac_pr
|
||||
@@ -4944,7 +4944,7 @@ static int stmmac_rx_zc(struct stmmac_pr
|
||||
desc_size = sizeof(struct dma_desc);
|
||||
}
|
||||
|
||||
@ -970,7 +970,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
rx_q->dma_rx_phy, desc_size);
|
||||
}
|
||||
while (count < limit) {
|
||||
@@ -4989,7 +4989,7 @@ read_again:
|
||||
@@ -4991,7 +4991,7 @@ read_again:
|
||||
|
||||
/* Prefetch the next RX descriptor */
|
||||
rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx,
|
||||
@ -979,7 +979,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
next_entry = rx_q->cur_rx;
|
||||
|
||||
if (priv->extend_desc)
|
||||
@@ -5110,7 +5110,7 @@ read_again:
|
||||
@@ -5112,7 +5112,7 @@ read_again:
|
||||
*/
|
||||
static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
|
||||
{
|
||||
@ -988,7 +988,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct stmmac_channel *ch = &priv->channel[queue];
|
||||
unsigned int count = 0, error = 0, len = 0;
|
||||
int status = 0, coe = priv->hw->rx_csum;
|
||||
@@ -5123,7 +5123,7 @@ static int stmmac_rx(struct stmmac_priv
|
||||
@@ -5125,7 +5125,7 @@ static int stmmac_rx(struct stmmac_priv
|
||||
int buf_sz;
|
||||
|
||||
dma_dir = page_pool_get_dma_dir(rx_q->page_pool);
|
||||
@ -997,7 +997,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
if (netif_msg_rx_status(priv)) {
|
||||
void *rx_head;
|
||||
@@ -5137,7 +5137,7 @@ static int stmmac_rx(struct stmmac_priv
|
||||
@@ -5139,7 +5139,7 @@ static int stmmac_rx(struct stmmac_priv
|
||||
desc_size = sizeof(struct dma_desc);
|
||||
}
|
||||
|
||||
@ -1006,7 +1006,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
rx_q->dma_rx_phy, desc_size);
|
||||
}
|
||||
while (count < limit) {
|
||||
@@ -5181,7 +5181,7 @@ read_again:
|
||||
@@ -5183,7 +5183,7 @@ read_again:
|
||||
break;
|
||||
|
||||
rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx,
|
||||
@ -1015,7 +1015,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
next_entry = rx_q->cur_rx;
|
||||
|
||||
if (priv->extend_desc)
|
||||
@@ -5315,7 +5315,7 @@ read_again:
|
||||
@@ -5317,7 +5317,7 @@ read_again:
|
||||
buf1_len, dma_dir);
|
||||
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
|
||||
buf->page, buf->page_offset, buf1_len,
|
||||
@ -1024,7 +1024,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
/* Data payload appended into SKB */
|
||||
page_pool_release_page(rx_q->page_pool, buf->page);
|
||||
@@ -5327,7 +5327,7 @@ read_again:
|
||||
@@ -5329,7 +5329,7 @@ read_again:
|
||||
buf2_len, dma_dir);
|
||||
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
|
||||
buf->sec_page, 0, buf2_len,
|
||||
@ -1033,7 +1033,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
/* Data payload appended into SKB */
|
||||
page_pool_release_page(rx_q->page_pool, buf->sec_page);
|
||||
@@ -5760,11 +5760,13 @@ static irqreturn_t stmmac_safety_interru
|
||||
@@ -5762,11 +5762,13 @@ static irqreturn_t stmmac_safety_interru
|
||||
static irqreturn_t stmmac_msi_intr_tx(int irq, void *data)
|
||||
{
|
||||
struct stmmac_tx_queue *tx_q = (struct stmmac_tx_queue *)data;
|
||||
@ -1048,7 +1048,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
/* Check if adapter is up */
|
||||
if (test_bit(STMMAC_DOWN, &priv->state))
|
||||
@@ -5799,10 +5801,12 @@ static irqreturn_t stmmac_msi_intr_tx(in
|
||||
@@ -5801,10 +5803,12 @@ static irqreturn_t stmmac_msi_intr_tx(in
|
||||
static irqreturn_t stmmac_msi_intr_rx(int irq, void *data)
|
||||
{
|
||||
struct stmmac_rx_queue *rx_q = (struct stmmac_rx_queue *)data;
|
||||
@ -1062,7 +1062,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
/* Check if adapter is up */
|
||||
if (test_bit(STMMAC_DOWN, &priv->state))
|
||||
@@ -5828,10 +5832,10 @@ static void stmmac_poll_controller(struc
|
||||
@@ -5830,10 +5834,10 @@ static void stmmac_poll_controller(struc
|
||||
|
||||
if (priv->plat->multi_msi_en) {
|
||||
for (i = 0; i < priv->plat->rx_queues_to_use; i++)
|
||||
@ -1075,7 +1075,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
} else {
|
||||
disable_irq(dev->irq);
|
||||
stmmac_interrupt(dev->irq, dev);
|
||||
@@ -6012,34 +6016,34 @@ static int stmmac_rings_status_show(stru
|
||||
@@ -6014,34 +6018,34 @@ static int stmmac_rings_status_show(stru
|
||||
return 0;
|
||||
|
||||
for (queue = 0; queue < rx_count; queue++) {
|
||||
@ -1116,7 +1116,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6386,7 +6390,7 @@ void stmmac_disable_rx_queue(struct stmm
|
||||
@@ -6388,7 +6392,7 @@ void stmmac_disable_rx_queue(struct stmm
|
||||
|
||||
void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue)
|
||||
{
|
||||
@ -1125,7 +1125,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct stmmac_channel *ch = &priv->channel[queue];
|
||||
unsigned long flags;
|
||||
u32 buf_size;
|
||||
@@ -6423,7 +6427,7 @@ void stmmac_enable_rx_queue(struct stmma
|
||||
@@ -6425,7 +6429,7 @@ void stmmac_enable_rx_queue(struct stmma
|
||||
rx_q->queue_index);
|
||||
} else {
|
||||
stmmac_set_dma_bfsize(priv, priv->ioaddr,
|
||||
@ -1134,7 +1134,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
rx_q->queue_index);
|
||||
}
|
||||
|
||||
@@ -6449,7 +6453,7 @@ void stmmac_disable_tx_queue(struct stmm
|
||||
@@ -6451,7 +6455,7 @@ void stmmac_disable_tx_queue(struct stmm
|
||||
|
||||
void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue)
|
||||
{
|
||||
@ -1143,7 +1143,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct stmmac_channel *ch = &priv->channel[queue];
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
@@ -6499,7 +6503,7 @@ void stmmac_xdp_release(struct net_devic
|
||||
@@ -6501,7 +6505,7 @@ void stmmac_xdp_release(struct net_devic
|
||||
stmmac_disable_all_queues(priv);
|
||||
|
||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||
@ -1152,7 +1152,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
/* Free the IRQ lines */
|
||||
stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0);
|
||||
@@ -6558,7 +6562,7 @@ int stmmac_xdp_open(struct net_device *d
|
||||
@@ -6560,7 +6564,7 @@ int stmmac_xdp_open(struct net_device *d
|
||||
|
||||
/* DMA RX Channel Configuration */
|
||||
for (chan = 0; chan < rx_cnt; chan++) {
|
||||
@ -1161,7 +1161,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||
rx_q->dma_rx_phy, chan);
|
||||
@@ -6576,7 +6580,7 @@ int stmmac_xdp_open(struct net_device *d
|
||||
@@ -6578,7 +6582,7 @@ int stmmac_xdp_open(struct net_device *d
|
||||
rx_q->queue_index);
|
||||
} else {
|
||||
stmmac_set_dma_bfsize(priv, priv->ioaddr,
|
||||
@ -1170,7 +1170,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
rx_q->queue_index);
|
||||
}
|
||||
|
||||
@@ -6585,7 +6589,7 @@ int stmmac_xdp_open(struct net_device *d
|
||||
@@ -6587,7 +6591,7 @@ int stmmac_xdp_open(struct net_device *d
|
||||
|
||||
/* DMA TX Channel Configuration */
|
||||
for (chan = 0; chan < tx_cnt; chan++) {
|
||||
@ -1179,7 +1179,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||
tx_q->dma_tx_phy, chan);
|
||||
@@ -6618,7 +6622,7 @@ int stmmac_xdp_open(struct net_device *d
|
||||
@@ -6620,7 +6624,7 @@ int stmmac_xdp_open(struct net_device *d
|
||||
|
||||
irq_error:
|
||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||
@ -1188,7 +1188,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
stmmac_hw_teardown(dev);
|
||||
init_error:
|
||||
@@ -6645,8 +6649,8 @@ int stmmac_xsk_wakeup(struct net_device
|
||||
@@ -6647,8 +6651,8 @@ int stmmac_xsk_wakeup(struct net_device
|
||||
queue >= priv->plat->tx_queues_to_use)
|
||||
return -EINVAL;
|
||||
|
||||
@ -1199,7 +1199,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
ch = &priv->channel[queue];
|
||||
|
||||
if (!rx_q->xsk_pool && !tx_q->xsk_pool)
|
||||
@@ -6906,8 +6910,8 @@ int stmmac_reinit_ringparam(struct net_d
|
||||
@@ -6908,8 +6912,8 @@ int stmmac_reinit_ringparam(struct net_d
|
||||
if (netif_running(dev))
|
||||
stmmac_release(dev);
|
||||
|
||||
@ -1210,7 +1210,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
if (netif_running(dev))
|
||||
ret = stmmac_open(dev);
|
||||
@@ -7345,7 +7349,7 @@ int stmmac_suspend(struct device *dev)
|
||||
@@ -7347,7 +7351,7 @@ int stmmac_suspend(struct device *dev)
|
||||
stmmac_disable_all_queues(priv);
|
||||
|
||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||
@ -1219,7 +1219,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
if (priv->eee_enabled) {
|
||||
priv->tx_path_in_lpi_mode = false;
|
||||
@@ -7397,7 +7401,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend);
|
||||
@@ -7399,7 +7403,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend);
|
||||
|
||||
static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue)
|
||||
{
|
||||
@ -1228,7 +1228,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
rx_q->cur_rx = 0;
|
||||
rx_q->dirty_rx = 0;
|
||||
@@ -7405,7 +7409,7 @@ static void stmmac_reset_rx_queue(struct
|
||||
@@ -7407,7 +7411,7 @@ static void stmmac_reset_rx_queue(struct
|
||||
|
||||
static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue)
|
||||
{
|
||||
|
||||
@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
@@ -1301,7 +1301,8 @@ static int stmmac_phy_setup(struct stmma
|
||||
@@ -1303,7 +1303,8 @@ static int stmmac_phy_setup(struct stmma
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
{
|
||||
u32 rx_cnt = priv->plat->rx_queues_to_use;
|
||||
unsigned int desc_size;
|
||||
@@ -1310,7 +1311,7 @@ static void stmmac_display_rx_rings(stru
|
||||
@@ -1312,7 +1313,7 @@ static void stmmac_display_rx_rings(stru
|
||||
|
||||
/* Display RX rings */
|
||||
for (queue = 0; queue < rx_cnt; queue++) {
|
||||
@ -36,7 +36,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
pr_info("\tRX Queue %u rings\n", queue);
|
||||
|
||||
@@ -1323,12 +1324,13 @@ static void stmmac_display_rx_rings(stru
|
||||
@@ -1325,12 +1326,13 @@ static void stmmac_display_rx_rings(stru
|
||||
}
|
||||
|
||||
/* Display RX ring */
|
||||
@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
{
|
||||
u32 tx_cnt = priv->plat->tx_queues_to_use;
|
||||
unsigned int desc_size;
|
||||
@@ -1337,7 +1339,7 @@ static void stmmac_display_tx_rings(stru
|
||||
@@ -1339,7 +1341,7 @@ static void stmmac_display_tx_rings(stru
|
||||
|
||||
/* Display TX rings */
|
||||
for (queue = 0; queue < tx_cnt; queue++) {
|
||||
@ -61,7 +61,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
pr_info("\tTX Queue %d rings\n", queue);
|
||||
|
||||
@@ -1352,18 +1354,19 @@ static void stmmac_display_tx_rings(stru
|
||||
@@ -1354,18 +1356,19 @@ static void stmmac_display_tx_rings(stru
|
||||
desc_size = sizeof(struct dma_desc);
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
|
||||
static int stmmac_set_bfsize(int mtu, int bufsize)
|
||||
@@ -1387,44 +1390,50 @@ static int stmmac_set_bfsize(int mtu, in
|
||||
@@ -1389,44 +1392,50 @@ static int stmmac_set_bfsize(int mtu, in
|
||||
/**
|
||||
* stmmac_clear_rx_descriptors - clear RX descriptors
|
||||
* @priv: driver private structure
|
||||
@ -147,7 +147,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct dma_desc *p;
|
||||
|
||||
if (priv->extend_desc)
|
||||
@@ -1441,10 +1450,12 @@ static void stmmac_clear_tx_descriptors(
|
||||
@@ -1443,10 +1452,12 @@ static void stmmac_clear_tx_descriptors(
|
||||
/**
|
||||
* stmmac_clear_descriptors - clear descriptors
|
||||
* @priv: driver private structure
|
||||
@ -161,7 +161,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
{
|
||||
u32 rx_queue_cnt = priv->plat->rx_queues_to_use;
|
||||
u32 tx_queue_cnt = priv->plat->tx_queues_to_use;
|
||||
@@ -1452,16 +1463,17 @@ static void stmmac_clear_descriptors(str
|
||||
@@ -1454,16 +1465,17 @@ static void stmmac_clear_descriptors(str
|
||||
|
||||
/* Clear the RX descriptors */
|
||||
for (queue = 0; queue < rx_queue_cnt; queue++)
|
||||
@ -181,7 +181,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
* @p: descriptor pointer
|
||||
* @i: descriptor index
|
||||
* @flags: gfp flag
|
||||
@@ -1469,10 +1481,12 @@ static void stmmac_clear_descriptors(str
|
||||
@@ -1471,10 +1483,12 @@ static void stmmac_clear_descriptors(str
|
||||
* Description: this function is called to allocate a receive buffer, perform
|
||||
* the DMA mapping and init the descriptor.
|
||||
*/
|
||||
@ -196,7 +196,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i];
|
||||
|
||||
if (!buf->page) {
|
||||
@@ -1497,7 +1511,7 @@ static int stmmac_init_rx_buffers(struct
|
||||
@@ -1499,7 +1513,7 @@ static int stmmac_init_rx_buffers(struct
|
||||
buf->addr = page_pool_get_dma_addr(buf->page) + buf->page_offset;
|
||||
|
||||
stmmac_set_desc_addr(priv, p, buf->addr);
|
||||
@ -205,7 +205,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
stmmac_init_desc3(priv, p);
|
||||
|
||||
return 0;
|
||||
@@ -1506,12 +1520,13 @@ static int stmmac_init_rx_buffers(struct
|
||||
@@ -1508,12 +1522,13 @@ static int stmmac_init_rx_buffers(struct
|
||||
/**
|
||||
* stmmac_free_rx_buffer - free RX dma buffers
|
||||
* @priv: private structure
|
||||
@ -222,7 +222,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i];
|
||||
|
||||
if (buf->page)
|
||||
@@ -1526,12 +1541,15 @@ static void stmmac_free_rx_buffer(struct
|
||||
@@ -1528,12 +1543,15 @@ static void stmmac_free_rx_buffer(struct
|
||||
/**
|
||||
* stmmac_free_tx_buffer - free RX dma buffers
|
||||
* @priv: private structure
|
||||
@ -240,7 +240,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
if (tx_q->tx_skbuff_dma[i].buf &&
|
||||
tx_q->tx_skbuff_dma[i].buf_type != STMMAC_TXBUF_T_XDP_TX) {
|
||||
@@ -1570,23 +1588,28 @@ static void stmmac_free_tx_buffer(struct
|
||||
@@ -1572,23 +1590,28 @@ static void stmmac_free_tx_buffer(struct
|
||||
/**
|
||||
* dma_free_rx_skbufs - free RX dma buffers
|
||||
* @priv: private structure
|
||||
@ -276,7 +276,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct dma_desc *p;
|
||||
int ret;
|
||||
|
||||
@@ -1595,7 +1618,7 @@ static int stmmac_alloc_rx_buffers(struc
|
||||
@@ -1597,7 +1620,7 @@ static int stmmac_alloc_rx_buffers(struc
|
||||
else
|
||||
p = rx_q->dma_rx + i;
|
||||
|
||||
@ -285,7 +285,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
queue);
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -1609,14 +1632,17 @@ static int stmmac_alloc_rx_buffers(struc
|
||||
@@ -1611,14 +1634,17 @@ static int stmmac_alloc_rx_buffers(struc
|
||||
/**
|
||||
* dma_free_rx_xskbufs - free RX dma buffers from XSK pool
|
||||
* @priv: private structure
|
||||
@ -306,7 +306,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i];
|
||||
|
||||
if (!buf->xdp)
|
||||
@@ -1627,12 +1653,14 @@ static void dma_free_rx_xskbufs(struct s
|
||||
@@ -1629,12 +1655,14 @@ static void dma_free_rx_xskbufs(struct s
|
||||
}
|
||||
}
|
||||
|
||||
@ -324,7 +324,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct stmmac_rx_buffer *buf;
|
||||
dma_addr_t dma_addr;
|
||||
struct dma_desc *p;
|
||||
@@ -1667,22 +1695,25 @@ static struct xsk_buff_pool *stmmac_get_
|
||||
@@ -1669,22 +1697,25 @@ static struct xsk_buff_pool *stmmac_get_
|
||||
/**
|
||||
* __init_dma_rx_desc_rings - init the RX descriptor ring (per queue)
|
||||
* @priv: driver private structure
|
||||
@ -353,7 +353,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
xdp_rxq_info_unreg_mem_model(&rx_q->xdp_rxq);
|
||||
|
||||
@@ -1709,9 +1740,9 @@ static int __init_dma_rx_desc_rings(stru
|
||||
@@ -1711,9 +1742,9 @@ static int __init_dma_rx_desc_rings(stru
|
||||
/* RX XDP ZC buffer pool may not be populated, e.g.
|
||||
* xdpsock TX-only.
|
||||
*/
|
||||
@ -365,7 +365,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
if (ret < 0)
|
||||
return -ENOMEM;
|
||||
}
|
||||
@@ -1721,17 +1752,19 @@ static int __init_dma_rx_desc_rings(stru
|
||||
@@ -1723,17 +1754,19 @@ static int __init_dma_rx_desc_rings(stru
|
||||
if (priv->extend_desc)
|
||||
stmmac_mode_init(priv, rx_q->dma_erx,
|
||||
rx_q->dma_rx_phy,
|
||||
@ -388,7 +388,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
{
|
||||
struct stmmac_priv *priv = netdev_priv(dev);
|
||||
u32 rx_count = priv->plat->rx_queues_to_use;
|
||||
@@ -1743,7 +1776,7 @@ static int init_dma_rx_desc_rings(struct
|
||||
@@ -1745,7 +1778,7 @@ static int init_dma_rx_desc_rings(struct
|
||||
"SKB addresses:\nskb\t\tskb data\tdma data\n");
|
||||
|
||||
for (queue = 0; queue < rx_count; queue++) {
|
||||
@ -397,7 +397,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
if (ret)
|
||||
goto err_init_rx_buffers;
|
||||
}
|
||||
@@ -1752,12 +1785,12 @@ static int init_dma_rx_desc_rings(struct
|
||||
@@ -1754,12 +1787,12 @@ static int init_dma_rx_desc_rings(struct
|
||||
|
||||
err_init_rx_buffers:
|
||||
while (queue >= 0) {
|
||||
@ -413,7 +413,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
rx_q->buf_alloc_num = 0;
|
||||
rx_q->xsk_pool = NULL;
|
||||
@@ -1774,14 +1807,17 @@ err_init_rx_buffers:
|
||||
@@ -1776,14 +1809,17 @@ err_init_rx_buffers:
|
||||
/**
|
||||
* __init_dma_tx_desc_rings - init the TX descriptor ring (per queue)
|
||||
* @priv: driver private structure
|
||||
@ -434,7 +434,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
int i;
|
||||
|
||||
netif_dbg(priv, probe, priv->dev,
|
||||
@@ -1793,16 +1829,16 @@ static int __init_dma_tx_desc_rings(stru
|
||||
@@ -1795,16 +1831,16 @@ static int __init_dma_tx_desc_rings(stru
|
||||
if (priv->extend_desc)
|
||||
stmmac_mode_init(priv, tx_q->dma_etx,
|
||||
tx_q->dma_tx_phy,
|
||||
@ -454,7 +454,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct dma_desc *p;
|
||||
|
||||
if (priv->extend_desc)
|
||||
@@ -1824,7 +1860,8 @@ static int __init_dma_tx_desc_rings(stru
|
||||
@@ -1826,7 +1862,8 @@ static int __init_dma_tx_desc_rings(stru
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -464,7 +464,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
{
|
||||
struct stmmac_priv *priv = netdev_priv(dev);
|
||||
u32 tx_queue_cnt;
|
||||
@@ -1833,7 +1870,7 @@ static int init_dma_tx_desc_rings(struct
|
||||
@@ -1835,7 +1872,7 @@ static int init_dma_tx_desc_rings(struct
|
||||
tx_queue_cnt = priv->plat->tx_queues_to_use;
|
||||
|
||||
for (queue = 0; queue < tx_queue_cnt; queue++)
|
||||
@ -473,7 +473,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1841,26 +1878,29 @@ static int init_dma_tx_desc_rings(struct
|
||||
@@ -1843,26 +1880,29 @@ static int init_dma_tx_desc_rings(struct
|
||||
/**
|
||||
* init_dma_desc_rings - init the RX/TX descriptor rings
|
||||
* @dev: net device structure
|
||||
@ -508,7 +508,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1868,17 +1908,20 @@ static int init_dma_desc_rings(struct ne
|
||||
@@ -1870,17 +1910,20 @@ static int init_dma_desc_rings(struct ne
|
||||
/**
|
||||
* dma_free_tx_skbufs - free TX dma buffers
|
||||
* @priv: private structure
|
||||
@ -533,7 +533,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
if (tx_q->xsk_pool && tx_q->xsk_frames_done) {
|
||||
xsk_tx_completed(tx_q->xsk_pool, tx_q->xsk_frames_done);
|
||||
@@ -1897,34 +1940,37 @@ static void stmmac_free_tx_skbufs(struct
|
||||
@@ -1899,34 +1942,37 @@ static void stmmac_free_tx_skbufs(struct
|
||||
u32 queue;
|
||||
|
||||
for (queue = 0; queue < tx_queue_cnt; queue++)
|
||||
@ -578,7 +578,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
sizeof(struct dma_extended_desc),
|
||||
rx_q->dma_erx, rx_q->dma_rx_phy);
|
||||
|
||||
@@ -1936,29 +1982,33 @@ static void __free_dma_rx_desc_resources
|
||||
@@ -1938,29 +1984,33 @@ static void __free_dma_rx_desc_resources
|
||||
page_pool_destroy(rx_q->page_pool);
|
||||
}
|
||||
|
||||
@ -617,7 +617,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
if (priv->extend_desc) {
|
||||
size = sizeof(struct dma_extended_desc);
|
||||
@@ -1971,7 +2021,7 @@ static void __free_dma_tx_desc_resources
|
||||
@@ -1973,7 +2023,7 @@ static void __free_dma_tx_desc_resources
|
||||
addr = tx_q->dma_tx;
|
||||
}
|
||||
|
||||
@ -626,7 +626,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
dma_free_coherent(priv->device, size, addr, tx_q->dma_tx_phy);
|
||||
|
||||
@@ -1979,28 +2029,32 @@ static void __free_dma_tx_desc_resources
|
||||
@@ -1981,28 +2031,32 @@ static void __free_dma_tx_desc_resources
|
||||
kfree(tx_q->tx_skbuff);
|
||||
}
|
||||
|
||||
@ -663,7 +663,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct stmmac_channel *ch = &priv->channel[queue];
|
||||
bool xdp_prog = stmmac_xdp_is_enabled(priv);
|
||||
struct page_pool_params pp_params = { 0 };
|
||||
@@ -2012,8 +2066,8 @@ static int __alloc_dma_rx_desc_resources
|
||||
@@ -2014,8 +2068,8 @@ static int __alloc_dma_rx_desc_resources
|
||||
rx_q->priv_data = priv;
|
||||
|
||||
pp_params.flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV;
|
||||
@ -674,7 +674,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
pp_params.order = ilog2(num_pages);
|
||||
pp_params.nid = dev_to_node(priv->device);
|
||||
pp_params.dev = priv->device;
|
||||
@@ -2028,7 +2082,7 @@ static int __alloc_dma_rx_desc_resources
|
||||
@@ -2030,7 +2084,7 @@ static int __alloc_dma_rx_desc_resources
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -683,7 +683,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
sizeof(*rx_q->buf_pool),
|
||||
GFP_KERNEL);
|
||||
if (!rx_q->buf_pool)
|
||||
@@ -2036,7 +2090,7 @@ static int __alloc_dma_rx_desc_resources
|
||||
@@ -2038,7 +2092,7 @@ static int __alloc_dma_rx_desc_resources
|
||||
|
||||
if (priv->extend_desc) {
|
||||
rx_q->dma_erx = dma_alloc_coherent(priv->device,
|
||||
@ -692,7 +692,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
sizeof(struct dma_extended_desc),
|
||||
&rx_q->dma_rx_phy,
|
||||
GFP_KERNEL);
|
||||
@@ -2045,7 +2099,7 @@ static int __alloc_dma_rx_desc_resources
|
||||
@@ -2047,7 +2101,7 @@ static int __alloc_dma_rx_desc_resources
|
||||
|
||||
} else {
|
||||
rx_q->dma_rx = dma_alloc_coherent(priv->device,
|
||||
@ -701,7 +701,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
sizeof(struct dma_desc),
|
||||
&rx_q->dma_rx_phy,
|
||||
GFP_KERNEL);
|
||||
@@ -2070,7 +2124,8 @@ static int __alloc_dma_rx_desc_resources
|
||||
@@ -2072,7 +2126,8 @@ static int __alloc_dma_rx_desc_resources
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -711,7 +711,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
{
|
||||
u32 rx_count = priv->plat->rx_queues_to_use;
|
||||
u32 queue;
|
||||
@@ -2078,7 +2133,7 @@ static int alloc_dma_rx_desc_resources(s
|
||||
@@ -2080,7 +2135,7 @@ static int alloc_dma_rx_desc_resources(s
|
||||
|
||||
/* RX queues buffers and DMA */
|
||||
for (queue = 0; queue < rx_count; queue++) {
|
||||
@ -720,7 +720,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
if (ret)
|
||||
goto err_dma;
|
||||
}
|
||||
@@ -2086,7 +2141,7 @@ static int alloc_dma_rx_desc_resources(s
|
||||
@@ -2088,7 +2143,7 @@ static int alloc_dma_rx_desc_resources(s
|
||||
return 0;
|
||||
|
||||
err_dma:
|
||||
@ -729,7 +729,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -2094,28 +2149,31 @@ err_dma:
|
||||
@@ -2096,28 +2151,31 @@ err_dma:
|
||||
/**
|
||||
* __alloc_dma_tx_desc_resources - alloc TX resources (per queue).
|
||||
* @priv: private structure
|
||||
@ -765,7 +765,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
sizeof(struct sk_buff *),
|
||||
GFP_KERNEL);
|
||||
if (!tx_q->tx_skbuff)
|
||||
@@ -2128,7 +2186,7 @@ static int __alloc_dma_tx_desc_resources
|
||||
@@ -2130,7 +2188,7 @@ static int __alloc_dma_tx_desc_resources
|
||||
else
|
||||
size = sizeof(struct dma_desc);
|
||||
|
||||
@ -774,7 +774,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
addr = dma_alloc_coherent(priv->device, size,
|
||||
&tx_q->dma_tx_phy, GFP_KERNEL);
|
||||
@@ -2145,7 +2203,8 @@ static int __alloc_dma_tx_desc_resources
|
||||
@@ -2147,7 +2205,8 @@ static int __alloc_dma_tx_desc_resources
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -784,7 +784,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
{
|
||||
u32 tx_count = priv->plat->tx_queues_to_use;
|
||||
u32 queue;
|
||||
@@ -2153,7 +2212,7 @@ static int alloc_dma_tx_desc_resources(s
|
||||
@@ -2155,7 +2214,7 @@ static int alloc_dma_tx_desc_resources(s
|
||||
|
||||
/* TX queues buffers and DMA */
|
||||
for (queue = 0; queue < tx_count; queue++) {
|
||||
@ -793,7 +793,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
if (ret)
|
||||
goto err_dma;
|
||||
}
|
||||
@@ -2161,27 +2220,29 @@ static int alloc_dma_tx_desc_resources(s
|
||||
@@ -2163,27 +2222,29 @@ static int alloc_dma_tx_desc_resources(s
|
||||
return 0;
|
||||
|
||||
err_dma:
|
||||
@ -827,7 +827,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -2189,16 +2250,18 @@ static int alloc_dma_desc_resources(stru
|
||||
@@ -2191,16 +2252,18 @@ static int alloc_dma_desc_resources(stru
|
||||
/**
|
||||
* free_dma_desc_resources - free dma desc resources
|
||||
* @priv: private structure
|
||||
@ -849,7 +849,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2687,8 +2750,8 @@ static void stmmac_tx_err(struct stmmac_
|
||||
@@ -2689,8 +2752,8 @@ static void stmmac_tx_err(struct stmmac_
|
||||
netif_tx_stop_queue(netdev_get_tx_queue(priv->dev, chan));
|
||||
|
||||
stmmac_stop_tx_dma(priv, chan);
|
||||
@ -860,7 +860,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
stmmac_reset_tx_queue(priv, chan);
|
||||
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||
tx_q->dma_tx_phy, chan);
|
||||
@@ -3686,19 +3749,93 @@ static int stmmac_request_irq(struct net
|
||||
@@ -3688,19 +3751,93 @@ static int stmmac_request_irq(struct net
|
||||
}
|
||||
|
||||
/**
|
||||
@ -957,7 +957,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
u32 chan;
|
||||
int ret;
|
||||
|
||||
@@ -3725,45 +3862,10 @@ static int stmmac_open(struct net_device
|
||||
@@ -3727,45 +3864,10 @@ static int stmmac_open(struct net_device
|
||||
memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats));
|
||||
priv->xstats.threshold = tc;
|
||||
|
||||
@ -1005,7 +1005,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
if (priv->plat->serdes_powerup) {
|
||||
ret = priv->plat->serdes_powerup(dev, priv->plat->bsp_priv);
|
||||
@@ -3806,14 +3908,28 @@ irq_error:
|
||||
@@ -3808,14 +3910,28 @@ irq_error:
|
||||
|
||||
stmmac_hw_teardown(dev);
|
||||
init_error:
|
||||
@ -1036,7 +1036,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
static void stmmac_fpe_stop_wq(struct stmmac_priv *priv)
|
||||
{
|
||||
set_bit(__FPE_REMOVING, &priv->fpe_task_state);
|
||||
@@ -3862,7 +3978,7 @@ static int stmmac_release(struct net_dev
|
||||
@@ -3864,7 +3980,7 @@ static int stmmac_release(struct net_dev
|
||||
stmmac_stop_all_dma(priv);
|
||||
|
||||
/* Release and free the Rx/Tx resources */
|
||||
@ -1045,7 +1045,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
/* Disable the MAC Rx/Tx */
|
||||
stmmac_mac_set(priv, priv->ioaddr, false);
|
||||
@@ -6385,7 +6501,7 @@ void stmmac_disable_rx_queue(struct stmm
|
||||
@@ -6387,7 +6503,7 @@ void stmmac_disable_rx_queue(struct stmm
|
||||
spin_unlock_irqrestore(&ch->lock, flags);
|
||||
|
||||
stmmac_stop_rx_dma(priv, queue);
|
||||
@ -1054,7 +1054,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
|
||||
void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue)
|
||||
@@ -6396,21 +6512,21 @@ void stmmac_enable_rx_queue(struct stmma
|
||||
@@ -6398,21 +6514,21 @@ void stmmac_enable_rx_queue(struct stmma
|
||||
u32 buf_size;
|
||||
int ret;
|
||||
|
||||
@ -1080,7 +1080,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||
rx_q->dma_rx_phy, rx_q->queue_index);
|
||||
@@ -6448,7 +6564,7 @@ void stmmac_disable_tx_queue(struct stmm
|
||||
@@ -6450,7 +6566,7 @@ void stmmac_disable_tx_queue(struct stmm
|
||||
spin_unlock_irqrestore(&ch->lock, flags);
|
||||
|
||||
stmmac_stop_tx_dma(priv, queue);
|
||||
@ -1089,7 +1089,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
|
||||
void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue)
|
||||
@@ -6458,21 +6574,21 @@ void stmmac_enable_tx_queue(struct stmma
|
||||
@@ -6460,21 +6576,21 @@ void stmmac_enable_tx_queue(struct stmma
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
@ -1115,7 +1115,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||
tx_q->dma_tx_phy, tx_q->queue_index);
|
||||
@@ -6512,7 +6628,7 @@ void stmmac_xdp_release(struct net_devic
|
||||
@@ -6514,7 +6630,7 @@ void stmmac_xdp_release(struct net_devic
|
||||
stmmac_stop_all_dma(priv);
|
||||
|
||||
/* Release and free the Rx/Tx resources */
|
||||
@ -1124,7 +1124,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
/* Disable the MAC Rx/Tx */
|
||||
stmmac_mac_set(priv, priv->ioaddr, false);
|
||||
@@ -6537,14 +6653,14 @@ int stmmac_xdp_open(struct net_device *d
|
||||
@@ -6539,14 +6655,14 @@ int stmmac_xdp_open(struct net_device *d
|
||||
u32 chan;
|
||||
int ret;
|
||||
|
||||
@ -1141,7 +1141,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
if (ret < 0) {
|
||||
netdev_err(dev, "%s: DMA descriptors initialization failed\n",
|
||||
__func__);
|
||||
@@ -6626,7 +6742,7 @@ irq_error:
|
||||
@@ -6628,7 +6744,7 @@ irq_error:
|
||||
|
||||
stmmac_hw_teardown(dev);
|
||||
init_error:
|
||||
@ -1150,7 +1150,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
dma_desc_error:
|
||||
return ret;
|
||||
}
|
||||
@@ -7492,7 +7608,7 @@ int stmmac_resume(struct device *dev)
|
||||
@@ -7494,7 +7610,7 @@ int stmmac_resume(struct device *dev)
|
||||
stmmac_reset_queues_param(priv);
|
||||
|
||||
stmmac_free_tx_skbufs(priv);
|
||||
|
||||
@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
@@ -5627,18 +5627,15 @@ static int stmmac_change_mtu(struct net_
|
||||
@@ -5629,18 +5629,15 @@ static int stmmac_change_mtu(struct net_
|
||||
{
|
||||
struct stmmac_priv *priv = netdev_priv(dev);
|
||||
int txfifosz = priv->plat->tx_fifo_size;
|
||||
@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
if (stmmac_xdp_is_enabled(priv) && new_mtu > ETH_DATA_LEN) {
|
||||
netdev_dbg(priv->dev, "Jumbo frames not supported for XDP\n");
|
||||
return -EINVAL;
|
||||
@@ -5650,8 +5647,29 @@ static int stmmac_change_mtu(struct net_
|
||||
@@ -5652,8 +5649,29 @@ static int stmmac_change_mtu(struct net_
|
||||
if ((txfifosz < new_mtu) || (new_mtu > BUF_SIZE_16KiB))
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/usb/qmi_wwan.c
|
||||
+++ b/drivers/net/usb/qmi_wwan.c
|
||||
@@ -1317,6 +1317,7 @@ static const struct usb_device_id produc
|
||||
@@ -1318,6 +1318,7 @@ static const struct usb_device_id produc
|
||||
{QMI_FIXED_INTF(0x19d2, 0x1426, 2)}, /* ZTE MF91 */
|
||||
{QMI_FIXED_INTF(0x19d2, 0x1428, 2)}, /* Telewell TW-LTE 4G v2 */
|
||||
{QMI_FIXED_INTF(0x19d2, 0x1432, 3)}, /* ZTE ME3620 */
|
||||
|
||||
@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
int current_brightness;
|
||||
--- a/include/linux/leds.h
|
||||
+++ b/include/linux/leds.h
|
||||
@@ -527,6 +527,16 @@ static inline void *led_get_trigger_data
|
||||
@@ -525,6 +525,16 @@ led_trigger_get_brightness(const struct
|
||||
|
||||
#endif /* CONFIG_LEDS_TRIGGERS */
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
||||
|
||||
--- a/drivers/bluetooth/btusb.c
|
||||
+++ b/drivers/bluetooth/btusb.c
|
||||
@@ -2289,6 +2289,23 @@ struct btmtk_section_map {
|
||||
@@ -2293,6 +2293,23 @@ struct btmtk_section_map {
|
||||
};
|
||||
} __packed;
|
||||
|
||||
@ -41,7 +41,7 @@ Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
||||
static void btusb_mtk_wmt_recv(struct urb *urb)
|
||||
{
|
||||
struct hci_dev *hdev = urb->context;
|
||||
@@ -3943,6 +3960,7 @@ static int btusb_probe(struct usb_interf
|
||||
@@ -3947,6 +3964,7 @@ static int btusb_probe(struct usb_interf
|
||||
hdev->shutdown = btusb_mtk_shutdown;
|
||||
hdev->manufacturer = 70;
|
||||
hdev->cmd_timeout = btusb_mtk_cmd_timeout;
|
||||
|
||||
@ -18,7 +18,7 @@ Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
||||
|
||||
--- a/drivers/bluetooth/btusb.c
|
||||
+++ b/drivers/bluetooth/btusb.c
|
||||
@@ -2294,7 +2294,7 @@ static int btusb_set_bdaddr_mtk(struct h
|
||||
@@ -2298,7 +2298,7 @@ static int btusb_set_bdaddr_mtk(struct h
|
||||
struct sk_buff *skb;
|
||||
long ret;
|
||||
|
||||
|
||||
@ -123,7 +123,7 @@ Signed-off-by: Justin Stitt <justinstitt@google.com>
|
||||
#endif /* _LINUX_ETHTOOL_H */
|
||||
--- a/net/ethtool/ioctl.c
|
||||
+++ b/net/ethtool/ioctl.c
|
||||
@@ -1954,6 +1954,13 @@ __printf(2, 3) void ethtool_sprintf(u8 *
|
||||
@@ -1957,6 +1957,13 @@ __printf(2, 3) void ethtool_sprintf(u8 *
|
||||
}
|
||||
EXPORT_SYMBOL(ethtool_sprintf);
|
||||
|
||||
|
||||
@ -336,6 +336,7 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8
|
||||
# CONFIG_ARM64_ERRATUM_2067961 is not set
|
||||
# CONFIG_ARM64_ERRATUM_2441007 is not set
|
||||
# CONFIG_ARM64_ERRATUM_2441009 is not set
|
||||
# CONFIG_ARM64_ERRATUM_3194386 is not set
|
||||
# CONFIG_ARM64_ERRATUM_819472 is not set
|
||||
# CONFIG_ARM64_ERRATUM_824069 is not set
|
||||
# CONFIG_ARM64_ERRATUM_826319 is not set
|
||||
|
||||
@ -85,7 +85,7 @@ swconfig_trig_update_port_mask(struct led_trigger *trigger)
|
||||
sw_trig = (void *) trigger;
|
||||
|
||||
port_mask = 0;
|
||||
read_lock(&trigger->leddev_list_lock);
|
||||
spin_lock(&trigger->leddev_list_lock);
|
||||
list_for_each(entry, &trigger->led_cdevs) {
|
||||
struct led_classdev *led_cdev;
|
||||
struct swconfig_trig_data *trig_data;
|
||||
@ -98,7 +98,7 @@ swconfig_trig_update_port_mask(struct led_trigger *trigger)
|
||||
read_unlock(&trig_data->lock);
|
||||
}
|
||||
}
|
||||
read_unlock(&trigger->leddev_list_lock);
|
||||
spin_unlock(&trigger->leddev_list_lock);
|
||||
|
||||
sw_trig->port_mask = port_mask;
|
||||
|
||||
@ -418,14 +418,14 @@ swconfig_trig_update_leds(struct switch_led_trigger *sw_trig)
|
||||
struct led_trigger *trigger;
|
||||
|
||||
trigger = &sw_trig->trig;
|
||||
read_lock(&trigger->leddev_list_lock);
|
||||
spin_lock(&trigger->leddev_list_lock);
|
||||
list_for_each(entry, &trigger->led_cdevs) {
|
||||
struct led_classdev *led_cdev;
|
||||
|
||||
led_cdev = list_entry(entry, struct led_classdev, trig_list);
|
||||
swconfig_trig_led_event(sw_trig, led_cdev);
|
||||
}
|
||||
read_unlock(&trigger->leddev_list_lock);
|
||||
spin_unlock(&trigger->leddev_list_lock);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@ -10,7 +10,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
|
||||
|
||||
--- a/drivers/net/usb/qmi_wwan.c
|
||||
+++ b/drivers/net/usb/qmi_wwan.c
|
||||
@@ -1080,12 +1080,18 @@ static const struct usb_device_id produc
|
||||
@@ -1081,12 +1081,18 @@ static const struct usb_device_id produc
|
||||
USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x581d, USB_CLASS_VENDOR_SPEC, 1, 7),
|
||||
.driver_info = (unsigned long)&qmi_wwan_info,
|
||||
},
|
||||
@ -43,7 +43,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
|
||||
|
||||
#define QUECTEL_VENDOR_ID 0x2c7c
|
||||
/* These Quectel products use Quectel's vendor ID */
|
||||
@@ -1156,6 +1161,11 @@ static const struct usb_device_id option
|
||||
@@ -1158,6 +1163,11 @@ static const struct usb_device_id option
|
||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
|
||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */
|
||||
.driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) },
|
||||
@ -55,7 +55,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
|
||||
/* Quectel products using Qualcomm vendor ID */
|
||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
|
||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
|
||||
@@ -1197,6 +1207,11 @@ static const struct usb_device_id option
|
||||
@@ -1199,6 +1209,11 @@ static const struct usb_device_id option
|
||||
.driver_info = ZLP },
|
||||
{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
|
||||
.driver_info = RSVD(4) },
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user