lchan_select: dont allow half rate EFR to be selected
The function lchan_select_by_chan_mode() is prone to select an half rate lchan when EFR is used, even though EFR is not defined for half-rate. Lets protect against that. Change-Id: I961d9aaba81424053ab1dc04ce7799e716af4cd8 Related: OS#3503
This commit is contained in:
parent
09273b7f19
commit
f165e338b5
|
@ -136,8 +136,12 @@ struct gsm_lchan *lchan_select_by_chan_mode(struct gsm_bts *bts,
|
|||
case GSM48_CMODE_SIGN:
|
||||
type = GSM_LCHAN_SDCCH;
|
||||
break;
|
||||
case GSM48_CMODE_SPEECH_V1:
|
||||
case GSM48_CMODE_SPEECH_EFR:
|
||||
/* EFR works over FR channels only */
|
||||
if (!full_rate)
|
||||
return NULL;
|
||||
/* fall through */
|
||||
case GSM48_CMODE_SPEECH_V1:
|
||||
case GSM48_CMODE_SPEECH_AMR:
|
||||
type = full_rate ? GSM_LCHAN_TCH_F : GSM_LCHAN_TCH_H;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue