[9610] wlbt: Move around code to fix compilation error (Android P)

Move various definations to beGinning of file to fix compilation error

Change-Id: Ic30aa7f168bbdae79fc766cac5230c7cb52b69ee
SCSC-Bug-Id: SSB-40175
Signed-off-by: Tarun Karela <t.karela@samsung.com>
diff --git a/wifi_hal.cpp b/wifi_hal.cpp
index 0ea9f46..bdc5545 100755
--- a/wifi_hal.cpp
+++ b/wifi_hal.cpp
@@ -72,6 +72,35 @@
     nl_socket_set_local_port(sock, pid + (port << 22));
 }
 
+class SetNdoffloadCommand : public WifiCommand {
+
+private:
+    u8 mEnable;
+public:
+    SetNdoffloadCommand(wifi_interface_handle handle, u8 enable)
+        : WifiCommand(handle, 0) {
+        mEnable = enable;
+    }
+    virtual int create() {
+        int ret;
+
+        ret = mMsg.create(GOOGLE_OUI, SLSI_NL80211_VENDOR_SUBCMD_CONFIGURE_ND_OFFLOAD);
+        if (ret < 0) {
+            ALOGE("Can't create message to send to driver - %d", ret);
+            return WIFI_ERROR_NOT_AVAILABLE;
+        }
+
+        nlattr *data = mMsg.attr_start(NL80211_ATTR_VENDOR_DATA);
+        ret = mMsg.put_u8(ANDR_WIFI_ATTRIBUTE_ND_OFFLOAD_CONFIG, mEnable);
+        if (ret < 0) {
+        	return ret;
+        }
+	ALOGD("Driver message has been created successfully--> %d", mEnable);
+        mMsg.attr_end(data);
+        return WIFI_SUCCESS;
+    }
+};
+
 static nl_sock * wifi_create_nl_socket(int port)
 {
     struct nl_sock *sock = nl_socket_alloc();
@@ -91,6 +120,32 @@
     return sock;
 }
 
+
+wifi_error wifi_configure_nd_offload(wifi_interface_handle handle, u8 enable)
+{
+	SetNdoffloadCommand command(handle, enable);
+	int ret = command.requestResponse();
+	if (ret != WIFI_SUCCESS) {
+		if (ret == -EPERM) {           /*This is just to pass VTS test */
+			ALOGD("return value from driver--> %d",ret);
+			return WIFI_SUCCESS;
+		}
+	}
+	return (wifi_error)ret;
+}
+
+wifi_error wifi_get_packet_filter_capabilities(wifi_interface_handle handle,
+                                                      u32 *version, u32 *max_len)
+{
+	/*Return success to pass VTS test.*/
+	ALOGD("Packet filter not supported");
+
+	*version = 0;
+	*max_len = 0;
+
+	return WIFI_SUCCESS;
+}
+
 /* Initialize HAL function pointer table */
 wifi_error init_wifi_vendor_hal_func_table(wifi_hal_fn *fn)
 {
@@ -802,34 +857,7 @@
 
 };
 
-class SetNdoffloadCommand : public WifiCommand {
 
-private:
-    u8 mEnable;
-public:
-    SetNdoffloadCommand(wifi_interface_handle handle, u8 enable)
-        : WifiCommand(handle, 0) {
-        mEnable = enable;
-    }
-    virtual int create() {
-        int ret;
-
-        ret = mMsg.create(GOOGLE_OUI, SLSI_NL80211_VENDOR_SUBCMD_CONFIGURE_ND_OFFLOAD);
-        if (ret < 0) {
-            ALOGE("Can't create message to send to driver - %d", ret);
-            return WIFI_ERROR_NOT_AVAILABLE;
-        }
-
-        nlattr *data = mMsg.attr_start(NL80211_ATTR_VENDOR_DATA);
-        ret = mMsg.put_u8(ANDR_WIFI_ATTRIBUTE_ND_OFFLOAD_CONFIG, mEnable);
-        if (ret < 0) {
-        	return ret;
-        }
-	ALOGD("Driver message has been created successfully--> %d", mEnable);
-        mMsg.attr_end(data);
-        return WIFI_SUCCESS;
-    }
-};
 
 static int wifi_get_multicast_id(wifi_handle handle, const char *name, const char *group)
 {
@@ -989,30 +1017,6 @@
     return (wifi_error) command.requestResponse();
 }
 
-wifi_error wifi_configure_nd_offload(wifi_interface_handle handle, u8 enable)
-{
-	SetNdoffloadCommand command(handle, enable);
-	int ret = command.requestResponse();
-	if (ret != WIFI_SUCCESS) {
-		if (ret == -EPERM) {           /*This is just to pass VTS test */
-			ALOGD("return value from driver--> %d",ret);
-			return WIFI_SUCCESS;
-		}
-	}
-	return (wifi_error)ret;
-}
-
-wifi_error wifi_get_packet_filter_capabilities(wifi_interface_handle handle,
-                                                      u32 *version, u32 *max_len)
-{
-	/*Return success to pass VTS test.*/
-	ALOGD("Packet filter not supported");
-
-	*version = 0;
-	*max_len = 0;
-
-	return WIFI_SUCCESS;
-}
 
 /////////////////////////////////////////////////////////////////////////////