#12 New wake up condition: wake-after-delay

closed
None
5
2014-08-22
2008-01-16
No

The libertas wireless module provides a programmable wake up condition: the host configures a wake up delay, and the wireless module will raise a wake up signal after the delay expires. This is useful for testing the wake up sequence without having to generate wake up traffic.
Could you consider the attached patch for inclusion?

Thanks,

Javier

From: Javier Cardona <javier@cozybit.com>
Date: Wed, 16 Jan 2008 11:08:40 -0800
Subject: [PATCH] New wake-after-delay option.

A wake-after-delay wake up condition allows testing the wake up sequence without having to generate wireless traffic.
---
ethtool-copy.h | 1 +
ethtool.c | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/ethtool-copy.h b/ethtool-copy.h
index 3a63224..1efe77a 100644
--- a/ethtool-copy.h
+++ b/ethtool-copy.h
@@ -500,5 +500,6 @@ struct ethtool_ops {
#define WAKE_ARP (1 << 4)
#define WAKE_MAGIC (1 << 5)
#define WAKE_MAGICSECURE (1 << 6) /* only meaningful if WAKE_MAGIC */
+#define WAKE_DELAY (1 << 7) /* wake after delay, for testing */

#endif /* _LINUX_ETHTOOL_H */
diff --git a/ethtool.c b/ethtool.c
index 3adf843..b01d16d 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -106,7 +106,7 @@ static struct option {
" [ advertise %%x ]\n"
" [ phyad %%d ]\n"
" [ xcvr internal|external ]\n"
- " [ wol p|u|m|b|a|g|s|d... ]\n"
+ " [ wol p|u|m|b|a|g|s|y|d... ]\n"
" [ sopass %%x:%%x:%%x:%%x:%%x:%%x ]\n"
" [ msglvl %%d ] \n" },
{ "-a", "--show-pause", MODE_GPAUSE, "Show pause options" },
@@ -942,6 +942,9 @@ static int parse_wolopts(char *optstr, u32 *data)
case 's':
*data |= WAKE_MAGICSECURE;
break;
+ case 'y':
+ *data |= WAKE_DELAY;
+ break;
case 'd':
*data = 0;
break;
@@ -975,6 +978,8 @@ static char *unparse_wolopts(int wolopts)
*p++ = 'g';
if (wolopts & WAKE_MAGICSECURE)
*p++ = 's';
+ if (wolopts & WAKE_DELAY)
+ *p++ = 'y';
} else {

Discussion

  • Javier Cardona

    Javier Cardona - 2008-01-16
    • assigned_to: nobody --> jgarzik
     
  • Jeff Garzik

    Jeff Garzik - 2009-03-06
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks