mncc: Use helper function to check if an MNCC frame is data (speech/traffic)

Rename method mncc_rcv_tchf() to mncc_rcv_data(), because the check applies
to all types of data frames, not only TCH/F data.
diff --git a/openbsc/src/libmsc/mncc_builtin.c b/openbsc/src/libmsc/mncc_builtin.c
index be35454..a5a463b 100644
--- a/openbsc/src/libmsc/mncc_builtin.c
+++ b/openbsc/src/libmsc/mncc_builtin.c
@@ -273,8 +273,8 @@
 	return 0;
 }
 
-/* receiving a TCH/F frame from the BSC code */
-static int mncc_rcv_tchf(struct gsm_call *call, int msg_type,
+/* receiving a (speech) traffic frame from the BSC code */
+static int mncc_rcv_data(struct gsm_call *call, int msg_type,
 			 struct gsm_data_frame *dfr)
 {
 	struct gsm_trans *remote_trans;
@@ -339,16 +339,14 @@
 		DEBUGP(DMNCC, "(call %x) Call created.\n", call->callref);
 	}
 
-	switch (msg_type) {
-	case GSM_TCHF_FRAME:
-	case GSM_TCHF_FRAME_EFR:
-		break;
-	default:
-		DEBUGP(DMNCC, "(call %x) Received message %s\n", call->callref,
-			get_mncc_name(msg_type));
-		break;
+	if (mncc_is_data_frame(msg_type)) {
+		rc = mncc_rcv_data(call, msg_type, arg);
+		goto out_free;
 	}
 
+	DEBUGP(DMNCC, "(call %x) Received message %s\n", call->callref,
+		get_mncc_name(msg_type));
+
 	switch(msg_type) {
 	case MNCC_SETUP_IND:
 		rc = mncc_setup_ind(call, msg_type, arg);
@@ -408,10 +406,6 @@
 			call->callref, data->cause.value);
 		rc = mncc_tx_to_cc(net, MNCC_RETRIEVE_REJ, data);
 		break;
-	case GSM_TCHF_FRAME:
-	case GSM_TCHF_FRAME_EFR:
-		rc = mncc_rcv_tchf(call, msg_type, arg);
-		break;
 	default:
 		LOGP(DMNCC, LOGL_NOTICE, "(call %x) Message unhandled\n", callref);
 		break;