Author: adrian
Date: Thu Jul  8 14:34:15 2010
New Revision: 209802
URL: http://svn.freebsd.org/changeset/base/209802

Log:
  Introduce a sysctl block for if_arge and, for now, a blank debug sysctl
  placeholder for later.
  
  Add in a missing FreeBSD ID string.

Modified:
  head/sys/mips/atheros/if_arge.c
  head/sys/mips/atheros/if_argevar.h

Modified: head/sys/mips/atheros/if_arge.c
==============================================================================
--- head/sys/mips/atheros/if_arge.c     Thu Jul  8 14:29:23 2010        
(r209801)
+++ head/sys/mips/atheros/if_arge.c     Thu Jul  8 14:34:15 2010        
(r209802)
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/module.h>
 #include <sys/socket.h>
 #include <sys/taskqueue.h>
+#include <sys/sysctl.h>
 
 #include <net/if.h>
 #include <net/if_arp.h>
@@ -198,6 +199,18 @@ arge_probe(device_t dev)
        return (0);
 }
 
+static void
+arge_attach_sysctl(device_t dev)
+{
+       struct arge_softc *sc = device_get_softc(dev);
+       struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(dev);
+       struct sysctl_oid *tree = device_get_sysctl_tree(dev);
+
+       SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+               "debug", CTLFLAG_RW, &sc->arge_debug, 0,
+               "arge interface debugging flags");
+}
+
 static int
 arge_attach(device_t dev)
 {
@@ -457,6 +470,9 @@ arge_attach(device_t dev)
                goto fail;
        }
 
+       /* setup sysctl variables */
+       arge_attach_sysctl(dev);
+
 fail:
        if (error) 
                arge_detach(dev);

Modified: head/sys/mips/atheros/if_argevar.h
==============================================================================
--- head/sys/mips/atheros/if_argevar.h  Thu Jul  8 14:29:23 2010        
(r209801)
+++ head/sys/mips/atheros/if_argevar.h  Thu Jul  8 14:34:15 2010        
(r209802)
@@ -23,6 +23,8 @@
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
+ *
+ * $FreeBSD$
  */
 
 #ifndef __IF_ARGEVAR_H__
@@ -152,6 +154,7 @@ struct arge_softc {
        uint32_t                arge_pll_reg;
        uint32_t                arge_pll_reg_shift;
        int                     arge_if_flags;
+       uint32_t                arge_debug;
 };
 
 #endif /* __IF_ARGEVAR_H__ */
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to