Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp121472iob; Wed, 27 Apr 2022 21:13:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnbF6Mc9kSJ9quq0Wlty+GwTYj05vUC6WUsNoeIpIQtnmclT2N0cAWVfUWWxmeHJpyzDeB X-Received: by 2002:a17:90b:17ca:b0:1d9:a666:b02c with SMTP id me10-20020a17090b17ca00b001d9a666b02cmr14714977pjb.219.1651119218129; Wed, 27 Apr 2022 21:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651119218; cv=none; d=google.com; s=arc-20160816; b=TJMVMSfE0aArSU7berxIWpOdLo7Zep/LPzPbEbi/mW8xzZUgI+duLWCgD3YCEVOgwG pTieXZjKLpcdL/XghEDPOoIY66B44aR3o/CcPLfGIh/vETyfEpMf3cgN+2objiF6HuwJ wGSNphNB5Rb617TZLI0++wspyZWrrfCPHpiTAN5wGsDYNfFq1z7LorSqgAuuq3zWZRaq BObyiLMhblLcsn9jbr3beq+uI+M58Tb4koRXS91/Eh7OtLu/LN4gG5L0GFdQKSXrA2wJ PZr4mZ0UHwPclDTYk647JqZ3XpFBmtnhbmsXsuuTT5HzTVd68S245NsAEISqiiP4ATJk 3O0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=R0XRcNoLTJ9hAnAXRMm/Q9jClpBR+gxUNuH+KRjiYKQ=; b=oSTMepzRJj/U/VVOmLFrQLOcoP/XVO8ijspZw2H65PLS2ns4blZuQidDeo8//ifAyb GjNXOrNl1F0aFZIBGjUJ4qsGfqVAXF9fsGTtVOTU3PLMsn4G3HO7wX4OYEQFsXcs2Zw8 BNnTELEjuAZYbLTJSU/BCPD9M9cgaBevLGAusqrKf6kvLW0eWxkPi2NIxJhszP7arPGq GK++1bZH+4lnyh7kD5twDeEMd2bCAJ6ZUIHr/FWmqPh+HgcO4gE9rm0DA0iYVw7dLsfP acw98ZUzb5m8s6dh72b+rmG3ZEsLjTAbLwm1Q0w6L1PztwdgdVEW2OYIPm0qNDra4VBl LD8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=cfPlMS0h; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id my12-20020a17090b4c8c00b001c7e8ae7620si3792192pjb.157.2022.04.27.21.13.19; Wed, 27 Apr 2022 21:13:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=cfPlMS0h; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238247AbiD1C17 (ORCPT + 68 others); Wed, 27 Apr 2022 22:27:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232045AbiD1C16 (ORCPT ); Wed, 27 Apr 2022 22:27:58 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A97F78FE0 for ; Wed, 27 Apr 2022 19:24:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1651112686; x=1682648686; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=R0XRcNoLTJ9hAnAXRMm/Q9jClpBR+gxUNuH+KRjiYKQ=; b=cfPlMS0hqIJvvrTaRPXUULLQnMOfskJSiNvFPUnbfkLpdMZXmGzJGJyF kodgWZ9Mbb9t7hlz8wIawPvHhrxnakY4cW6rvPEFKItMEGKsiTYEiKo0S SgRpEyTZu+i3gkgVasA6eMKDo9xOowJiYN+WpBXD/yVOHDcdel+cQfXNG I=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-01.qualcomm.com with ESMTP; 27 Apr 2022 19:24:46 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg04-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2022 19:24:45 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 27 Apr 2022 19:24:45 -0700 Received: from wgong-HP3-Z230-SFF-Workstation.qca.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 27 Apr 2022 19:24:44 -0700 From: Wen Gong To: CC: , Subject: [PATCH] ath11k: fix warning of not found station for bssid in message Date: Wed, 27 Apr 2022 22:24:26 -0400 Message-ID: <20220428022426.2927-1-quic_wgong@quicinc.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 --- 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 3c0ac1e29479..3b7a6d2f8f2c 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -5794,9 +5794,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; } @@ -5894,8 +5894,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); } } base-commit: 3637b73b8e805d011202e2bf10947f2d206695d4 -- 2.31.1