ATH11K Archive mirror
 help / color / mirror / Atom feed
From: Carl Huang <quic_cjhuang@quicinc.com>
To: Kalle Valo <kvalo@kernel.org>, Luca Weiss <luca.weiss@fairphone.com>
Cc: <quic_cjhuang@quicinc.com>, <ath11k@lists.infradead.org>,
	<linux-wireless@vger.kernel.org>, <regressions@lists.linux.dev>
Subject: Re: [PATCH 1/2] wifi: ath11k: supports 2 station interfaces
Date: Fri, 10 May 2024 21:04:06 +0800	[thread overview]
Message-ID: <4d60ccf3-455d-4189-9100-d35488b00236@quicinc.com> (raw)
In-Reply-To: <93c15c59-f24c-4472-ae7e-969fd1e3bfec@quicinc.com>



On 2024/5/10 20:03, Carl Huang wrote:
> 
> 
> On 2024/5/10 18:18, Kalle Valo wrote:
>> "Luca Weiss" <luca.weiss@fairphone.com> writes:
>>
>>> On Fri Jul 14, 2023 at 4:38 AM CEST, Carl Huang wrote:
>>>> Add hardware parameter support_dual_stations to indicate
>>>> whether 2 station interfaces are supported. For chips which
>>>> support this feature, limit total number of AP interface and
>>>> mesh point to 1. The max interfaces are 3 for such chips.
>>>>
>>>> The chips affected are:
>>>>   QCA6390 hw2.0
>>>>   WCN6855 hw2.0
>>>>   WCN6855 hw2.1
>>>> Other chips are not affected.
>>>>
>>>> For affected chips, remove radar_detect_widths because now
>>>> num_different_channels is set to 2. radar_detect_widths can
>>>> be set only when num_different_channels is 1. See mac80211
>>>> function wiphy_verify_combinations for details.
>>>>
>>>> Tested-on: WCN6855 hw2.0 PCI 
>>>> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
>>>
>>> Hi Carl,
>>>
>>> Unfortunately this commit breaks wifi on a QCM6490 smartphone
>>> (qcm6490-fairphone-fp5) and makes the board crash.
>>>
>>> Reverting this commit (plus for conflict resolution 5dc9d1a55e95 ("wifi:
>>> ath11k: add support for QCA2066") and 24395ec11707 ("wifi: ath11k:
>>> provide address list if chip supports 2 stations")) makes wifi work
>>> again.
>>
>> Thanks for the report. So the broken commit is:
>>
>> f019f4dff2e4 wifi: ath11k: support 2 station interfaces
>>
>> This went into v6.9-rc1 so I'm guessing that WCN6750 support will be
>> fully broken in v6.9? Not good. And most likely Linus will release v6.9
>> on Sunday so it's too late to get a fix included in the final release.
>>
>> Carl, can you fix this ASAP? Or should we just revert the broken
>> commits?
>>
>> Adding this to our regression tracking:
>>
>> #regzbot introduced: f019f4dff2e4 ^
>> #regzbot title: ath11k: WCN6750 firmware crashes during initialisation
>>
> Kalle, looks we're not able to fix it before Sunday as I don't have 
> WCN6750 setup to verify the fix. The fix could be to define a dedicated 
> function ath11k_init_wmi_config_wcn6750() for WCN6750. I'll send the 
> patch out so others like Luca can have a try.
> 
Sorry, I have problem to run "git send-email" as it prompts "5.7.60 
SMTP; Client does not have permissions to send as this sender".

The patch looks like:

 From 19bb7f1377a5e3c5d42ab2bedbaf9e976c1068b4 Mon Sep 17 00:00:00 2001
From: Carl Huang <quic_cjhuang@quicinc.com>
Date: Fri, 10 May 2024 19:40:37 +0800
Subject: [PATCH] wifi:ath11k: fix WCN6750 firmware crash

WCN6750 firmware crashed because of vdev_number changed to 3 from 4
in commit f019f4dff2e4("wifi: ath11k: support 2 station interfaces").

Fix it by defining a separate function ath11k_init_wmi_config_wcn6750()
for WCN6750 to initialize its' specific parameters.

Fixes: f019f4dff2e4 ("wifi: ath11k: support 2 station interfaces")
Tested-on: WCN6855 hw2.0 PCI 
WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3

Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
---
  drivers/net/wireless/ath/ath11k/hw.c | 49 +++++++++++++++++++++++++++-
  1 file changed, 48 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/hw.c 
b/drivers/net/wireless/ath/ath11k/hw.c
index caa6dc12a790..df8822ac3be1 100644
--- a/drivers/net/wireless/ath/ath11k/hw.c
+++ b/drivers/net/wireless/ath/ath11k/hw.c
@@ -102,6 +102,53 @@ static void ath11k_init_wmi_config_qca6390(struct 
ath11k_base *ab,
  	config->flag1 |= WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64;
  }

+static void ath11k_init_wmi_config_wcn6750(struct ath11k_base *ab,
+					   struct target_resource_config *config)
+{
+	config->num_vdevs = 4;
+	config->num_peers = 16;
+	config->num_tids = 32;
+
+	config->num_offload_peers = 3;
+	config->num_offload_reorder_buffs = 3;
+	config->num_peer_keys = TARGET_NUM_PEER_KEYS;
+	config->ast_skid_limit = TARGET_AST_SKID_LIMIT;
+	config->tx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1;
+	config->rx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1;
+	config->rx_timeout_pri[0] = TARGET_RX_TIMEOUT_LO_PRI;
+	config->rx_timeout_pri[1] = TARGET_RX_TIMEOUT_LO_PRI;
+	config->rx_timeout_pri[2] = TARGET_RX_TIMEOUT_LO_PRI;
+	config->rx_timeout_pri[3] = TARGET_RX_TIMEOUT_HI_PRI;
+	config->rx_decap_mode = TARGET_DECAP_MODE_NATIVE_WIFI;
+	config->scan_max_pending_req = TARGET_SCAN_MAX_PENDING_REQS;
+	config->bmiss_offload_max_vdev = TARGET_BMISS_OFFLOAD_MAX_VDEV;
+	config->roam_offload_max_vdev = TARGET_ROAM_OFFLOAD_MAX_VDEV;
+	config->roam_offload_max_ap_profiles = 
TARGET_ROAM_OFFLOAD_MAX_AP_PROFILES;
+	config->num_mcast_groups = 0;
+	config->num_mcast_table_elems = 0;
+	config->mcast2ucast_mode = 0;
+	config->tx_dbg_log_size = TARGET_TX_DBG_LOG_SIZE;
+	config->num_wds_entries = 0;
+	config->dma_burst_size = 0;
+	config->rx_skip_defrag_timeout_dup_detection_check = 0;
+	config->vow_config = TARGET_VOW_CONFIG;
+	config->gtk_offload_max_vdev = 2;
+	config->num_msdu_desc = 0x400;
+	config->beacon_tx_offload_max_vdev = 2;
+	config->rx_batchmode = TARGET_RX_BATCHMODE;
+
+	config->peer_map_unmap_v2_support = 0;
+	config->use_pdev_id = 1;
+	config->max_frag_entries = 0xa;
+	config->num_tdls_vdevs = 0x1;
+	config->num_tdls_conn_table_entries = 8;
+	config->beacon_tx_offload_max_vdev = 0x2;
+	config->num_multicast_filter_entries = 0x20;
+	config->num_wow_filters = 0x16;
+	config->num_keep_alive_pattern = 0;
+	config->flag1 |= WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64;
+}
+
  static void ath11k_hw_ipq8074_reo_setup(struct ath11k_base *ab)
  {
  	u32 reo_base = HAL_SEQ_WCSS_UMAC_REO_REG;
@@ -1102,7 +1149,7 @@ const struct ath11k_hw_ops wcn6855_ops = {

  const struct ath11k_hw_ops wcn6750_ops = {
  	.get_hw_mac_from_pdev_id = ath11k_hw_ipq8074_mac_from_pdev_id,
-	.wmi_init_config = ath11k_init_wmi_config_qca6390,
+	.wmi_init_config = ath11k_init_wmi_config_wcn6750,
  	.mac_id_to_pdev_id = ath11k_hw_mac_id_to_pdev_id_qca6390,
  	.mac_id_to_srng_id = ath11k_hw_mac_id_to_srng_id_qca6390,
  	.tx_mesh_enable = ath11k_hw_qcn9074_tx_mesh_enable,
-- 
2.34.1


Hi Luca, could you help apply this patch and retest?

Hi Kalle, could you help send this patch if Luca verifies it works?





  reply	other threads:[~2024-05-10 13:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14  2:37 [PATCH 0/2] wifi: ath11k: support 2 station interfaces Carl Huang
2023-07-14  2:38 ` [PATCH 1/2] wifi: ath11k: supports " Carl Huang
2024-02-13 16:17   ` Kalle Valo
2024-02-15 11:23   ` Kalle Valo
2024-05-10  8:22   ` Luca Weiss
2024-05-10 10:18     ` Kalle Valo
2024-05-10 12:03       ` Carl Huang
2024-05-10 13:04         ` Carl Huang [this message]
2024-05-10 13:26           ` Luca Weiss
2024-05-11  2:50             ` Carl Huang
2024-05-10 13:57         ` Kalle Valo
2024-05-11  3:12           ` Carl Huang
2024-05-16 11:45             ` Linux regression tracking (Thorsten Leemhuis)
2024-05-16 14:11               ` Jeff Johnson
2024-05-17  5:25                 ` Kalle Valo
2024-05-17  6:04                   ` Thorsten Leemhuis
2024-05-17  7:39                     ` Kalle Valo
2024-05-19 17:51                       ` Linux regression tracking (Thorsten Leemhuis)
2024-05-10 11:35     ` Carl Huang
2024-05-10 12:58       ` Luca Weiss
2023-07-14  2:38 ` [PATCH 2/2] wifi: ath11k: reports address list if chip supports 2 stations Carl Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4d60ccf3-455d-4189-9100-d35488b00236@quicinc.com \
    --to=quic_cjhuang@quicinc.com \
    --cc=ath11k@lists.infradead.org \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luca.weiss@fairphone.com \
    --cc=regressions@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).