netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Wen Gong <quic_wgong@quicinc.com>,
	Kalle Valo <quic_kvalo@quicinc.com>,
	Sasha Levin <sashal@kernel.org>,
	kvalo@kernel.org, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, ath11k@lists.infradead.org,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.17 061/135] ath11k: fix warning of not found station for bssid in message
Date: Mon, 30 May 2022 09:30:19 -0400	[thread overview]
Message-ID: <20220530133133.1931716-61-sashal@kernel.org> (raw)
In-Reply-To: <20220530133133.1931716-1-sashal@kernel.org>

From: Wen Gong <quic_wgong@quicinc.com>

[ Upstream commit 7330e1ec9748948177830c6e1a13379835d577f9 ]

When test connect/disconnect to an AP frequently with WCN6855, sometimes
it show below log.

[  277.040121] wls1: deauthenticating from 8c:21:0a:b3:5a:64 by local choice (Reason: 3=DEAUTH_LEAVING)
[  277.050906] ath11k_pci 0000:05:00.0: wmi stats vdev id 0 mac 00:03:7f:29:61:11
[  277.050944] ath11k_pci 0000:05:00.0: wmi stats bssid 8c:21:0a:b3:5a:64 vif         pK-error
[  277.050954] ath11k_pci 0000:05:00.0: not found station for bssid 8c:21:0a:b3:5a:64
[  277.050961] ath11k_pci 0000:05:00.0: failed to parse rssi chain -71
[  277.050967] ath11k_pci 0000:05:00.0: failed to pull fw stats: -71
[  277.050976] ath11k_pci 0000:05:00.0: wmi stats vdev id 0 mac 00:03:7f:29:61:11
[  277.050983] ath11k_pci 0000:05:00.0: wmi stats bssid 8c:21:0a:b3:5a:64 vif         pK-error
[  277.050989] ath11k_pci 0000:05:00.0: not found station for bssid 8c:21:0a:b3:5a:64
[  277.050995] ath11k_pci 0000:05:00.0: failed to parse rssi chain -71
[  277.051000] ath11k_pci 0000:05:00.0: failed to pull fw stats: -71
[  278.064050] ath11k_pci 0000:05:00.0: failed to request fw stats: -110

Reason is:
When running disconnect operation, sta_info removed from local->sta_hash
by __sta_info_destroy_part1() from __sta_info_flush(), after this,
ieee80211_find_sta_by_ifaddr() which called by
ath11k_wmi_tlv_fw_stats_data_parse() and ath11k_wmi_tlv_rssi_chain_parse()
cannot find this station, then failed log printed.

steps are like this:
1. when disconnect from AP, __sta_info_destroy() called __sta_info_destroy_part1()
and __sta_info_destroy_part2().

2. in __sta_info_destroy_part1(),  it has "sta_info_hash_del(local, sta)"
and "list_del_rcu(&sta->list)", it will remove the ieee80211_sta from the
list of ieee80211_hw.

3. in __sta_info_destroy_part2(), it called drv_sta_state()->ath11k_mac_op_sta_state(),
then peer->sta is clear at this moment.

4. in __sta_info_destroy_part2(), it then called sta_set_sinfo()->drv_sta_statistics()
->ath11k_mac_op_sta_statistics(), then WMI_REQUEST_STATS_CMDID sent to firmware.

5. WMI_UPDATE_STATS_EVENTID reported from firmware, at this moment, the
ieee80211_sta can not be found again because it has remove from list in
step2 and also peer->sta is clear in step3.

6. in __sta_info_destroy_part2(), it then called cleanup_single_sta()->
sta_info_free()->kfree(sta), at this moment, the ieee80211_sta is freed
in memory, then the failed log will not happen because function
ath11k_mac_op_sta_state() will not be called.

