mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-20 19:03:39 +00:00
151 lines
4.6 KiB
Diff
151 lines
4.6 KiB
Diff
From 9f34492dda8ce6b09eb98ccea3ed49eaa6aedb49 Mon Sep 17 00:00:00 2001
|
|
From: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
|
Date: Thu, 1 June 2023 11:50:32 +0530
|
|
Subject: [PATCH] ath12k: Revert fix target assert during channel switch
|
|
|
|
If peer flags during peer assoc are updated as per the max peer bandwidth,
|
|
then there is no need to send phymode along width channel width whenever
|
|
peer channel width is changed.
|
|
|
|
This reverts all the changes made in order to send peer phymode during
|
|
peer channel width change.
|
|
|
|
Revert: 346a12b097ea ("ath12k: fix target assert during channel switch")
|
|
|
|
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
|
---
|
|
--- a/drivers/net/wireless/ath/ath12k/core.h
|
|
+++ b/drivers/net/wireless/ath/ath12k/core.h
|
|
@@ -637,7 +637,6 @@ struct ath12k_link_sta {
|
|
struct ath12k_wbm_tx_stats *wbm_tx_stats;
|
|
|
|
u16 tcl_metadata;
|
|
- u32 bw_prev;
|
|
u8 link_id; /* IEEE link id */
|
|
u8 link_idx; /* for fw use only */
|
|
u32 last_tx_pkt_bw;
|
|
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
|
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
|
@@ -6157,14 +6157,6 @@ static int ath12k_station_assoc(struct a
|
|
}
|
|
}
|
|
|
|
- spin_lock_bh(&ar->data_lock);
|
|
-
|
|
- /* Set arsta bw and prev bw */
|
|
- arsta->bw = bandwidth;
|
|
- arsta->bw_prev = bandwidth;
|
|
-
|
|
- spin_unlock_bh(&ar->data_lock);
|
|
-
|
|
return 0;
|
|
}
|
|
|
|
@@ -6269,11 +6261,10 @@ static void ath12k_sta_rc_update_wk(stru
|
|
const u16 *vht_mcs_mask;
|
|
const u16 *he_mcs_mask;
|
|
const u16 *eht_mcs_mask;
|
|
- u32 changed, bw, nss, smps, bw_prev;
|
|
+ u32 changed, bw, nss, smps;
|
|
int err, num_vht_rates, num_he_rates, num_eht_rates, num_ht_rates;
|
|
const struct cfg80211_bitrate_mask *mask;
|
|
struct peer_assoc_params peer_arg;
|
|
- enum wmi_phy_mode peer_phymode;
|
|
struct ath12k_sta *ahsta;
|
|
struct ieee80211_link_sta *link_sta = NULL;
|
|
bool ht_supp, vht_supp, has_he, has_eht;
|
|
@@ -6300,7 +6291,6 @@ static void ath12k_sta_rc_update_wk(stru
|
|
arsta->changed = 0;
|
|
|
|
bw = arsta->bw;
|
|
- bw_prev = arsta->bw_prev;
|
|
nss = arsta->nss;
|
|
smps = arsta->smps;
|
|
|
|
@@ -6315,51 +6305,14 @@ static void ath12k_sta_rc_update_wk(stru
|
|
ath12k_mac_max_eht_nss(eht_mcs_mask)));
|
|
|
|
if (changed & IEEE80211_RC_BW_CHANGED) {
|
|
- /* Get the the peer phymode */
|
|
- ath12k_peer_assoc_h_phymode(ar, arvif, arsta, &peer_arg);
|
|
- peer_phymode = peer_arg.peer_phymode;
|
|
-
|
|
- if (bw > bw_prev) {
|
|
- /* BW is upgraded. In this case we send WMI_PEER_PHYMODE
|
|
- * followed by WMI_PEER_CHWIDTH
|
|
- */
|
|
- ath12k_dbg(ar->ab, ATH12K_DBG_PEER, "mac BW upgrade for sta %pM new BW %d, old BW %d\n",
|
|
- arsta->addr, bw, bw_prev);
|
|
- err = ath12k_wmi_set_peer_param(ar, arsta->addr,
|
|
- arvif->vdev_id, WMI_PEER_PHYMODE,
|
|
- peer_phymode);
|
|
- if (err) {
|
|
- ath12k_warn(ar->ab, "failed to update STA %pM peer phymode %d: %d\n",
|
|
- arsta->addr, peer_phymode, err);
|
|
- goto err_rc_bw_changed;
|
|
- }
|
|
- err = ath12k_wmi_set_peer_param(ar, arsta->addr,
|
|
- arvif->vdev_id, WMI_PEER_CHWIDTH,
|
|
- bw);
|
|
- if (err)
|
|
- ath12k_warn(ar->ab, "failed to update STA %pM peer bw %d: %d\n",
|
|
- arsta->addr, bw, err);
|
|
- } else {
|
|
- /* BW is downgraded. In this case we send
|
|
- * WMI_PEER_CHWIDTH followed by WMI_PEER_PHYMODE
|
|
- */
|
|
- ath12k_dbg(ar->ab, ATH12K_DBG_PEER, "mac BW downgrade for sta %pM new BW %d,old BW %d\n",
|
|
- arsta->addr, bw, bw_prev);
|
|
- err = ath12k_wmi_set_peer_param(ar, arsta->addr,
|
|
- arvif->vdev_id, WMI_PEER_CHWIDTH,
|
|
- bw);
|
|
- if (err) {
|
|
- ath12k_warn(ar->ab, "failed to update STA %pM peer bw %d: %d\n",
|
|
- arsta->addr, bw, err);
|
|
- goto err_rc_bw_changed;
|
|
- }
|
|
- err = ath12k_wmi_set_peer_param(ar, arsta->addr,
|
|
- arvif->vdev_id, WMI_PEER_PHYMODE,
|
|
- peer_phymode);
|
|
- if (err)
|
|
- ath12k_warn(ar->ab, "failed to update STA %pM peer phymode %d: %d\n",
|
|
- arsta->addr, peer_phymode, err);
|
|
- }
|
|
+ ath12k_dbg(ar->ab, ATH12K_DBG_PEER, "mac BW change for sta %pM new BW %d\n",
|
|
+ arsta->addr, bw);
|
|
+
|
|
+ err = ath12k_wmi_set_peer_param(ar, arsta->addr, arvif->vdev_id,
|
|
+ WMI_PEER_CHWIDTH, bw);
|
|
+ if (err)
|
|
+ ath12k_warn(ar->ab, "failed to update STA %pM peer bw %d: %d\n",
|
|
+ arsta->addr, bw, err);
|
|
}
|
|
|
|
if (changed & IEEE80211_RC_NSS_CHANGED) {
|
|
@@ -6411,7 +6364,7 @@ static void ath12k_sta_rc_update_wk(stru
|
|
|
|
if (!link_sta) {
|
|
rcu_read_unlock();
|
|
- goto err_rc_bw_changed;
|
|
+ goto err_unlock;
|
|
}
|
|
|
|
ht_supp = link_sta->ht_cap.ht_supported;
|
|
@@ -6463,7 +6416,7 @@ static void ath12k_sta_rc_update_wk(stru
|
|
arsta->addr, arvif->vdev_id);
|
|
}
|
|
}
|
|
-err_rc_bw_changed:
|
|
+err_unlock:
|
|
mutex_unlock(&ar->conf_mutex);
|
|
}
|
|
|
|
@@ -7345,7 +7298,6 @@ static void ath12k_mac_op_sta_rc_update(
|
|
break;
|
|
}
|
|
|
|
- arsta->bw_prev = arsta->bw;
|
|
arsta->bw = bw;
|
|
}
|
|
|