From patchwork Mon May 14 15:52:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 10398793 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 1378E60536 for ; Mon, 14 May 2018 15:53:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00DB827C05 for ; Mon, 14 May 2018 15:53:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E65CA27C2D; Mon, 14 May 2018 15:53:03 +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 8F0B027C05 for ; Mon, 14 May 2018 15:53:03 +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=YNho01cLgXsbUUkCNuN1cNUIES XcJIY3cZoGhcSr79DlksmExCW2ThSCQlNMcGADATBWoB+O12bVapccixWijnL4fBVsael9UFQaEDd i88ImeCCPPxfcUd0+hm6fGpqE7BpC3X/9YHaMLAGWPjfzsc4lTrg14amgU8UBp/js2i7lfq96qFU4 i579ydaBcX9KPuLvJfqgcKWF0mmnLxbO/hQM48oE6UGLWNOgmZNtMnSuyhhOF1ppXmQChZxE5/7iD Mm+JoqHBAFWwLtEYkgW8sybX+TMY/yBvVRjOLDrxP0qs8SXq4U9ufysCX+Kmfr3OeTHpJzJDOQdzX VS3pwtcg==; 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 1fIFmR-00088E-PB; Mon, 14 May 2018 15:52:55 +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 1fIFm8-00080i-SO for ath10k@lists.infradead.org; Mon, 14 May 2018 15:52:43 +0000 Received: from ben-dt3.candelatech.com (firewall.candelatech.com [50.251.239.81]) by mail2.candelatech.com (Postfix) with ESMTP id A4E6F40AF76; Mon, 14 May 2018 08:52:23 -0700 (PDT) From: greearb@candelatech.com To: ath10k@lists.infradead.org Subject: [PATCH v2 2/3] ath10k: Don't try un-supported idle_ps_config command. Date: Mon, 14 May 2018 08:52:16 -0700 Message-Id: <1526313137-23899-2-git-send-email-greearb@candelatech.com> X-Mailer: git-send-email 2.4.11 In-Reply-To: <1526313137-23899-1-git-send-email-greearb@candelatech.com> References: <1526313137-23899-1-git-send-email-greearb@candelatech.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180514_085236_987172_19CABEED X-CRM114-Status: GOOD ( 11.45 ) 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; }