Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp284598lqb; Thu, 23 May 2024 19:40:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWmw+mNglaIVtFXolmtHnqCh9zV7JQwSqMgq5dbWuPRZuxNHF7bBqgd6VktLjnnaOSTA/8eGpiZlwa+H0+b/TVR4j3VAJmCh6gx+V9DZg== X-Google-Smtp-Source: AGHT+IHU1ARAb8OJX6jqDxYpCmzQXDYij9A/W8z6yESIeIRqqKXhgGgDjFf0jU1yW4d644PYEIo8 X-Received: by 2002:a05:690c:996:b0:61a:ae0a:1f4d with SMTP id 00721157ae682-62a08d7ed97mr10183537b3.17.1716518439337; Thu, 23 May 2024 19:40:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716518439; cv=pass; d=google.com; s=arc-20160816; b=kwczGMUp5+4UOGYvZ7v8lu10x6HWhucku8ZUS8QnpMrTn/91y3w2WZRmr1+unJYwdi PZ1oWBrQ5cWP2JfAIl/8fp1jIsOuMIBeMgfMNpLSV+ZG+t4chnVB3YeyZi9wMwOgrd+C 71a9rR0EDQ5sGpgFdjxJmxRnvkqJdac758hFsUWMKPq8dN91xavFryPApySZhoNaUmpz klAty4MSWc/UFqZJ2J+S8bXROleeodOseLdrMJSHBqOzMxfF9FPxv8uLoOenA9K5OCOB femEGAbABGLnKfr/AiD0lYSaGaxyqOLwzzvsVwGYo0spLzvKnZOtQjx6IMNTbVnVBkyI oKNQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=qDlJYwfIg/Kk48xgynR5GC9PNh+x6U4PobtPtpcFaVg=; fh=GvdSpWOTOOEO++mEtOt0MOXW4RZebXmBponUWoai99Q=; b=DT/oj/MsBydi3BAK46js+LgB/wZZ2zJkh+epbT/Yz5x2MPN3ZTbCHoWqMVJfgvdGNU HoK7D+Tj71awoGLP/+Fd3hHdIR0WaDRroDXPU78ya5b4w1IjFp2mCY9gS08pZOqYjXdT yH1fxWauHCZ9L4ntt4Xm+s+vurg4fIIW++/8lPo1v7p2nqPVtenh26U877WVhAuwNdwH dIOUHbY4bximKobQ3ZXAKH9xLpEXPMbjOLZj3eQF05kY6An01gfxpGAgmL25TgGnS7c9 WEDAkoGsCnOIdpMVY5DhPGauCYuF9f57o4HaATrH2gV3JnMwEDtqKqoIIJ7mLl3t3P8x RRsg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Dl3ifOcd; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-8036-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8036-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43fb18ca67fsi8204951cf.675.2024.05.23.19.40.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 19:40:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8036-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Dl3ifOcd; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-8036-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8036-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0319C1C209F3 for ; Fri, 24 May 2024 02:40:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB30321103; Fri, 24 May 2024 02:40:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Dl3ifOcd" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 416EA1E884 for ; Fri, 24 May 2024 02:40:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716518436; cv=none; b=GNE4NlL5EYbs3Iph/LVozmmDqaj0a32MZafJCFl11+9naFbqQmLQ72LT6BKh/kRovIIjQozxoqo4PnqE+VY9qWxX+PYvp2rPaVbT8ERROEvWk6/+ND69XyHSbiMvREYhJYJJPW+x7X0q+KQBsyVitUiI4HXsoOcHYzWkShIj3xU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716518436; c=relaxed/simple; bh=or3I6jD5ZazAgJ98uYf0lO8nfqKiJzSk2fI2q/2IQEo=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=GCJKMm9dAuHlHy5YTuzlptr3fMOBX0NzP9l+zKPN6SoD3CRcf6oIWSI4eZeoC1+PlZQlteSOC8L+KVmjFMOI0IvTc+KAbsm14G08I0pTzZ1Yoi5azRDu8m7t8zkiIzdcHCNQiM51kVEsNF47pWkWsK82kPbmddWWPPSbnTQYFwI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=Dl3ifOcd; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44NNOuec015823; Fri, 24 May 2024 02:40:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=qDlJYwfIg/Kk48xgynR5GC 9PNh+x6U4PobtPtpcFaVg=; b=Dl3ifOcdRfBOyVNoRR6iImc9q8IDEUW8Vo2yll R+Lqc6PkzRE8sgtnWJz8pmk/JepWzaxL7HcBpO3uqQxquxGysy/k9a0xZ2Bsqxs7 XxLpb/+VqI7OuX6mINbpNoTfbtrWzcwYjfV53QfeQcLj5/S+CiOPIpIler3FzZDG JF6MRx8By8KgOiGDqLDBN27esdlYZJbSHfY4TlsuyQruK7aFa3L2+N9PqI1maxrt cI/6skeCspQ4GEivEOTPcnZTbi134FY4+FFaSlroYFma6XlPOjIp6KoyRjVIKAWT 1O0YCbyXO2EE+/QF/3XW6tPTyODGHDRQp9vO0fuHVDMlSABg== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3yaa8hryyf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 May 2024 02:40:32 +0000 (GMT) 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 44O2eW8v022544 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 May 2024 02:40:32 GMT Received: from bqiang-SFF.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.1544.9; Thu, 23 May 2024 19:40:30 -0700 From: Baochen Qiang To: CC: , Subject: [PATCH] wifi: ath12k: fix wrong definition of CE ring's base address Date: Fri, 24 May 2024 10:40:21 +0800 Message-ID: <20240524024021.37711-1-quic_bqiang@quicinc.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: QoxylfbHf1OeWEc70r20_5RRKOjuFlVt X-Proofpoint-ORIG-GUID: QoxylfbHf1OeWEc70r20_5RRKOjuFlVt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-23_15,2024-05-23_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0 impostorscore=0 phishscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2405240018 Base address of CE ring is defined as u32, currently this works because DMA mask configured as 32 bit: #define ATH12K_PCI_DMA_MASK 32 However this mask could be changed once firmware bugs are fixed to fully support 36 bit DMA addressing. So to protect against any future changes to the DMA mask, change the type of the fields that are dependent upon it. This is found during code review. Compile tested only. Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Baochen Qiang --- drivers/net/wireless/ath/ath12k/ce.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/ce.h b/drivers/net/wireless/ath/ath12k/ce.h index 79af3b6159f1..857bc5f9e946 100644 --- a/drivers/net/wireless/ath/ath12k/ce.h +++ b/drivers/net/wireless/ath/ath12k/ce.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause-Clear */ /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2022, 2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #ifndef ATH12K_CE_H @@ -119,7 +119,7 @@ struct ath12k_ce_ring { /* Host address space */ void *base_addr_owner_space_unaligned; /* CE address space */ - u32 base_addr_ce_space_unaligned; + dma_addr_t base_addr_ce_space_unaligned; /* Actual start of descriptors. * Aligned to descriptor-size boundary. @@ -129,7 +129,7 @@ struct ath12k_ce_ring { void *base_addr_owner_space; /* CE address space */ - u32 base_addr_ce_space; + dma_addr_t base_addr_ce_space; /* HAL ring id */ u32 hal_ring_id; base-commit: fae0804439b5833308ab7d8563c643edb0fa174c -- 2.25.1