Re: Cleaning up SIM hot swap

2017-07-10 Thread Aleksander Morgado
On Sat, Jul 8, 2017 at 12:52 PM, carlo wrote: > > > While trying to implement setup_sim_hot_swap for MBIM modems, I > > noticed that I am setting up and enabling unsolicited events for > > SUBSCRIBER_INFO type notifications, but not cleaning them up. This > > might not end up affecting the user si

[PATCH] bearer-qmi: replace g_new + memcpy with g_memdup

2017-07-10 Thread Ben Chan
--- src/mm-bearer-qmi.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mm-bearer-qmi.c b/src/mm-bearer-qmi.c index 4d532274..c687db60 100644 --- a/src/mm-bearer-qmi.c +++ b/src/mm-bearer-qmi.c @@ -151,7 +151,6 @@ reload_stats_context_step (GTask *task) { MMBea

Re: Cleaning up SIM hot swap

2017-07-10 Thread Eric Caruso
On Mon, Jul 10, 2017 at 12:11 AM, Aleksander Morgado wrote: > On Sat, Jul 8, 2017 at 12:52 PM, carlo wrote: >> >> > While trying to implement setup_sim_hot_swap for MBIM modems, I >> > noticed that I am setting up and enabling unsolicited events for >> > SUBSCRIBER_INFO type notifications, but no

Re: Cleaning up SIM hot swap

2017-07-10 Thread Aleksander Morgado
On Mon, Jul 10, 2017 at 8:37 PM, Eric Caruso wrote: >>> > While trying to implement setup_sim_hot_swap for MBIM modems, I >>> > noticed that I am setting up and enabling unsolicited events for >>> > SUBSCRIBER_INFO type notifications, but not cleaning them up. This >>> > might not end up affecting

[PATCH v2] mm-broadband-modem-mbim: support SIM hot swapping

2017-07-10 Thread Eric Caruso
If an MBIM modem supports unsolicited notifications for subscriber ready status, we can use it to detect when SIM cards have been removed and reinserted. Upon detection we should re- probe the modem so that we can configure it for the new SIM. --- src/mm-broadband-modem-mbim.c | 94 +++

Re: Cleaning up SIM hot swap

2017-07-10 Thread Eric Caruso
I think you're right that mbim-proxy does handle this, since it disconnects all of the relevant signal handlers when client_unref is called (via client_set_device). I put up the version of the patch that I have right now that leaves the cleanup to mbim-proxy; however, I'm going to want to clean it