Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp4047698pxy; Tue, 4 May 2021 16:42:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxysYO9dYmzBd5Mq9D3BDeKWcXEkQiRIseokfC0JHXDTmokLicFCYyF0N4N/13o+Se1smG X-Received: by 2002:a17:907:3f1c:: with SMTP id hq28mr22433755ejc.349.1620171764240; Tue, 04 May 2021 16:42:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620171764; cv=none; d=google.com; s=arc-20160816; b=KF5rTYn/S7iU8F0Cc3VNytim8AEEUgsgjdnf6tjV79hKFGSY0j7q8WQbSch647mhsB bA8L56oMNeKzh7txPkOfJzdAyMy8w74M9ZvA4VzFbecdnFfTLNNiY7V7+RdfxXS3X6E0 /NaBjl4wTbDSUESUFT1Ah1l93wiDEhw4H4GBrt3LINoxUVVWxR+geFBOzmyXJJk2eO7I 35DgYA5xCjEAYKnanVGpSm0sWfH4lPhQcoIaNQ0Pwdl/DVK1oH7lOsg+qx4WiMv8wGoh 9IphMKUOOwxLwz2I5DNYbQYJNqgO+C+ymI4IThqIQLqS8XnEL1jW1cvBTnCskJTwkdiE JVCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=C0sQCjaoPR40g0+mP3PUInbcfTXbeVX/WRbKeIYAWoU=; b=FHa7GOUNZ2792eryGoeObYv+duXD8riHjGRwGnFbVJCFQTwIlB1TFJDc6W6tNr/PAU 6d61AbTUHg0778pzgN74qGBqW3aid8TvRR8RLq4mR7JTtl+Fz4MrvnL5C9L9C3tunctq dWBSMX5e07Bl2KeFGdO5nTpAi57rZuI5frrQzOkh2oRd5ZaJVT99CwwFINvt8oYlnmT/ HMInq7mmPIdRep/7P/W+rAQwZMkBww5UrR+2b4sqW+BpLOLqjDcvH8di1bBjprv84n/2 L/EIhoe+yl1mnklKLKjyweO7ciHteUM1f40DfWywnxm0bJlSdfso3SCMh8OGjHuXiW4p /8Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=inORiAv6; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k3si15378493eds.434.2021.05.04.16.42.21; Tue, 04 May 2021 16:42:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=inORiAv6; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231663AbhEDXj2 (ORCPT + 99 others); Tue, 4 May 2021 19:39:28 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:55389 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231548AbhEDXjJ (ORCPT ); Tue, 4 May 2021 19:39:09 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1620171494; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=C0sQCjaoPR40g0+mP3PUInbcfTXbeVX/WRbKeIYAWoU=; b=inORiAv6QpTTOqo+eRajKhrMixZl4LYg9thxcMMcdvAGro3YBkHIACLTxIs/2q/qCgZ8mXwY ucZpifyGxM+A2urnKodsbc64wJMbPU2qVo8ULKEttoJjshKVZRj42Cuj4wfxkhY/8+i7+GWr 0yvVIA0nra8uZb9I0guQveyw8lU= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-west-2.postgun.com with SMTP id 6091dae1febcffa80ff73664 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 04 May 2021 23:38:09 GMT Sender: bbhatt=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 02B9BC4338A; Tue, 4 May 2021 23:38:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 Received: from malabar-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: bbhatt) by smtp.codeaurora.org (Postfix) with ESMTPSA id 24157C433F1; Tue, 4 May 2021 23:38:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 24157C433F1 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=bbhatt@codeaurora.org From: Bhaumik Bhatt To: manivannan.sadhasivam@linaro.org Cc: linux-arm-msm@vger.kernel.org, hemantk@codeaurora.org, jhugo@codeaurora.org, linux-kernel@vger.kernel.org, loic.poulain@linaro.org, linux-wireless@vger.kernel.org, kvalo@codeaurora.org, ath11k@lists.infradead.org, Bhaumik Bhatt Subject: [PATCH v2 4/6] ath11k: set register access length for MHI driver Date: Tue, 4 May 2021 16:37:56 -0700 Message-Id: <1620171478-35679-5-git-send-email-bbhatt@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1620171478-35679-1-git-send-email-bbhatt@codeaurora.org> References: <1620171478-35679-1-git-send-email-bbhatt@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org MHI driver requires register space length to add range checks and prevent memory region accesses outside of that for MMIO space. Set it before registering the MHI controller. Signed-off-by: Bhaumik Bhatt --- drivers/net/wireless/ath/ath11k/mhi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath11k/mhi.c b/drivers/net/wireless/ath/ath11k/mhi.c index 09858e5..c0f013c 100644 --- a/drivers/net/wireless/ath/ath11k/mhi.c +++ b/drivers/net/wireless/ath/ath11k/mhi.c @@ -235,6 +235,7 @@ int ath11k_mhi_register(struct ath11k_pci *ab_pci) mhi_ctrl->cntrl_dev = ab->dev; mhi_ctrl->fw_image = ab_pci->amss_path; mhi_ctrl->regs = ab->mem; + mhi_ctrl->reg_len = ab->mem_len; ret = ath11k_mhi_get_msi(ab_pci); if (ret) { -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project