mirror of git://git.sysmocom.de/ofono
ublox: support more internet contexts
Create multiple gprs-context instances and let the gprs core use them as it sees fit. Only for Toby L2.
This commit is contained in:
parent
50133ac0f4
commit
8d8333cc21
|
@ -294,21 +294,25 @@ static void ublox_post_sim(struct ofono_modem *modem)
|
|||
struct ofono_gprs *gprs;
|
||||
struct ofono_gprs_context *gc;
|
||||
GAtChat *chat = data->modem ? data->modem : data->aux;
|
||||
const char *driver = data->model_id == TOBYL2_HIGH_THROUGHPUT_MODE ?
|
||||
"ubloxmodem" : "atmodem";
|
||||
/* Toby L2: Create same number of contexts as supported PDP contexts. */
|
||||
int ncontexts = data->model_id == TOBYL2_HIGH_THROUGHPUT_MODE ? 8 : 1;
|
||||
|
||||
DBG("%p", modem);
|
||||
|
||||
gprs = ofono_gprs_create(modem, data->vendor_family, "atmodem",
|
||||
data->aux);
|
||||
if (data->model_id == TOBYL2_HIGH_THROUGHPUT_MODE)
|
||||
gc = ofono_gprs_context_create(modem, data->vendor_family,
|
||||
"ubloxmodem", chat);
|
||||
|
||||
else
|
||||
while (ncontexts) {
|
||||
gc = ofono_gprs_context_create(modem, data->vendor_family,
|
||||
"atmodem", chat);
|
||||
driver, chat);
|
||||
|
||||
if (gprs && gc)
|
||||
ofono_gprs_add_context(gprs, gc);
|
||||
if (gprs && gc)
|
||||
ofono_gprs_add_context(gprs, gc);
|
||||
|
||||
--ncontexts;
|
||||
}
|
||||
}
|
||||
|
||||
static void ublox_post_online(struct ofono_modem *modem)
|
||||
|
|
Loading…
Reference in New Issue