summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksim Yevmenkin <emax@FreeBSD.org>2004-11-02 20:01:42 +0000
committerMaksim Yevmenkin <emax@FreeBSD.org>2004-11-02 20:01:42 +0000
commitcff5b6df1cf46b61fcdb15cee7eb49dc081b86c7 (patch)
tree57c0eb93819d33a50986bad6d915016d71967f8f
parentbb4641e28b702a48adbbb7548b4e1b476a9948cb (diff)
Notes
-rw-r--r--sys/netgraph/bluetooth/drivers/h4/ng_h4.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/netgraph/bluetooth/drivers/h4/ng_h4.c b/sys/netgraph/bluetooth/drivers/h4/ng_h4.c
index 1710a4c535cf..c532ac063990 100644
--- a/sys/netgraph/bluetooth/drivers/h4/ng_h4.c
+++ b/sys/netgraph/bluetooth/drivers/h4/ng_h4.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: ng_h4.c,v 1.5 2003/05/10 05:51:25 max Exp $
+ * $Id: ng_h4.c,v 1.7 2004/08/23 18:08:15 max Exp $
* $FreeBSD$
*
* Based on:
@@ -70,6 +70,8 @@
*****************************************************************************
*****************************************************************************/
+NET_NEEDS_GIANT("ng_h4");
+
/* MALLOC define */
#ifndef NG_SEPARATE_MALLOC
MALLOC_DEFINE(M_NETGRAPH_H4, "netgraph_h4", "Netgraph Bluetooth H4 node");
@@ -199,7 +201,7 @@ ng_h4_open(struct cdev *dev, struct tty *tp)
/* Set back pointers */
NG_NODE_SET_PRIVATE(sc->node, sc);
- tp->t_sc = (caddr_t) sc;
+ tp->t_lsc = (caddr_t) sc;
/* The node has to be a WRITER because data can change node status */
NG_NODE_FORCE_WRITER(sc->node);
@@ -228,7 +230,7 @@ out:
static int
ng_h4_close(struct tty *tp, int flag)
{
- ng_h4_info_p sc = (ng_h4_info_p) tp->t_sc;
+ ng_h4_info_p sc = (ng_h4_info_p) tp->t_lsc;
int s;
s = spltty(); /* XXX */
@@ -236,7 +238,7 @@ ng_h4_close(struct tty *tp, int flag)
ttyflush(tp, FREAD | FWRITE);
clist_free_cblocks(&tp->t_outq);
if (sc != NULL) {
- tp->t_sc = NULL;
+ tp->t_lsc = NULL;
if (sc->node != NULL) {
if (sc->flags & NG_H4_TIMEOUT)
@@ -285,7 +287,7 @@ static int
ng_h4_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag,
struct thread *td)
{
- ng_h4_info_p sc = (ng_h4_info_p) tp->t_sc;
+ ng_h4_info_p sc = (ng_h4_info_p) tp->t_lsc;
int s, error = 0;
s = spltty(); /* XXX */
@@ -326,7 +328,7 @@ ng_h4_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag,
static int
ng_h4_input(int c, struct tty *tp)
{
- ng_h4_info_p sc = (ng_h4_info_p) tp->t_sc;
+ ng_h4_info_p sc = (ng_h4_info_p) tp->t_lsc;
if (sc == NULL || tp != sc->tp ||
sc->node == NULL || NG_NODE_NOT_VALID(sc->node))
@@ -546,7 +548,7 @@ ng_h4_input(int c, struct tty *tp)
static int
ng_h4_start(struct tty *tp)
{
- ng_h4_info_p sc = (ng_h4_info_p) tp->t_sc;
+ ng_h4_info_p sc = (ng_h4_info_p) tp->t_lsc;
if (sc == NULL || tp != sc->tp ||
sc->node == NULL || NG_NODE_NOT_VALID(sc->node))