From patchwork Thu Sep 17 07:41:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 11781799 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1C076112E for ; Thu, 17 Sep 2020 07:42:29 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D51812072E for ; Thu, 17 Sep 2020 07:42:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TqHmWreF"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="iCw4GwLw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D51812072E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=X7XPeBBsI65dHQ98LmgszoZ0rCU/yaZGpylc54kZ2Pg=; b=TqHmWreFAQTMkZriZCVD4IY/Ru gyaA3miMVRejW/WzNm1JEB/IsqjV4uAz527zdWxthLoECs5vbwY/TLaHeIUiTFKEG8d4CS6GzdI6h PFa9lXjZoFSycXPWWp+hsGoSVVdfTPv7U+i0A3OwqrTzTYScNJMFHsUt/77jQ0GQPIoyORZKG4Gdv 7wVztolAwtjCXjLItM5Xi/A2Nb6W1HcTJtLXsk44JGVjhAlG1XJ+ngW2iUNQR3Q42vMXGpsbvdV5S xFFD34v1VcrUjbmr9+S+Di0Bb7TXakUaLQ0cL5bXZtvK3644Frx4LGOTa+mF4qzHJkSJ5wctL2GEX F0zNEWjQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIoYE-0007Sl-Oq; Thu, 17 Sep 2020 07:41:54 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIoYC-0007Rd-7i for ath10k@lists.infradead.org; Thu, 17 Sep 2020 07:41:53 +0000 Received: by mail-pf1-x442.google.com with SMTP id k15so664276pfc.12 for ; Thu, 17 Sep 2020 00:41:50 -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:author; bh=FXDiiYkOrBBkVMM60XIvsHKuLK5wSyPpdEYR7aXyVeE=; b=iCw4GwLwH4XXyDXgc0qXrpwDfvZsPiJOvBqE4DHe9rNTw9dyeZdz73ZGAaYeJFhfAc 5jBxJXFSncPIyRXCtdeFWzeXnTb9NyZEDSzN0E7DaOPWo5kyl0920tplCBronsYZeneR 8jOUfjj5ef671oSxEfy3FiXQZ9FtXWywocHpg8liT1Rl8jvyJZ7NyWmcMGkI9K7NMbRz uKEVG8/DE88glop1q9AdGMTFU5fppJsVLWyZ27UGFTkbp3cS5UNMNcONYteUA/Lz+AVw YQ3JmUkIMUz175TX0Ff6jGGvDv3BsPDDtzRklvJrBKDA8iibWpfjGd/LaOHKQyLD5AkA tFVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:author; bh=FXDiiYkOrBBkVMM60XIvsHKuLK5wSyPpdEYR7aXyVeE=; b=WGd+MSPrc7WVN6wmWkko4t5A/lFnfvyx66cVHJ5XAxWEgOV3rp023lZ5mXxi180wZH 1VnasBM9VDkgeNQrqhkU+aPqEt6f0urVODI0XnNHnaDwZiCsRCwf+k5UxacjJQ8ZeLUi 5rP0yt+aJRssXLH5Ytw34teHBYWFok27OYI2Ow0gk/dnLmhKSN+kL85okBnvKIXI3+rF zLk6rYNdolEc4uK+EPnAvGYPXOifdL2XaJtHcPkR5LIYfvPNdZutEkN4iW7DoMAK9KRG 371BTJnDes7YPRrCEvMDQ6zjyrp9vqFEw1Z66ZAJtyfaXlbq2bSQiQvyK2JSVTARzS+o Q6mA== X-Gm-Message-State: AOAM532ekZ1B2FmzZ5Rmo7cqETZ9e6V3HeXQnIt0oVHdmEBLpEWT5sNI WOy78jEhebTemJJtMfyiA/nTYQ== X-Google-Smtp-Source: ABdhPJzeq73boIofbBUIov5zoWTDDc1vmS133UThfzm7c+wWboFUL3yGWk8BGO8uBksiOtHwbMmvyA== X-Received: by 2002:a63:4c57:: with SMTP id m23mr20910626pgl.77.1600328508312; Thu, 17 Sep 2020 00:41:48 -0700 (PDT) Received: from localhost.localdomain ([2405:201:6803:6073:ddd6:7b70:6083:ecc4]) by smtp.gmail.com with ESMTPSA id e27sm19365745pfj.62.2020.09.17.00.41.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Sep 2020 00:41:47 -0700 (PDT) From: Amit Pundir To: Kalle Valo , David S Miller , Jakub Kicinski , Bjorn Andersson , Jeffrey Hugo Subject: [PATCH] ath10k: qmi: Skip host capability request for Xiaomi Poco F1 Date: Thu, 17 Sep 2020 13:11:41 +0530 Message-Id: <1600328501-8832-1-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 Author: Amit Pundir X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200917_034152_278585_CD5815D9 X-CRM114-Status: GOOD ( 15.24 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:442 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 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 -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 X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org, Konrad Dybcio , ath10k@lists.infradead.org, lkml , John Stultz , Sumit Semwal MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org Workaround to get WiFi working on Xiaomi Poco F1 (sdm845) phone. We get a non-fatal QMI_ERR_MALFORMED_MSG_V01 error message in ath10k_qmi_host_cap_send_sync(), but we can still bring up WiFi services successfully on AOSP if we ignore it. We suspect either the host cap is not implemented or there may be firmware specific issues. Firmware version is QC_IMAGE_VERSION_STRING=WLAN.HL.2.0.c3-00257-QCAHLSWMTPLZ-1 qcom,snoc-host-cap-8bit-quirk didn't help. If I use this quirk, then the host capability request does get accepted, but we run into fatal "msa info req rejected" error and WiFi interface doesn't come up. Attempts are being made to debug the failure reasons but no luck so far. Hence this device specific workaround instead of checking for QMI_ERR_MALFORMED_MSG_V01 error message. Tried ath10k/WCN3990/hw1.0/wlanmdsp.mbn from the upstream linux-firmware project but it didn't help and neither did building board-2.bin file from stock bdwlan* files. This workaround will be removed once we have a viable fix. Thanks to postmarketOS guys for catching this. Signed-off-by: Amit Pundir --- Device-tree for Xiaomi Poco F1(Beryllium) got merged in qcom/arm64-for-5.10 last week https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?id=77809cf74a8c drivers/net/wireless/ath/ath10k/qmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c index 0dee1353d395..37c5350eb8b1 100644 --- a/drivers/net/wireless/ath/ath10k/qmi.c +++ b/drivers/net/wireless/ath/ath10k/qmi.c @@ -651,7 +651,8 @@ static int ath10k_qmi_host_cap_send_sync(struct ath10k_qmi *qmi) /* older FW didn't support this request, which is not fatal */ if (resp.resp.result != QMI_RESULT_SUCCESS_V01 && - resp.resp.error != QMI_ERR_NOT_SUPPORTED_V01) { + resp.resp.error != QMI_ERR_NOT_SUPPORTED_V01 && + !of_machine_is_compatible("xiaomi,beryllium")) { /* Xiaomi Poco F1 workaround */ ath10k_err(ar, "host capability request rejected: %d\n", resp.resp.error); ret = -EINVAL; goto out;