diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-10-09 15:54:48 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-10-09 15:54:48 +0200 |
commit | 927889edbec5fc68f457303cf62c563d546d0f1b (patch) | |
tree | e30e7472cca934ed10c4066a621369c762847f6e /src/mm-modem-helpers-qmi.c | |
parent | 316b9fa001edee37a17d831708839016aed93e80 (diff) |
bearer-qmi: use user-specified allowed authentication methods
If none of the specified methods is supported, an error is returned.
Diffstat (limited to 'src/mm-modem-helpers-qmi.c')
-rw-r--r-- | src/mm-modem-helpers-qmi.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mm-modem-helpers-qmi.c b/src/mm-modem-helpers-qmi.c index af1a390c..84935877 100644 --- a/src/mm-modem-helpers-qmi.c +++ b/src/mm-modem-helpers-qmi.c @@ -879,3 +879,19 @@ mm_sms_state_from_qmi_message_tag (QmiWmsMessageTagType tag) return MM_SMS_STATE_UNKNOWN; } } + +/*****************************************************************************/ + +QmiWdsAuthentication +mm_bearer_allowed_auth_to_qmi_authentication (MMBearerAllowedAuth auth) +{ + QmiWdsAuthentication out; + + out = 0; + if (auth & MM_BEARER_ALLOWED_AUTH_PAP) + out |= QMI_WDS_AUTHENTICATION_PAP; + if (auth & MM_BEARER_ALLOWED_AUTH_CHAP) + out |= QMI_WDS_AUTHENTICATION_CHAP; + + return out; +} |