Add interface_name while calling wlan.sh for multi-interface support 46/242646/1 accepted/tizen/unified/20200903.151720 submit/tizen/20200828.142119 submit/tizen/20200901.053326 submit/tizen/20200902.111409 submit/tizen/20200903.044940
authorNishant Chaprana <n.chaprana@samsung.com>
Fri, 28 Aug 2020 11:27:15 +0000 (16:57 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Fri, 28 Aug 2020 11:27:15 +0000 (16:57 +0530)
Change-Id: Id2de6c4d11a05558b89b7ef1bbbcffe76ee52066
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
packaging/wifi-direct-manager.spec
plugin/wpasupplicant/ctrl_iface_dbus/wfd-plugin-wpasupplicant.c

index 4fe5a62..75d51f2 100644 (file)
@@ -6,7 +6,7 @@
 
 Name:          wifi-direct-manager
 Summary:       Wi-Fi Direct manger
-Version:       1.3.2
+Version:       1.3.3
 Release:       1
 Group:      Network & Connectivity/Wireless
 License:    Apache-2.0
index 4281815..0397990 100644 (file)
@@ -4006,11 +4006,11 @@ gboolean _ws_util_execute_file(const char *file_path,
        return FALSE;
 }
 
-static int __ws_p2p_firmware_start(void)
+static int __ws_p2p_firmware_start(const char *interface_name)
 {
        gboolean rv = FALSE;
        const char *path = "/usr/bin/wlan.sh";
-       char *const args[] = { "/usr/bin/wlan.sh", "p2p", NULL };
+       char *const args[] = { "/usr/bin/wlan.sh", "p2p", (char *)interface_name, NULL };
        char *const envs[] = { NULL };
 
        rv = _ws_util_execute_file(path, args, envs);
@@ -4021,11 +4021,11 @@ static int __ws_p2p_firmware_start(void)
        return 0;
 }
 
-static int __ws_p2p_firmware_stop(void)
+static int __ws_p2p_firmware_stop(const char *interface_name)
 {
        gboolean rv = FALSE;
        const char *path = "/usr/bin/wlan.sh";
-       char *const args[] = { "/usr/bin/wlan.sh", "stop", NULL };
+       char *const args[] = { "/usr/bin/wlan.sh", "stop", (char *)interface_name, NULL };
        char *const envs[] = { NULL };
        rv = _ws_util_execute_file(path, args, envs);
        if (rv < 0)
@@ -4344,7 +4344,7 @@ int ws_activate(int concurrent)
        while (retry_count < WS_CONN_RETRY_COUNT) {
                /* load wlan driver */
                if (concurrent == 0)
-                       res = __ws_p2p_firmware_start();
+                       res = __ws_p2p_firmware_start(config->ifname);
                if (res < 0) {
                        WDP_LOGE("Failed to load driver [ret=%d]", res);
                        return -1;
@@ -4378,7 +4378,7 @@ int ws_activate(int concurrent)
        if (res < 0) {
                res = __ws_p2p_supplicant_stop();
                WDP_LOGI("[/usr/sbin/p2p_supp.sh stop] returns %d", res);
-               res = __ws_p2p_firmware_stop();
+               res = __ws_p2p_firmware_stop(config->ifname);
                WDP_LOGI("P2P firmware stopped with error %d", res);
                __WDP_LOG_FUNC_EXIT__;
                return -1;
@@ -4431,7 +4431,7 @@ int ws_deactivate(int concurrent)
        if (concurrent == 0) {
                res = __ws_p2p_supplicant_stop();
                WDP_LOGI("[/usr/sbin/p2p_supp.sh stop] returns %d", res);
-               res = __ws_p2p_firmware_stop();
+               res = __ws_p2p_firmware_stop(config->ifname);
                WDP_LOGI("P2P firmware stopped with error %d", res);
        }
        g_pd->activated = FALSE;