From patchwork Fri May 11 21:42:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 10395427 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 5F0D1601A0 for ; Fri, 11 May 2018 21:42:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6570B28FD6 for ; Fri, 11 May 2018 21:42:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5932528FDC; Fri, 11 May 2018 21:42:46 +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 E1B9328FD6 for ; Fri, 11 May 2018 21:42:45 +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=Vx7ZRXM7O81x4JMp91h/Sj0xGWz1tNiHjBNGPLgY5lI=; b=bZfwb4+9siwiKbaMoq2XA4Pzim PxQKOIVrip7cxiOGVranVj4OwA9o3e64GRPtNRbjEFFQZpqpRiU/4X2gsEmmAX3fMJWYAWuQyJPl6 EsZID6z1HzgSOlhR9odTJQk3Z+VDA4YbVifA1N6qOeZFNHwLB0OARSrGSz+IK/+tQOudIThURZx3M uLbCMecjU6FKUJhdsCErXJpxxlRNZETqHx4Ewi19UkPre8A31Js9GFz4TKRh1rwJqj+Hq4Tu+7LVJ ojffoQT7iyNYpSiBtQqsz7h7ps9oGhvcHbp05fCOC4Sp3HwBR2uYLfn7h+nM8C0MC6MGXBzBBUxZq xKPgkX+Q==; 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 1fHFoB-00089u-AT; Fri, 11 May 2018 21:42:35 +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 1fHFo7-00088U-AM for ath10k@lists.infradead.org; Fri, 11 May 2018 21:42:32 +0000 Received: from ben-dt3.candelatech.com (firewall.candelatech.com [50.251.239.81]) by mail2.candelatech.com (Postfix) with ESMTP id E83EF40A69D; Fri, 11 May 2018 14:42:16 -0700 (PDT) From: greearb@candelatech.com To: ath10k@lists.infradead.org Subject: [PATCH 2/3] ath10k: Don't try un-supported idle_ps_config command. Date: Fri, 11 May 2018 14:42:10 -0700 Message-Id: <1526074931-23885-2-git-send-email-greearb@candelatech.com> X-Mailer: git-send-email 2.4.11 In-Reply-To: <1526074931-23885-1-git-send-email-greearb@candelatech.com> References: <1526074931-23885-1-git-send-email-greearb@candelatech.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180511_144231_414790_82F995D4 X-CRM114-Status: GOOD ( 10.79 ) 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: kvalo@qca.qualcomm.com, linux-wireless@vger.kernel.org, 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 3d7119a..1185d0c2 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -4680,10 +4680,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); @@ -6770,7 +6773,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; }