Commit Graph

88 Commits

Author SHA1 Message Date
martin 028c339458 If we don't have a source telephone number configured, do not send
a IEI_CALLINGPN information element.
2004-05-06 21:11:04 +00:00
itojun d2f1c029b9 kill sprintf, use snprintf 2004-04-21 18:40:37 +00:00
matt 29fd5f0232 Use M_ZERO as appropriate. Use M_WAITOK instead of 0. 2004-04-18 19:21:06 +00:00
pooka e9a93a44e9 Pass the number of B channels down in the info ioctl. 2004-03-28 14:27:26 +00:00
martin acbc97c970 Avoid NULL pointer dereferences on incomplete setup by userland.
Fixes PR kern/24807.
2004-03-21 16:29:40 +00:00
wiz e365329be5 Spell length with h after t. Inspired by a commit by brad@openbsd. 2004-02-13 18:02:05 +00:00
keihan b8702f530b netbsd.org -> NetBSD.org
This was the last commit of this kind to src/sys, which is now totally
"NetBSD.org clean".  Thanks for the patiance, and sorry for all the commits.
2003-12-04 13:57:30 +00:00
pooka aaff23d58d Calculate controller number based on the controller number stored in
the soft context instead of hardcoding it to "1".  Now we have a better
chance of working with multiple controllers.
2003-10-28 17:02:54 +00:00
pooka a1dd1bf617 g/c unused var bch from a few places 2003-10-03 16:47:57 +00:00
pooka 2491e652ce When processing a connect indication, seek out the appropriate
l3drv and add that information to the call descriptor.  This causes
us to not crash when receiving calls.
2003-10-03 16:46:32 +00:00
pooka dae7af8b24 Ready the kernel side of i4b for primary rate interface support by
removing assumptions that there are only two B channels and by
adding support for a varying number of channels.

Due to this, rename previously used isdn identified "bri" to "isdnif",
which better describes the current situation.
2003-10-03 16:38:44 +00:00
martin 6b0c555300 On physical layer errors, mark deactivated call descriptors correctly.
Spotted by Antti Kantee.
2003-09-26 22:20:12 +00:00
pooka 3a930307fc When releasing all cd's associated with a controller, don't stop
after finding one.
2003-09-26 21:05:33 +00:00
pooka b6d1da0696 RCSID 2003-09-26 15:17:23 +00:00
pooka 4952ffa71e Give iavc a bit in the debug bitmask society. 2003-09-25 15:54:41 +00:00
pooka 6a7a858eb2 Add a support layer for the ISDN CAPI (http://www.capi.org/), which should
make it pretty simple to write drivers for cards which conform to CAPI.

This code was originally written by Juha-Matti Liukkonen <jml@cubical.fi>
of Cubical Solutions Ltd. for FreeBSD, and was now adapted to NetBSD
by myself for the same company.
2003-09-25 15:34:38 +00:00
pooka 0553a30d48 Make the number of maximum b-channels provided by a controller a macro
and base the calculation of the amount of call descriptors on that.

Define MAX_BCHAN as 2 for now, since we don't support primary rate (yet).
2003-09-25 15:16:08 +00:00
pooka 0388df434a add number of b-channels provided to controller info request 2003-09-25 15:11:21 +00:00
pooka 3a76a8a2df Add a hack to avoid calling l2 functions for active ISDN cards. They
expect l1_token to contain the l2_token when it indeed is the l1_token
for active cards, which don't use l2.

Martin promised to look into really fixing this a few weeks from now .. ;)
2003-09-25 14:17:57 +00:00
pooka 4915f83148 Make isdntel hangup via /dev/isdnteld work by digging out the correct
soft context and using it instead of the incorrect one.

