openwrt-ipq-breeze303/package/kernel/mac80211/patches/nss/subsys/245-compilation_fix.patch
Sean Khan db9ba5cdb1 ath11k_nss: Organize patch order and formatting
NSS patches should always get applied last as to avoid fuzzing issues
with upstream patches.

Also cleanup patches that introduced spaces as indents vs. tabs

Signed-off-by: Sean Khan <datapronix@protonmail.com>

ath11k_nss: drop upstreamed patch

A variation of this patch 'wifi: mac80211: Use flexible array in struct ieee80211_tim_ie'
was upstreamed in commit 'e6e4d90b69027d74ba7e9a0a586b95a5714e10c0'.
Remove it to avoid compilation issues.

Signed-off-by: Sean Khan <datapronix@protonmail.com>

ath11k_nss: Fix patch conflict

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:08 -04:00

116 lines
3.8 KiB
Diff

From 9cdb8bae50aca80b593d0f53be5b8efedfc91324 Mon Sep 17 00:00:00 2001
From: Tamizh Chelvam <tamizhr@codeaurora.org>
Date: Sun, 7 Mar 2021 22:49:26 +0530
Subject: [PATCH] backport: Compile fix
Adding these changes to fix compilation issue due to
package upgrade
Signed-off-by: Tamizh Chelvam <tamizhr@codeaurora.org>
Signed-off-by: Gautham Kumar Senthilkumaran <quic_gauthamk@quicinc.com>
---
include/linux/backport-refcount.h | 4 +--
include/net/fq.h | 10 +++++-
net/mac80211/cfg.c | 4 +--
net/mac80211/ieee80211_i.h | 4 ++-
net/mac80211/iface.c | 2 --
net/mac80211/rx.c | 23 +++++++++-----
net/mac80211/tx.c | 54 ++++++++++++++++++++++----------
7 files changed, 40 insertions(+), 23 deletions(-)
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -207,6 +207,7 @@ enum ieee80211_rx_flags {
};
struct ieee80211_rx_data {
+ struct napi_struct *napi;
struct list_head *list;
struct sk_buff *skb;
struct ieee80211_local *local;
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -4686,19 +4686,21 @@ static void ieee80211_8023_xmit(struct i
ieee80211_aggr_check(sdata, sta, skb);
- tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
- tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]);
- if (tid_tx) {
- if (!test_bit(HT_AGG_STATE_OPERATIONAL, &tid_tx->state)) {
- /* fall back to non-offload slow path */
- __ieee80211_subif_start_xmit(skb, dev, 0,
- IEEE80211_TX_CTRL_MLO_LINK_UNSPEC,
- NULL);
- return;
- }
+ if (!ieee80211_hw_check(&local->hw, SUPPORTS_NSS_OFFLOAD)) {
+ tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
+ tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]);
+ if (tid_tx) {
+ if (!test_bit(HT_AGG_STATE_OPERATIONAL, &tid_tx->state)) {
+ /* fall back to non-offload slow path */
+ __ieee80211_subif_start_xmit(skb, dev, 0,
+ IEEE80211_TX_CTRL_MLO_LINK_UNSPEC,
+ NULL);
+ return;
+ }
- if (tid_tx->timeout)
- tid_tx->last_tx = jiffies;
+ if (tid_tx->timeout)
+ tid_tx->last_tx = jiffies;
+ }
}
skb = ieee80211_tx_skb_fixup(skb, ieee80211_sdata_netdev_features(sdata));
@@ -4755,7 +4757,7 @@ netdev_tx_t ieee80211_subif_start_xmit_8
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ethhdr *ehdr = (struct ethhdr *)skb->data;
- struct ieee80211_key *key;
+ struct ieee80211_key *key = NULL;
struct sta_info *sta;
#ifdef CPTCFG_MAC80211_NSS_SUPPORT
@@ -4773,9 +4775,13 @@ netdev_tx_t ieee80211_subif_start_xmit_8
goto out;
}
- if (unlikely(IS_ERR_OR_NULL(sta) || !sta->uploaded ||
- !test_sta_flag(sta, WLAN_STA_AUTHORIZED) ||
- sdata->control_port_protocol == ehdr->h_proto))
+ if (ieee80211_hw_check(&sdata->local->hw, SUPPORTS_NSS_OFFLOAD)) {
+ if (unlikely(IS_ERR_OR_NULL(sta) || !sta->uploaded))
+ sta = NULL;
+ goto tx_offload;
+ } else if (unlikely(IS_ERR_OR_NULL(sta) || !sta->uploaded ||
+ !test_sta_flag(sta, WLAN_STA_AUTHORIZED) ||
+ sdata->control_port_protocol == ehdr->h_proto))
goto skip_offload;
key = rcu_dereference(sta->ptk[sta->ptk_idx]);
@@ -4786,6 +4792,7 @@ netdev_tx_t ieee80211_subif_start_xmit_8
goto skip_offload;
sk_pacing_shift_update(skb->sk, sdata->local->hw.tx_sk_pacing_shift);
+tx_offload:
ieee80211_8023_xmit(sdata, dev, sta, key, skb);
goto out;
@@ -6292,13 +6299,7 @@ start_xmit:
mutex_lock(&local->mtx);
local_bh_disable();
-
- /* added hardware encap check for ethernet mode */
- if (sdata->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED)
- ieee80211_subif_start_xmit_8023(skb, skb->dev);
- else
- __ieee80211_subif_start_xmit(skb, skb->dev, flags, ctrl_flags, cookie);
-
+ __ieee80211_subif_start_xmit(skb, skb->dev, flags, ctrl_flags, cookie);
local_bh_enable();
mutex_unlock(&local->mtx);