Actually this print log is not a real error, it is only to skip parse the
info, so change to skip print by default debug setting.

Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3

Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220428022426.2927-1-quic_wgong@quicinc.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/ath/ath11k/wmi.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index 22921673e956..4ad3fe7d7d1f 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -5616,9 +5616,9 @@ static int ath11k_wmi_tlv_rssi_chain_parse(struct ath11k_base *ab,
 					   arvif->bssid,
 					   NULL);
 	if (!sta) {
-		ath11k_warn(ab, "not found station for bssid %pM\n",
-			    arvif->bssid);
-		ret = -EPROTO;
+		ath11k_dbg(ab, ATH11K_DBG_WMI,
+			   "not found station of bssid %pM for rssi chain\n",
+			   arvif->bssid);
 		goto exit;
 	}
 
@@ -5716,8 +5716,9 @@ static int ath11k_wmi_tlv_fw_stats_data_parse(struct ath11k_base *ab,
 					   "wmi stats vdev id %d snr %d\n",
 					   src->vdev_id, src->beacon_snr);
 			} else {
-				ath11k_warn(ab, "not found station for bssid %pM\n",
-					    arvif->bssid);
+				ath11k_dbg(ab, ATH11K_DBG_WMI,
+					   "not found station of bssid %pM for vdev stat\n",
+					   arvif->bssid);
 			}
 		}
 
