From patchwork Thu Sep 9 14:44:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 508359 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp387639jai; Thu, 9 Sep 2021 07:42:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwQslI5klbcq6abVpkrM08uj5UoGHr4H3Gz6WFBFbirv4b/q3rsSlhijcSQJhPDaZzr5BD X-Received: by 2002:a17:90a:af86:: with SMTP id w6mr4040660pjq.8.1631198565962; Thu, 09 Sep 2021 07:42:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631198565; cv=none; d=google.com; s=arc-20160816; b=K1IduJeq/56lBEzjd+EY/jyxsLPqGbfXEvyx9NRZzLHSQi5jTe9XKrNl0XafVUXj4k jeE7AlhOIErJCc9bzEZzy7Pf+ZqT4xnwWzMTE+GfW0U4Rd+rDO8E+oAKgl6+UpvNKfw4 CPzBlUti0+QkvW1UKWaJg2uvEHt3l6WgL/5bqHae52wqdiRgcl9IX/jCjtXNIVCrgdge lTF0KX8vkdj1E6LJC0hu+miRNvXOxqddFAu9hYAAsSB9KYyArQG+vf0ZFn4+fjlnLkQ3 vlI8ZGA/sevs+7UC/JQwiCpXcTcPQxhgTdO7aRD1fBcWkbHSCU5ashbqjmt/pGFL2Ue1 vr2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=EBHPNNv7cGvrhJ5HLr9zYH/3u0zdT1tRLP2t/lnexzU=; b=w8qyQc6Bd+iv7VgQYDUWuX4JJ8wxsHfbn4NMppVlTNXmdmpCgPYjqnRbR1GDcaME3u Rt1+j7pba+P2Lsjgi+sSACsmLcHSOiHj7mEiCPwUg7nPKErTBVWfembB+XDa5F9h8xNu 22dCLIiUKhwfjUj++mAOmh4pIEYEFi1IYjDt7t3ffVLc2FKH5MWOgf645acTa2SRdIq+ F8E71NnBV0HC9pNOgOTLylvjFVmVr3w0W6XwEuiWl5jeQyCrSJCrnZISYBpK72MIbuqx YJ2e0KgVWYvCn8ais89iTCfKaKd4wHnlmutKryTaqxvsMmrp3VPbpuOEzQaL+9N9SX9g ZTEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=zSblsXYo; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=yx1anUGK; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="wcn36xx-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id s9si2225313pjs.183.2021.09.09.07.42.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Sep 2021 07:42:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=zSblsXYo; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=yx1anUGK; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="wcn36xx-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EBHPNNv7cGvrhJ5HLr9zYH/3u0zdT1tRLP2t/lnexzU=; b=zSblsXYoMccVfK h4jlUCJYWT+cC5FWgcCVmNE1HTKOysvGHVjsu/tejnVMaQ8SHP4eF9vDpPinY0kh7BK5CciBkQIk+ JB+3apCVfVdqnxRQDnaONBPSkw2bDcV3UHievH9980WwB7zw8KiG9ZkdXSsqCmxYGQypoZJpQU8sO xkwD+lXHuoPkPB94Donhd8/G+nKtVn6H8/9d5rwv6r+jqigahWKjF/bQ/QpB3XC/Or/5LnmESwGgr PpZq7HVhPXKy337HC3q3deJNLSGBqMrUKBNdt6/K8RwXQijj4xKqxXtq0MZy3XJtcXrZLlOeFaXlP svOPbFJOCqw3iRjoOl9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mOLGF-00AAiB-Gg; Thu, 09 Sep 2021 14:42:43 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mOLGC-00AAfv-9k for wcn36xx@lists.infradead.org; Thu, 09 Sep 2021 14:42:42 +0000 Received: by mail-wm1-x32a.google.com with SMTP id l18-20020a05600c4f1200b002f8cf606262so1689611wmq.1 for ; Thu, 09 Sep 2021 07:42:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dv1391ZJpfbE5d0G7Ee4lP1GAG4bmKBnL172I+Jvp+o=; b=yx1anUGKM1bVMqtRxTVz2c9uv/c5eepSPWVza6fb56AEOQKDjdbJt9ybEgWM+F6fjw 7B1TfxSr4YlcrsZgSbEf5FLipKIgbccINxlLvbKVuznOl5UrvVIKU6GfiWT9GlG1/7oO uoKUDs+NKZEyiees65Qf91vm4IMImVR7zyC8UUpz8d6wg7nqINb2YmOqjxz71Lk13OFU D/KHz8D8Xubo4b7zYcbnr3QuUYkpLRXsQ/8Xz8+6EMAotw3Ef3l4radTl2LKRIgw2QiZ +DtfNZ4IuJi9vL7mFjFuDgt3+rR7OZ3QVVN3b+z/Zvs5f3GQOJyI/qwOGdGc3PCcj1rj AFHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dv1391ZJpfbE5d0G7Ee4lP1GAG4bmKBnL172I+Jvp+o=; b=oGjaoN2CPZ3DZP4kACGaVB6nFS4vDZAgNlqLPpJwfRV6+bfR96++WQ2hGySyh1IrN1 8Ya79GFHv4/CG1jNMKtCMLIc9OKJPnSkg+NDBHbjSxvSxks1pkhDki5pqQtgvlPTtmVH Gw6IpRiAYY4kIGeOmAK6J6hlJg89nuYSATm1QYYVQ+25QajjJWkQTyBMw8IdMXeTT5WF qf/Bf3SIwO6NE1UAPVRR/WRa/Q352TMMrszxrzjW8joC9GbQwP1nr9ssBS7fKRCLibzA ZqH72fLiHljCaoxNC+pJts2uykLANMYogHUixcTPXDjrunh3dW6cSM7i8ncwQs6I4Sch QujA== X-Gm-Message-State: AOAM532obwbVYbtHpCjpGJVPLgLeCinUqzwO54p9u5U4ANtUKNahzu14 zbSxLp2KQbhAQxf8Xy5Rq9J7sg== X-Received: by 2002:a7b:ce91:: with SMTP id q17mr3359386wmj.25.1631198556926; Thu, 09 Sep 2021 07:42:36 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id k29sm1160712wms.24.2021.09.09.07.42.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Sep 2021 07:42:36 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, linux-wireless@vger.kernel.org, wcn36xx@lists.infradead.org Cc: loic.poulain@linaro.org, benl@squareup.com, bryan.odonoghue@linaro.org Subject: [PATCH v2 2/2] wcn36xx: Add ability for wcn36xx_smd_dump_cmd_req to pass two's complement Date: Thu, 9 Sep 2021 15:44:28 +0100 Message-Id: <20210909144428.2564650-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210909144428.2564650-1-bryan.odonoghue@linaro.org> References: <20210909144428.2564650-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210909_074240_388030_3495399C X-CRM114-Status: GOOD ( 12.86 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Qcom documents suggest passing of negative values to the dump command, however currently we convert from string to u32 not s32, so we cannot pass a two's complement value to the firmware in this way. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:32a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: wcn36xx@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org Qcom documents suggest passing of negative values to the dump command, however currently we convert from string to u32 not s32, so we cannot pass a two's complement value to the firmware in this way. There is in fact only one parameter which takes a two's complement value in the antenna diversity switch command. Downstream: iwpriv wlan0 dump 71 3 Upstream: echo "71 3 " > /sys/kernel/debug/ieee80211/phy0/wcn36xx/dump Fixes: 8e84c2582169 ("wcn36xx: mac80211 driver for Qualcomm WCN3660/WCN3680 hardware") Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.33.0 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx Reviewed-by: Loic Poulain diff --git a/drivers/net/wireless/ath/wcn36xx/debug.c b/drivers/net/wireless/ath/wcn36xx/debug.c index 389b5e7129a6..6af306ae41ad 100644 --- a/drivers/net/wireless/ath/wcn36xx/debug.c +++ b/drivers/net/wireless/ath/wcn36xx/debug.c @@ -120,7 +120,7 @@ static ssize_t write_file_dump(struct file *file, if (begin == NULL) break; - if (kstrtou32(begin, 0, &arg[i]) != 0) + if (kstrtos32(begin, 0, &arg[i]) != 0) break; }