From patchwork Fri Jul 27 00:42:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 10546549 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C8F86139A for ; Fri, 27 Jul 2018 00:43:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B52BC2BB1A for ; Fri, 27 Jul 2018 00:43:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A903F2BB36; Fri, 27 Jul 2018 00:43:21 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0944E2BB30 for ; Fri, 27 Jul 2018 00:43:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=gdweZhB+wmSgGB34WmwnxRMtVgc/7VZTh4bqMLEdB74=; b=VCtq4DqYFLWUNM3BDfPzXG6hXN TKG+bYZiNz5wKXOw93Atr18Z5ffcl7+zZN2admrnz7qzF0mtwgwN3tZBit9chW1cVZuvn1BUevTKb sfcI26zbNg2kN5THHzD4PCvnLJIWWxZKnS2Hh2ejfedMjeSbUkoNkTnFn18jb6hYx3q/ur5Wkl78J C3beG0AM7H55CvgLD3IftAcY99zgWXp2/mnEoOKY3ncNhmD5BktEg8qEIRQWjpAU32uTywpDWSsqe qgI63utV0uUCxDw/ERxkKLtBSC05VvPMTwfTfhMCzibeNpaVM6fvWtdkYvE0JIXIPU6QOXe9OKAFK IhjQigzA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fiqqf-0000uE-21; Fri, 27 Jul 2018 00:43:13 +0000 Received: from mail2.candelatech.com ([208.74.158.173]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fiqqb-0000st-Ia for ath10k@lists.infradead.org; Fri, 27 Jul 2018 00:43:10 +0000 Received: from ben-dt3.candelatech.com (firewall.candelatech.com [50.251.239.81]) by mail2.candelatech.com (Postfix) with ESMTP id EA6DD40AC0B; Thu, 26 Jul 2018 17:42:52 -0700 (PDT) From: greearb@candelatech.com To: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org, kvalo@codeaurora.org Subject: [PATCH v3 2/3] ath10k: Don't try un-supported idle_ps_config command. Date: Thu, 26 Jul 2018 17:42:44 -0700 Message-Id: <1532652165-27272-2-git-send-email-greearb@candelatech.com> X-Mailer: git-send-email 2.4.11 In-Reply-To: <1532652165-27272-1-git-send-email-greearb@candelatech.com> References: <1532652165-27272-1-git-send-email-greearb@candelatech.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180726_174309_639763_E6310D01 X-CRM114-Status: GOOD ( 10.89 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ben Greear MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ben Greear The warning the the logs does not give user a clue as to what command is failing, so it is worth it to check for un-supported command before trying the call. And add return-code to survey error message. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/mac.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 541bc1c..345d333 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -4690,10 +4690,13 @@ static int ath10k_start(struct ieee80211_hw *hw) } param = ar->wmi.pdev_param->idle_ps_config; - ret = ath10k_wmi_pdev_set_param(ar, param, 1); - if (ret && ret != -EOPNOTSUPP) { - ath10k_warn(ar, "failed to enable idle_ps_config: %d\n", ret); - goto err_core_stop; + if (param != WMI_PDEV_PARAM_UNSUPPORTED) { + ret = ath10k_wmi_pdev_set_param(ar, param, 1); + if (ret) { + ath10k_warn(ar, "failed to enable idle_ps_config: %d\n", + ret); + goto err_core_stop; + } } __ath10k_set_antenna(ar, ar->cfg_tx_chainmask, ar->cfg_rx_chainmask); @@ -6809,7 +6812,8 @@ ath10k_mac_update_bss_chan_survey(struct ath10k *ar, ret = ath10k_wmi_pdev_bss_chan_info_request(ar, type); if (ret) { - ath10k_warn(ar, "failed to send pdev bss chan info request\n"); + ath10k_warn(ar, "failed to send pdev bss chan info request: %d\n", + ret); return; }