From: "John W. Linville" <linville@tuxdriver.com>
To: "Gábor Stefanik" <netrolller.3d@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] rtl8180: implement get_tsf op for mac80211
Date: Tue, 26 Jan 2010 21:10:40 -0500 [thread overview]
Message-ID: <20100127021040.GA15520@tuxdriver.com> (raw)
In-Reply-To: <69e28c911001261453r12a687eay3eac8669d3f0bfad@mail.gmail.com>
On Tue, Jan 26, 2010 at 11:53:38PM +0100, Gábor Stefanik wrote:
> On Tue, Jan 26, 2010 at 10:22 PM, John W. Linville
> <linville@tuxdriver.com> wrote:
> > Signed-off-by: John W. Linville <linville@tuxdriver.com>
> > ---
> > drivers/net/wireless/rtl818x/rtl8180_dev.c | 15 +++++++++++++++
> > 1 files changed, 15 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/net/wireless/rtl818x/rtl8180_dev.c b/drivers/net/wireless/rtl818x/rtl8180_dev.c
> > index 5a2b719..8dbb504 100644
> > --- a/drivers/net/wireless/rtl818x/rtl8180_dev.c
> > +++ b/drivers/net/wireless/rtl818x/rtl8180_dev.c
> > @@ -761,6 +761,20 @@ static void rtl8180_configure_filter(struct ieee80211_hw *dev,
> > rtl818x_iowrite32(priv, &priv->map->RX_CONF, priv->rx_conf);
> > }
> >
> > +static u64 rtl8180_get_tsf(struct ieee80211_hw *dev)
> > +{
> > + struct rtl8180_priv *priv = dev->priv;
> > + u32 tsftl;
> > + u64 tsft;
> > +
> > + tsftl = rtl818x_ioread32(priv, &priv->map->TSFT[0]);
> > + tsft = rtl818x_ioread32(priv, &priv->map->TSFT[1]);
> > + tsft <<= 32;
> > + tsft |= tsftl;
> > +
> > + return tsft;
> > +}
>
> Why not:
>
> struct rtl8180_priv *priv = dev->priv;
> u64 tsft;
>
> tsft = rtl818x_ioread32(priv, &priv->map->TSFT[0]);
> tfst |= rtl818x_ioread32(priv, &priv->map->TSFT[1]) << 32;
>
> return tsft;
What difference does it make?
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
next prev parent reply other threads:[~2010-01-27 2:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-26 21:22 [PATCH] rtl8180: implement get_tsf op for mac80211 John W. Linville
2010-01-26 22:53 ` Gábor Stefanik
2010-01-27 2:10 ` John W. Linville [this message]
2010-01-27 4:48 ` Gábor Stefanik
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=20100127021040.GA15520@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=linux-wireless@vger.kernel.org \
--cc=netrolller.3d@gmail.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.