mac80211: update v5.4 patches

add recent patches made to the v4.4 kernel to the v5.4 kernel

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2023-07-25 08:34:33 +02:00
parent 9c27a4b878
commit 672578af01
4 changed files with 76 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
Index: backports-20210222_001-4.4.60-b157d2276/drivers/net/wireless/ath/ath11k/mac.c
===================================================================
--- backports-20210222_001-4.4.60-b157d2276.orig/drivers/net/wireless/ath/ath11k/mac.c
+++ backports-20210222_001-4.4.60-b157d2276/drivers/net/wireless/ath/ath11k/mac.c
@@ -9160,7 +9160,7 @@ static int ath11k_mac_setup_iface_combin
limits[0].max = 1;
limits[0].types |= BIT(NL80211_IFTYPE_STATION);
- limits[1].max = 16;
+ limits[1].max = 8;
limits[1].types |= BIT(NL80211_IFTYPE_AP);
if (IS_ENABLED(CPTCFG_MAC80211_MESH) &&
@@ -9169,7 +9169,7 @@ static int ath11k_mac_setup_iface_combin
combinations[0].limits = limits;
combinations[0].n_limits = n_limits;
- combinations[0].max_interfaces = 16;
+ combinations[0].max_interfaces = 8;
combinations[0].num_different_channels = 1;
combinations[0].beacon_int_infra_match = true;
combinations[0].beacon_int_min_gcd = 100;

View File

@@ -0,0 +1,12 @@
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3978,7 +3978,8 @@ void __ieee80211_subif_start_xmit(struct
ap_sdata = sdata;
if (ap_sdata->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED &&
- !is_multicast_ether_addr(skb->data)) {
+ !is_multicast_ether_addr(skb->data) &&
+ (sta || ieee80211_hw_check(&local->hw, SUPPORTS_NSS_OFFLOAD))) {
if (sta)
key = rcu_dereference(sta->ptk[sta->ptk_idx]);
ieee80211_8023_xmit(sdata, dev, sta, key, skb);

View File

@@ -0,0 +1,31 @@
Index: backports-20210222_001-4.4.60-b157d2276/drivers/net/wireless/ath/ath11k/mac.c
===================================================================
--- backports-20210222_001-4.4.60-b157d2276.orig/drivers/net/wireless/ath/ath11k/mac.c
+++ backports-20210222_001-4.4.60-b157d2276/drivers/net/wireless/ath/ath11k/mac.c
@@ -5872,6 +5915,7 @@ static int ath11k_mac_copy_he_cap(struct
int band)
{
int i, idx = 0;
+ struct ath11k_base *ab = ar->ab;
for (i = 0; i < NUM_NL80211_IFTYPES; i++) {
struct ieee80211_sta_he_cap *he_cap = &data[idx].he_cap;
@@ -5904,6 +5948,17 @@ static int ath11k_mac_copy_he_cap(struct
~IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK;
he_cap_elem->phy_cap_info[5] |= ar->num_tx_chains - 1;
+ he_cap_elem->phy_cap_info[0] &=
+ ~IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G;
+ switch (ab->hw_rev) {
+ case ATH11K_HW_QCN6122:
+ case ATH11K_HW_QCN9074_HW10:
+ break;
+ default:
+ he_cap_elem->phy_cap_info[0] &=
+ ~IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G;
+ break;
+ }
switch (i) {
case NL80211_IFTYPE_AP:
he_cap_elem->phy_cap_info[3] &=

View File

@@ -0,0 +1,11 @@
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -5898,6 +5898,8 @@ static int ath11k_mac_copy_he_cap(struct
memcpy(he_cap_elem->phy_cap_info, band_cap->he_cap_phy_info,
sizeof(he_cap_elem->phy_cap_info));
+ he_cap_elem->mac_cap_info[0] &= ~IEEE80211_HE_MAC_CAP0_HTC_HE;
+
he_cap_elem->mac_cap_info[1] &=
IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_MASK;