Linux wireless drivers development
 help / color / mirror / Atom feed
From: Nishant Sarmukadam <nishants@marvell.com>
To: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	Pradeep Nemavat <pnemavat@marvell.com>
Subject: Re: [PATCH V2 2/4] mwl8k: Add timestamp information for tx packets
Date: Thu, 21 Apr 2011 13:45:10 +0530	[thread overview]
Message-ID: <1303373710.24017.46.camel@localhost.localdomain> (raw)
In-Reply-To: <20110421074209.GX1897@wantstofly.org>


On Thu, 2011-04-21 at 00:42 -0700, Lennert Buytenhek wrote:
> On Tue, Apr 19, 2011 at 10:16:20PM +0530, Nishant Sarmukadam wrote:
> 
> > From: Pradeep Nemavat <pnemavat@marvell.com>
> > 
> > Timestamp tx packets using a HW micro-second timer.
> > This timestamp will be compared to the current timestamp
> > in the hardware and if the difference is greater than 500ms,
> > the packet will be dropped.
> > 
> > Signed-off-by: Pradeep Nemavat <pnemavat@marvell.com>
> > Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
> > ---
> >  drivers/net/wireless/mwl8k.c |   12 ++++++++++++
> >  1 files changed, 12 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
> > index 7968301..aca0139 100644
> > --- a/drivers/net/wireless/mwl8k.c
> > +++ b/drivers/net/wireless/mwl8k.c
> > @@ -1792,6 +1792,14 @@ static inline void mwl8k_tx_count_packet(struct ieee80211_sta *sta, u8 tid)
> >  		tx_stats->pkts++;
> >  }
> >  
> > +/* HW micro second timer register
> > + * located at offset 0xA600. This
> > + * will be used to timestamp tx
> > + * packets.
> > + */
> > +
> > +#define	MWL8K_HW_TIMER_REGISTER	(priv->regs + 0xA600)
> 
> 1. Ugly implicit 'priv' argument here. :-(
> 
>    Please just do something like:
> 
>  #define  MWL8K_A2H_INT_RX_READY                  (1 << 1)
>  #define  MWL8K_A2H_INT_TX_DONE                   (1 << 0)
> +
> +/* Misc registers */
> +#define MWL8K_HW_TIMER_REGISTER		0x0000a600
> 
>  #define MWL8K_A2H_EVENTS        (MWL8K_A2H_INT_DUMMY | \
>                                   MWL8K_A2H_INT_CHNL_SWITCHED | \
> 
>    and then just use it as ioread32(priv->regs + MWL8K_HW_TIMER_REGISTER).
> 
> 
Ok, will send out patch set V3 incorporating this change. 

> 2. Does this register exist on 8687/superfly3, or is it SJ only?

Yes, this does exist on 8687 and superfly3 as well. 



  reply	other threads:[~2011-04-21  8:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-19 16:46 [PATCH V2 1/4] mwl8k: Do not stop tx queues Nishant Sarmukadam
2011-04-19 16:46 ` [PATCH V2 2/4] mwl8k: Add timestamp information for tx packets Nishant Sarmukadam
2011-04-21  7:42   ` Lennert Buytenhek
2011-04-21  8:15     ` Nishant Sarmukadam [this message]
2011-04-19 16:46 ` [PATCH V2 3/4] mwl8k: Reserve buffers for tx management frames Nishant Sarmukadam
2011-04-21  7:44   ` Lennert Buytenhek
2011-04-21  8:15     ` Nishant Sarmukadam
2011-04-19 16:46 ` [PATCH V2 4/4] mwl8k: Enable life time expiry for tx packets in the hardware Nishant Sarmukadam
2011-04-21  7:38 ` [PATCH V2 1/4] mwl8k: Do not stop tx queues Lennert Buytenhek

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=1303373710.24017.46.camel@localhost.localdomain \
    --to=nishants@marvell.com \
    --cc=buytenh@wantstofly.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pnemavat@marvell.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox