Bug 86498 - [network]qser_nw_set_config网络设置无法设置组合网络只能进行only设置

Change-Id: I44611c0aa29c1b6442bb89e361da3117d2c23e26
diff --git a/mbtk/liblynq_lib/src/lynq_network.c b/mbtk/liblynq_lib/src/lynq_network.c
old mode 100755
new mode 100644
index 86bd562..795539c
--- a/mbtk/liblynq_lib/src/lynq_network.c
+++ b/mbtk/liblynq_lib/src/lynq_network.c
@@ -392,7 +392,8 @@
     15 : GSM/UMTS/LTE(LTE preferred)
     */
 
-    if(mbtk_2_lynq) {
+    if(mbtk_2_lynq) 
+    {
         switch(net_mode)
         {
             //使用之前set的tmp_mode的值来进行回显get
@@ -418,31 +419,40 @@
                 mbtk_net_pre = 0xFF;
                 break;
         }
-    } else {
-        switch(net_mode)
+    } 
+    else 
+   {
+        if(QSER_NW_MODE_GSM == net_mode)
         {
-            //只做234G的下配 MBTK_NET_PREF_GSM_ONLY/MBTK_NET_PREF_UMTS_ONLY/MBTK_NET_PREF_LTE_ONLY
-            case QSER_NW_MODE_GSM:
-                mbtk_net_pre = MBTK_NET_PREF_GSM_ONLY;
-                break;
-            case QSER_NW_MODE_WCDMA:
-                mbtk_net_pre = MBTK_NET_PREF_UMTS_ONLY;
-                break;
-            case QSER_NW_MODE_CDMA:
-                //mbtk_net_pre = MBTK_NET_PREF_GSM_UMTS_UMTS_PREF;
-                break;
-            case QSER_NW_MODE_EVDO:
-                //mbtk_net_pre = MBTK_NET_PREF_GSM_UMTS_UMTS_PREF;
-                break;
-            case QSER_NW_MODE_LTE:
-                mbtk_net_pre = MBTK_NET_PREF_LTE_ONLY;
-                break;
-            case QSER_NW_MODE_TDSCDMA:
-                //mbtk_net_pre = MBTK_NET_PREF_GSM_UMTS_UMTS_PREF;
-                break;
-            default:
-                mbtk_net_pre = 0xFF;
-                break;
+            mbtk_net_pre = MBTK_NET_PREF_GSM_ONLY;
+        }
+        else if(QSER_NW_MODE_WCDMA == net_mode)
+        {
+            mbtk_net_pre = MBTK_NET_PREF_UMTS_ONLY;
+        }
+        else if(QSER_NW_MODE_LTE == net_mode)
+        {
+            mbtk_net_pre = MBTK_NET_PREF_LTE_ONLY;
+        }
+        else if((QSER_NW_MODE_GSM | QSER_NW_MODE_WCDMA) == net_mode)
+        {
+            mbtk_net_pre = MBTK_NET_PREF_GSM_UMTS_UMTS_PREF;
+        }
+        else if((QSER_NW_MODE_WCDMA | QSER_NW_MODE_LTE) == net_mode)
+        {
+            mbtk_net_pre = MBTK_NET_PREF_UMTS_LTE_LTE_PREF;
+        }
+        else if((QSER_NW_MODE_GSM | QSER_NW_MODE_LTE) == net_mode)
+        {
+            mbtk_net_pre = MBTK_NET_PREF_GSM_LTE_LTE_PREF;
+        }
+        else if((QSER_NW_MODE_GSM | QSER_NW_MODE_WCDMA | QSER_NW_MODE_LTE) == net_mode)
+        {
+            mbtk_net_pre = MBTK_NET_PREF_GSM_UMTS_LTE_LTE_PREF;
+        }
+        else
+        {
+            mbtk_net_pre = 0xFF;
         }
     }
     return mbtk_net_pre;
diff --git a/mbtk/test/liblynq_lib/lynq_nw_test.c b/mbtk/test/liblynq_lib/lynq_nw_test.c
old mode 100755
new mode 100644
index 725ad69..39bc5a0
--- a/mbtk/test/liblynq_lib/lynq_nw_test.c
+++ b/mbtk/test/liblynq_lib/lynq_nw_test.c
@@ -255,30 +255,8 @@
                 fflush(stdin);
                 opt = atoi(operator);
                 QSER_NW_CONFIG_INFO_T t_info;
-                switch(opt)
-                {
-                    case 1:
-                        t_info.preferred_nw_mode = QSER_NW_MODE_GSM;//2G
-                        break;
-                    case 2:
-                        t_info.preferred_nw_mode = QSER_NW_MODE_WCDMA;//3G
-                        break;
-                    case 4:
-                        t_info.preferred_nw_mode = QSER_NW_MODE_CDMA;//3G no support
-                        break;
-                    case 8:
-                        t_info.preferred_nw_mode = QSER_NW_MODE_EVDO;//3G no support
-                        break;
-                    case 16:
-                        t_info.preferred_nw_mode = QSER_NW_MODE_LTE;//4G
-                        break;
-                    case 32:
-                        t_info.preferred_nw_mode = QSER_NW_MODE_TDSCDMA;//3G no support
-                        break;
-                    default:
-                        t_info.preferred_nw_mode = QSER_NW_MODE_LTE;//4G
-                        break;
-                }
+             
+                t_info.preferred_nw_mode = opt;
                 ret = qser_nw_set_config(handle, &t_info);
                 printf("qser_nw_set_config ret = %d\n", ret);
             }