Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp217512pxk; Thu, 17 Sep 2020 00:43:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaeQ1pHLGMLTEL4sUI/XqjTEeM7jRIux/dQCKO8tqLnHfShOt+9MzablE8hGQwlX5+wEAH X-Received: by 2002:a17:906:15c4:: with SMTP id l4mr28872488ejd.78.1600328595467; Thu, 17 Sep 2020 00:43:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600328595; cv=none; d=google.com; s=arc-20160816; b=xcKaP/lv+QfBaB4Sr2jaqp5kdIV79fEQ45EbSFEtYT9uHv+nha/dPkzZrliiHT1kOZ a8iIMjzsMCrZx4W5W9TQTVYU+hpsV+8ikuRD3AbkkMXB3qNI7/VGJVSCOsMnXhicYD9d tUfhJ06t7ptwIRGgxaf1OAU+I1EqgNAygCG9wLtHNo9iLwFAe93cesWzFqDjBL3S+bik 9OYeOKUt8SiKt/3RnvT/5jsymP9kXZVhc7GVz26PG35HLr9Z47mRdgQ+eTZhKgzOQIFE JT8EECwxKvdLbdPefAw8WqhjuiS3QAGwPBwP3OxVGtS5yl5EkT5j9iDbKG1MBwdpUGhD 5cEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:author:message-id:date:subject:cc:to:from :dkim-signature; bh=FXDiiYkOrBBkVMM60XIvsHKuLK5wSyPpdEYR7aXyVeE=; b=lvcD0+c3JFcrLVi4z6BnyaSHnluLn0ez2KXUOKkO9kZ5Yqp4TEhjuLKsufTIPDuZcY hK3APkoPPllGv4HJMjpnXH9Xeh5Suu6QgGO7EHBo77PcKYz0sUEOhLAxljgjpEWJjquO v9gEjAmZeSBFBzlrvEdyt5usymrxqxD1iCOnO9JOGHIANfoYw1K8A1tgYRdTp3ngQh0k 7vhJKtMIelZkWhLxyi8rdj4F1GlN+jPkjHSq+qrIq8GVu0Evl9qXpc59QPaOMl7xcq2A 1AeaGR/6Yb0z4vxvVLkWpEO7LSgr9W+2WlKK1e/en4xWlicS8A1I80fO8iAZ61My5d62 NAAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iCw4GwLw; 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 gj3si14047708ejb.728.2020.09.17.00.42.40; Thu, 17 Sep 2020 00:43:15 -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=@linaro.org header.s=google header.b=iCw4GwLw; 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 S1726217AbgIQHlv (ORCPT + 99 others); Thu, 17 Sep 2020 03:41:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726106AbgIQHlt (ORCPT ); Thu, 17 Sep 2020 03:41:49 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9ADBC06174A for ; Thu, 17 Sep 2020 00:41:48 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id w7so684750pfi.4 for ; Thu, 17 Sep 2020 00:41:48 -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=ETYMYrAbfRpzN2waK7dak4h5Dd9gdTVD3SCl7q/7FJFPuVKVveb7Fc5+CTivBtmDKA Mo7cOcAZWmK3H8uuVT2jowktwOzY8cVl2/4NGNEWjGvxW90cvE9ecc9+4kLZYuyet4yL UtU//ojlubAqaTsdyloVjEKj6P8icXAnM7GULqD/g10XRQKJtOlc7vIXs3oPa3edR6jO 2qWVaC8QHNheHJfo3WozuRJ7paXaDH5nJj2eoJIeK5f8s/dg2UQNZykqDXkVDove/Wa1 9WDGr6/Bp3Ysn55mpSusEXiKjo2EcG0QNaG+B67GB6elfZeHryJLFA9uj+3kxSdWKQgd ofwQ== X-Gm-Message-State: AOAM533KKPhpNfDcuXJDBxmJfIeSvQ2FoKleLc648FfgSJOfKvwB+bRw j21Ob40IEsZZ7R04GsMzS/BZMg== 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 Cc: John Stultz , Sumit Semwal , Konrad Dybcio , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, lkml 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 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 --- 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; -- 2.7.4