Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp726788pxu; Mon, 23 Nov 2020 02:30:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwqGDXEXeNaN9vEOTbsTzJmmsSpewqrSFQSEBZtdzDT8XAQVOdj9EDIf3gKHfgCMRAm7lhA X-Received: by 2002:a17:906:4104:: with SMTP id j4mr45085011ejk.439.1606127429980; Mon, 23 Nov 2020 02:30:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606127429; cv=none; d=google.com; s=arc-20160816; b=EFaXXPSoyKIqleDMjN0knlVqpvHaZq7vD63qSpVh+531gPiGeWVOoL0Vfsne8UIkTu S7Z7KMB/E9jXM3Ti4vH5G3Zf2GqUueTK21rg/IK0GB5rRLbTC8px6YeCEN32mN7OVk+F 6BIHofIEKX2bHeEyEwoDkxGy2YL3WW6/EIOJlxGd+4fy8ZsVmDCJv8y3KUilMrZY5QYG iiOTmCoHv9SrzUpHdCGfISnrpSeTYG6sxHljyp7ecZBtGDfLyGbvw+7N9DFPuGeHOFP1 LLu1zjT542eu61gP4qyExy7XQPOcUN8A6tR2McHeCR8e9IpsVMNcotPagznk2vzOQuul YGTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=O0ThdxcJNO6zV2BphVWbiZgpVdrlhVR1MlXKPXk6EbI=; b=ynw54l90SD8wXEP1+bVglemcYX6/THAVX4EEnoJIIFioD0vthgZYck87j5LFJJoEOX MsbhebBN+a3AnL0C5vmJtNW3RuQz4EEdq2HzXBQPb8Nq6bzSr+wObUHNIuN2VfOR2yIc S9b4BuGct8sPMN7GvYayB8Hcli3PQ4udwost6QsUHOiTaLlKAfwnUm4WxnlDDqIV7S2P JkfQSePFn4k+1GuoiJSSp4bHwqf+pLfqDqURduFtWXdZYPcIuhePqdWf7g1PtGQcK3T1 hCpWSBB9zepAbgNpQpyGHRXr2QTSrSF8r86xDoZIhgG6ib9hDDbir1CsO28UcnucDAyH QeNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ddt6tz3j; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y14si5510993edj.388.2020.11.23.02.29.55; Mon, 23 Nov 2020 02:30:29 -0800 (PST) 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=@linaro.org header.s=google header.b=Ddt6tz3j; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728576AbgKWK24 (ORCPT + 99 others); Mon, 23 Nov 2020 05:28:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728153AbgKWK24 (ORCPT ); Mon, 23 Nov 2020 05:28:56 -0500 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D1FCC0613CF for ; Mon, 23 Nov 2020 02:28:56 -0800 (PST) Received: by mail-pl1-x631.google.com with SMTP id 18so8619974pli.13 for ; Mon, 23 Nov 2020 02:28:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=O0ThdxcJNO6zV2BphVWbiZgpVdrlhVR1MlXKPXk6EbI=; b=Ddt6tz3jFBvHqbvtkEjGa7L62ThxISp2m8mvGVC+V1ccsa8/1Ot5o77bK78xEnPc0J MH+t7qj5sfeU+eSLEx/bduYC1u6HCIpk1dzUPdVsFVLBc9GHQbjj6XWxYZNYEBYb8rPB Pn8qhkZviZe2uOs3RGXTL0Qn15Uj/YBzZyn6etVgszZjSwAelMmM5Y9cPXeWQLynyXgo mPeAQ/PyvMXJoMBd88T/Pd5Luhyg75lWegpDVhZuorfXkssRLWqEoYvkE0riB1N9K31U VNJuwlKXFyjWMKcvzzc5dscMTaq2nbpZeZEZAwjz+pQT+C8Gl/p1s528maryBgipn02N p4eA== 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; bh=O0ThdxcJNO6zV2BphVWbiZgpVdrlhVR1MlXKPXk6EbI=; b=nGmRYC0c3DAblmpxzDdEsZMJHvgjBBmjd/nGDAYES2TaaA1B19EJWxl0vR3MMWdprk 8BQrcJMsG7h5C/frxS6k10Odkb7OToXcHuhU5KqMAIPvRDAlcd4ToykxNHRPbpJq4Yam VWSoQSZcZgyVybUCXyg2f/PdN8LBBbN6lt8+OlVjQFvyTMEyqqW9iDpbS2Maw8un2FUT hmm728isSlB90Vw7Bk7x+bDUdsPFr/MWfvusXbb0KDJMBDbXH/Sd5LOo86si0uxSTS4+ nn5/JPFDiwDc0eRfKB0uSgwyHlXEL5s8ATkzCjM24BsYVEe8y5IjgzZF7qVlhELAZIMG I9Xg== X-Gm-Message-State: AOAM5306QO3VVT3J6KeyQS2SCE+0+VTAX7ACqknGfqFE+hlpNYd59m7V 7RJzDoOWI9rY686PPUiiNvwklg== X-Received: by 2002:a17:902:8ec4:b029:d7:eb0d:84c0 with SMTP id x4-20020a1709028ec4b02900d7eb0d84c0mr22751917plo.23.1606127335664; Mon, 23 Nov 2020 02:28:55 -0800 (PST) Received: from localhost.localdomain ([49.207.198.226]) by smtp.gmail.com with ESMTPSA id s18sm11907655pfc.5.2020.11.23.02.28.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Nov 2020 02:28:55 -0800 (PST) From: Amit Pundir To: Kalle Valo , David S Miller , Jakub Kicinski , Bjorn Andersson , Jeffrey Hugo Cc: John Stultz , Sumit Semwal , Konrad Dybcio , Joel S , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, phone-devel@vger.kernel.org, lkml Subject: [PATCH v2] ath10k: qmi: Skip host capability request for Xiaomi Poco F1 Date: Mon, 23 Nov 2020 15:58:49 +0530 Message-Id: <1606127329-6942-1-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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 --- We dropped this workaround last time in the favor of a generic dts quirk to skip host cap check. But that is under under discussion for a while now, https://lkml.org/lkml/2020/9/25/1119, so resending this short term workaround for the time being. v2: ath10k-check complained about a too long line last time, so moved the comment to a new line. drivers/net/wireless/ath/ath10k/qmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c index ae6b1f402adf..1c58b0ff1d29 100644 --- a/drivers/net/wireless/ath/ath10k/qmi.c +++ b/drivers/net/wireless/ath/ath10k/qmi.c @@ -653,7 +653,9 @@ 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 && + /* Xiaomi Poco F1 workaround */ + !of_machine_is_compatible("xiaomi,beryllium")) { ath10k_err(ar, "host capability request rejected: %d\n", resp.resp.error); ret = -EINVAL; goto out; -- 2.7.4