All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] modem: add support to clear cached pins.
@ 2019-01-16  6:45 Nandini Rebello
  2019-01-16  6:52 ` Giacinto Cifelli
  2019-01-23 23:50 ` Denis Kenzior
  0 siblings, 2 replies; 4+ messages in thread
From: Nandini Rebello @ 2019-01-16  6:45 UTC (permalink / raw)
  To: ofono

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

Adding support to clear cached pins when modem is powered off.
---
 src/modem.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/modem.c b/src/modem.c
index bc46275..baacdc8 100644
--- a/src/modem.c
+++ b/src/modem.c
@@ -1130,6 +1130,9 @@ static DBusMessage *modem_set_property(DBusConnection *conn,
 		if (modem->lockdown)
 			return __ofono_error_access_denied(msg);
 
+		if (!powered)
+			ofono_sim_clear_cached_pins(modem->sim);
+
 		err = set_powered(modem, powered);
 		if (err < 0) {
 			if (err != -EINPROGRESS)
-- 
2.7.4


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

* Re: [PATCH] modem: add support to clear cached pins.
  2019-01-16  6:45 [PATCH] modem: add support to clear cached pins Nandini Rebello
@ 2019-01-16  6:52 ` Giacinto Cifelli
  2019-01-23 23:50 ` Denis Kenzior
  1 sibling, 0 replies; 4+ messages in thread
From: Giacinto Cifelli @ 2019-01-16  6:52 UTC (permalink / raw)
  To: ofono

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

Hi Nandini,

On Wed, Jan 16, 2019 at 7:45 AM Nandini Rebello
<nandini.rebello@intel.com> wrote:
>
> Adding support to clear cached pins when modem is powered off.

but then this whole feature is useless because most of the modems
disappear from the bus when crashing and restarting,
and when they re-enumerate they are automatically Powered=false

how do you go round this for your template modem?

> ---
>  src/modem.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/modem.c b/src/modem.c
> index bc46275..baacdc8 100644
> --- a/src/modem.c
> +++ b/src/modem.c
> @@ -1130,6 +1130,9 @@ static DBusMessage *modem_set_property(DBusConnection *conn,
>                 if (modem->lockdown)
>                         return __ofono_error_access_denied(msg);
>
> +               if (!powered)
> +                       ofono_sim_clear_cached_pins(modem->sim);
> +
>                 err = set_powered(modem, powered);
>                 if (err < 0) {
>                         if (err != -EINPROGRESS)
> --
> 2.7.4
>
> _______________________________________________
> ofono mailing list
> ofono(a)ofono.org
> https://lists.ofono.org/mailman/listinfo/ofono

Regards,
Giacinto

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

* Re: [PATCH] modem: add support to clear cached pins.
  2019-01-16  6:45 [PATCH] modem: add support to clear cached pins Nandini Rebello
  2019-01-16  6:52 ` Giacinto Cifelli
@ 2019-01-23 23:50 ` Denis Kenzior
  1 sibling, 0 replies; 4+ messages in thread
From: Denis Kenzior @ 2019-01-23 23:50 UTC (permalink / raw)
  To: ofono

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

Hi Nandini,

On 01/16/2019 12:45 AM, Nandini Rebello wrote:
> Adding support to clear cached pins when modem is powered off.
> ---
>   src/modem.c | 3 +++
>   1 file changed, 3 insertions(+)
> 

Applied, thanks.

Regards,
-Denis


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

* [PATCH] modem: add support to clear cached pins.
@ 2019-01-03 11:05 Nandini Rebello
  0 siblings, 0 replies; 4+ messages in thread
From: Nandini Rebello @ 2019-01-03 11:05 UTC (permalink / raw)
  To: ofono

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

Adding support to clear cached pins when modem is disabled.
---
 src/modem.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/modem.c b/src/modem.c
index bc46275..590d85b 100644
--- a/src/modem.c
+++ b/src/modem.c
@@ -1243,6 +1243,8 @@ void ofono_modem_set_powered(struct ofono_modem *modem, ofono_bool_t powered)
 		set_online(modem, FALSE);
 
 		modem_change_state(modem, MODEM_STATE_POWER_OFF);
+
+		ofono_sim_clear_cached_pins();
 	}
 
 out:
-- 
2.7.4


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

end of thread, other threads:[~2019-01-23 23:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-16  6:45 [PATCH] modem: add support to clear cached pins Nandini Rebello
2019-01-16  6:52 ` Giacinto Cifelli
2019-01-23 23:50 ` Denis Kenzior
  -- strict thread matches above, loose matches on Subject: below --
2019-01-03 11:05 Nandini Rebello

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.