huawei: NDIS port doesn't depend on modem port
authorCaiwen Zhang <caiwen.zhang@windriver.com>
Fri, 3 Jun 2011 09:14:07 +0000 (17:14 +0800)
committerDenis Kenzior <denkenz@gmail.com>
Thu, 2 Jun 2011 21:02:42 +0000 (16:02 -0500)
When creating the NDIS gprs context, do not check the existence of the
modem port.

plugins/huawei.c

index e6a35c6..1dd4870 100644 (file)
@@ -716,16 +716,15 @@ static void huawei_post_online(struct ofono_modem *modem)
        ofono_ussd_create(modem, OFONO_VENDOR_QUALCOMM_MSM,
                                                "atmodem", data->pcui);
 
-       if ((data->sim_state == HUAWEI_SIM_STATE_VALID ||
-                       data->sim_state == HUAWEI_SIM_STATE_INVALID_CS) &&
-                       data->modem != NULL) {
+       if (data->sim_state == HUAWEI_SIM_STATE_VALID ||
+                       data->sim_state == HUAWEI_SIM_STATE_INVALID_CS) {
                data->gprs = ofono_gprs_create(modem, OFONO_VENDOR_HUAWEI,
                                                "atmodem", data->pcui);
 
                if (data->ndis == TRUE)
                        data->gc = ofono_gprs_context_create(modem, 0,
                                                "huaweimodem", data->pcui);
-               else
+               else if (data->modem != NULL)
                        data->gc = ofono_gprs_context_create(modem, 0,
                                                "atmodem", data->modem);