From patchwork Tue Apr 4 07:22:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Youghandhar Chintala X-Patchwork-Id: 78877 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2834611vqo; Tue, 4 Apr 2023 00:25:10 -0700 (PDT) X-Google-Smtp-Source: AKy350YTJBlY+ely5mW9RwU2zLzfMMwLOakCg0BPm+YH/iStkXd5LuEyf9JYiVJD81n0oetklEo5 X-Received: by 2002:a05:6a20:2921:b0:cc:ca9:4fde with SMTP id t33-20020a056a20292100b000cc0ca94fdemr1252262pzf.33.1680593110554; Tue, 04 Apr 2023 00:25:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680593110; cv=none; d=google.com; s=arc-20160816; b=EPVGnhdNpP7InDyltSfsMYvR4ToYY+Uc10TOUb2ub1+xLZVD0cLaKHG4AkPpMOI/Ky a1/M5HxyaU4FUjnN3qad88Q0/zk8xQUOiPkuMutnkrW3cdM7QVW+V4k+qLTzz0zIUXZb I8/LtDB8Nqsc9Mszr8NnSZ1yzc7s3sB76uCu6O5q/ryxhABhg3Y1CN8OcXeuvLhIEYpW B7xSq9iJcQRLgzS4ANhc9YFvmwoRP7YSrX6Kh+w4mLR1nYYoO6gMDHCNbpeoZhp45rDE 537sFDgunKUOlZ3If6i+3slueIM3E03COTLulZIeaG/x5HZF5q/VSIwcz+40XMWpasVD 8toQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yoO9hOORUgp4tejOSXtitoR4zpiwg+9WL5jAsVzw0/k=; b=K8VrM4OArmx8IUOq/Lk7Sayn//8SvFQUE3UYro3LF/SkSNUVQCsCeSmZ++pknV9Rb5 iW1avdJFu8e1nsYUhfgm6dZGIYRmKGRYlt+lXEHiQD4wiVzUTmw3eD+xFXIRmqISSmtN yUX0X6D9EBJkKo4RdhjhDZbUV4FASINnWKlHTiAEAF7ZgJdGUBfur4FOpvJejNpzRVQy iGeWreLx56BDpilR/t3WtHQ7JIFUuMYwCsLrs2/niCkBFsaM2eAUTbWAEWpWzyoQaPvO 5rSftLaxFeB9rDhR/kDW0gh7iRIRIUWb7XXzklQQaf2SE7gG5oq8Bq9FdxwSEkhE+NPS Y/CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=JNIONuEF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i64-20020a638743000000b0051369870273si9998763pge.11.2023.04.04.00.24.58; Tue, 04 Apr 2023 00:25:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=qcppdkim1 header.b=JNIONuEF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S233891AbjDDHXZ (ORCPT + 99 others); Tue, 4 Apr 2023 03:23:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233893AbjDDHXT (ORCPT ); Tue, 4 Apr 2023 03:23:19 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C1FD2726; Tue, 4 Apr 2023 00:23:15 -0700 (PDT) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3345fKv8004992; Tue, 4 Apr 2023 07:23:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=yoO9hOORUgp4tejOSXtitoR4zpiwg+9WL5jAsVzw0/k=; b=JNIONuEFJiL+Yg/q8wZnn54KhxzKqOtlKUxE6HdrRH/u4akwBiNLoQnCPgTIOCzOPNCo 8GaJbPRJpIdss0F/wy/r4fIC6aVsnvWMeYI6MPidJGVSwy8aGiQkzCZZDhYHRlUF6gco 2+Sp03AUJ3hU55igCw+pzGAUUuVDcNHQKPie29yjNzRokzeLSWV5XgJMFSui+vKKk6MY OJN/D5crEKQJTImPgrN3P6lgeE6+NRf/JI/4gnrBCkQ791vnYINTJO8TgwZ07j5yl+Yb PfHSLppp5JYrqJ9xlC1Ar5DZSt7Ycy8ZMAqcU9PHmfNEIjmTaNCxw/QB0VLcotrrF5EJ NQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pquxtjr16-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Apr 2023 07:23:13 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3347NCHr019809 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 4 Apr 2023 07:23:13 GMT Received: from youghand-linux.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.42; Tue, 4 Apr 2023 00:23:10 -0700 From: Youghandhar Chintala To: CC: , , , Youghandhar Chintala Subject: [PATCH 1/3] wifi: ath11k: Use proper API to get peer id for WCN6750 Date: Tue, 4 Apr 2023 12:52:32 +0530 Message-ID: <20230404072234.18503-2-quic_youghand@quicinc.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20230404072234.18503-1-quic_youghand@quicinc.com> References: <20230404072234.18503-1-quic_youghand@quicinc.com> MIME-Version: 1.0 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-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: JD2p7Oc9xWhAIZBfuJQb54shoYu7SoNC X-Proofpoint-ORIG-GUID: JD2p7Oc9xWhAIZBfuJQb54shoYu7SoNC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-04_01,2023-04-03_03,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 spamscore=0 mlxlogscore=942 priorityscore=1501 impostorscore=0 mlxscore=0 adultscore=0 suspectscore=0 bulkscore=0 phishscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304040066 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762229601538899555?= X-GMAIL-MSGID: =?utf-8?q?1762229601538899555?= Currently on WCN6750, we are seeing an issue where signal average field value in station dump is incorrect. This is because of registering an incorrect mpdu_info_get_peerid() API for WCN6750. Due to this, we get an invalid peer id while processing the peer stats, and the signal average field will have invalid values in station dump. Fix this by registering correct mpdu_info_get_peerid() API for WCN6750. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 Signed-off-by: Youghandhar Chintala --- drivers/net/wireless/ath/ath11k/hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/hw.c b/drivers/net/wireless/ath/ath11k/hw.c index 60ac215e0678..9321613721a0 100644 --- a/drivers/net/wireless/ath/ath11k/hw.c +++ b/drivers/net/wireless/ath/ath11k/hw.c @@ -1122,7 +1122,7 @@ const struct ath11k_hw_ops wcn6750_ops = { .rx_desc_get_attention = ath11k_hw_qcn9074_rx_desc_get_attention, .rx_desc_get_msdu_payload = ath11k_hw_qcn9074_rx_desc_get_msdu_payload, .reo_setup = ath11k_hw_wcn6855_reo_setup, - .mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid, + .mpdu_info_get_peerid = ath11k_hw_wcn6855_mpdu_info_get_peerid, .rx_desc_mac_addr2_valid = ath11k_hw_ipq9074_rx_desc_mac_addr2_valid, .rx_desc_mpdu_start_addr2 = ath11k_hw_ipq9074_rx_desc_mpdu_start_addr2, .get_ring_selector = ath11k_hw_wcn6750_get_tcl_ring_selector, From patchwork Tue Apr 4 07:22:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Youghandhar Chintala X-Patchwork-Id: 78879 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2834895vqo; Tue, 4 Apr 2023 00:25:51 -0700 (PDT) X-Google-Smtp-Source: AKy350YZidEsxWNy8amB1UD+I83dhwYzPKPEbKm8HSNfyE2+/+p3E7uAxGLtRYlHF7LxVkt1g7XS X-Received: by 2002:a17:906:2897:b0:932:4990:2563 with SMTP id o23-20020a170906289700b0093249902563mr1247707ejd.24.1680593150770; Tue, 04 Apr 2023 00:25:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680593150; cv=none; d=google.com; s=arc-20160816; b=HEGoBeudodVmpBHTPQkByTbDbNUrJ9v2juF0EW+Gw3Hgs3la0ZBRixKmYXZAeTqxAP hSnWnN6eKt2e3WMZpUe27yjBXWX3n65f1t9Bka6PlgNmXOkYlHQL3E1nM/qNS2xaHMIm bRWeOwVg0seqLGm1AOwecChDwqBG/3dUMlX7GxSi/ChQihjTE33A6XpVbqZ4jtGY0V5n rA14XKJsea6r1Z5cWDFWrz+epxKcdoUd4D5+a+BlqTwCh5DQHvxE5F0teVir51dIrb9u nbqQmsuNAxIoJLwuax5dcjYfDr/udQqMnCjq3S3cFe4ybgUE2e2CHWJ4CMk4XhYF+7x7 RkOw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UUYQzmKRF+c+OHY9b3+NQ/SAcXNPlhTghOL1eurbcJU=; b=RmQLJIbjQyNUXF7+1W1nLdI+ulvKss5ddatvtOyD+wnb08aW5hnsjxoUX/Y8+GbUIa v+DHHyyR6oONog92sQ8Shu8hfcwfLSUiOdCFoy4h5z/FhtbnOAhKlCGqlX5HNFircziT lKLgI76aWvHIUISTwYJ6BzA75OVslm2YYThHDb+MRVu1hGySGRls9k66q8UQvQH93AMU yj91iTNVTi9xgm0pFioyfmpLRzt5S0hWDOBBGfaaxXOmg7VLrTxtvrRwUr/6vV6cqfFs RJXjNI0O2cHo4l3YQGI3YiLFxnpDIWe1QaeYctKh8iINPuHzQDsWG8dv8dqZebbgxejX TAwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ktk3B1tY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wb8-20020a170907d50800b00947c4925900si6919641ejc.348.2023.04.04.00.25.26; Tue, 04 Apr 2023 00:25:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=qcppdkim1 header.b=ktk3B1tY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S233782AbjDDHXa (ORCPT + 99 others); Tue, 4 Apr 2023 03:23:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233900AbjDDHXW (ORCPT ); Tue, 4 Apr 2023 03:23:22 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1FC31FC7; Tue, 4 Apr 2023 00:23:20 -0700 (PDT) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3343LBW9016659; Tue, 4 Apr 2023 07:23:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=UUYQzmKRF+c+OHY9b3+NQ/SAcXNPlhTghOL1eurbcJU=; b=ktk3B1tYWoHM8Pe2tCB/6jPGziQNB6ATAaVcAIuBkGlIGSHhkhkeyS7q61l4TmTecbN8 CL/DsgaU3w9/TXLQrkEfi4yZR9P/aW+6jloN26+0ox5MWqCOZza8QmiiVOZfv5N4j67a g1WnaCJDNOSMZyrFPP2D+ddsht6DWr5LJFDGR+PgO5+f+8OLeeYbP9pNcdb7TLconYdy sFo3kOQ90oUoHbHGHxFxif06hEAHsng2tfoK9vrjxSi1HSUdQxQto6pIZaP7MGLEkF5d ifmF40SJ7y8XCiz8ddUdc+puk71EhbBJeC1KSJDIFoYrfnjU8b8S8icJPT8NVlKcZOc4 VA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pr4jm9c71-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Apr 2023 07:23:19 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3347NIZO014095 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 4 Apr 2023 07:23:18 GMT Received: from youghand-linux.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.42; Tue, 4 Apr 2023 00:23:16 -0700 From: Youghandhar Chintala To: CC: , , , Youghandhar Chintala Subject: [PATCH 2/3] wifi: ath11k: Align RX MPDU info with the hardware for WCN6750 Date: Tue, 4 Apr 2023 12:52:33 +0530 Message-ID: <20230404072234.18503-3-quic_youghand@quicinc.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20230404072234.18503-1-quic_youghand@quicinc.com> References: <20230404072234.18503-1-quic_youghand@quicinc.com> MIME-Version: 1.0 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-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 2NY3ZiZf1AriEX_7n6pXng-5TDgUy9Sg X-Proofpoint-GUID: 2NY3ZiZf1AriEX_7n6pXng-5TDgUy9Sg X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-04_01,2023-04-03_03,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 bulkscore=0 adultscore=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 mlxscore=0 mlxlogscore=788 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304040066 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762229643540432625?= X-GMAIL-MSGID: =?utf-8?q?1762229643540432625?= Currently on WCN6750, we are seeing an issue where signal average field value in station dump is incorrect. This is because RX MPDU info fields in the driver are not properly aligned with the hardware. Due to this, we get an invalid peer id while processing the peer stats, and the signal avg value will not be updated. Fix this by aligning the RX MPDU info in the driver with the hardware. Change is applicable for WCN6855 as well. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 Signed-off-by: Youghandhar Chintala --- drivers/net/wireless/ath/ath11k/hal_rx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/hal_rx.h b/drivers/net/wireless/ath/ath11k/hal_rx.h index f6bae07abfd3..1d5f92611b85 100644 --- a/drivers/net/wireless/ath/ath11k/hal_rx.h +++ b/drivers/net/wireless/ath/ath11k/hal_rx.h @@ -414,9 +414,9 @@ struct hal_rx_mpdu_info { } __packed; struct hal_rx_mpdu_info_wcn6855 { - __le32 rsvd0[8]; + __le32 rsvd0[10]; __le32 info0; - __le32 rsvd1[14]; + __le32 rsvd1[12]; } __packed; #define HAL_RX_PPDU_END_DURATION GENMASK(23, 0) From patchwork Tue Apr 4 07:22:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Youghandhar Chintala X-Patchwork-Id: 78878 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2834821vqo; Tue, 4 Apr 2023 00:25:36 -0700 (PDT) X-Google-Smtp-Source: AKy350abJeMH5uo7imI0UvLNoIFqpfl+QUydg1d5BUNWN5LfgrJKAYNoC5ubxZ2SNfPZ+wlukEyx X-Received: by 2002:a17:902:e543:b0:19a:e762:a1af with SMTP id n3-20020a170902e54300b0019ae762a1afmr21270965plf.33.1680593136400; Tue, 04 Apr 2023 00:25:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680593136; cv=none; d=google.com; s=arc-20160816; b=VNFYfXtSEB4HAPG7Auch64PN1ZfPHCPRXHivwsJAIvESySHVdsNwr9CsuX/jnAi5jZ 7FSpoC/otHJ8IIsstBHY0GiWfaFumLa2+Z7CRf0XCWsnOsb+W6BTS6beMb+NxMe7v81r 4QWJColGvTGpsZjbm/VhoNs1H4OVMc3fheI4BBCyqNkfQT/MzINpRK5swxcXdGLWpVsa Cze3AtaXDUVqcahCuC0imT84SJ8rMgwwUTYWNDT673hIdiD8dfRRnUaVbHVfi6ayxkDO rZRgDWPXfElLFRGvqrC5pgA1Q1nfNbzlN48bTC8J24KlBM1yCO6DKx353cY0xWfTjbFx jfMw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mAzCkR2VqhS11ARx312yaABAYga51ffC2WXsE4hi42Y=; b=LJFFTUh576u6uJiM8Q0NoAupHxlMuYpf/L8S7Vo+o+zXKIodom9U7q+o7boNFmDJ2n lKQ3rPwN7C+LinXK49TfwXLBthILSBILlr4QR8hBJeWTRP1xM0qAydedIiRiSLp39cG3 H2KfDT59RIVRdbaVcppNK5XAK+EFma/3dmYmmm+bzNGEgK/6BGhI+i2pjiKuAVqpVn6W zYTyIiI4GqcsTs3g+slj0//DvG9ckdFjsdjelhvX3S3kICApoSaQm4uAaCrCCNd2Orxj 7igJsr4BV1qzX/QUB+IxTmZKUv3kwr9xgeSsatdYryjUcbMcxtQdjtOiSykT7RQxYYIy 7n8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=DnuKvYeh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p3-20020a634203000000b005137bf7e2d3si9666976pga.582.2023.04.04.00.25.23; Tue, 04 Apr 2023 00:25:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=qcppdkim1 header.b=DnuKvYeh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S233924AbjDDHXj (ORCPT + 99 others); Tue, 4 Apr 2023 03:23:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233873AbjDDHX2 (ORCPT ); Tue, 4 Apr 2023 03:23:28 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 435392D4C; Tue, 4 Apr 2023 00:23:26 -0700 (PDT) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3346B9Gn022550; Tue, 4 Apr 2023 07:23:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=mAzCkR2VqhS11ARx312yaABAYga51ffC2WXsE4hi42Y=; b=DnuKvYehH3W8aHPcnIK3Y/X2AC6UbctK/0krYuaNEqZxYGjIUyQh42oRcOnDAU3K5X5H YuFu9TLxhX2ufBfAAC4kZ1wXg7cXjMftCQOedNxNX6sWA1hVAlckr3qury0eq2cpL8k2 nat/8QjWY+3UzW+DjZvU4nQWqf0yOwRQFLkCYl5k0X95eTxg7A/5ixtcrKfDTtMELuds EnOfVFFjuK5bZ6uyR7wxsg1IN+KgNhMdtE5U2A0CB8OnFF4TpoVbY4mTAoBo2lWi18U9 9MyVw2Uj3zD5PJh+y5Zslle411Kh+okw4TaLD+11AG11URZ64GfCLMHDs9yWVc5oRJay 0Q== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pquxtjr1m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Apr 2023 07:23:24 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3347NNWP014135 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 4 Apr 2023 07:23:24 GMT Received: from youghand-linux.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.42; Tue, 4 Apr 2023 00:23:21 -0700 From: Youghandhar Chintala To: CC: , , , Youghandhar Chintala Subject: [PATCH 3/3] wifi: ath11k: Populate the signal average field properly Date: Tue, 4 Apr 2023 12:52:34 +0530 Message-ID: <20230404072234.18503-4-quic_youghand@quicinc.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20230404072234.18503-1-quic_youghand@quicinc.com> References: <20230404072234.18503-1-quic_youghand@quicinc.com> MIME-Version: 1.0 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-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: fKrIbQp3Y7dHpLOoKB1Z-IBlw3vtQ6JM X-Proofpoint-ORIG-GUID: fKrIbQp3Y7dHpLOoKB1Z-IBlw3vtQ6JM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-04_01,2023-04-03_03,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 spamscore=0 mlxlogscore=860 priorityscore=1501 impostorscore=0 mlxscore=0 adultscore=0 suspectscore=0 bulkscore=0 phishscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304040066 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762229628668114399?= X-GMAIL-MSGID: =?utf-8?q?1762229628668114399?= Currently on WCN6750, we are seeing an issue where signal average field value in station dump is incorrect. Signal average field is populated without checking for dB to dBm conversion. For WCN6750 devices, the signal average value is already in dBm units, so no need to convert it again. If signal average is valid, then fill it based on dB to dBm conversion condition to fix this. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 Signed-off-by: Youghandhar Chintala --- drivers/net/wireless/ath/ath11k/mac.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index cad832e0e6b8..531a881d8623 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -8278,7 +8278,7 @@ static void ath11k_mac_op_sta_statistics(struct ieee80211_hw *hw, { struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv; struct ath11k *ar = arsta->arvif->ar; - s8 signal; + s8 signal, signal_avg; bool db2dbm = test_bit(WMI_TLV_SERVICE_HW_DB2DBM_CONVERSION_SUPPORT, ar->ab->wmi_ab.svc_map); @@ -8330,9 +8330,12 @@ static void ath11k_mac_op_sta_statistics(struct ieee80211_hw *hw, sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL); } - sinfo->signal_avg = ewma_avg_rssi_read(&arsta->avg_rssi) + - ATH11K_DEFAULT_NOISE_FLOOR; - sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL_AVG); + signal_avg = ewma_avg_rssi_read(&arsta->avg_rssi); + if (signal_avg) { + sinfo->signal_avg = db2dbm ? signal_avg : signal_avg + ATH11K_DEFAULT_NOISE_FLOOR; + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL_AVG); + } + } #if IS_ENABLED(CONFIG_IPV6)