struct gprs_context_data {
GAtChat *chat;
unsigned int active_context;
+ GAtPPPAuthMethod auth_method;
char username[OFONO_GPRS_MAX_USERNAME_LENGTH + 1];
char password[OFONO_GPRS_MAX_PASSWORD_LENGTH + 1];
GAtPPP *ppp;
if (getenv("OFONO_PPP_DEBUG"))
g_at_ppp_set_debug(gcd->ppp, ppp_debug, "PPP");
+ g_at_ppp_set_auth_method(gcd->ppp, gcd->auth_method);
g_at_ppp_set_credentials(gcd->ppp, gcd->username, gcd->password);
/* set connect and disconnect callbacks */
memcpy(gcd->username, ctx->username, sizeof(ctx->username));
memcpy(gcd->password, ctx->password, sizeof(ctx->password));
+ /* We only support CHAP and PAP */
+ switch (ctx->auth_method) {
+ case OFONO_GPRS_AUTH_METHOD_CHAP:
+ gcd->auth_method = G_AT_PPP_AUTH_METHOD_CHAP;
+ break;
+ case OFONO_GPRS_AUTH_METHOD_PAP:
+ gcd->auth_method = G_AT_PPP_AUTH_METHOD_PAP;
+ break;
+ default:
+ goto error;
+ }
+
gcd->state = STATE_ENABLING;
if (gcd->vendor == OFONO_VENDOR_ZTE) {