[7570] wlbt : Returning WIFI_ERROR_NOT_SUPPORTED for NAT KeepAlive APIs.
authorMohit Ghuley <mohit.ghuley@samsung.com>
Fri, 24 Mar 2017 08:20:29 +0000 (13:50 +0530)
committerTarun Karela <t.karela@samsung.com>
Mon, 4 Jun 2018 09:40:47 +0000 (10:40 +0100)
Returning WIFI_ERROR_NOT_SUPPORTED for NAT KeepAlive APIs.

Change-Id: I011d7b4b0b4a9b6623bf5ba94dac07a593507dd7
SCSC-Bug-Id:SSB-27261
Signed-off-by: Mohit Ghuley <mohit.ghuley@samsung.com>
wifi_offload.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index ee16b17..8552959
@@ -192,35 +192,17 @@ public:
     }
 };
 
-
 /* API to send specified mkeep_alive packet periodically. */
 wifi_error wifi_start_sending_offloaded_packet(wifi_request_id index, wifi_interface_handle iface,
         u8 *ip_packet, u16 ip_packet_len, u8 *src_mac_addr, u8 *dst_mac_addr, u32 period_msec)
 {
-    if ((index > 0 && index <= N_AVAIL_ID) && (ip_packet != NULL) && (src_mac_addr != NULL)
-            && (dst_mac_addr != NULL) && (period_msec > 0)
-            && (ip_packet_len <= MKEEP_ALIVE_IP_PKT_MAX)) {
-        MKeepAliveCommand *cmd = new MKeepAliveCommand(iface, index, ip_packet, ip_packet_len,
-                src_mac_addr, dst_mac_addr, period_msec, START_MKEEP_ALIVE);
-        wifi_error result = (wifi_error)cmd->start();
-        delete cmd;
-        return result;
-    } else {
-        ALOGE("Invalid mkeep_alive parameters");
-        return  WIFI_ERROR_INVALID_ARGS;
-    }
+    ALOGE("Returning WIFI_ERROR_NOT_SUPPORTED, as NAT KeepAlive Feature is disabled as of now.");
+    return WIFI_ERROR_NOT_SUPPORTED;
 }
 
 /* API to stop sending mkeep_alive packet. */
 wifi_error wifi_stop_sending_offloaded_packet(wifi_request_id index, wifi_interface_handle iface)
 {
-    if (index > 0 && index <= N_AVAIL_ID) {
-        MKeepAliveCommand *cmd = new MKeepAliveCommand(iface, index, STOP_MKEEP_ALIVE);
-        wifi_error result = (wifi_error)cmd->start();
-        delete cmd;
-        return result;
-    } else {
-        ALOGE("Invalid mkeep_alive parameters");
-        return  WIFI_ERROR_INVALID_ARGS;
-    }
+    ALOGE("Returning WIFI_ERROR_NOT_SUPPORTED, as NAT KeepAlive Feature is disabled as of now.");
+    return WIFI_ERROR_NOT_SUPPORTED;
 }