mac80211: refresh all patches

Signed-off-by: AnYun <amadeus@openjmu.xyz>
This commit is contained in:
aiamadeus 2023-12-07 23:10:18 +08:00
parent 794fa1345e
commit 14fb304fd4
11 changed files with 111 additions and 111 deletions

View File

@ -1,12 +1,12 @@
--- a/drivers/net/wireless/ath/ath10k/debug.c --- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -1260,6 +1260,9 @@ static int ath10k_debug_cal_data_fetch(struct ath10k *ar) @@ -1260,6 +1260,9 @@ static int ath10k_debug_cal_data_fetch(s
if (ar->hw_params.cal_data_len == 0) if (ar->hw_params.cal_data_len == 0)
return -EOPNOTSUPP; return -EOPNOTSUPP;
+ if (ar->hif.bus == ATH10K_BUS_SDIO) + if (ar->hif.bus == ATH10K_BUS_SDIO)
+ return -EINVAL; + return -EINVAL;
+ +
hi_addr = host_interest_item_address(HI_ITEM(hi_board_data)); hi_addr = host_interest_item_address(HI_ITEM(hi_board_data));
ret = ath10k_hif_diag_read(ar, hi_addr, &addr, sizeof(addr)); ret = ath10k_hif_diag_read(ar, hi_addr, &addr, sizeof(addr));

View File

@ -202,7 +202,7 @@ v13:
err_spectral_destroy: err_spectral_destroy:
ath10k_spectral_destroy(ar); ath10k_spectral_destroy(ar);
err_debug_destroy: err_debug_destroy:
@@ -3537,6 +3556,8 @@ void ath10k_core_unregister(struct ath10 @@ -3538,6 +3557,8 @@ void ath10k_core_unregister(struct ath10
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags)) if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
return; return;

View File

@ -18,7 +18,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
--- a/drivers/net/wireless/ath/ath10k/mac.c --- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -10080,7 +10080,6 @@ int ath10k_mac_register(struct ath10k *a @@ -10081,7 +10081,6 @@ int ath10k_mac_register(struct ath10k *a
ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA); ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA);
ieee80211_hw_set(ar->hw, QUEUE_CONTROL); ieee80211_hw_set(ar->hw, QUEUE_CONTROL);
ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG); ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG);

View File

@ -54,7 +54,7 @@
int ath9k_init_debug(struct ath_hw *ah) int ath9k_init_debug(struct ath_hw *ah)
{ {
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
@@ -1432,6 +1480,8 @@ int ath9k_init_debug(struct ath_hw *ah) @@ -1432,6 +1479,8 @@ int ath9k_init_debug(struct ath_hw *ah)
ath9k_tx99_init_debug(sc); ath9k_tx99_init_debug(sc);
ath9k_cmn_spectral_init_debug(&sc->spec_priv, sc->debug.debugfs_phy); ath9k_cmn_spectral_init_debug(&sc->spec_priv, sc->debug.debugfs_phy);

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c --- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1461,6 +1461,52 @@ static const struct file_operations fops @@ -1460,6 +1460,52 @@ static const struct file_operations fops
.owner = THIS_MODULE .owner = THIS_MODULE
}; };
@ -53,7 +53,7 @@
int ath9k_init_debug(struct ath_hw *ah) int ath9k_init_debug(struct ath_hw *ah)
{ {
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
@@ -1482,6 +1528,8 @@ int ath9k_init_debug(struct ath_hw *ah) @@ -1481,6 +1527,8 @@ int ath9k_init_debug(struct ath_hw *ah)
debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc, debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
&fops_eeprom); &fops_eeprom);

View File

