Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Make it look more like rt2560.c
details: https://anonhg.NetBSD.org/src/rev/acf8e72afd32
branches: trunk
changeset: 345017:acf8e72afd32
user: christos <christos%NetBSD.org@localhost>
date: Mon May 02 17:37:23 2016 +0000
description:
Make it look more like rt2560.c
diffstat:
sys/dev/ic/rt2860.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diffs (52 lines):
diff -r 3ca43fc71aae -r acf8e72afd32 sys/dev/ic/rt2860.c
--- a/sys/dev/ic/rt2860.c Mon May 02 17:33:03 2016 +0000
+++ b/sys/dev/ic/rt2860.c Mon May 02 17:37:23 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rt2860.c,v 1.5 2016/05/01 10:49:59 nonaka Exp $ */
+/* $NetBSD: rt2860.c,v 1.6 2016/05/02 17:37:23 christos Exp $ */
/* $OpenBSD: rt2860.c,v 1.90 2016/04/13 10:49:26 mpi Exp $ */
/*-
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.5 2016/05/01 10:49:59 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.6 2016/05/02 17:37:23 christos Exp $");
#include <sys/param.h>
#include <sys/sockio.h>
@@ -364,6 +364,7 @@
ifp->if_ioctl = rt2860_ioctl;
ifp->if_start = rt2860_start;
ifp->if_watchdog = rt2860_watchdog;
+ IFQ_SET_READY(&ifp->if_snd);
memcpy(ifp->if_xname, device_xname(sc->sc_dev), IFNAMSIZ);
if_attach(ifp);
@@ -393,6 +394,14 @@
sc->sc_txtap_len = sizeof sc->sc_txtapu;
sc->sc_txtap.wt_ihdr.it_len = htole16(sc->sc_txtap_len);
sc->sc_txtap.wt_ihdr.it_present = htole32(RT2860_TX_RADIOTAP_PRESENT);
+
+ ieee80211_announce(ic);
+
+ if (pmf_device_register(sc->sc_dev, NULL, NULL))
+ pmf_class_network_register(sc->sc_dev, ifp);
+ else
+ aprint_error_dev(sc->sc_dev,
+ "couldn't establish power handler\n");
}
int
@@ -402,6 +411,10 @@
struct ifnet *ifp = &sc->sc_if;
int qid;
+ pmf_device_deregister(sc->sc_dev);
+
+ rt2860_stop(ifp, 1);
+
ieee80211_ifdetach(&sc->sc_ic); /* free all nodes */
if_detach(ifp);
Home |
Main Index |
Thread Index |
Old Index