-- 
2.35.1


  parent reply	other threads:[~2022-05-30 13:52 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220530133133.1931716-1-sashal@kernel.org>
2022-05-30 13:29 ` [PATCH AUTOSEL 5.17 003/135] ath11k: fix the warning of dev_wake in mhi_pm_disable_transition() Sasha Levin
2022-05-30 13:29 ` [PATCH AUTOSEL 5.17 005/135] selftests/bpf: Fix vfs_link kprobe definition Sasha Levin
2022-05-30 13:29 ` [PATCH AUTOSEL 5.17 006/135] selftests/bpf: Fix parsing of prog types in UAPI hdr for bpftool sync Sasha Levin
2022-05-30 13:29 ` [PATCH AUTOSEL 5.17 007/135] ath11k: Change max no of active probe SSID and BSSID to fw capability Sasha Levin
2022-05-30 13:29 ` [PATCH AUTOSEL 5.17 008/135] mwifiex: add mutex lock for call in mwifiex_dfs_chan_sw_work_queue Sasha Levin
2022-05-30 13:29 ` [PATCH AUTOSEL 5.17 009/135] b43legacy: Fix assigning negative value to unsigned variable Sasha Levin
2022-05-30 13:29 ` [PATCH AUTOSEL 5.17 010/135] b43: " Sasha Levin
2022-05-30 13:29 ` [PATCH AUTOSEL 5.17 011/135] ipw2x00: Fix potential NULL dereference in libipw_xmit() Sasha Levin
2022-05-30 13:29 ` [PATCH AUTOSEL 5.17 012/135] ipv6: fix locking issues with loops over idev->addr_list Sasha Levin
2022-05-30 13:29 ` [PATCH AUTOSEL 5.17 016/135] libbpf: Fix a bug with checking bpf_probe_read_kernel() support in old kernels Sasha Levin
2022-05-30 13:29 ` [PATCH AUTOSEL 5.17 017/135] mac80211: minstrel_ht: fix where rate stats are stored (fixes debugfs output) Sasha Levin
2022-05-30 13:29 ` [PATCH AUTOSEL 5.17 023/135] sfc: ef10: Fix assigning negative value to unsigned variable Sasha Levin
2022-05-30 13:29 ` [PATCH AUTOSEL 5.17 025/135] rtw88: fix incorrect frequency reported Sasha Levin
2022-05-30 13:29 ` [PATCH AUTOSEL 5.17 026/135] rtw88: 8821c: fix debugfs rssi value Sasha Levin
2022-05-30 13:29 ` [PATCH AUTOSEL 5.17 029/135] tcp: consume incoming skb leading to a reset Sasha Levin
2022-05-30 13:29 ` [PATCH AUTOSEL 5.17 033/135] net: sched: use queue_mapping to pick tx queue Sasha Levin
2022-05-30 13:29 ` [PATCH AUTOSEL 5.17 038/135] ath9k: fix QCA9561 PA bias level Sasha Levin
2022-05-30 13:30 ` [PATCH AUTOSEL 5.17 052/135] ath11k: disable spectral scan during spectral deinit Sasha Levin
2022-05-30 13:30 ` [PATCH AUTOSEL 5.17 056/135] ath10k: skip ath10k_halt during suspend for driver state RESTARTING Sasha Levin
2022-05-30 13:30 ` Sasha Levin [this message]
2022-05-30 13:30 ` [PATCH AUTOSEL 5.17 063/135] ipv6: Don't send rs packets to the interface of ARPHRD_TUNNEL Sasha Levin
2022-05-30 13:30 ` [PATCH AUTOSEL 5.17 064/135] net/mlx5: fs, delete the FTE when there are no rules attached to it Sasha Levin
2022-05-30 13:30 ` [PATCH AUTOSEL 5.17 066/135] mlxsw: spectrum_dcb: Do not warn about priority changes Sasha Levin
2022-05-30 13:30 ` [PATCH AUTOSEL 5.17 067/135] mlxsw: Treat LLDP packets as control Sasha Levin
2022-05-30 13:30 ` [PATCH AUTOSEL 5.17 075/135] net/mlx5: Increase FW pre-init timeout for health recovery Sasha Levin
2022-05-30 13:30 ` [PATCH AUTOSEL 5.17 078/135] net: remove two BUG() from skb_checksum_help() Sasha Levin
2022-05-30 13:30 ` [PATCH AUTOSEL 5.17 090/135] rtlwifi: Use pr_warn instead of WARN_ONCE Sasha Levin
2022-05-30 13:30 ` [PATCH AUTOSEL 5.17 091/135] mt76: mt7921: accept rx frames with non-standard VHT MCS10-11 Sasha Levin
2022-05-30 13:30 ` [PATCH AUTOSEL 5.17 092/135] mt76: fix encap offload ethernet type check Sasha Levin
2022-05-30 13:30 ` [PATCH AUTOSEL 5.17 099/135] usbnet: Run unregister_netdev() before unbind() again Sasha Levin
2022-05-30 13:30 ` [PATCH AUTOSEL 5.17 100/135] Bluetooth: HCI: Add HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN quirk Sasha Levin
2022-05-30 13:31 ` [PATCH AUTOSEL 5.17 112/135] net: phy: micrel: Allow probing without .driver_data Sasha Levin
2022-05-30 13:31 ` [PATCH AUTOSEL 5.17 115/135] rtw89: cfo: check mac_id to avoid out-of-bounds Sasha Levin
2022-05-30 13:31 ` [PATCH AUTOSEL 5.17 122/135] can: mcp251xfd: silence clang's -Wunaligned-access warning Sasha Levin
2022-05-30 13:31 ` [PATCH AUTOSEL 5.17 124/135] net: ipa: ignore endianness if there is no header Sasha Levin
2022-05-30 13:31 ` [PATCH AUTOSEL 5.17 126/135] selftests/bpf: Add missing trampoline program type to trampoline_count test Sasha Levin
2022-05-30 13:31 ` [PATCH AUTOSEL 5.17 129/135] rxrpc: Return an error to sendmsg if call failed Sasha Levin
2022-05-30 13:31 ` [PATCH AUTOSEL 5.17 130/135] rxrpc, afs: Fix selection of abort codes Sasha Levin
2022-05-30 13:31 ` [PATCH AUTOSEL 5.17 131/135] afs: Adjust ACK interpretation to try and cope with NAT Sasha Levin
2022-05-30 13:31 ` [PATCH AUTOSEL 5.17 132/135] eth: tg3: silence the GCC 12 array-bounds warning Sasha Levin
2022-05-30 13:31 ` [PATCH AUTOSEL 5.17 134/135] selftests/bpf: fix btf_dump/btf_dump due to recent clang change Sasha Levin

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=20220530133133.1931716-61-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=ath11k@lists.infradead.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=quic_kvalo@quicinc.com \
    --cc=quic_wgong@quicinc.com \
    --cc=stable@vger.kernel.org \
    /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 NNTP newsgroup(s).