Also, don't bother to crash the kernel if we try to hangup a non-connected
dialer, simply return an error.
2003-09-23 14:15:59 +00:00
martin c52fa54bfe Make it compile on alpha. 2003-08-12 19:49:27 +00:00
itojun a812112ebc use strlcpy 2003-05-16 05:12:32 +00:00
martin b0290dfbc4 Change a integer value that is passed via a void* in an ioctl() like
function to a intptr_t. This makes it compile on sparc64.
Addresses parts of PR kern/21448 by Frank Kardel.
2003-05-08 21:15:13 +00:00
drochner 93c6f5d089 Rename the IPR_VJ option into IRIP_VJ (as irip(4) told all the time),
create an opt_ header and make the dependency on slcompress.c more exact.
(OK by martin)
2003-04-11 14:45:27 +00:00
wiz 68caa698b2 Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.
2003-04-06 18:20:07 +00:00
kristerw 83b5a18c99 Restore the system priority level in case of errors.
OK:ed by martin.
2002-12-28 21:09:14 +00:00
drochner cc12f9fb4e remove ttydefchars declaration which was wrong anyway,
a correct one is now pulled in from <sys/ttydefaults.h>
2002-12-10 13:50:10 +00:00
lukem 0635de35a3 Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more. 2002-11-26 23:30:07 +00:00
christos 729ccbc9cd si_ -> sel_ 2002-11-26 19:49:00 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
martin 2fe85a6623 Uniformly pass a "struct isdn_l3_driver *" through layer 2, so we
do not have to search for that driver later while we already knew it
at layer 1.
2002-05-21 10:31:10 +00:00
martin 3d49645449 Remove debug printf accidently commited.
Noticed by Thomas Klausner.
2002-05-17 09:28:34 +00:00
wiz da0b574ae0 Comment out token after #endif. 2002-05-16 19:30:41 +00:00
martin d1a8d9aaa3 Sync layer 3 B-channel accounting with layer 2.
Sprinkle some update_controller_leds() calls to places that change this
state.
2002-05-02 18:56:55 +00:00
drochner 14a494bc05 return ENXIO if a driver cannot be found 2002-04-17 15:23:47 +00:00
martin e4998611e9 Fix copyright notice. 2002-04-14 12:24:26 +00:00
martin a56dc0602f Document a puzzling assignement. 2002-04-12 06:21:57 +00:00
martin 30453d09bc Print hardware device name in layer 1 debug output. 2002-04-09 20:48:21 +00:00
martin 7486d374b8 Fix typo in debug message. 2002-04-09 20:47:24 +00:00
martin bf8b82a971 Move isic_intr_enable to a file not depending on the HSCX driver, so
ifpci-only configurations build again.

Remove the now unused controller enable function from the passive drivers
l2<->l1 interface.
2002-04-01 12:14:26 +00:00
martin ed4ba39c75 Add a command to layer 1 drivers to update LED state for controllers that
have status LEDs.
2002-03-30 17:54:17 +00:00
martin 4afabfd9b3 Cache a pointer to layer 3 driver state in a call descriptor.
Use this instead of expensive isdn_find_l3_by_bri() calls where possible.
2002-03-30 11:43:33 +00:00
martin e14f4779db Avoid duplicate expensive lookups by passing a pointer to the call
descriptor/a pointer to the layer 3 state directly to driver functions,
instead of their ID/index.
2002-03-30 11:15:41 +00:00
martin 3ba8ce25ee Pass subaddresses and calling party number type/plan to userland on
incoming calls.
2002-03-30 07:08:13 +00:00
martin f5e2c967fc Split BRI attaching into two phases, so lower layer drivers can get their
BRI identifier and L3 driver state early on, then finish initializing and
announce the controller to userland when it's ready.
2002-03-29 20:29:53 +00:00
martin ea03e4fc22 Better check ioctl parameters and reject requests for not (currently)
present controllers.

Clear our TEI on persistent (physical) deactivation, instead of setting it
to a bogus 0.
2002-03-29 15:01:27 +00:00
martin ebd73ccd11 After Jason Thorpe explained to me how it is supposed to work, implement
(de)activate for pcmcia cards.
Implement detach/(de)activate for PCI cards.
Clean up internal state (free call-descriptors) if a controller is
detached while it has open connections.
2002-03-27 07:39:35 +00:00
martin 9611ef91c3 Cosmetical nitpick: initialize TEI to -1 instead of 0, to prevent
controllers that don't touch it at all to display a bogus, but
theoreticaly valid value.
2002-03-25 20:28:41 +00:00