diff mbox series

[06/13] gprs: Default CID range to 1..NUM_CONTEXTS -1

Message ID 20241031220638.1582166-6-denkenz@gmail.com (mailing list archive)
State Accepted
Commit 0fba72b098a1d82ab2c28cf86370a840b7daa394
Headers show
Series [01/13] qmi: validate TLV length | expand

Commit Message

Denis Kenzior Oct. 31, 2024, 10:06 p.m. UTC
For those drivers where CIDs have no meaning (such as non-AT command
based modems), set a default range between 1 and NUM_CONTEXTS - 1 (255).
This allows the driver to omit this method invocation.
---
 src/gprs.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/src/gprs.c b/src/gprs.c
index 3c71f8084417..c5287661b9d9 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -3082,6 +3082,7 @@  OFONO_DEFINE_ATOM_CREATE(gprs, OFONO_ATOM_TYPE_GPRS, {
 	atom->status = NETWORK_REGISTRATION_STATUS_UNKNOWN;
 	atom->netreg_status = -1;
 	atom->used_pids = l_uintset_new(MAX_CONTEXTS);
+	atom->used_cids = l_uintset_new_from_range(1, MAX_CONTEXTS - 1);
 })
 
 static void netreg_watch(struct ofono_atom *atom,