From patchwork Thu May 7 19:07:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 6360651 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 90B1B9F1C2 for ; Thu, 7 May 2015 19:08:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AED2320304 for ; Thu, 7 May 2015 19:08:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D069520303 for ; Thu, 7 May 2015 19:08:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751174AbbEGTIL (ORCPT ); Thu, 7 May 2015 15:08:11 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:38056 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750900AbbEGTIK (ORCPT ); Thu, 7 May 2015 15:08:10 -0400 Received: by wiun10 with SMTP id n10so2857693wiu.1 for ; Thu, 07 May 2015 12:08:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=een9VG6e5QNV0qnnvyfeBjppT3OecsMWqETZbf4KTKA=; b=pwZK0CSutdPy+XC/OvUcE96L9r+v/Rg3TUVkrb0Z6TRL58FxVQJe29gW925c8eV7RF Buk72tueJKZCRsKBlGwmYpnMlPG+kdZttg3F0EX39pgCdEFBJYyEydsDGEVz5K1ncUEY HheLxHbOKV0AXkWX1gRYdcqopUidzOEcLpDExHUwnnxokaZjtsR/udVZlzR7C9f67Oun 5lpT48EIPfYSV5XWi8PI0L+U9+xY2Dr2pym0QWXfmTIqLmaThXi6X8K4jTXgBlbuD7VH 0xN6y2JwiB7EpyDjYHejaNGB8IPobkfspdod/cqyD2K59Rvu+6OnHR6Cc5BJMfMKkXar I6Kw== X-Received: by 10.180.88.8 with SMTP id bc8mr170525wib.19.1431025688971; Thu, 07 May 2015 12:08:08 -0700 (PDT) Received: from linux-tdhb.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by mx.google.com with ESMTPSA id ch2sm5348985wib.18.2015.05.07.12.08.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 May 2015 12:08:08 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Kalle Valo , linux-wireless@vger.kernel.org Cc: Brett Rudley , Arend van Spriel , "Franky (Zhenhui) Lin" , Hante Meuleman , brcm80211-dev-list@broadcom.com, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH 2/2] brcmfmac: fix debugging info for received hw messages with errors Date: Thu, 7 May 2015 21:07:41 +0200 Message-Id: <1431025661-8879-2-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1431025661-8879-1-git-send-email-zajec5@gmail.com> References: <1431025661-8879-1-git-send-email-zajec5@gmail.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Code in function setting/querying device was treating every error as Broadcom protocol specific one. It wasn't right thing to do as most of subcalls return "normal" errors (errno-base.h). This resulted in e.g.: brcmf_usb_rx_ctlpkt: rxctl wait timed out brcmfmac: brcmf_fil_cmd_data Failed: BCME_NOTDOWN (-5) which was misleading because of interpreting -EIO as BCME_NOTDOWN. Signed-off-by: Rafa? Mi?ecki --- drivers/net/wireless/brcm80211/brcmfmac/bcdc.c | 5 ++++- drivers/net/wireless/brcm80211/brcmfmac/fwil.c | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcdc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcdc.c index 8e0e91c..47941ab 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcdc.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcdc.c @@ -203,8 +203,11 @@ retry: } /* Check the ERROR flag */ - if (flags & BCDC_DCMD_ERROR) + if (flags & BCDC_DCMD_ERROR) { ret = le32_to_cpu(msg->status); + brcmf_dbg(BCDC, "received message with error %s (%d)\n", + brcmf_get_errstr((u32)(-ret)), ret); + } done: return ret; diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwil.c b/drivers/net/wireless/brcm80211/brcmfmac/fwil.c index bdbdc9e..c86a522 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/fwil.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/fwil.c @@ -53,8 +53,7 @@ brcmf_fil_cmd_data(struct brcmf_if *ifp, u32 cmd, void *data, u32 len, bool set) if (err >= 0) return 0; - brcmf_dbg(FIL, "Failed: %s (%d)\n", - brcmf_get_errstr((u32)(-err)), err); + brcmf_dbg(FIL, "Failed: %d\n", err); return -EBADE; }