@ -192,7 +192,7 @@
#endif #endif
--- a/drivers/net/wireless/ath/ath9k/debug.c --- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1506,6 +1506,61 @@ static const struct file_operations fops @@ -1505,6 +1505,61 @@ static const struct file_operations fops
.llseek = default_llseek, .llseek = default_llseek,
}; };
@ -254,7 +254,7 @@
int ath9k_init_debug(struct ath_hw *ah) int ath9k_init_debug(struct ath_hw *ah)
{ {
@@ -1530,6 +1585,10 @@ int ath9k_init_debug(struct ath_hw *ah) @@ -1529,6 +1584,10 @@ int ath9k_init_debug(struct ath_hw *ah)
&fops_eeprom); &fops_eeprom);
debugfs_create_file("chanbw", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, debugfs_create_file("chanbw", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
sc, &fops_chanbw); sc, &fops_chanbw);

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c --- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1562,6 +1562,50 @@ static const struct file_operations fops @@ -1561,6 +1561,50 @@ static const struct file_operations fops
#endif #endif
@ -51,7 +51,7 @@
int ath9k_init_debug(struct ath_hw *ah) int ath9k_init_debug(struct ath_hw *ah)
{ {
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
@@ -1589,6 +1633,8 @@ int ath9k_init_debug(struct ath_hw *ah) @@ -1588,6 +1632,8 @@ int ath9k_init_debug(struct ath_hw *ah)
debugfs_create_file("gpio_led", S_IWUSR, debugfs_create_file("gpio_led", S_IWUSR,
sc->debug.debugfs_phy, sc, &fops_gpio_led); sc->debug.debugfs_phy, sc, &fops_gpio_led);
#endif #endif

View File

@ -1,91 +1,91 @@
--- a/net/wireless/nl80211.c --- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c
@@ -421,8 +421,13 @@ static const struct nla_policy @@ -421,8 +421,13 @@ static const struct nla_policy
nl80211_fils_discovery_policy[NL80211_FILS_DISCOVERY_ATTR_MAX + 1] = { nl80211_fils_discovery_policy[NL80211_FILS_DISCOVERY_ATTR_MAX + 1] = {
[NL80211_FILS_DISCOVERY_ATTR_INT_MIN] = NLA_POLICY_MAX(NLA_U32, 10000), [NL80211_FILS_DISCOVERY_ATTR_INT_MIN] = NLA_POLICY_MAX(NLA_U32, 10000),
[NL80211_FILS_DISCOVERY_ATTR_INT_MAX] = NLA_POLICY_MAX(NLA_U32, 10000), [NL80211_FILS_DISCOVERY_ATTR_INT_MAX] = NLA_POLICY_MAX(NLA_U32, 10000),
+#if LINUX_VERSION_IS_GEQ(5,10,0) +#if LINUX_VERSION_IS_GEQ(5,10,0)
[NL80211_FILS_DISCOVERY_ATTR_TMPL] = [NL80211_FILS_DISCOVERY_ATTR_TMPL] =
NLA_POLICY_BINARY_RANGE(NL80211_FILS_DISCOVERY_TMPL_MIN_LEN, IEEE80211_MAX_DATA_LEN), NLA_POLICY_BINARY_RANGE(NL80211_FILS_DISCOVERY_TMPL_MIN_LEN, IEEE80211_MAX_DATA_LEN),
+#else +#else
+ [NL80211_FILS_DISCOVERY_ATTR_TMPL] = { .type = NLA_BINARY, + [NL80211_FILS_DISCOVERY_ATTR_TMPL] = { .type = NLA_BINARY,
+ .len = IEEE80211_MAX_DATA_LEN }, + .len = IEEE80211_MAX_DATA_LEN },
+#endif +#endif
}; };
static const struct nla_policy static const struct nla_policy
@@ -533,7 +538,11 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { @@ -533,7 +538,11 @@ static const struct nla_policy nl80211_p
[NL80211_ATTR_MPATH_NEXT_HOP] = NLA_POLICY_ETH_ADDR_COMPAT, [NL80211_ATTR_MPATH_NEXT_HOP] = NLA_POLICY_ETH_ADDR_COMPAT,
/* allow 3 for NUL-termination, we used to declare this NLA_STRING */ /* allow 3 for NUL-termination, we used to declare this NLA_STRING */
+#if LINUX_VERSION_IS_GEQ(5,10,0) +#if LINUX_VERSION_IS_GEQ(5,10,0)
[NL80211_ATTR_REG_ALPHA2] = NLA_POLICY_BINARY_RANGE(2, 3), [NL80211_ATTR_REG_ALPHA2] = NLA_POLICY_BINARY_RANGE(2, 3),
+#else +#else
+ [NL80211_ATTR_REG_ALPHA2] = { .type = NLA_STRING, .len = 2 }, + [NL80211_ATTR_REG_ALPHA2] = { .type = NLA_STRING, .len = 2 },
+#endif +#endif
[NL80211_ATTR_REG_RULES] = { .type = NLA_NESTED }, [NL80211_ATTR_REG_RULES] = { .type = NLA_NESTED },
[NL80211_ATTR_BSS_CTS_PROT] = { .type = NLA_U8 }, [NL80211_ATTR_BSS_CTS_PROT] = { .type = NLA_U8 },
@@ -679,14 +688,24 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { @@ -679,14 +688,24 @@ static const struct nla_policy nl80211_p
* The value of the Length field of the Supported Operating * The value of the Length field of the Supported Operating
* Classes element is between 2 and 253. * Classes element is between 2 and 253.
*/ */
+#if LINUX_VERSION_IS_GEQ(5,10,0) +#if LINUX_VERSION_IS_GEQ(5,10,0)
[NL80211_ATTR_STA_SUPPORTED_OPER_CLASSES] = [NL80211_ATTR_STA_SUPPORTED_OPER_CLASSES] =
NLA_POLICY_BINARY_RANGE(2, 253), NLA_POLICY_BINARY_RANGE(2, 253),
+#else +#else
+ [NL80211_ATTR_STA_SUPPORTED_OPER_CLASSES] = + [NL80211_ATTR_STA_SUPPORTED_OPER_CLASSES] =
+ { .type = NLA_BINARY }, + { .type = NLA_BINARY },
+#endif +#endif
[NL80211_ATTR_HANDLE_DFS] = { .type = NLA_FLAG }, [NL80211_ATTR_HANDLE_DFS] = { .type = NLA_FLAG },
[NL80211_ATTR_OPMODE_NOTIF] = { .type = NLA_U8 }, [NL80211_ATTR_OPMODE_NOTIF] = { .type = NLA_U8 },
[NL80211_ATTR_VENDOR_ID] = { .type = NLA_U32 }, [NL80211_ATTR_VENDOR_ID] = { .type = NLA_U32 },
[NL80211_ATTR_VENDOR_SUBCMD] = { .type = NLA_U32 }, [NL80211_ATTR_VENDOR_SUBCMD] = { .type = NLA_U32 },
[NL80211_ATTR_VENDOR_DATA] = { .type = NLA_BINARY }, [NL80211_ATTR_VENDOR_DATA] = { .type = NLA_BINARY },
+#if LINUX_VERSION_IS_GEQ(5,10,0) +#if LINUX_VERSION_IS_GEQ(5,10,0)
[NL80211_ATTR_QOS_MAP] = NLA_POLICY_BINARY_RANGE(IEEE80211_QOS_MAP_LEN_MIN, IEEE80211_QOS_MAP_LEN_MAX), [NL80211_ATTR_QOS_MAP] = NLA_POLICY_BINARY_RANGE(IEEE80211_QOS_MAP_LEN_MIN, IEEE80211_QOS_MAP_LEN_MAX),
+#else +#else
+ [NL80211_ATTR_QOS_MAP] = { .type = NLA_BINARY, + [NL80211_ATTR_QOS_MAP] = { .type = NLA_BINARY,
+ .len = IEEE80211_QOS_MAP_LEN_MAX }, + .len = IEEE80211_QOS_MAP_LEN_MAX },
+#endif +#endif
[NL80211_ATTR_MAC_HINT] = NLA_POLICY_EXACT_LEN_WARN(ETH_ALEN), [NL80211_ATTR_MAC_HINT] = NLA_POLICY_EXACT_LEN_WARN(ETH_ALEN),
[NL80211_ATTR_WIPHY_FREQ_HINT] = { .type = NLA_U32 }, [NL80211_ATTR_WIPHY_FREQ_HINT] = { .type = NLA_U32 },
[NL80211_ATTR_TDLS_PEER_CAPABILITY] = { .type = NLA_U32 }, [NL80211_ATTR_TDLS_PEER_CAPABILITY] = { .type = NLA_U32 },
@@ -741,9 +760,14 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { @@ -741,9 +760,14 @@ static const struct nla_policy nl80211_p
[NL80211_ATTR_TXQ_LIMIT] = { .type = NLA_U32 }, [NL80211_ATTR_TXQ_LIMIT] = { .type = NLA_U32 },
[NL80211_ATTR_TXQ_MEMORY_LIMIT] = { .type = NLA_U32 }, [NL80211_ATTR_TXQ_MEMORY_LIMIT] = { .type = NLA_U32 },
[NL80211_ATTR_TXQ_QUANTUM] = { .type = NLA_U32 }, [NL80211_ATTR_TXQ_QUANTUM] = { .type = NLA_U32 },
+#if LINUX_VERSION_IS_GEQ(5,10,0) +#if LINUX_VERSION_IS_GEQ(5,10,0)
[NL80211_ATTR_HE_CAPABILITY] = [NL80211_ATTR_HE_CAPABILITY] =
NLA_POLICY_VALIDATE_FN(NLA_BINARY, validate_he_capa, NLA_POLICY_VALIDATE_FN(NLA_BINARY, validate_he_capa,
NL80211_HE_MAX_CAPABILITY_LEN), NL80211_HE_MAX_CAPABILITY_LEN),
+#else +#else
+ [NL80211_ATTR_HE_CAPABILITY] = { .type = NLA_BINARY, + [NL80211_ATTR_HE_CAPABILITY] = { .type = NLA_BINARY,
+ .len = NL80211_HE_MAX_CAPABILITY_LEN }, + .len = NL80211_HE_MAX_CAPABILITY_LEN },
+#endif +#endif
[NL80211_ATTR_FTM_RESPONDER] = [NL80211_ATTR_FTM_RESPONDER] =
NLA_POLICY_NESTED(nl80211_ftm_responder_policy), NLA_POLICY_NESTED(nl80211_ftm_responder_policy),
[NL80211_ATTR_TIMEOUT] = NLA_POLICY_MIN(NLA_U32, 1), [NL80211_ATTR_TIMEOUT] = NLA_POLICY_MIN(NLA_U32, 1),
@@ -16409,9 +16433,11 @@ static const struct genl_ops nl80211_ops[] = { @@ -16392,9 +16416,11 @@ static const struct genl_ops nl80211_ops
/* can be retrieved by unprivileged users */ /* can be retrieved by unprivileged users */
.internal_flags = IFLAGS(NL80211_FLAG_NEED_WIPHY), .internal_flags = IFLAGS(NL80211_FLAG_NEED_WIPHY),
}, },
+#if LINUX_VERSION_IS_GEQ(5,10,0) +#if LINUX_VERSION_IS_GEQ(5,10,0)
}; };
static const struct genl_small_ops nl80211_small_ops[] = { static const struct genl_small_ops nl80211_small_ops[] = {
+#endif +#endif
{ {
.cmd = NL80211_CMD_SET_WIPHY, .cmd = NL80211_CMD_SET_WIPHY,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -17248,8 +17274,10 @@ static struct genl_family nl80211_fam __genl_ro_after_init = { @@ -17231,8 +17257,10 @@ static struct genl_family nl80211_fam __
.module = THIS_MODULE, .module = THIS_MODULE,
.ops = nl80211_ops, .ops = nl80211_ops,
.n_ops = ARRAY_SIZE(nl80211_ops), .n_ops = ARRAY_SIZE(nl80211_ops),
+#if LINUX_VERSION_IS_GEQ(5,10,0) +#if LINUX_VERSION_IS_GEQ(5,10,0)
.small_ops = nl80211_small_ops, .small_ops = nl80211_small_ops,
.n_small_ops = ARRAY_SIZE(nl80211_small_ops), .n_small_ops = ARRAY_SIZE(nl80211_small_ops),
+#endif +#endif
#if LINUX_VERSION_IS_GEQ(6,1,0) #if LINUX_VERSION_IS_GEQ(6,1,0)
.resv_start_op = NL80211_CMD_REMOVE_LINK_STA + 1, .resv_start_op = NL80211_CMD_REMOVE_LINK_STA + 1,
#endif #endif

View File

@ -12,7 +12,7 @@
have_80mhz = true; have_80mhz = true;
--- a/net/mac80211/util.c --- a/net/mac80211/util.c
+++ b/net/mac80211/util.c +++ b/net/mac80211/util.c
@@ -1981,7 +1981,8 @@ static int ieee80211_build_preq_ies_band @@ -1955,7 +1955,8 @@ static int ieee80211_build_preq_ies_band
/* Check if any channel in this sband supports at least 80 MHz */ /* Check if any channel in this sband supports at least 80 MHz */
for (i = 0; i < sband->n_channels; i++) { for (i = 0; i < sband->n_channels; i++) {
if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED | if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED |

View File

@ -129,7 +129,7 @@
local->hw.max_mtu = IEEE80211_MAX_DATA_LEN; local->hw.max_mtu = IEEE80211_MAX_DATA_LEN;
--- a/net/wireless/nl80211.c --- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c
@@ -799,6 +799,7 @@ static const struct nla_policy nl80211_p @@ -823,6 +823,7 @@ static const struct nla_policy nl80211_p
[NL80211_ATTR_MLD_ADDR] = NLA_POLICY_EXACT_LEN(ETH_ALEN), [NL80211_ATTR_MLD_ADDR] = NLA_POLICY_EXACT_LEN(ETH_ALEN),
[NL80211_ATTR_MLO_SUPPORT] = { .type = NLA_FLAG }, [NL80211_ATTR_MLO_SUPPORT] = { .type = NLA_FLAG },
[NL80211_ATTR_MAX_NUM_AKM_SUITES] = { .type = NLA_REJECT }, [NL80211_ATTR_MAX_NUM_AKM_SUITES] = { .type = NLA_REJECT },
@ -137,7 +137,7 @@
}; };
/* policy for the key attributes */ /* policy for the key attributes */
@@ -3511,6 +3512,22 @@ static int nl80211_set_wiphy(struct sk_b @@ -3535,6 +3536,22 @@ static int nl80211_set_wiphy(struct sk_b
if (result) if (result)
goto out; goto out;
} }

View File

@ -1,6 +1,6 @@
--- a/backport-include/linux/etherdevice.h --- a/backport-include/linux/etherdevice.h
+++ b/backport-include/linux/etherdevice.h +++ b/backport-include/linux/etherdevice.h
@@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@ static inline void u64_to_ether_addr(u64
} }
#endif /* LINUX_VERSION_IS_LESS(4,11,0) */ #endif /* LINUX_VERSION_IS_LESS(4,11,0) */