Hi Shweta,

On 6/11/20 2:06 AM, shweta wrote:
From: Shweta Jain <shweta2.j...@intel.com>

---
  plugins/xmm7xxx.c | 22 +++++++++++++++++++---
  1 file changed, 19 insertions(+), 3 deletions(-)


This patch does not apply cleanly. In fact, I see three distinct series from you and it isn't clear in what order I would even apply these. Since it looks like all these series are related, can you please rebase all patches on top of git HEAD (for example, via 'git pull --rebase') and resubmit the entire set as a single series?

diff --git a/plugins/xmm7xxx.c b/plugins/xmm7xxx.c
index 6afc8cb..3959583 100644
--- a/plugins/xmm7xxx.c
+++ b/plugins/xmm7xxx.c
@@ -123,6 +123,8 @@ struct xmm7xxx_data {
        int coex_lte_id;
        int coex_wlan_id;
        int coex_bt_id;
+       ofono_bool_t stk_enable;
+       ofono_bool_t enable_euicc;
  };
/* eUICC Implementation */
@@ -1888,7 +1890,10 @@ static void switch_sim_state_status(struct ofono_modem 
*modem, int status)
                        ofono_phonebook_create(modem, 0, "atmodem", data->chat);
                        data->sms_phonebook_added = TRUE;
                }
-
+               break;
+       case 18:
+               data->enable_euicc=TRUE;
+               ofono_warn("Esim State With no Profile %d  ", status);

why ofono_warn?

                break;
        default:
                ofono_warn("Unknown SIM state %d received", status);
@@ -2077,15 +2082,24 @@ static void xmm7xxx_pre_sim(struct ofono_modem *modem)
        data->sim = ofono_sim_create(modem, OFONO_VENDOR_XMM, "atmodem",
                                        data->chat);
        xmm_euicc_enable(modem, data->chat);
+       ofono_stk_create(modem, OFONO_VENDOR_XMM, "atmodem", data->chat);

Generally STK isn't available until the PIN has been entered, and thus should be available only in post_sim state. Is esim somehow different?

  }
static void set_online_cb(gboolean ok, GAtResult *result, gpointer user_data)
  {
        struct cb_data *cbd = user_data;
        ofono_modem_online_cb_t cb = cbd->cb;
+       char * strng = cbd->cb;

What does this do??

+       DBG("");

Hmm, not sure what compiler you're using, but C99 doesn't support mixed declarations and expressions. Nor does our coding style. Please move this after all the variable declaration block.

        struct ofono_error error;
-
+       struct ofono_modem *modem = cbd->data;
+       struct xmm7xxx_data *data = ofono_modem_get_data(modem);
        decode_at_error(&error, g_at_result_final_response(result));
+       if(data->enable_euicc==TRUE && data->stk_enable==TRUE )
+       {
+         g_at_chat_send(data->chat, "AT+CFUN=16", none_prefix,
+                                               NULL, NULL, NULL);
+       }

Okay, but this is not following our coding style. Refer to doc/coding-style.txt for details.

        cb(&error, cbd->data);
  }
@@ -2108,8 +2122,10 @@ static void xmm7xxx_set_online(struct ofono_modem *modem, ofono_bool_t online,
                data->coex_wlan_id = 0;
                g_at_chat_unregister(data->chat, data->coex_bt_id);
                data->coex_bt_id = 0;
+               data->stk_enable=FALSE;
        }
-
+       else
+        data->stk_enable=TRUE;

Coding style is all wrong here...

        if (g_at_chat_send(data->chat, command, none_prefix,
                                        set_online_cb, cbd, g_free) > 0) {
                if (online)


Regards,
-Denis
_______________________________________________
ofono mailing list -- ofono@ofono.org
To unsubscribe send an email to ofono-le...@ofono.org

Reply via email to