All of lore.kernel.org
 help / color / mirror / Atom feed
* Handling of Fixed Dialing v3
@ 2010-10-12 15:18 Petteri Tikander
  2010-10-12 15:18 ` [RFC PATCH 1/8] sim: add function to read general info from SIM EF-file Petteri Tikander
  0 siblings, 1 reply; 24+ messages in thread
From: Petteri Tikander @ 2010-10-12 15:18 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 614 bytes --]

The goal of these patches is to check, if Fixed Dialing is enabled in SIM-card.
Because also invalidation/rehabilitation status of ADN has to be checked,
functionality is added for retrieving file-status of EF-files.
So general information of EF-files is returned (containing now also file status)
without starting the actual EF-content retrieving.

The FDN-enable status is checked. If FDN is enabled, SIM-initialisation routine is 
interrupted (modem is left in PRE-SIM state), and FD-enabled property is signalled 
over D-BUS.

oFono still trusts to EFphase value when selecting SIM/USIM access.



^ permalink raw reply	[flat|nested] 24+ messages in thread
* [RFC PATCH 4/8] atmodem: returns file-status of SIM EF-file
@ 2010-10-14 21:02 Petteri Tikander
  2010-10-14 21:02 ` [RFC PATCH 5/8] isimodem: " Petteri Tikander
  0 siblings, 1 reply; 24+ messages in thread
From: Petteri Tikander @ 2010-10-14 21:02 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 2320 bytes --]

---
 drivers/atmodem/sim.c |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c
index d0a7148..90d87bc 100644
--- a/drivers/atmodem/sim.c
+++ b/drivers/atmodem/sim.c
@@ -64,11 +64,12 @@ static void at_crsm_info_cb(gboolean ok, GAtResult *result, gpointer user_data)
 	int flen, rlen;
 	int str;
 	unsigned char access[3];
+	unsigned char file_status;
 
 	decode_at_error(&error, g_at_result_final_response(result));
 
 	if (!ok) {
-		cb(&error, -1, -1, -1, NULL, cbd->data);
+		cb(&error, -1, -1, -1, NULL, 0, cbd->data);
 		return;
 	}
 
@@ -88,27 +89,31 @@ static void at_crsm_info_cb(gboolean ok, GAtResult *result, gpointer user_data)
 		error.type = OFONO_ERROR_TYPE_SIM;
 		error.error = (sw1 << 8) | sw2;
 
-		cb(&error, -1, -1, -1, NULL, cbd->data);
+		cb(&error, -1, -1, -1, NULL, 0, cbd->data);
 		return;
 	}
 
 	DBG("crsm_info_cb: %02x, %02x, %i", sw1, sw2, len);
 
-	if (response[0] == 0x62)
+	if (response[0] == 0x62) {
 		ok = sim_parse_3g_get_response(response, len, &flen, &rlen,
 						&str, access, NULL);
+
+		file_status = SIM_FILE_STATUS_VALID;
+	}
 	else
 		ok = sim_parse_2g_get_response(response, len, &flen, &rlen,
-						&str, access);
+						&str, access, &file_status);
 
 	if (!ok)
 		goto error;
 
-	cb(&error, flen, str, rlen, access, cbd->data);
+	cb(&error, flen, str, rlen, access, file_status, cbd->data);
+
 	return;
 
 error:
-	CALLBACK_WITH_FAILURE(cb, -1, -1, -1, NULL, cbd->data);
+	CALLBACK_WITH_FAILURE(cb, -1, -1, -1, NULL, 0, cbd->data);
 }
 
 static void at_sim_read_info(struct ofono_sim *sim, int fileid,
@@ -123,7 +128,7 @@ static void at_sim_read_info(struct ofono_sim *sim, int fileid,
 		unsigned char access[3] = { 0x00, 0x00, 0x00 };
 
 		if (fileid == SIM_EFAD_FILEID) {
-			CALLBACK_WITH_SUCCESS(cb, 4, 0, 0, access, data);
+			CALLBACK_WITH_SUCCESS(cb, 4, 0, 0, access, 1, data);
 			return;
 		}
 	}
@@ -142,7 +147,7 @@ static void at_sim_read_info(struct ofono_sim *sim, int fileid,
 		return;
 
 error:
-	CALLBACK_WITH_FAILURE(cb, -1, -1, -1, NULL, data);
+	CALLBACK_WITH_FAILURE(cb, -1, -1, -1, NULL, 0, data);
 }
 
 static void at_crsm_read_cb(gboolean ok, GAtResult *result,
-- 
1.6.3.3



^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2010-10-15 12:27 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-12 15:18 Handling of Fixed Dialing v3 Petteri Tikander
2010-10-12 15:18 ` [RFC PATCH 1/8] sim: add function to read general info from SIM EF-file Petteri Tikander
2010-10-12 15:18   ` [RFC PATCH 2/8] simfs: add logic to retrieve only only EF-info, but no EF-contents Petteri Tikander
2010-10-12 15:18     ` [RFC PATCH 3/8] simutil: response-handler returns now also file-status Petteri Tikander
2010-10-12 15:18       ` [RFC PATCH 4/8] atmodem: returns file-status of SIM EF-file Petteri Tikander
2010-10-12 15:18         ` [RFC PATCH 5/8] isimodem: " Petteri Tikander
2010-10-12 15:18           ` [RFC PATCH 6/8] simutil: add ID of EFadn Petteri Tikander
2010-10-12 15:18             ` [RFC PATCH 7/8] sim: check if Fixed Dialing is enabled in the SIM-card Petteri Tikander
2010-10-12 15:18               ` [RFC PATCH 8/8] doc: update sim-api Petteri Tikander
2010-10-14  5:56                 ` Marcel Holtmann
2010-10-14 11:22               ` [RFC PATCH 7/8] sim: check if Fixed Dialing is enabled in the SIM-card Denis Kenzior
2010-10-14 11:24               ` Denis Kenzior
2010-10-14 10:43             ` [RFC PATCH 6/8] simutil: add ID of EFadn Denis Kenzior
2010-10-14 10:58           ` [RFC PATCH 5/8] isimodem: returns file-status of SIM EF-file Denis Kenzior
2010-10-14 10:57         ` [RFC PATCH 4/8] atmodem: " Denis Kenzior
2010-10-14 16:54           ` Petteri Tikander
2010-10-14 11:03         ` Denis Kenzior
2010-10-14 10:41       ` [RFC PATCH 3/8] simutil: response-handler returns now also file-status Denis Kenzior
2010-10-14 16:12         ` Petteri Tikander
2010-10-14 11:10     ` [RFC PATCH 2/8] simfs: add logic to retrieve only only EF-info, but no EF-contents Denis Kenzior
2010-10-14 11:07   ` [RFC PATCH 1/8] sim: add function to read general info from SIM EF-file Denis Kenzior
2010-10-14 15:14     ` Petteri Tikander
  -- strict thread matches above, loose matches on Subject: below --
2010-10-14 21:02 [RFC PATCH 4/8] atmodem: returns file-status of " Petteri Tikander
2010-10-14 21:02 ` [RFC PATCH 5/8] isimodem: " Petteri Tikander
2010-10-15 12:27   ` Denis Kenzior

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.