Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp277741lqb; Thu, 23 May 2024 19:16:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW0zukMi5cx1YckzvzrmRnB/0gd9v3rVoDjVTb6iveP1eT5rsIJMHdZuvqjrSqjmgLVrcz+jecTdzpdS05xY60TGOENAVMFYNqGdBqGpg== X-Google-Smtp-Source: AGHT+IEzXDv23ZOKmVUbDHnIjWOYbqwkXTTHKlaKYWnouZ4pyTbd3H77fu/+MkrfE804uanXHJp8 X-Received: by 2002:a0c:f40f:0:b0:6ab:8c6f:e2f5 with SMTP id 6a1803df08f44-6abbbc862bfmr10796036d6.14.1716516978069; Thu, 23 May 2024 19:16:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716516978; cv=pass; d=google.com; s=arc-20160816; b=d/Hti072m8Dl4FzDgt6/Xd1SnZtydMYadHY0LUWqedJIH72BZMa/uexEEBDXkMeH8D eSm4iJwXSbEkq0pqFT5cN5m9in+BhZlPqTwxy+e/Ksg2Urlr+OGt9kqBtF6Ce58XYPiU rKm/gNlenVCY+qVHRneYlboGuRhDWu1vpaecCwOCn/ZBjxrJBJvpTJLsy1fN9JXLyF5p 9cl3Jy9Aw5jL9Xm+umpCptttiG+PwGnSeJo3eFcqWwXUNiiZq/r0/P+rHBZQxqcru9Z4 qJdiZP1wM8LHJUdi1Gy1P5cZK4A2P8JTvCoasZiCzcdB3PpQd6bSwtnQ5ODKskHr+W3g /b+A== 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=oPIIibZHS2oIF+9AMVwuHXVlAOBmlxNv2LLGs8Waick=; fh=j480mrNlK527R2LSjAa5EczedEomDzgwrIPbXwRGWTc=; b=mZOfTOETNZID3R3ok/nO69ouMLvW2sj1YhfWMi/PAYSkSMsvepDLIUNJYCAJv98oyG TA4Wkf9Fp5OYsAG1wto0iT8CAbIZCDv0xNFq3ssxcC8LI+Btp4zuk8LmuNxmXWH9laYa FHbFyH1h5B4826p0lulDEzKPWRQMV5VN72Xereap9c4e9kCUr32jHqCd0lhyuJ//EkH4 3bsw3OZqhiJKyj5GRw4YUDHX6pbEmyZ3q6ZVS7WXSEX/5J0eZZGuBvyZF6YxYyh7ELn5 w1+x9kir17wz1BleDUSVlgNAZgJC6IgAyKG0ciGWhNR4TrLTK2FD9SupdV9cJjyHyR/2 cUMQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=SwwmuFcz; 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-8034-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8034-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 6a1803df08f44-6ac162b4e14si6373386d6.501.2024.05.23.19.16.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 19:16:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8034-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=SwwmuFcz; 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-8034-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8034-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 B2F371C20CDC for ; Fri, 24 May 2024 02:16:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 45E814C9B; Fri, 24 May 2024 02:16:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="SwwmuFcz" 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 873A63C0D for ; Fri, 24 May 2024 02:16:13 +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=1716516975; cv=none; b=YvqXWD3asENlnxh60/zKI4FCWxrLaiHI3/l7MQ8PXCXm+mbnrq3dDBjZzB0TfCc7eyA0SkVXPVPCqAVo/WY441l1DgJnh8O9hcCPTskssRG6D121TXXbU4u2Q4hv11wmtyfWd1y3U0Lrmw+QqLDDbGDi7phoaCck+c+4nJrCGZg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716516975; c=relaxed/simple; bh=eF8tCQbxegzw2zEUhVC6kcDKviFjxp1U3vZ4Q2nh9Zg=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=tGtBHkxngxUUtzTBe/WLmlCpZp+sMv4YJBuHzFTuLIRPtuARU6juCZpf57T+w2aOOWgWVwF9k8XB6a27q7qKLyVQnVLevhcQWU/9IcGf8n2kdvEBwvu1pSQYimzLk0kq7UZEVFN4mmrNCeutBsrTPEMIikHH1gF4nnd2W8PyDZQ= 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=SwwmuFcz; 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 44NNQrwv017986; Fri, 24 May 2024 02:16:09 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=oPIIibZHS2oIF+9AMVwuHX VlAOBmlxNv2LLGs8Waick=; b=SwwmuFczgSVtGP6Rqh8y9FKg/52cPz4kXhiN/s w6BlBbopSJrrlAMvmeO8s8y8DrdqscYJvNZFOF4gJoKK92C9W3ZxrTlSzdCLda7S MX8Ed7xWdiq8gE+GlpY+L5/Lgb87/baT78dULQgdfUJAqSJrKyipyOXskBUjoJ/0 mGpLmlZwBuLwaaU0SJzH3K14/RU0tIFuVAFEmFLL1/CMA4kz0EhnuPlPL0kg1hUp lEpKD1uVh+KnDukJ9Wr1adYAD0KwPMRzrUv2BbWV/VV35akssQh5NnhQYf80TL36 6O2Mn5JtOuJRR5XaLlGvs+oClPl21S8nwznxrL5it6r8Hs4w== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3yaa8hrxp4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 May 2024 02:16:09 +0000 (GMT) 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 44O2G86j019220 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 May 2024 02:16:08 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:16:06 -0700 From: Baochen Qiang To: CC: , Subject: [PATCH] wifi: ath11k: fix wrong definition of CE ring's base address Date: Fri, 24 May 2024 10:15:58 +0800 Message-ID: <20240524021558.34452-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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: JUbphbRR8zVlny1qD_ECqb0BF3I_WQi- X-Proofpoint-ORIG-GUID: JUbphbRR8zVlny1qD_ECqb0BF3I_WQi- 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=948 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2405240015 Base address of CE ring is defined as u32, currently this works because coherent DMA mask configured as 32 bit: #define ATH11K_PCI_COHERENT_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: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Baochen Qiang --- drivers/net/wireless/ath/ath11k/ce.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/ce.h b/drivers/net/wireless/ath/ath11k/ce.h index 69946fc70077..bcde2fcf02cf 100644 --- a/drivers/net/wireless/ath/ath11k/ce.h +++ b/drivers/net/wireless/ath/ath11k/ce.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause-Clear */ /* * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022, 2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #ifndef ATH11K_CE_H @@ -146,7 +146,7 @@ struct ath11k_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. @@ -156,7 +156,7 @@ struct ath11k_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