From patchwork Wed Oct 21 21:10:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Randolf X-Patchwork-Id: 7460661 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 855189F37F for ; Wed, 21 Oct 2015 21:10:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9E3E020396 for ; Wed, 21 Oct 2015 21:10:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 61FDF2037F for ; Wed, 21 Oct 2015 21:10:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753869AbbJUVKJ (ORCPT ); Wed, 21 Oct 2015 17:10:09 -0400 Received: from postler.einfach.org ([5.9.2.179]:53319 "EHLO postler.einfach.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750756AbbJUVKI (ORCPT ); Wed, 21 Oct 2015 17:10:08 -0400 Received: from localhost.localdomain (unknown [188.85.79.213]) by postler.einfach.org (Postfix) with ESMTPA id 756A2C19; Wed, 21 Oct 2015 21:10:06 +0000 (UTC) From: Bruno Randolf To: Jes.Sorensen@redhat.com, linux-wireless@vger.kernel.org Cc: Bruno Randolf Subject: [PATCH] rtl8xxxu: Debugging for RXFLTMAP0,1,2 Date: Wed, 21 Oct 2015 22:10:01 +0100 Message-Id: <1445461801-16742-1-git-send-email-br1@einfach.org> X-Mailer: git-send-email 1.9.1 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (postler.einfach.org [0.0.0.0]); Wed, 21 Oct 2015 21:10:07 +0000 (UTC) X-Virus-Scanned: clamav-milter 0.98.7 at bced1da0f74a X-Virus-Status: Clean 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 --- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 54 ++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c index 324ab8a..4d0e121 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c @@ -5657,7 +5657,58 @@ rtl8xxxu_rcr_read(void *data, u64 *val) return 0; } +static int +rtl8xxxu_RXFLTMAP0_write(void *data, u64 val) +{ + struct rtl8xxxu_priv *priv = data; + rtl8xxxu_write16(priv, REG_RXFLTMAP0, val); + return 0; +} + +static int +rtl8xxxu_RXFLTMAP0_read(void *data, u64 *val) +{ + struct rtl8xxxu_priv *priv = data; + *val = rtl8xxxu_read16(priv, REG_RXFLTMAP0); + return 0; +} + +static int +rtl8xxxu_RXFLTMAP1_write(void *data, u64 val) +{ + struct rtl8xxxu_priv *priv = data; + rtl8xxxu_write16(priv, REG_RXFLTMAP1, val); + return 0; +} + +static int +rtl8xxxu_RXFLTMAP1_read(void *data, u64 *val) +{ + struct rtl8xxxu_priv *priv = data; + *val = rtl8xxxu_read16(priv, REG_RXFLTMAP1); + return 0; +} + +static int +rtl8xxxu_RXFLTMAP2_write(void *data, u64 val) +{ + struct rtl8xxxu_priv *priv = data; + rtl8xxxu_write16(priv, REG_RXFLTMAP2, val); + return 0; +} + +static int +rtl8xxxu_RXFLTMAP2_read(void *data, u64 *val) +{ + struct rtl8xxxu_priv *priv = data; + *val = rtl8xxxu_read16(priv, REG_RXFLTMAP2); + return 0; +} + DEFINE_SIMPLE_ATTRIBUTE(fops_rcr, rtl8xxxu_rcr_read, rtl8xxxu_rcr_write, "0x%08llx\n"); +DEFINE_SIMPLE_ATTRIBUTE(fops_RXFLTMAP0, rtl8xxxu_RXFLTMAP0_read, rtl8xxxu_RXFLTMAP0_write, "0x%08llx\n"); +DEFINE_SIMPLE_ATTRIBUTE(fops_RXFLTMAP1, rtl8xxxu_RXFLTMAP1_read, rtl8xxxu_RXFLTMAP1_write, "0x%08llx\n"); +DEFINE_SIMPLE_ATTRIBUTE(fops_RXFLTMAP2, rtl8xxxu_RXFLTMAP2_read, rtl8xxxu_RXFLTMAP2_write, "0x%08llx\n"); void rtl8xxxu_init_debugfs(struct rtl8xxxu_priv *priv) { @@ -5668,6 +5719,9 @@ void rtl8xxxu_init_debugfs(struct rtl8xxxu_priv *priv) return; debugfs_create_file("rcr", S_IRUSR | S_IWUSR, dir, priv, &fops_rcr); + debugfs_create_file("RXFLTMAP0", S_IRUSR | S_IWUSR, dir, priv, &fops_RXFLTMAP0); + debugfs_create_file("RXFLTMAP1", S_IRUSR | S_IWUSR, dir, priv, &fops_RXFLTMAP1); + debugfs_create_file("RXFLTMAP2", S_IRUSR | S_IWUSR, dir, priv, &fops_RXFLTMAP2); } static int rtl8xxxu_probe(struct usb_interface *interface,