ath11k_nss: Refresh patches

Signed-off-by: Sean Khan <datapronix@protonmail.com>
This commit is contained in:
Sean Khan
2024-07-10 14:25:37 -04:00
parent 72977f1d0e
commit 09b44ecee4
10 changed files with 59 additions and 58 deletions

View File

@@ -114,21 +114,23 @@ Signed-off-by: Sowmiya Sree Elavalagan <ssreeela@codeaurora.org>
/*
* NOTE: Be very careful when changing this function, it must NOT return
* an error on interface type changes that have been pre-checked, so most
@@ -1450,6 +1491,19 @@ int ieee80211_do_open(struct wireless_de
@@ -1450,6 +1491,21 @@ int ieee80211_do_open(struct wireless_de
ieee80211_recalc_ps(local);
+#ifdef CPTCFG_MAC80211_NSS_SUPPORT
+ sdata->nssctx = NULL;
+ if (nss_redirect) {
+ sdata->nssctx = nss_virt_if_create_sync(dev);
+ if (sdata->nssctx) {
+ sdata_info(sdata, "Created a NSS virtual interface\n");
+ nss_virt_if_register(sdata->nssctx, receive_from_nss, sdata->dev);
+ } else {
+ sdata_info(sdata, "Failed to create a NSS virtual interface\n");
+ }
+ }
+ sdata->nssctx = NULL;
+ if (nss_redirect) {
+ sdata->nssctx = nss_virt_if_create_sync(dev);
+ if (sdata->nssctx) {
+ sdata_info(sdata, "Created a NSS virtual interface\n");
+ nss_virt_if_register(sdata->nssctx, receive_from_nss, sdata->dev);
+ } else {
+ sdata_info(
+ sdata,
+ "Failed to create a NSS virtual interface\n");
+ }
+ }
+#endif
+
set_bit(SDATA_STATE_RUNNING, &sdata->state);
@@ -213,11 +215,10 @@ Signed-off-by: Sowmiya Sree Elavalagan <ssreeela@codeaurora.org>
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1726,7 +1726,16 @@ static bool ieee80211_tx_frags(struct ie
return true;
@@ -1727,6 +1727,16 @@ static bool ieee80211_tx_frags(struct ie
}
} else {
-
+#ifdef CPTCFG_MAC80211_NSS_SUPPORT
+ if (skb_queue_len(&local->pending[q]) >= 1000) {
+ spin_unlock_irqrestore(
@@ -231,7 +232,7 @@ Signed-off-by: Sowmiya Sree Elavalagan <ssreeela@codeaurora.org>
/*
* Since queue is stopped, queue up frames for
* later transmission from the tx-pending
@@ -4504,6 +4513,35 @@ static void ieee80211_mlo_multicast_tx(s
@@ -4504,6 +4514,35 @@ static void ieee80211_mlo_multicast_tx(s
kfree_skb(skb);
}
@@ -267,7 +268,7 @@ Signed-off-by: Sowmiya Sree Elavalagan <ssreeela@codeaurora.org>
/**
* ieee80211_subif_start_xmit - netif start_xmit function for 802.3 vifs
* @skb: packet to be sent
@@ -4517,6 +4555,10 @@ netdev_tx_t ieee80211_subif_start_xmit(s
@@ -4517,6 +4556,10 @@ netdev_tx_t ieee80211_subif_start_xmit(s
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
const struct ethhdr *eth = (void *)skb->data;
@@ -278,12 +279,12 @@ Signed-off-by: Sowmiya Sree Elavalagan <ssreeela@codeaurora.org>
if (likely(!is_multicast_ether_addr(eth->h_dest)))
goto normal;
@@ -4703,6 +4745,9 @@ netdev_tx_t ieee80211_subif_start_xmit_8
@@ -4703,6 +4746,9 @@ netdev_tx_t ieee80211_subif_start_xmit_8
struct ieee80211_key *key;
struct sta_info *sta;
+#ifdef CPTCFG_MAC80211_NSS_SUPPORT
+ ieee80211_xmit_nss_fixup(skb, dev);
+ ieee80211_xmit_nss_fixup(skb, dev);
+#endif
if (unlikely(!ieee80211_sdata_running(sdata) || skb->len < ETH_HLEN)) {
kfree_skb(skb);

View File

@@ -137,7 +137,7 @@ Signed-off-by: Sathishkumar Muruganandam <murugana@codeaurora.org>
{
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -4307,8 +4307,11 @@ void __ieee80211_subif_start_xmit(struct
@@ -4308,8 +4308,11 @@ void __ieee80211_subif_start_xmit(struct
sta = NULL;
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) {
@@ -151,7 +151,7 @@ Signed-off-by: Sathishkumar Muruganandam <murugana@codeaurora.org>
if (ap_sdata->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED &&
!is_multicast_ether_addr(skb->data)) {
if (sta)
@@ -4698,7 +4701,8 @@ static void ieee80211_8023_xmit(struct i
@@ -4699,7 +4702,8 @@ static void ieee80211_8023_xmit(struct i
info->hw_queue = sdata->vif.hw_queue[queue];

View File

@@ -102,7 +102,7 @@ Signed-off-by: Sathishkumar Muruganandam <murugana@codeaurora.org>
key->conf.cipher = cipher;
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -4657,16 +4657,25 @@ static void ieee80211_8023_xmit(struct i
@@ -4658,16 +4658,25 @@ static void ieee80211_8023_xmit(struct i
struct ieee80211_key *key, struct sk_buff *skb)
{
struct ieee80211_tx_info *info;

View File

@@ -30,7 +30,7 @@ Signed-off-by: Gautham Kumar Senthilkumaran <quic_gauthamk@quicinc.com>
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
@@ -4687,19 +4687,21 @@ static void ieee80211_8023_xmit(struct i
ieee80211_aggr_check(sdata, sta, skb);
@@ -64,7 +64,7 @@ Signed-off-by: Gautham Kumar Senthilkumaran <quic_gauthamk@quicinc.com>
}
skb = ieee80211_tx_skb_fixup(skb, ieee80211_sdata_netdev_features(sdata));
@@ -4755,7 +4757,7 @@ netdev_tx_t ieee80211_subif_start_xmit_8
@@ -4756,7 +4758,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;
@@ -73,7 +73,7 @@ Signed-off-by: Gautham Kumar Senthilkumaran <quic_gauthamk@quicinc.com>
struct sta_info *sta;
#ifdef CPTCFG_MAC80211_NSS_SUPPORT
@@ -4773,9 +4775,13 @@ netdev_tx_t ieee80211_subif_start_xmit_8
@@ -4774,9 +4776,13 @@ netdev_tx_t ieee80211_subif_start_xmit_8
goto out;
}
@@ -90,7 +90,7 @@ Signed-off-by: Gautham Kumar Senthilkumaran <quic_gauthamk@quicinc.com>
goto skip_offload;
key = rcu_dereference(sta->ptk[sta->ptk_idx]);
@@ -4786,6 +4792,7 @@ netdev_tx_t ieee80211_subif_start_xmit_8
@@ -4787,6 +4793,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);
@@ -98,7 +98,7 @@ Signed-off-by: Gautham Kumar Senthilkumaran <quic_gauthamk@quicinc.com>
ieee80211_8023_xmit(sdata, dev, sta, key, skb);
goto out;
@@ -6292,13 +6299,7 @@ start_xmit:
@@ -6293,13 +6300,7 @@ start_xmit:
mutex_lock(&local->mtx);
local_bh_disable();

View File

@@ -1173,7 +1173,7 @@ Signed-off-by: Gautham Kumar Senthilkumaran <quic_gauthamk@quicinc.com>
void mesh_pathtbl_unregister(struct ieee80211_sub_if_data *sdata)
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2619,7 +2619,7 @@ static struct sk_buff *ieee80211_build_h
@@ -2620,7 +2620,7 @@ static struct sk_buff *ieee80211_build_h
bool multicast;
u16 info_id = 0;
struct ieee80211_chanctx_conf *chanctx_conf = NULL;
@@ -1182,7 +1182,7 @@ Signed-off-by: Gautham Kumar Senthilkumaran <quic_gauthamk@quicinc.com>
int ret;
u8 link_id = u32_get_bits(ctrl_flags, IEEE80211_TX_CTRL_MLO_LINK);
@@ -2631,6 +2631,9 @@ static struct sk_buff *ieee80211_build_h
@@ -2632,6 +2632,9 @@ static struct sk_buff *ieee80211_build_h
info_flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;
#endif
@@ -1192,7 +1192,7 @@ Signed-off-by: Gautham Kumar Senthilkumaran <quic_gauthamk@quicinc.com>
/* convert Ethernet header to proper 802.11 header (based on
* operation mode) */
ethertype = (skb->data[12] << 8) | skb->data[13];
@@ -2701,6 +2704,13 @@ static struct sk_buff *ieee80211_build_h
@@ -2702,6 +2705,13 @@ static struct sk_buff *ieee80211_build_h
break;
#ifdef CPTCFG_MAC80211_MESH
case NL80211_IFTYPE_MESH_POINT:
@@ -1206,7 +1206,7 @@ Signed-off-by: Gautham Kumar Senthilkumaran <quic_gauthamk@quicinc.com>
if (!is_multicast_ether_addr(skb->data)) {
struct sta_info *next_hop;
bool mpp_lookup = true;
@@ -2964,10 +2974,10 @@ static struct sk_buff *ieee80211_build_h
@@ -2965,10 +2975,10 @@ static struct sk_buff *ieee80211_build_h
skb_reset_mac_header(skb);
@@ -1221,7 +1221,7 @@ Signed-off-by: Gautham Kumar Senthilkumaran <quic_gauthamk@quicinc.com>
info->ack_frame_id = info_id;
info->band = band;
@@ -4284,6 +4294,7 @@ void __ieee80211_subif_start_xmit(struct
@@ -4285,6 +4295,7 @@ void __ieee80211_subif_start_xmit(struct
struct sk_buff *next;
int len = skb->len;
struct ieee80211_key *key = NULL;
@@ -1229,7 +1229,7 @@ Signed-off-by: Gautham Kumar Senthilkumaran <quic_gauthamk@quicinc.com>
struct ieee80211_sub_if_data *ap_sdata;
if (unlikely(!ieee80211_sdata_running(sdata) || skb->len < ETH_HLEN)) {
@@ -4358,9 +4369,15 @@ void __ieee80211_subif_start_xmit(struct
@@ -4359,9 +4370,15 @@ void __ieee80211_subif_start_xmit(struct
goto out;
}

View File

@@ -14,7 +14,7 @@ Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -4769,6 +4769,67 @@ out_free:
@@ -4770,6 +4770,67 @@ out_free:
kfree_skb(skb);
}
@@ -82,7 +82,7 @@ Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
netdev_tx_t ieee80211_subif_start_xmit_8023(struct sk_buff *skb,
struct net_device *dev)
{
@@ -4808,6 +4869,11 @@ netdev_tx_t ieee80211_subif_start_xmit_8
@@ -4809,6 +4870,11 @@ netdev_tx_t ieee80211_subif_start_xmit_8
if (key && (!(key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)))
goto skip_offload;

View File

@@ -33,7 +33,7 @@ Signed-off-by: Tamizh Chelvam <quic_tamizhr@quicinc.com>
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -4703,7 +4703,7 @@ static void ieee80211_8023_xmit(struct i
@@ -4704,7 +4704,7 @@ static void ieee80211_8023_xmit(struct i
ieee80211_aggr_check(sdata, sta, skb);
@@ -42,7 +42,7 @@ Signed-off-by: Tamizh Chelvam <quic_tamizhr@quicinc.com>
tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]);
if (tid_tx) {
@@ -4754,7 +4754,7 @@ static void ieee80211_8023_xmit(struct i
@@ -4755,7 +4755,7 @@ static void ieee80211_8023_xmit(struct i
&info->flags, NULL);
dev_sw_netstats_tx_add(dev, skbs, len);

View File

@@ -44,7 +44,7 @@ Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
/* misc utils */
static __le16 ieee80211_duration(struct ieee80211_tx_data *tx,
@@ -4327,7 +4328,7 @@ void __ieee80211_subif_start_xmit(struct
@@ -4328,7 +4329,7 @@ void __ieee80211_subif_start_xmit(struct
!is_multicast_ether_addr(skb->data)) {
if (sta)
key = rcu_dereference(sta->ptk[sta->ptk_idx]);
@@ -53,7 +53,7 @@ Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
rcu_read_unlock();
return;
}
@@ -4373,7 +4374,7 @@ void __ieee80211_subif_start_xmit(struct
@@ -4374,7 +4375,7 @@ void __ieee80211_subif_start_xmit(struct
if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) {
if (sta)
key = rcu_dereference(sta->ptk[sta->ptk_idx]);
@@ -62,7 +62,7 @@ Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
} else {
dev_sw_netstats_tx_add(dev, 1, skb->len);
ieee80211_xmit(sdata, sta, skb);
@@ -4671,7 +4672,8 @@ static bool ieee80211_tx_8023(struct iee
@@ -4672,7 +4673,8 @@ static bool ieee80211_tx_8023(struct iee
static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
struct net_device *dev, struct sta_info *sta,
@@ -72,7 +72,7 @@ Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
{
struct ieee80211_tx_info *info;
struct ethhdr *ehdr = (struct ethhdr *)skb->data;
@@ -4727,6 +4729,7 @@ static void ieee80211_8023_xmit(struct i
@@ -4728,6 +4730,7 @@ static void ieee80211_8023_xmit(struct i
info = IEEE80211_SKB_CB(skb);
memset(info, 0, sizeof(*info));
@@ -80,7 +80,7 @@ Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
info->hw_queue = sdata->vif.hw_queue[queue];
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN &&
@@ -4747,11 +4750,12 @@ static void ieee80211_8023_xmit(struct i
@@ -4748,11 +4751,12 @@ static void ieee80211_8023_xmit(struct i
memcpy(IEEE80211_SKB_CB(seg), info, sizeof(*info));
}
@@ -96,7 +96,7 @@ Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
dev_sw_netstats_tx_add(dev, skbs, len);
if (!ieee80211_hw_check(&local->hw, SUPPORTS_NSS_OFFLOAD) && sta) {
@@ -4771,7 +4775,8 @@ out_free:
@@ -4772,7 +4776,8 @@ out_free:
void ieee80211_8023_xmit_ap(struct ieee80211_sub_if_data *sdata,
struct net_device *dev, struct sta_info *sta,
@@ -106,7 +106,7 @@ Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
{
struct ieee80211_tx_info *info;
struct ieee80211_local *local = sdata->local;
@@ -4780,6 +4785,9 @@ void ieee80211_8023_xmit_ap(struct ieee8
@@ -4781,6 +4786,9 @@ void ieee80211_8023_xmit_ap(struct ieee8
unsigned long flags;
int q;
u16 q_map;
@@ -116,7 +116,7 @@ Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
/*
* If the skb is shared we need to obtain our own copy.
@@ -4791,11 +4799,13 @@ void ieee80211_8023_xmit_ap(struct ieee8
@@ -4792,11 +4800,13 @@ void ieee80211_8023_xmit_ap(struct ieee8
info = IEEE80211_SKB_CB(skb);
memset(info, 0, sizeof(*info));
@@ -133,7 +133,7 @@ Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
info->flags |= IEEE80211_TX_CTL_HW_80211_ENCAP;
info->control.vif = &sdata->vif;
@@ -4829,14 +4839,23 @@ void ieee80211_8023_xmit_ap(struct ieee8
@@ -4830,14 +4840,23 @@ void ieee80211_8023_xmit_ap(struct ieee8
drv_tx(local, &control, skb);
}
@@ -157,8 +157,8 @@ Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
+ bool is_eapol;
#ifdef CPTCFG_MAC80211_NSS_SUPPORT
ieee80211_xmit_nss_fixup(skb, dev);
@@ -4852,14 +4871,15 @@ netdev_tx_t ieee80211_subif_start_xmit_8
ieee80211_xmit_nss_fixup(skb, dev);
@@ -4853,14 +4872,15 @@ netdev_tx_t ieee80211_subif_start_xmit_8
kfree_skb(skb);
goto out;
}
@@ -176,7 +176,7 @@ Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
goto skip_offload;
key = rcu_dereference(sta->ptk[sta->ptk_idx]);
@@ -4870,13 +4890,13 @@ netdev_tx_t ieee80211_subif_start_xmit_8
@@ -4871,13 +4891,13 @@ netdev_tx_t ieee80211_subif_start_xmit_8
goto skip_offload;
if (sdata->vif.type == NL80211_IFTYPE_AP) {
@@ -192,7 +192,7 @@ Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
goto out;
skip_offload:
@@ -6382,7 +6402,10 @@ start_xmit:
@@ -6383,7 +6403,10 @@ start_xmit:
mutex_lock(&local->mtx);
local_bh_disable();

View File

@@ -31,7 +31,7 @@ Signed-off-by: Tamizh Chelvam Raja <quic_tamizhr@quicinc.com>
static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
struct net_device *dev, struct sta_info *sta,
struct ieee80211_key *key, struct sk_buff *skb,
@@ -3641,7 +3643,7 @@ ieee80211_sdata_netdev_features(struct i
@@ -3642,7 +3644,7 @@ ieee80211_sdata_netdev_features(struct i
}
static struct sk_buff *
@@ -40,7 +40,7 @@ Signed-off-by: Tamizh Chelvam Raja <quic_tamizhr@quicinc.com>
{
if (skb_is_gso(skb)) {
struct sk_buff *segs;
@@ -3659,7 +3661,7 @@ ieee80211_tx_skb_fixup(struct sk_buff *s
@@ -3660,7 +3662,7 @@ ieee80211_tx_skb_fixup(struct sk_buff *s
if (skb_needs_linearize(skb, features) && __skb_linearize(skb))
goto free;
@@ -49,7 +49,7 @@ Signed-off-by: Tamizh Chelvam Raja <quic_tamizhr@quicinc.com>
int ofs = skb_checksum_start_offset(skb);
if (skb->encapsulation)
@@ -3805,7 +3807,7 @@ static bool ieee80211_xmit_fast(struct i
@@ -3806,7 +3808,7 @@ static bool ieee80211_xmit_fast(struct i
memcpy(&eth, skb->data, ETH_HLEN - 2);
/* after this point (skb is modified) we cannot return false */
@@ -58,7 +58,7 @@ Signed-off-by: Tamizh Chelvam Raja <quic_tamizhr@quicinc.com>
if (!skb)
return true;
@@ -4351,7 +4353,7 @@ void __ieee80211_subif_start_xmit(struct
@@ -4352,7 +4354,7 @@ void __ieee80211_subif_start_xmit(struct
* things so we cannot really handle checksum or GSO offload.
* fix it up in software before we handle anything else.
*/
@@ -67,7 +67,7 @@ Signed-off-by: Tamizh Chelvam Raja <quic_tamizhr@quicinc.com>
if (!skb) {
len = 0;
goto out;
@@ -4722,7 +4724,7 @@ static void ieee80211_8023_xmit(struct i
@@ -4723,7 +4725,7 @@ static void ieee80211_8023_xmit(struct i
}
}
@@ -78,7 +78,7 @@ Signed-off-by: Tamizh Chelvam Raja <quic_tamizhr@quicinc.com>
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -2267,6 +2267,10 @@ int ieee80211_if_add(struct ieee80211_lo
@@ -2269,6 +2269,10 @@ int ieee80211_if_add(struct ieee80211_lo
ndev->features |= local->hw.netdev_features;
ndev->priv_flags |= IFF_LIVE_ADDR_CHANGE;

View File

@@ -83,7 +83,7 @@ Signed-off-by: Yuvasree Sivasankaran <quic_ysivasan@quicinc.com>
return false;
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
@@ -4336,7 +4343,8 @@ void __ieee80211_subif_start_xmit(struct
@@ -4337,7 +4344,8 @@ void __ieee80211_subif_start_xmit(struct
}
}
@@ -93,7 +93,7 @@ Signed-off-by: Yuvasree Sivasankaran <quic_ysivasan@quicinc.com>
ieee80211_aggr_check(sdata, sta, skb);
if (sta) {
@@ -4688,8 +4696,10 @@ static void ieee80211_8023_xmit(struct i
@@ -4689,8 +4697,10 @@ static void ieee80211_8023_xmit(struct i
bool multicast;
u8 tid;
@@ -106,7 +106,7 @@ Signed-off-by: Yuvasree Sivasankaran <quic_ysivasan@quicinc.com>
multicast = is_multicast_ether_addr(ra);
@@ -6386,9 +6396,12 @@ int ieee80211_tx_control_port(struct wip
@@ -6387,9 +6397,12 @@ int ieee80211_tx_control_port(struct wip
}
if (!IS_ERR(sta)) {