• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/isdn/capi/

Lines Matching defs:cmsg

505 static void send_message(capidrv_contr * card, _cmsg * cmsg)
509 capi_cmsg2message(cmsg, cmsg->buf);
510 len = CAPIMSG_LEN(cmsg->buf);
512 memcpy(skb_put(skb, len), cmsg->buf, len);
654 static _cmsg cmsg;
660 capi_fill_DISCONNECT_REQ(&cmsg,
669 send_message(card, &cmsg);
763 static void handle_controller(_cmsg * cmsg)
765 capidrv_contr *card = findcontrbynumber(cmsg->adr.adrController & 0x7f);
769 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
770 cmsg->adr.adrController & 0x7f);
773 switch (CAPICMD(cmsg->Command, cmsg->Subcommand)) {
778 card->contrnr, cmsg->Info, capi_info2str(cmsg->Info), card->cipmask);
779 if (cmsg->Info) {
789 if ( cmsg->ManuID == 0x214D5641
790 && cmsg->Class == 0
791 && cmsg->Function == 1) {
792 u8 *data = cmsg->ManuData+3;
793 u16 len = cmsg->ManuData[0];
797 len = (cmsg->ManuData[1] | (cmsg->ManuData[2] << 8));
816 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
817 cmsg->adr.adrController, layer);
822 if (cmsg->ManuID == 0x214D5641) {
824 switch (cmsg->Class) {
833 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
834 cmsg->adr.adrController,
835 cmsg->Function, s);
851 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
852 cmsg->adr.adrController);
859 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
860 cmsg->adr.adrController);
863 static void handle_incoming_call(capidrv_contr * card, _cmsg * cmsg)
880 plcip->plci = cmsg->adr.adrPLCI;
888 cmsg->CallingPartyNumber + 3,
889 cmsg->CallingPartyNumber[0] - 2);
891 cmsg->CalledPartyNumber + 2,
892 cmsg->CalledPartyNumber[0] - 1);
893 cmd.parm.setup.si1 = cip2si1(cmsg->CIPValue);
894 cmd.parm.setup.si2 = cip2si2(cmsg->CIPValue);
895 cmd.parm.setup.plan = cmsg->CallingPartyNumber[1];
896 cmd.parm.setup.screen = cmsg->CallingPartyNumber[2];
920 capi_cmsg_answer(cmsg);
921 cmsg->Reject = 1; /* ignore */
922 send_message(card, cmsg);
948 capi_fill_ALERT_REQ(cmsg,
957 plcip->msgid = cmsg->Messagenumber;
958 send_message(card, cmsg);
970 capi_cmsg_answer(cmsg);
971 cmsg->Reject = 2; /* reject call, normal call clearing */
972 send_message(card, cmsg);
978 capi_cmsg_answer(cmsg);
979 cmsg->Reject = 8; /* reject call,
981 send_message(card, cmsg);
988 static void handle_plci(_cmsg * cmsg)
990 capidrv_contr *card = findcontrbynumber(cmsg->adr.adrController & 0x7f);
997 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
998 cmsg->adr.adrController & 0x7f);
1001 switch (CAPICMD(cmsg->Command, cmsg->Subcommand)) {
1004 if (cmsg->Reason) {
1007 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
1008 cmsg->Reason, capi_info2str(cmsg->Reason), cmsg->adr.adrPLCI);
1010 if (!(plcip = find_plci_by_plci(card, cmsg->adr.adrPLCI))) {
1011 capi_cmsg_answer(cmsg);
1012 send_message(card, cmsg);
1017 capi_cmsg_answer(cmsg);
1018 send_message(card, cmsg);
1023 if (cmsg->Info) {
1026 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
1027 cmsg->Info, capi_info2str(cmsg->Info),
1028 cmsg->adr.adrPLCI);
1030 if (!(plcip = find_plci_by_plci(card, cmsg->adr.adrPLCI)))
1037 if (cmsg->Info) {
1040 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
1041 cmsg->Info, capi_info2str(cmsg->Info),
1042 cmsg->adr.adrPLCI);
1047 handle_incoming_call(card, cmsg);
1051 if (cmsg->Info) {
1054 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
1055 cmsg->Info, capi_info2str(cmsg->Info),
1056 cmsg->adr.adrPLCI);
1058 if (!(plcip = find_plci_by_msgid(card, cmsg->Messagenumber)))
1061 plcip->plci = cmsg->adr.adrPLCI;
1062 if (cmsg->Info) {
1071 if (!(plcip = find_plci_by_plci(card, cmsg->adr.adrPLCI)))
1075 capi_cmsg_answer(cmsg);
1076 send_message(card, cmsg);
1080 capi_cmsg_answer(cmsg);
1081 send_message(card, cmsg);
1083 nccip = new_ncci(card, plcip, cmsg->adr.adrPLCI);
1089 capi_fill_CONNECT_B3_REQ(cmsg,
1095 nccip->msgid = cmsg->Messagenumber;
1096 send_message(card, cmsg);
1108 if (!(plcip = find_plci_by_plci(card, cmsg->adr.adrPLCI)))
1111 if (cmsg->InfoNumber == 0x4000) {
1112 if (cmsg->InfoElement[0] == 4) {
1118 ((u32) cmsg->InfoElement[1]
1119 | ((u32) (cmsg->InfoElement[2]) << 8)
1120 | ((u32) (cmsg->InfoElement[3]) << 16)
1121 | ((u32) (cmsg->InfoElement[4]) << 24)));
1126 cdb = capi_cmsg2str(cmsg);
1133 card->contrnr, cmsg->InfoNumber);
1152 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
1153 cmsg->adr.adrPLCI);
1159 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
1160 cmsg->adr.adrPLCI);
1165 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
1166 cmsg->adr.adrPLCI);
1170 static void handle_ncci(_cmsg * cmsg)
1172 capidrv_contr *card = findcontrbynumber(cmsg->adr.adrController & 0x7f);
1180 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
1181 cmsg->adr.adrController & 0x7f);
1184 switch (CAPICMD(cmsg->Command, cmsg->Subcommand)) {
1187 if (!(nccip = find_ncci(card, cmsg->adr.adrNCCI)))
1190 capi_cmsg_answer(cmsg);
1191 send_message(card, cmsg);
1208 plcip = find_plci_by_ncci(card, cmsg->adr.adrNCCI);
1210 nccip = new_ncci(card, plcip, cmsg->adr.adrNCCI);
1213 capi_fill_CONNECT_B3_RESP(cmsg,
1220 send_message(card, cmsg);
1228 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
1229 cmsg->adr.adrNCCI);
1231 capi_fill_CONNECT_B3_RESP(cmsg,
1234 cmsg->adr.adrNCCI,
1238 send_message(card, cmsg);
1244 cmsg->adr.adrNCCI,
1245 cmsg->Messagenumber)))
1248 nccip->ncci = cmsg->adr.adrNCCI;
1249 if (cmsg->Info) {
1252 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
1253 cmsg->Info, capi_info2str(cmsg->Info),
1254 cmsg->adr.adrNCCI);
1257 if (cmsg->Info)
1264 capi_cmsg_answer(cmsg);
1265 send_message(card, cmsg);
1273 if (cmsg->Info) {
1275 cmsg->Info, capi_info2str(cmsg->Info));
1277 if (!(nccip = find_ncci(card, cmsg->adr.adrNCCI)))
1280 len = capidrv_del_ack(nccip, cmsg->DataHandle);
1291 if (!(nccip = find_ncci(card, cmsg->adr.adrNCCI)))
1296 capi_cmsg_answer(cmsg);
1297 send_message(card, cmsg);
1302 if (!(nccip = find_ncci(card, cmsg->adr.adrNCCI)))
1304 if (cmsg->Info) {
1307 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
1308 cmsg->Info, capi_info2str(cmsg->Info),
1309 cmsg->adr.adrNCCI);
1315 if (!(nccip = find_ncci(card, cmsg->adr.adrNCCI)))
1318 capi_cmsg_answer(cmsg);
1319 send_message(card, cmsg);
1333 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
1334 cmsg->adr.adrNCCI);
1340 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
1341 cmsg->adr.adrNCCI);
1346 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
1347 cmsg->adr.adrNCCI);
1351 static void handle_data(_cmsg * cmsg, struct sk_buff *skb)
1353 capidrv_contr *card = findcontrbynumber(cmsg->adr.adrController & 0x7f);
1358 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
1359 cmsg->adr.adrController & 0x7f);
1363 if (!(nccip = find_ncci(card, cmsg->adr.adrNCCI))) {
1366 capi_cmd2str(cmsg->Command, cmsg->Subcommand),
1367 cmsg->adr.adrNCCI);
1373 capi_cmsg_answer(cmsg);
1374 send_message(card, cmsg);