mirror of
https://github.com/Ansuel/openwrt.git
synced 2025-12-16 15:01:32 +00:00
ath10k-ct: add pending patch to support kernel 6.18
Add pending patch to support kernel 6.18 with new args on some OPs. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
parent
45af02c14c
commit
3ceee15970
@ -0,0 +1,145 @@
|
||||
From b74947b4f6ff7c122a1bb6eb38bb7ecfbb1d3820 Mon Sep 17 00:00:00 2001
|
||||
From: Roopni Devanathan <quic_rdevanat@quicinc.com>
|
||||
Date: Sun, 15 Jun 2025 13:53:09 +0530
|
||||
Subject: [PATCH] wifi: cfg80211/mac80211: Add support to get radio index
|
||||
|
||||
Currently, per-radio attributes are set on per-phy basis, i.e., all the
|
||||
radios present in a wiphy will take attributes values sent from user. But
|
||||
each radio in a wiphy can get different values from userspace based on
|
||||
its requirement.
|
||||
|
||||
To extend support to set per-radio attributes, add support to get radio
|
||||
index from userspace. Add an NL attribute - NL80211_ATTR_WIPHY_RADIO_INDEX,
|
||||
to get user specified radio index for which attributes should be changed.
|
||||
Pass this to individual drivers, so that the drivers can use this radio
|
||||
index to change per-radio attributes when necessary. Currently, per-radio
|
||||
attributes identified are:
|
||||
NL80211_ATTR_WIPHY_TX_POWER_LEVEL
|
||||
NL80211_ATTR_WIPHY_ANTENNA_TX
|
||||
NL80211_ATTR_WIPHY_ANTENNA_RX
|
||||
NL80211_ATTR_WIPHY_RETRY_SHORT
|
||||
NL80211_ATTR_WIPHY_RETRY_LONG
|
||||
NL80211_ATTR_WIPHY_FRAG_THRESHOLD
|
||||
NL80211_ATTR_WIPHY_RTS_THRESHOLD
|
||||
NL80211_ATTR_WIPHY_COVERAGE_CLASS
|
||||
NL80211_ATTR_TXQ_LIMIT
|
||||
NL80211_ATTR_TXQ_MEMORY_LIMIT
|
||||
NL80211_ATTR_TXQ_QUANTUM
|
||||
|
||||
By default, the radio index is set to -1. This means the attribute should
|
||||
be treated as a global configuration. If the user has not specified any
|
||||
index, then the radio index passed to individual drivers would be -1. This
|
||||
would indicate that the attribute applies to all radios in that wiphy.
|
||||
|
||||
Signed-off-by: Roopni Devanathan <quic_rdevanat@quicinc.com>
|
||||
Link: https://patch.msgid.link/20250615082312.619639-2-quic_rdevanat@quicinc.com
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
ath10k-6.14/core.c | 2 +-
|
||||
ath10k-6.14/hw.c | 1 +
|
||||
ath10k-6.14/hw.h | 2 +-
|
||||
ath10k-6.14/mac.c | 19 +++--
|
||||
93 files changed, 520 insertions(+), 291 deletions(-)
|
||||
|
||||
--- a/ath10k-6.14/core.c
|
||||
+++ b/ath10k-6.14/core.c
|
||||
@@ -3120,7 +3120,7 @@ static void ath10k_core_set_coverage_cla
|
||||
set_coverage_class_work);
|
||||
|
||||
if (ar->hw_params.hw_ops->set_coverage_class)
|
||||
- ar->hw_params.hw_ops->set_coverage_class(ar, -1);
|
||||
+ ar->hw_params.hw_ops->set_coverage_class(ar, -1, -1);
|
||||
}
|
||||
|
||||
static int ath10k_core_init_firmware_features(struct ath10k *ar)
|
||||
--- a/ath10k-6.14/hw.c
|
||||
+++ b/ath10k-6.14/hw.c
|
||||
@@ -590,6 +590,7 @@ void ath10k_hw_fill_survey_time(struct a
|
||||
* function monitors and modifies the corresponding MAC registers.
|
||||
*/
|
||||
static void ath10k_hw_qca988x_set_coverage_class(struct ath10k *ar,
|
||||
+ int radio_idx,
|
||||
s16 value)
|
||||
{
|
||||
u32 slottime_reg;
|
||||
--- a/ath10k-6.14/hw.h
|
||||
+++ b/ath10k-6.14/hw.h
|
||||
@@ -646,7 +646,7 @@ struct htt_rx_ring_rx_desc_offsets;
|
||||
|
||||
/* Defines needed for Rx descriptor abstraction */
|
||||
struct ath10k_hw_ops {
|
||||
- void (*set_coverage_class)(struct ath10k *ar, s16 value);
|
||||
+ void (*set_coverage_class)(struct ath10k *ar, int radio_idx, s16 value);
|
||||
int (*enable_pll_clk)(struct ath10k *ar);
|
||||
int (*tx_data_rssi_pad_bytes)(struct htt_resp *htt);
|
||||
int (*is_rssi_enable)(struct htt_resp *resp);
|
||||
--- a/ath10k-6.14/mac.c
|
||||
+++ b/ath10k-6.14/mac.c
|
||||
@@ -5679,7 +5679,8 @@ void ath10k_halt(struct ath10k *ar)
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
}
|
||||
|
||||
-static int ath10k_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
|
||||
+static int ath10k_get_antenna(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ u32 *tx_ant, u32 *rx_ant)
|
||||
{
|
||||
struct ath10k *ar = hw->priv;
|
||||
|
||||
@@ -5929,7 +5930,8 @@ static int __ath10k_set_antenna(struct a
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int ath10k_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
|
||||
+static int ath10k_set_antenna(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ u32 tx_ant, u32 rx_ant)
|
||||
{
|
||||
struct ath10k *ar = hw->priv;
|
||||
int ret;
|
||||
@@ -6299,7 +6301,7 @@ static int ath10k_config_ps(struct ath10
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static int ath10k_config(struct ieee80211_hw *hw, u32 changed)
|
||||
+static int ath10k_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
|
||||
{
|
||||
struct ath10k *ar = hw->priv;
|
||||
struct ieee80211_conf *conf = &hw->conf;
|
||||
@@ -7234,7 +7236,8 @@ static void ath10k_bss_info_changed(stru
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
}
|
||||
|
||||
-static void ath10k_mac_op_set_coverage_class(struct ieee80211_hw *hw, s16 value)
|
||||
+static void ath10k_mac_op_set_coverage_class(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ s16 value)
|
||||
{
|
||||
struct ath10k *ar = hw->priv;
|
||||
|
||||
@@ -7251,7 +7254,7 @@ static void ath10k_mac_op_set_coverage_c
|
||||
ar->eeprom_overrides.coverage_already_set = false; /* value is being changed */
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
|
||||
- ar->hw_params.hw_ops->set_coverage_class(ar, value);
|
||||
+ ar->hw_params.hw_ops->set_coverage_class(ar, -1, value);
|
||||
}
|
||||
|
||||
struct ath10k_mac_tdls_iter_data {
|
||||
@@ -9000,7 +9003,8 @@ static int ath10k_cancel_remain_on_chann
|
||||
* in ath10k, but device-specific in mac80211.
|
||||
*/
|
||||
|
||||
-static int ath10k_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
|
||||
+static int ath10k_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ u32 value)
|
||||
{
|
||||
struct ath10k *ar = hw->priv;
|
||||
struct ath10k_vif *arvif;
|
||||
@@ -9023,7 +9027,8 @@ static int ath10k_set_rts_threshold(stru
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static int ath10k_mac_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value)
|
||||
+static int ath10k_mac_op_set_frag_threshold(struct ieee80211_hw *hw,
|
||||
+ int radio_idx, u32 value)
|
||||
{
|
||||
/* Even though there's a WMI enum for fragmentation threshold no known
|
||||
* firmware actually implements it. Moreover it is not possible to rely
|
||||
@ -40,7 +40,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
if (ret)
|
||||
--- a/ath10k-6.14/mac.c
|
||||
+++ b/ath10k-6.14/mac.c
|
||||
@@ -11654,7 +11654,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -11659,7 +11659,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
|
||||
@ -12,7 +12,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
|
||||
--- a/ath10k-6.14/mac.c
|
||||
+++ b/ath10k-6.14/mac.c
|
||||
@@ -9081,12 +9081,12 @@ static void ath10k_flush(struct ieee8021
|
||||
@@ -9086,12 +9086,12 @@ static void ath10k_flush(struct ieee8021
|
||||
if (vif) {
|
||||
arvif = (void *)vif->drv_priv;
|
||||
vid = arvif->vdev_id;
|
||||
|
||||
@ -18,7 +18,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
--- a/ath10k-6.14/mac.c
|
||||
+++ b/ath10k-6.14/mac.c
|
||||
@@ -11339,7 +11339,6 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -11344,7 +11344,6 @@ int ath10k_mac_register(struct ath10k *a
|
||||
ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA);
|
||||
ieee80211_hw_set(ar->hw, QUEUE_CONTROL);
|
||||
ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user