From: Gertjan van Wingerde <gwingerde@gmail.com>
To: Ivo Van Doorn <ivdoorn@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com
Subject: Re: [PATCH v2 04/10] rt2x00: Move rt2x00debug_dump_frame declaration to rt2x00.h.
Date: Thu, 13 May 2010 13:04:42 +0200 [thread overview]
Message-ID: <4BEBDCCA.1040004@gmail.com> (raw)
In-Reply-To: <AANLkTilbzQ1_16u2hjkh6pFSnUmjg8bNRHiJf_g1hPPb@mail.gmail.com>
On 05/13/10 11:45, Ivo Van Doorn wrote:
> On Thu, May 13, 2010 at 11:36 AM, Gertjan van Wingerde
> <gwingerde@gmail.com> wrote:
>> This allows rt2x00debug_dump_frame to be used from everywhere.
>>
>> This is preparation for beacon writing clean ups.
>>
>> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
>> ---
>> drivers/net/wireless/rt2x00/rt2x00.h | 35 +++++++++++++++++++++++++++++
>> drivers/net/wireless/rt2x00/rt2x00debug.c | 1 +
>> drivers/net/wireless/rt2x00/rt2x00dump.h | 20 ----------------
>> drivers/net/wireless/rt2x00/rt2x00lib.h | 10 --------
>> 4 files changed, 36 insertions(+), 30 deletions(-)
>>
>> diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
>> index 6c1ff4c..1329f6c 100644
>> --- a/drivers/net/wireless/rt2x00/rt2x00.h
>> +++ b/drivers/net/wireless/rt2x00/rt2x00.h
>> @@ -1015,6 +1015,41 @@ struct queue_entry *rt2x00queue_get_entry(struct data_queue *queue,
>> enum queue_index index);
>>
>> /*
>> + * Debugfs handlers.
>> + */
>> +/**
>> + * enum rt2x00_dump_type - Frame type
>> + *
>> + * These values are used for the indicate the type of frame that is being
>> + * dumped:
>> + * @DUMP_FRAME_RXDONE: This frame has been received by the hardware.
>> + * @DUMP_FRAME_TX: This frame is queued for transmission to the hardware.
>> + * @DUMP_FRAME_TXDONE: This frame indicates the device has handled
>> + * the tx event which has either succeeded or failed. A frame
>> + * with this type should also have been reported with as a
>> + * %DUMP_FRAME_TX frame.
>> + * @DUMP_FRAME_BEACON: This beacon frame is queued for transmission to the
>> + * hardware.
>> + */
>> +enum rt2x00_dump_type {
>> + DUMP_FRAME_RXDONE = 1,
>> + DUMP_FRAME_TX = 2,
>> + DUMP_FRAME_TXDONE = 3,
>> + DUMP_FRAME_BEACON = 4,
>> +};
>
> Can't this stay in rt2x00dump.h? The rt2x00dump.h is part of the
> public interface towards
> userspace which can use these defined to determine the frame type.
> We can safely include this header in rt2x00.h since it contains the
> public interface anyway.
Hmpf, it looks like there is a lot of unspecified assumptions about the placement
of information in files and for some functionality. We must get better in documenting
this.
Although it is a bit strange to have a public interface to userspace defined this deep
in the kernel source tree, I'll move it back and put a big fat comment is there that this
actually is the public interface towards userspace and that all this information is to
be kept together.
>
>> +#ifdef CONFIG_RT2X00_LIB_DEBUGFS
>> +void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
>> + enum rt2x00_dump_type type, struct sk_buff *skb);
>> +#else
>> +static inline void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
>> + enum rt2x00_dump_type type,
>> + struct sk_buff *skb)
>> +{
>> +}
>> +#endif /* CONFIG_RT2X00_LIB_DEBUGFS */
>
> Could you add some documentation to this function?
>
Off course I can; although that is a bit more than just moving declarations ;-)
---
Gertjan.
next prev parent reply other threads:[~2010-05-13 11:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-13 9:36 [PATCH v2 00/10] rt2x00: Further fixes and cleanups Gertjan van Wingerde
2010-05-13 9:36 ` [PATCH v2 01/10] rt2x00: Consistently name skb frame descriptor skbdesc Gertjan van Wingerde
2010-05-13 9:36 ` [PATCH v2 02/10] rt2x00: In debugfs frame dumping allow the TX descriptor to be part of the skb Gertjan van Wingerde
2010-05-13 9:36 ` [PATCH v2 03/10] rt2x00: Dump beacons under a different identifier than TX frames Gertjan van Wingerde
2010-05-13 9:36 ` [PATCH v2 04/10] rt2x00: Move rt2x00debug_dump_frame declaration to rt2x00.h Gertjan van Wingerde
2010-05-13 9:45 ` Ivo Van Doorn
2010-05-13 11:04 ` Gertjan van Wingerde [this message]
2010-05-13 9:36 ` [PATCH v2 05/10] rt2x00: Fix beacon descriptor writing for rt61pci Gertjan van Wingerde
2010-05-13 9:36 ` [PATCH v2 06/10] rt2x00: Re-order tx descriptor writing code in drivers Gertjan van Wingerde
2010-05-13 9:36 ` [PATCH v2 07/10] rt2x00: Simplify TXD handling of beacons Gertjan van Wingerde
2010-05-13 9:36 ` [PATCH v2 08/10] rt2x00: Push beacon TX descriptor writing to drivers Gertjan van Wingerde
2010-05-13 9:46 ` Ivo Van Doorn
2010-05-13 9:36 ` [PATCH v2 09/10] rt2x00: Reverse calling order of bus write_tx_desc and driver write_tx_desc Gertjan van Wingerde
2010-05-13 9:47 ` Ivo Van Doorn
2010-05-13 9:36 ` [PATCH v2 10/10] rt2x00: Properly reserve room for descriptors in skbs Gertjan van Wingerde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BEBDCCA.1040004@gmail.com \
--to=gwingerde@gmail.com \
--cc=ivdoorn@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=users@rt2x00.serialmonkey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.