From patchwork Fri Jun 24 12:34:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 9197399 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 6BEAD60754 for ; Fri, 24 Jun 2016 12:35:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5ABC3284AB for ; Fri, 24 Jun 2016 12:35:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C190284AF; Fri, 24 Jun 2016 12:35:09 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 E635C284AB for ; Fri, 24 Jun 2016 12:35:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751501AbcFXMfF (ORCPT ); Fri, 24 Jun 2016 08:35:05 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36804 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751210AbcFXMfB (ORCPT ); Fri, 24 Jun 2016 08:35:01 -0400 Received: by mail-wm0-f65.google.com with SMTP id c82so4612316wme.3 for ; Fri, 24 Jun 2016 05:35:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=w10vae64cUYifeT6V5GzP5vqIylliqPneznnQPkunA0=; b=Ce/TaEaPcZJrqBjX+e+GBJ8M+jk1cC+R18U9weub7wUC354iXn0bNEZ+FRgN8y2Ff2 2SO69eDb9M/UNUamtiJZT3hXbCe47ynLuJ6Za/L1vyrPUSewLWkSlvuJDTQLcb/5P9ph 8czOvdnVT9o6oID0SzKqnur8r6G2OJMngNA8eGCS+6U+D75gFgiCpsVPVnwIvaJkGrKR HN/NVfkkr3QKq705kkdxjGnCd5jUfEF1Fw612Rm2du5S/zN0bIIs0us9VDg4fLKC0N9Z s7fmN8c09yLQb2EzMXnuZ+mkvuszzK3t2z15fUhC9iF5hXzafuT0eWm9P6MH3CMf8P3L QTXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=w10vae64cUYifeT6V5GzP5vqIylliqPneznnQPkunA0=; b=VPoqAP/YN1WyKaMfUZSnTiGIGb23l7TZOF99TsVdHdhq+4H2fFo6OgZixb8h20fPe6 omySTJcDVkkQV0t2fn6UDnu+4c4Wxuls2a1cdl7ctYb37UNmkET1ka2UWiD+Iu+6eV3k z5TV7Mz99A3RXrSgMSq+lUUBRI1Ozu9DigcnHBpiXnH4iqwleulpp/5qEl3qdwnMhaRk 7uuTRQjNzFeY2OJNMkxpPvS7LS7Uiteplj4iN8S6IMzJzQJo+/X2iQjCJC3GtUxS5VvN UzHjYRdBnFCR0kUhASQxoPrlXV3/bGwGum5HDKDWUEQKQB6hIhdd7gSPj35bUkDLTf/B erfQ== X-Gm-Message-State: ALyK8tJmoHMJd5lv3brwmbhnOxWsEeDw7FewjeG5ODtGu6g2rpkatijaINniOi3+/6LiQg== X-Received: by 10.195.11.40 with SMTP id ef8mr3537076wjd.137.1466771699658; Fri, 24 Jun 2016 05:34:59 -0700 (PDT) Received: from blackbox.darklights.net (p200300DCD3CD1B04711E7E5304799B46.dip0.t-ipconnect.de. [2003:dc:d3cd:1b04:711e:7e53:479:9b46]) by smtp.googlemail.com with ESMTPSA id x83sm2942499wmx.9.2016.06.24.05.34.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jun 2016 05:34:58 -0700 (PDT) From: Martin Blumenstingl To: ath9k-devel@qca.qualcomm.com, linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org Cc: nbd@nbd.name, chunkeey@googlemail.com, mark.rutland@arm.com, robh+dt@kernel.org, arend.vanspriel@broadcom.com, Martin Blumenstingl Subject: [PATCH v3 2/3] ath9k: add a helper to get the string representation of ath_bus_type Date: Fri, 24 Jun 2016 14:34:29 +0200 Message-Id: <20160624123430.4097-3-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160624123430.4097-1-martin.blumenstingl@googlemail.com> References: <20160624123430.4097-1-martin.blumenstingl@googlemail.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 Signed-off-by: Martin Blumenstingl --- this is a new patch which didn't exist in v2 yet, it prepares the new function ath_bus_type_to_string which will be used in patch #3 drivers/net/wireless/ath/ath.h | 2 ++ drivers/net/wireless/ath/main.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h index da7a7c8..be0d292 100644 --- a/drivers/net/wireless/ath/ath.h +++ b/drivers/net/wireless/ath/ath.h @@ -327,4 +327,6 @@ static inline const char *ath_opmode_to_string(enum nl80211_iftype opmode) } #endif +const char *ath_bus_type_to_string(enum ath_bus_type bustype); + #endif /* ATH_H */ diff --git a/drivers/net/wireless/ath/main.c b/drivers/net/wireless/ath/main.c index 338d723..90427cb 100644 --- a/drivers/net/wireless/ath/main.c +++ b/drivers/net/wireless/ath/main.c @@ -90,3 +90,18 @@ void ath_printk(const char *level, const struct ath_common* common, va_end(args); } EXPORT_SYMBOL(ath_printk); + +const char *ath_bus_type_to_string(enum ath_bus_type bustype) +{ + switch (bustype) { + case ATH_PCI: + return "pci"; + case ATH_AHB: + return "ahb"; + case ATH_USB: + return "usb"; + default: + return "unknown"; + } +} +EXPORT_SYMBOL(ath_bus_type_to_string);