From patchwork Wed Apr 5 11:58:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maya Erez X-Patchwork-Id: 9663833 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5D66060365 for ; Wed, 5 Apr 2017 12:00:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4547327D0C for ; Wed, 5 Apr 2017 12:00:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A33128484; Wed, 5 Apr 2017 12:00:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D5F0284FF for ; Wed, 5 Apr 2017 12:00:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933071AbdDEL77 (ORCPT ); Wed, 5 Apr 2017 07:59:59 -0400 Received: from wolverine02.qualcomm.com ([199.106.114.251]:5508 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932932AbdDEL6c (ORCPT ); Wed, 5 Apr 2017 07:58:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1491393512; x=1522929512; h=cc:from:to:subject:date:message-id:in-reply-to: references; bh=KU9T4zXVL/krasvv/xz0Hp6VFcnaz2ypvwipKvwvWQ4=; b=Hcf49e4z4Ks7x2yxd0jXgLdT7QT0FUGs+P/WallVCweHU+ogKhL92IK/ 8Vn0h9geRtE4VBK0BTzWBzY3403BmhsQgRklr/kkEmRvjGE7lOm6rdGkU AYnV5yB2PVMJpkyEOsza5uRJN171uM+clT3EW2GpUgcvnWMumYJEaFI/n g=; X-IronPort-AV: E=Sophos;i="5.36,278,1486454400"; d="scan'208";a="371582765" Received: from unknown (HELO ironmsg02-L.qualcomm.com) ([10.53.140.109]) by wolverine02.qualcomm.com with ESMTP; 05 Apr 2017 04:58:31 -0700 Cc: Hamad Kadmany , linux-wireless@vger.kernel.org, wil6210@qca.qualcomm.com, Maya Erez X-IronPort-AV: E=McAfee;i="5800,7501,8488"; a="899448734" X-MGA-submission: =?us-ascii?q?MDH1VOCQgPO//3GNgjkETNdIOTePZi+fv1r4pn?= =?us-ascii?q?tcxy95Irbrfr7EIjbYwBUxeTRclENaiMHXhImfacSGaRWRsRcAlc4IJt?= =?us-ascii?q?W0/uvo2WW9lcUD28rr0t6G15HAfLxh7XdjHVk/wxdQOKPF09R/6iRJEZ?= =?us-ascii?q?cD?= Received: from lx-merez1.mea.qualcomm.com ([10.18.173.103]) by ironmsg02-L.qualcomm.com with ESMTP; 05 Apr 2017 04:58:30 -0700 From: Maya Erez To: Kalle Valo Subject: [PATCH 07/11] wil6210: fix check for sparrow D0 FW file Date: Wed, 5 Apr 2017 14:58:10 +0300 Message-Id: <1491393494-11816-8-git-send-email-qca_merez@qca.qualcomm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1491393494-11816-1-git-send-email-qca_merez@qca.qualcomm.com> References: <1491393494-11816-1-git-send-email-qca_merez@qca.qualcomm.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hamad Kadmany Driver fails to load FW for sparrow D0 devices in some cases. Fix this by returning correct value from wil_fw_verify_file_exists when D0 FW file is not detected for any reason. Signed-off-by: Hamad Kadmany Signed-off-by: Maya Erez --- drivers/net/wireless/ath/wil6210/fw_inc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/wil6210/fw_inc.c b/drivers/net/wireless/ath/wil6210/fw_inc.c index f4901587..e01acac 100644 --- a/drivers/net/wireless/ath/wil6210/fw_inc.c +++ b/drivers/net/wireless/ath/wil6210/fw_inc.c @@ -554,5 +554,7 @@ bool wil_fw_verify_file_exists(struct wil6210_priv *wil, const char *name) rc = request_firmware(&fw, name, wil_to_dev(wil)); if (!rc) release_firmware(fw); - return rc != -ENOENT; + else + wil_dbg_fw(wil, "<%s> not available: %d\n", name, rc); + return !rc; }