PFR build error fix

PFR build is failing due to unavailability of checkIPMBChannel()
function. This wasn't exposed earlier due to PFR compile flag.
Moved checkIPMBChannel() function to top.

Tested:
PFR build successful

Change-Id: I02a353e2b059a6e62b350c5872c23ec489f5696d
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
diff --git a/src/firmware-update.cpp b/src/firmware-update.cpp
index 56ad777..266fe0c 100644
--- a/src/firmware-update.cpp
+++ b/src/firmware-update.cpp
@@ -513,6 +513,33 @@
     }
 }
 
+/** @brief check if channel IPMB
+ *
+ *  This function checks if the command is from IPMB
+ *
+ * @param[in] ctx - context of current session.
+ *  @returns true if the medium is IPMB else return true.
+ **/
+ipmi::Cc checkIPMBChannel(const ipmi::Context::ptr &ctx, bool &isIPMBChannel)
+{
+    ipmi::ChannelInfo chInfo;
+
+    if (ipmi::getChannelInfo(ctx->channel, chInfo) != ipmi::ccSuccess)
+    {
+        phosphor::logging::log<phosphor::logging::level::ERR>(
+            "Failed to get Channel Info",
+            phosphor::logging::entry("CHANNEL=%d", ctx->channel));
+        return ipmi::ccUnspecifiedError;
+    }
+
+    if (static_cast<ipmi::EChannelMediumType>(chInfo.mediumType) ==
+        ipmi::EChannelMediumType::ipmb)
+    {
+        isIPMBChannel = true;
+    }
+    return ipmi::ccSuccess;
+}
+
 static void postTransferCompleteHandler(
     std::unique_ptr<sdbusplus::bus::match::match> &fwUpdateMatchSignal)
 {
@@ -977,32 +1004,6 @@
     return ipmi::responseSuccess(
         static_cast<uint8_t>(BmcExecutionContext::linuxOs), partitionPtr);
 }
-/** @brief check if channel IPMB
- *
- *  This function checks if the command is from IPMB
- *
- * @param[in] ctx - context of current session.
- *  @returns true if the medium is IPMB else return true.
- **/
-ipmi::Cc checkIPMBChannel(const ipmi::Context::ptr &ctx, bool &isIPMBChannel)
-{
-    ipmi::ChannelInfo chInfo;
-
-    if (ipmi::getChannelInfo(ctx->channel, chInfo) != ipmi::ccSuccess)
-    {
-        phosphor::logging::log<phosphor::logging::level::ERR>(
-            "Failed to get Channel Info",
-            phosphor::logging::entry("CHANNEL=%d", ctx->channel));
-        return ipmi::ccUnspecifiedError;
-    }
-
-    if (static_cast<ipmi::EChannelMediumType>(chInfo.mediumType) ==
-        ipmi::EChannelMediumType::ipmb)
-    {
-        isIPMBChannel = true;
-    }
-    return ipmi::ccSuccess;
-}
 /** @brief Get Firmware Update Random Number
  *
  *  This function generate the random number used for