All of lore.kernel.org
 help / color / mirror / Atom feed
* Handling of Fixed Dialing v4
@ 2010-10-14 21:02 Petteri Tikander
  2010-10-14 21:02 ` [RFC PATCH 1/8] simfs: add logic to retrieve only only EF-info, but no EF-contents Petteri Tikander
  0 siblings, 1 reply; 19+ messages in thread
From: Petteri Tikander @ 2010-10-14 21:02 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] 19+ messages in thread
* [RFC PATCH 4/8] atmodem: returns file-status of SIM EF-file
@ 2010-10-12 15:18 Petteri Tikander
  2010-10-12 15:18 ` [RFC PATCH 5/8] isimodem: " Petteri Tikander
  0 siblings, 1 reply; 19+ messages in thread
From: Petteri Tikander @ 2010-10-12 15:18 UTC (permalink / raw)
  To: ofono

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

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

diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c
index d0a7148..d44b7d2 100644
--- a/drivers/atmodem/sim.c
+++ b/drivers/atmodem/sim.c
@@ -64,11 +64,13 @@ 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,
+			SIM_FILE_STATUS_NOT_AVAILABLE, cbd->data);
 		return;
 	}
 
@@ -88,27 +90,33 @@ 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,
+			SIM_FILE_STATUS_NOT_AVAILABLE, 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_NOT_AVAILABLE;
+	}
 	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,
+				SIM_FILE_STATUS_NOT_AVAILABLE, cbd->data);
 }
 
 static void at_sim_read_info(struct ofono_sim *sim, int fileid,
@@ -123,7 +131,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, 0x01, data);
 			return;
 		}
 	}
@@ -142,7 +150,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, 0xFF, data);
 }
 
 static void at_crsm_read_cb(gboolean ok, GAtResult *result,
-- 
1.6.3.3



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

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

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-14 21:02 Handling of Fixed Dialing v4 Petteri Tikander
2010-10-14 21:02 ` [RFC PATCH 1/8] simfs: add logic to retrieve only only EF-info, but no EF-contents Petteri Tikander
2010-10-14 21:02   ` [RFC PATCH 2/8] simutil: response-handler returns now also file-status Petteri Tikander
2010-10-14 21:02     ` [RFC PATCH 3/8] sim: add new parameter to file-info utility Petteri Tikander
2010-10-14 21:02       ` [RFC PATCH 4/8] atmodem: returns file-status of SIM EF-file Petteri Tikander
2010-10-14 21:02         ` [RFC PATCH 5/8] isimodem: " Petteri Tikander
2010-10-14 21:02           ` [RFC PATCH 6/8] sim: add function for reading only general info from SIM-EF file Petteri Tikander
2010-10-14 21:02             ` [RFC PATCH 7/8] sim: check if Fixed Dialing is enabled in the SIM-card Petteri Tikander
2010-10-14 21:02               ` [RFC PATCH 8/8] doc: update sim-api Petteri Tikander
2010-10-15 12:28                 ` Denis Kenzior
2010-10-15 12:33               ` [RFC PATCH 7/8] sim: check if Fixed Dialing is enabled in the SIM-card Denis Kenzior
2010-10-15 12:32             ` [RFC PATCH 6/8] sim: add function for reading only general info from SIM-EF file Denis Kenzior
2010-10-15 12:27           ` [RFC PATCH 5/8] isimodem: returns file-status of SIM EF-file Denis Kenzior
2010-10-15 12:26         ` [RFC PATCH 4/8] atmodem: " Denis Kenzior
2010-10-15 12:21       ` [RFC PATCH 3/8] sim: add new parameter to file-info utility Denis Kenzior
2010-10-15 12:20     ` [RFC PATCH 2/8] simutil: response-handler returns now also file-status Denis Kenzior
2010-10-15 12:19   ` [RFC PATCH 1/8] simfs: add logic to retrieve only only EF-info, but no EF-contents Denis Kenzior
  -- strict thread matches above, loose matches on Subject: below --
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-14 10:58   ` 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.