aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/gigaset
diff options
context:
space:
mode:
authorTilman Schmidt <tilman@imap.cc>2010-07-05 10:19:04 -0400
committerDavid S. Miller <davem@davemloft.net>2010-07-07 19:57:53 -0400
commit18c2259c14d8595e64a802940422335d172a53db (patch)
tree7360e537084291688b0d8850db31a240158493f5 /drivers/isdn/gigaset
parent6a75342a1c788aa89acac675e1720b08068ac8e7 (diff)
isdn/gigaset: handle Supplementary Service Listen
Add minimal handling for the non-optional CAPI FACILITY_REQ Supplementary Service function Listen. Impact: bugfix Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/gigaset')
-rw-r--r--drivers/isdn/gigaset/capi.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c
index 68194b502731..3ef149fe48c8 100644
--- a/drivers/isdn/gigaset/capi.c
+++ b/drivers/isdn/gigaset/capi.c
@@ -45,6 +45,7 @@
45#define CAPI_FACILITY_LI 0x0005 45#define CAPI_FACILITY_LI 0x0005
46 46
47#define CAPI_SUPPSVC_GETSUPPORTED 0x0000 47#define CAPI_SUPPSVC_GETSUPPORTED 0x0000
48#define CAPI_SUPPSVC_LISTEN 0x0001
48 49
49/* missing from capiutil.h */ 50/* missing from capiutil.h */
50#define CAPIMSG_PLCI_PART(m) CAPIMSG_U8(m, 9) 51#define CAPIMSG_PLCI_PART(m) CAPIMSG_U8(m, 9)
@@ -1151,7 +1152,7 @@ static void do_facility_req(struct gigaset_capi_ctr *iif,
1151 case CAPI_FACILITY_SUPPSVC: 1152 case CAPI_FACILITY_SUPPSVC:
1152 /* decode Function parameter */ 1153 /* decode Function parameter */
1153 pparam = cmsg->FacilityRequestParameter; 1154 pparam = cmsg->FacilityRequestParameter;
1154 if (pparam == NULL || *pparam < 2) { 1155 if (pparam == NULL || pparam[0] < 2) {
1155 dev_notice(cs->dev, "%s: %s missing\n", "FACILITY_REQ", 1156 dev_notice(cs->dev, "%s: %s missing\n", "FACILITY_REQ",
1156 "Facility Request Parameter"); 1157 "Facility Request Parameter");
1157 send_conf(iif, ap, skb, CapiIllMessageParmCoding); 1158 send_conf(iif, ap, skb, CapiIllMessageParmCoding);
@@ -1168,8 +1169,32 @@ static void do_facility_req(struct gigaset_capi_ctr *iif,
1168 /* Supported Services: none */ 1169 /* Supported Services: none */
1169 capimsg_setu32(confparam, 6, 0); 1170 capimsg_setu32(confparam, 6, 0);
1170 break; 1171 break;
1172 case CAPI_SUPPSVC_LISTEN:
1173 if (pparam[0] < 7 || pparam[3] < 4) {
1174 dev_notice(cs->dev, "%s: %s missing\n",
1175 "FACILITY_REQ", "Notification Mask");
1176 send_conf(iif, ap, skb,
1177 CapiIllMessageParmCoding);
1178 return;
1179 }
1180 if (CAPIMSG_U32(pparam, 4) != 0) {
1181 dev_notice(cs->dev,
1182 "%s: unsupported supplementary service notification mask 0x%x\n",
1183 "FACILITY_REQ", CAPIMSG_U32(pparam, 4));
1184 info = CapiFacilitySpecificFunctionNotSupported;
1185 confparam[3] = 2; /* length */
1186 capimsg_setu16(confparam, 4,
1187 CapiSupplementaryServiceNotSupported);
1188 }
1189 info = CapiSuccess;
1190 confparam[3] = 2; /* length */
1191 capimsg_setu16(confparam, 4, CapiSuccess);
1192 break;
1171 /* ToDo: add supported services */ 1193 /* ToDo: add supported services */
1172 default: 1194 default:
1195 dev_notice(cs->dev,
1196 "%s: unsupported supplementary service function 0x%04x\n",
1197 "FACILITY_REQ", function);
1173 info = CapiFacilitySpecificFunctionNotSupported; 1198 info = CapiFacilitySpecificFunctionNotSupported;
1174 /* Supplementary Service specific parameter */ 1199 /* Supplementary Service specific parameter */
1175 confparam[3] = 2; /* length */ 1200 confparam[3] = 2; /* length */