Remove a leftover from the BRI registry at layer 2.
Initialize layer 2's idea of it's BRI id after attaching.
This commit is contained in:
parent
963ecd396e
commit
909e313a80
|
@ -27,14 +27,14 @@
|
||||||
* i4b_isic.c - global isic stuff
|
* i4b_isic.c - global isic stuff
|
||||||
* ==============================
|
* ==============================
|
||||||
*
|
*
|
||||||
* $Id: isic.c,v 1.5 2002/03/25 12:07:33 martin Exp $
|
* $Id: isic.c,v 1.6 2002/03/25 14:44:46 martin Exp $
|
||||||
*
|
*
|
||||||
* last edit-date: [Fri Jan 5 11:36:10 2001]
|
* last edit-date: [Fri Jan 5 11:36:10 2001]
|
||||||
*
|
*
|
||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: isic.c,v 1.5 2002/03/25 12:07:33 martin Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: isic.c,v 1.6 2002/03/25 14:44:46 martin Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/ioccom.h>
|
#include <sys/ioccom.h>
|
||||||
|
@ -273,9 +273,13 @@ isic_recover(struct isic_softc *sc)
|
||||||
int
|
int
|
||||||
isic_attach_bri(struct isic_softc *sc, const char *cardname, const struct isdn_layer1_bri_driver *dchan_driver)
|
isic_attach_bri(struct isic_softc *sc, const char *cardname, const struct isdn_layer1_bri_driver *dchan_driver)
|
||||||
{
|
{
|
||||||
sc->sc_l3token = isdn_attach_bri(sc->sc_dev.dv_xname, cardname, &sc->sc_l2, &isic_l3_driver);
|
struct isdn_l3_driver * drv;
|
||||||
|
|
||||||
|
drv = isdn_attach_bri(sc->sc_dev.dv_xname, cardname, &sc->sc_l2, &isic_l3_driver);
|
||||||
|
sc->sc_l3token = drv;
|
||||||
sc->sc_l2.driver = dchan_driver;
|
sc->sc_l2.driver = dchan_driver;
|
||||||
sc->sc_l2.l1_token = sc;
|
sc->sc_l2.l1_token = sc;
|
||||||
|
sc->sc_l2.bri = drv->bri;
|
||||||
isdn_layer2_status_ind(&sc->sc_l2, STI_ATTACH, 1);
|
isdn_layer2_status_ind(&sc->sc_l2, STI_ATTACH, 1);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,14 +35,14 @@
|
||||||
* Fritz!Card PCI specific routines for isic driver
|
* Fritz!Card PCI specific routines for isic driver
|
||||||
* ------------------------------------------------
|
* ------------------------------------------------
|
||||||
*
|
*
|
||||||
* $Id: isic_pci_avm_fritz_pci.c,v 1.7 2002/03/24 20:35:53 martin Exp $
|
* $Id: isic_pci_avm_fritz_pci.c,v 1.8 2002/03/25 14:44:46 martin Exp $
|
||||||
*
|
*
|
||||||
* last edit-date: [Fri Jan 5 11:38:58 2001]
|
* last edit-date: [Fri Jan 5 11:38:58 2001]
|
||||||
*
|
*
|
||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: isic_pci_avm_fritz_pci.c,v 1.7 2002/03/24 20:35:53 martin Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: isic_pci_avm_fritz_pci.c,v 1.8 2002/03/25 14:44:46 martin Exp $");
|
||||||
|
|
||||||
#include "opt_isicpci.h"
|
#include "opt_isicpci.h"
|
||||||
#ifdef ISICPCI_AVM_A1
|
#ifdef ISICPCI_AVM_A1
|
||||||
|
@ -804,6 +804,7 @@ void
|
||||||
isic_attach_fritzPci(struct pci_isic_softc *psc, struct pci_attach_args *pa)
|
isic_attach_fritzPci(struct pci_isic_softc *psc, struct pci_attach_args *pa)
|
||||||
{
|
{
|
||||||
struct isic_softc *sc = &psc->sc_isic;
|
struct isic_softc *sc = &psc->sc_isic;
|
||||||
|
struct isdn_l3_drvier *drv;
|
||||||
u_int v;
|
u_int v;
|
||||||
|
|
||||||
/* setup io mappings */
|
/* setup io mappings */
|
||||||
|
@ -936,10 +937,12 @@ isic_attach_fritzPci(struct pci_isic_softc *psc, struct pci_attach_args *pa)
|
||||||
sc->sc_freeflag2 = 0;
|
sc->sc_freeflag2 = 0;
|
||||||
|
|
||||||
/* init higher protocol layers */
|
/* init higher protocol layers */
|
||||||
sc->sc_l3token = isdn_attach_bri(sc->sc_dev.dv_xname,
|
drv = isdn_attach_bri(sc->sc_dev.dv_xname,
|
||||||
"AVM Fritz!PCI", &sc->sc_l2, &ifpci_l3_driver);
|
"AVM Fritz!PCI", &sc->sc_l2, &ifpci_l3_driver);
|
||||||
|
sc->sc_l3token = drv;
|
||||||
sc->sc_l2.driver = &isic_std_driver;
|
sc->sc_l2.driver = &isic_std_driver;
|
||||||
sc->sc_l2.l1_token = sc;
|
sc->sc_l2.l1_token = sc;
|
||||||
|
sc->sc_l2.bri = drv->bri;
|
||||||
isdn_layer2_status_ind(&sc->sc_l2, STI_ATTACH, 1);
|
isdn_layer2_status_ind(&sc->sc_l2, STI_ATTACH, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: i4b_l2.h,v 1.3 2002/03/24 20:35:58 martin Exp $ */
|
/* $NetBSD: i4b_l2.h,v 1.4 2002/03/25 14:44:46 martin Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
|
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
* i4b_l2.h - ISDN layer 2 (Q.921) definitions
|
* i4b_l2.h - ISDN layer 2 (Q.921) definitions
|
||||||
* ---------------------------------------------
|
* ---------------------------------------------
|
||||||
*
|
*
|
||||||
* $Id: i4b_l2.h,v 1.3 2002/03/24 20:35:58 martin Exp $
|
* $Id: i4b_l2.h,v 1.4 2002/03/25 14:44:46 martin Exp $
|
||||||
*
|
*
|
||||||
* $FreeBSD$
|
* $FreeBSD$
|
||||||
*
|
*
|
||||||
|
@ -41,7 +41,6 @@
|
||||||
#define _I4B_L2_H_
|
#define _I4B_L2_H_
|
||||||
|
|
||||||
typedef struct l2_softc {
|
typedef struct l2_softc {
|
||||||
SIMPLEQ_ENTRY(l2_softc) briq;
|
|
||||||
const struct isdn_layer1_bri_driver * driver;
|
const struct isdn_layer1_bri_driver * driver;
|
||||||
void* l1_token;
|
void* l1_token;
|
||||||
int bri;
|
int bri;
|
||||||
|
|
Loading…
Reference in New Issue