18 #include <linux/module.h>
29 static int seteaz(
int card,
unsigned long channel,
char *);
30 static int setl2(
int card,
unsigned long arg);
31 static int setl3(
int card,
unsigned long arg);
32 static int acceptb(
int card,
unsigned long channel);
38 static char *
commands[] = {
"ISDN_CMD_IOCTL",
60 static char *l3protos[] = {
"ISDN_PROTO_L3_TRANS" };
61 static char *l2protos[] = {
"ISDN_PROTO_L2_X75I",
62 "ISDN_PROTO_L2_X75UI",
63 "ISDN_PROTO_L2_X75BUI",
65 "ISDN_PROTO_L2_TRANS" };
72 for (i = 0; i <
cinst; i++) {
89 pr_debug(
"Invalid param: %d is not a valid card id\n", card);
105 pr_debug(
"%s: Failed to verify user space 0x%lx\n",
114 return hangup(card, cmd->
arg);
116 return answer(card, cmd->
arg);
118 return acceptb(card, cmd->
arg);
120 return clreaz(card, cmd->
arg);
124 return setl2(card, cmd->
arg);
126 return setl3(card, cmd->
arg);
141 pr_debug(
"Invalid param: %d is not a valid card id\n", card);
167 pr_debug(
"Invalid param: %d is not a valid card id\n", card);
178 (
unsigned char)channel + 1,
180 (
unsigned int *)Phone);
182 pr_debug(
"%s: Dialing %s on channel %lu\n",
183 sc_adapter[card]->devicename, Phone, channel + 1);
191 static int answer(
int card,
unsigned long channel)
194 pr_debug(
"Invalid param: %d is not a valid card id\n", card);
199 hangup(card, channel + 1);
204 pr_debug(
"%s: Answered incoming call on channel %lu\n",
212 static int hangup(
int card,
unsigned long channel)
217 pr_debug(
"Invalid param: %d is not a valid card id\n", card);
224 (
unsigned char)channel + 1,
227 pr_debug(
"%s: Sent HANGUP message to channel %lu\n",
235 static int setl2(
int card,
unsigned long arg)
241 pr_debug(
"Invalid param: %d is not a valid card id\n", card);
245 channel = arg & 0xff;
251 pr_debug(
"%s: Sending GetFrameFormat for channel %d\n",
256 (
unsigned char)channel + 1,
258 (
unsigned int *)protocol);
267 static int setl3(
int card,
unsigned long channel)
269 int protocol = channel >> 8;
272 pr_debug(
"Invalid param: %d is not a valid card id\n", card);
280 static int acceptb(
int card,
unsigned long channel)
283 pr_debug(
"Invalid param: %d is not a valid card id\n", card);
289 hangup(card, channel + 1);
293 pr_debug(
"%s: B-Channel connection accepted on channel %lu\n",
299 static int clreaz(
int card,
unsigned long arg)
302 pr_debug(
"Invalid param: %d is not a valid card id\n", card);
308 pr_debug(
"%s: EAZ List cleared for channel %lu\n",
313 static int seteaz(
int card,
unsigned long arg,
char *num)
316 pr_debug(
"Invalid param: %d is not a valid card id\n", card);
322 pr_debug(
"%s: EAZ list for channel %lu set to: %s\n",
333 pr_debug(
"Invalid param: %d is not a valid card id\n", card);