Shift ciphering algorithm selection from VLR to MSC

The VLR code seems to have the assumption that there is one particular
algorithm to be used, as opposed to one of a set of algorithms.

What's missing is basically to decide when/where to pick the best
algorithm within the capabilities of the phone (classmark) and the
network configuration (net->a5_encryption_mask).  So far, libvlr has no
notion of classmark.  Rather, libmsc has.

Why does the VLR care about the particular algorithm at all?  The VLR
should probably simply decide if it should use encryption or not, and if
so, the MSC will figure which algorithm to use.

Change-Id: I5ed80ca2086560a5975a758ec568a034a9a8ab89
diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c
index 21ef082..6750a46 100644
--- a/src/libvlr/vlr.c
+++ b/src/libvlr/vlr.c
@@ -1105,33 +1105,15 @@
 int vlr_set_ciph_mode(struct vlr_instance *vlr,
 		      struct osmo_fsm_inst *fi,
 		      void *msc_conn_ref,
-		      enum vlr_ciph ciph_mode,
+		      bool ciph_required,
 		      bool umts_aka,
 		      bool retrieve_imeisv)
 {
-	switch (ciph_mode) {
-	case VLR_CIPH_NONE:
+	if (!ciph_required)
 		return 0;
 
-	case VLR_CIPH_A5_1:
-	case VLR_CIPH_A5_3:
-		LOGPFSML(fi, LOGL_DEBUG, "Set Ciphering Mode: %d=%s\n",
-			 ciph_mode, vlr_ciph_name(ciph_mode));
-		return vlr->ops.set_ciph_mode(msc_conn_ref,
-					      ciph_mode,
-					      umts_aka,
-					      retrieve_imeisv);
-
-	case VLR_CIPH_A5_2:
-		/* TODO policy by user config? */
-		LOGPFSML(fi, LOGL_ERROR, "A5/2 ciphering is not allowed\n");
-		return -EINVAL;
-
-	default:
-		LOGPFSML(fi, LOGL_ERROR, "unknown ciphering value: %d\n",
-			 ciph_mode);
-		return -EINVAL;
-	}
+	LOGPFSML(fi, LOGL_DEBUG, "Set Ciphering Mode\n");
+	return vlr->ops.set_ciph_mode(msc_conn_ref, umts_aka, retrieve_imeisv);
 }
 
 /* Decide whether UMTS AKA should be used.