From: Denis Kenzior <denkenz@gmail.com>
To: ofono@lists.linux.dev
Cc: Denis Kenzior <denkenz@gmail.com>
Subject: [PATCH v2 5/8] qmi: gprs: Remove magic number use
Date: Mon, 6 May 2024 16:57:59 -0500 [thread overview]
Message-ID: <20240506215804.57124-5-denkenz@gmail.com> (raw)
In-Reply-To: <20240506215804.57124-1-denkenz@gmail.com>
---
drivers/qmimodem/gprs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/qmimodem/gprs.c b/drivers/qmimodem/gprs.c
index fce975def9c2..2a0d52317cbb 100644
--- a/drivers/qmimodem/gprs.c
+++ b/drivers/qmimodem/gprs.c
@@ -70,6 +70,7 @@ static bool extract_ss_info(struct qmi_result *result, int *status, int *tech)
static void get_lte_attach_param_cb(struct qmi_result *result, void *user_data)
{
+ static const uint8_t PARAM_APN = 0x10;
struct ofono_gprs *gprs = user_data;
struct gprs_data *data = ofono_gprs_get_data(gprs);
char *apn = NULL;
@@ -83,7 +84,7 @@ static void get_lte_attach_param_cb(struct qmi_result *result, void *user_data)
}
/* APN */
- apn = qmi_result_get_string(result, 0x10);
+ apn = qmi_result_get_string(result, PARAM_APN);
if (!apn) {
DBG("Default profile has no APN setting");
goto noapn;
--
2.45.0
next prev parent reply other threads:[~2024-05-06 21:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-06 21:57 [PATCH v2 1/8] qmi: wds: Fix up enum naming Denis Kenzior
2024-05-06 21:57 ` [PATCH v2 2/8] qmi: gprs: use Extended Data Bearer Technology Denis Kenzior
2024-05-06 21:57 ` [PATCH v2 3/8] qmi: netreg: Print network capability Denis Kenzior
2024-05-06 21:57 ` [PATCH v2 4/8] qmi: gprs: Remove IP Support Type parsing Denis Kenzior
2024-05-06 21:57 ` Denis Kenzior [this message]
2024-05-06 21:58 ` [PATCH v2 6/8] qmi: gprs-context: Split out IPv4 setting processing Denis Kenzior
2024-05-06 21:58 ` [PATCH v2 7/8] qmi: gprs-context: Parse IPv6 context settings Denis Kenzior
2024-05-06 21:58 ` [PATCH v2 8/8] qmi: gprs-context: Obtain initial bearer IP support Denis Kenzior
2024-05-06 23:20 ` [PATCH v2 1/8] qmi: wds: Fix up enum naming patchwork-bot+ofono
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240506215804.57124-5-denkenz@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.