Fix MNC length for Swisscom SIM cards

Swisscom SIM cards do not include MNC length within EF_AD, and end up
using incorrect MNC length based on the 3-digit default. Hardcode MNC
length of 2 for Switzerland, in the same manner as it was done for
Finland.

Signed-hostap: Andrejs Cainikovs <andrejs.cainikovs@sonymobile.com>
This commit is contained in:
Andrejs Cainikovs 2013-08-31 10:58:23 +03:00 committed by Jouni Malinen
parent 7e3f110b08
commit fcf20528a0

View File

@ -938,6 +938,8 @@ static int mnc_len_from_imsi(const char *imsi)
mcc_str[3] = '\0';
mcc = atoi(mcc_str);
if (mcc == 228)
return 2; /* Networks in Switzerland use 2-digit MNC */
if (mcc == 244)
return 2; /* Networks in Finland use 2-digit MNC */