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: 10398785 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 CEF8E60536 for ; Mon, 14 May 2018 15:52:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEE6128382 for ; Mon, 14 May 2018 15:52:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B35692839C; Mon, 14 May 2018 15:52:29 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 56AF528382 for ; Mon, 14 May 2018 15:52:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752912AbeENPw1 (ORCPT ); Mon, 14 May 2018 11:52:27 -0400 Received: from mail2.candelatech.com ([208.74.158.173]:60340 "EHLO mail2.candelatech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752373AbeENPw0 (ORCPT ); Mon, 14 May 2018 11:52:26 -0400 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 Cc: kvalo@qca.qualcomm.com, linux-wireless@vger.kernel.org, Ben Greear 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> 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: 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; }