* [PATCH] rtl8187: Add callback for get_tsf
@ 2010-01-26 23:45 Larry Finger
2010-01-26 23:57 ` Gábor Stefanik
2010-01-27 0:17 ` Hin-Tak Leung
0 siblings, 2 replies; 6+ messages in thread
From: Larry Finger @ 2010-01-26 23:45 UTC (permalink / raw)
To: John W Linville; +Cc: Herton Ronaldo Krzesinski, Hin-Tak Leung, linux-wireless
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
Index: wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/rtl818x/rtl8187_dev.c
+++ wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c
@@ -1265,6 +1265,14 @@ static int rtl8187_conf_tx(struct ieee80
return 0;
}
+static u64 rtl8187_get_tsf(struct ieee80211_hw *dev)
+{
+ struct rtl8187_priv *priv = dev->priv;
+
+ return rtl818x_ioread32(priv, &priv->map->TSFT[0]) |
+ (u64)(rtl818x_ioread32(priv, &priv->map->TSFT[1])) << 32;
+}
+
static const struct ieee80211_ops rtl8187_ops = {
.tx = rtl8187_tx,
.start = rtl8187_start,
@@ -1276,7 +1284,8 @@ static const struct ieee80211_ops rtl818
.prepare_multicast = rtl8187_prepare_multicast,
.configure_filter = rtl8187_configure_filter,
.conf_tx = rtl8187_conf_tx,
- .rfkill_poll = rtl8187_rfkill_poll
+ .rfkill_poll = rtl8187_rfkill_poll,
+ .get_tsf = rtl8187_get_tsf
};
static void rtl8187_eeprom_register_read(struct eeprom_93cx6 *eeprom)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] rtl8187: Add callback for get_tsf
2010-01-26 23:45 [PATCH] rtl8187: Add callback for get_tsf Larry Finger
@ 2010-01-26 23:57 ` Gábor Stefanik
2010-01-27 0:27 ` Hin-Tak Leung
2010-01-27 0:17 ` Hin-Tak Leung
1 sibling, 1 reply; 6+ messages in thread
From: Gábor Stefanik @ 2010-01-26 23:57 UTC (permalink / raw)
To: Larry Finger
Cc: John W Linville, Herton Ronaldo Krzesinski, Hin-Tak Leung,
linux-wireless
On Wed, Jan 27, 2010 at 12:45 AM, Larry Finger
<Larry.Finger@lwfinger.net> wrote:
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
>
> Index: wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/rtl818x/rtl8187_dev.c
> +++ wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c
> @@ -1265,6 +1265,14 @@ static int rtl8187_conf_tx(struct ieee80
> return 0;
> }
>
> +static u64 rtl8187_get_tsf(struct ieee80211_hw *dev)
> +{
> + struct rtl8187_priv *priv = dev->priv;
> +
> + return rtl818x_ioread32(priv, &priv->map->TSFT[0]) |
> + (u64)(rtl818x_ioread32(priv, &priv->map->TSFT[1])) << 32;
> +}
> +
> static const struct ieee80211_ops rtl8187_ops = {
> .tx = rtl8187_tx,
> .start = rtl8187_start,
> @@ -1276,7 +1284,8 @@ static const struct ieee80211_ops rtl818
> .prepare_multicast = rtl8187_prepare_multicast,
> .configure_filter = rtl8187_configure_filter,
> .conf_tx = rtl8187_conf_tx,
> - .rfkill_poll = rtl8187_rfkill_poll
> + .rfkill_poll = rtl8187_rfkill_poll,
> + .get_tsf = rtl8187_get_tsf
Please put a comma at the end of this line. It doesn't really matter,
but this is the accepted kernel coding style.
> };
>
> static void rtl8187_eeprom_register_read(struct eeprom_93cx6 *eeprom)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] rtl8187: Add callback for get_tsf
2010-01-26 23:45 [PATCH] rtl8187: Add callback for get_tsf Larry Finger
2010-01-26 23:57 ` Gábor Stefanik
@ 2010-01-27 0:17 ` Hin-Tak Leung
2010-01-27 0:28 ` Larry Finger
1 sibling, 1 reply; 6+ messages in thread
From: Hin-Tak Leung @ 2010-01-27 0:17 UTC (permalink / raw)
To: Larry Finger
Cc: John W Linville, Herton Ronaldo Krzesinski, Hin-Tak Leung,
linux-wireless
On Tue, Jan 26, 2010 at 11:45 PM, Larry Finger
<Larry.Finger@lwfinger.net> wrote:
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Presumably this new api is needed and used by some userland tools (iw
or other QoS-related tool?).
> ---
>
> Index: wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/rtl818x/rtl8187_dev.c
> +++ wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c
> @@ -1265,6 +1265,14 @@ static int rtl8187_conf_tx(struct ieee80
> return 0;
> }
>
> +static u64 rtl8187_get_tsf(struct ieee80211_hw *dev)
> +{
> + struct rtl8187_priv *priv = dev->priv;
> +
> + return rtl818x_ioread32(priv, &priv->map->TSFT[0]) |
> + (u64)(rtl818x_ioread32(priv, &priv->map->TSFT[1])) << 32;
> +}
> +
> static const struct ieee80211_ops rtl8187_ops = {
> .tx = rtl8187_tx,
> .start = rtl8187_start,
> @@ -1276,7 +1284,8 @@ static const struct ieee80211_ops rtl818
> .prepare_multicast = rtl8187_prepare_multicast,
> .configure_filter = rtl8187_configure_filter,
> .conf_tx = rtl8187_conf_tx,
> - .rfkill_poll = rtl8187_rfkill_poll
> + .rfkill_poll = rtl8187_rfkill_poll,
> + .get_tsf = rtl8187_get_tsf
> };
>
> static void rtl8187_eeprom_register_read(struct eeprom_93cx6 *eeprom)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] rtl8187: Add callback for get_tsf
2010-01-26 23:57 ` Gábor Stefanik
@ 2010-01-27 0:27 ` Hin-Tak Leung
0 siblings, 0 replies; 6+ messages in thread
From: Hin-Tak Leung @ 2010-01-27 0:27 UTC (permalink / raw)
To: Gábor Stefanik
Cc: Larry Finger, John W Linville, Herton Ronaldo Krzesinski,
Hin-Tak Leung, linux-wireless
2010/1/26 Gábor Stefanik <netrolller.3d@gmail.com>:
> On Wed, Jan 27, 2010 at 12:45 AM, Larry Finger
> <Larry.Finger@lwfinger.net> wrote:
>> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
>> ---
>>
>> Index: wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c
>> ===================================================================
>> --- wireless-testing.orig/drivers/net/wireless/rtl818x/rtl8187_dev.c
>> +++ wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c
>> @@ -1265,6 +1265,14 @@ static int rtl8187_conf_tx(struct ieee80
>> return 0;
>> }
>>
>> +static u64 rtl8187_get_tsf(struct ieee80211_hw *dev)
>> +{
>> + struct rtl8187_priv *priv = dev->priv;
>> +
>> + return rtl818x_ioread32(priv, &priv->map->TSFT[0]) |
>> + (u64)(rtl818x_ioread32(priv, &priv->map->TSFT[1])) << 32;
>> +}
>> +
>> static const struct ieee80211_ops rtl8187_ops = {
>> .tx = rtl8187_tx,
>> .start = rtl8187_start,
>> @@ -1276,7 +1284,8 @@ static const struct ieee80211_ops rtl818
>> .prepare_multicast = rtl8187_prepare_multicast,
>> .configure_filter = rtl8187_configure_filter,
>> .conf_tx = rtl8187_conf_tx,
>> - .rfkill_poll = rtl8187_rfkill_poll
>> + .rfkill_poll = rtl8187_rfkill_poll,
>> + .get_tsf = rtl8187_get_tsf
>
> Please put a comma at the end of this line. It doesn't really matter,
> but this is the accepted kernel coding style.
Hmm, interesting - is that written down somewhere? Indeed a quick greb
through the wireless driver source says
most have a "," (but not always). OTOH, I seem to recall that one of
gcc's warning options will complain about empy elements in a list like
that - e.g. {a,b,c,} can trigger a gcc warning message if one of
-W<something> is specified.
>
>> };
>>
>> static void rtl8187_eeprom_register_read(struct eeprom_93cx6 *eeprom)
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
>
>
> --
> Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] rtl8187: Add callback for get_tsf
2010-01-27 0:17 ` Hin-Tak Leung
@ 2010-01-27 0:28 ` Larry Finger
2010-01-27 9:17 ` Johannes Berg
0 siblings, 1 reply; 6+ messages in thread
From: Larry Finger @ 2010-01-27 0:28 UTC (permalink / raw)
To: Hin-Tak Leung
Cc: John W Linville, Herton Ronaldo Krzesinski, Hin-Tak Leung,
linux-wireless
On 01/26/2010 06:17 PM, Hin-Tak Leung wrote:
> On Tue, Jan 26, 2010 at 11:45 PM, Larry Finger
> <Larry.Finger@lwfinger.net> wrote:
>> Signed-off-by: Larry Finger<Larry.Finger@lwfinger.net>
>
> Acked-by: Hin-Tak Leung<htl10@users.sourceforge.net>
>
> Presumably this new api is needed and used by some userland tools (iw
> or other QoS-related tool?).
From include/net/mac80211.h: "It is currently used for IBSS mode BSSID merging
and debugging". Implementation of this callback is voluntary.
Larry
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] rtl8187: Add callback for get_tsf
2010-01-27 0:28 ` Larry Finger
@ 2010-01-27 9:17 ` Johannes Berg
0 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2010-01-27 9:17 UTC (permalink / raw)
To: Larry Finger
Cc: Hin-Tak Leung, John W Linville, Herton Ronaldo Krzesinski,
Hin-Tak Leung, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 455 bytes --]
On Tue, 2010-01-26 at 18:28 -0600, Larry Finger wrote:
> > Presumably this new api is needed and used by some userland tools (iw
> > or other QoS-related tool?).
>
> From include/net/mac80211.h: "It is currently used for IBSS mode BSSID merging
> and debugging". Implementation of this callback is voluntary.
In fact, if you give mac80211 TSF timestamps with each packet, it will
never be used other than from the debugfs file.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-01-27 9:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-26 23:45 [PATCH] rtl8187: Add callback for get_tsf Larry Finger
2010-01-26 23:57 ` Gábor Stefanik
2010-01-27 0:27 ` Hin-Tak Leung
2010-01-27 0:17 ` Hin-Tak Leung
2010-01-27 0:28 ` Larry Finger
2010-01-27 9:17 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox