wlan: enabling ARP offload in suspended state on association

In DUT suspend state if station gets associated to an AP ARP offload
was not getting enabled. with this change host would be triggering
ARP offload in suspended state

Change-Id: I2240bcdb48c0837163d47e8235012af9cce7c7f1
CRs-fixed: 477590
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index cb67991..a446664 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -96,6 +96,7 @@
 #include "wlan_hdd_softap_tx_rx.h"
 #include "wlan_hdd_main.h"
 #include "wlan_hdd_assoc.h"
+#include "wlan_hdd_power.h"
 #ifdef WLAN_BTAMP_FEATURE
 #include "bap_hdd_misc.h"
 #endif
@@ -6588,6 +6589,7 @@
                      struct net_device *dev, bool mode, v_SINT_t timeout)
 {
     hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
+    hdd_context_t *pHddCtx;
     VOS_STATUS vos_status;
 
     ENTER();
@@ -6604,6 +6606,28 @@
         return -EAGAIN;
     }
 
+    pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
+    if (NULL == pHddCtx)
+    {
+        hddLog(VOS_TRACE_LEVEL_FATAL, "%s: HDD context is NULL\n", __func__);
+        return -ENODEV;
+    }
+
+    if ((DRIVER_POWER_MODE_AUTO == !mode) &&
+        (TRUE == pHddCtx->hdd_wlan_suspended) &&
+        (pHddCtx->cfg_ini->fhostArpOffload) &&
+        (eConnectionState_Associated ==
+             (WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))->conn_info.connState))
+    {
+        vos_status = hdd_conf_hostarpoffload(pAdapter, TRUE);
+        if (!VOS_IS_STATUS_SUCCESS(vos_status))
+        {
+            hddLog(VOS_TRACE_LEVEL_INFO,
+                   "%s:Failed to enable ARPOFFLOAD Feature %d\n",
+                   __func__, vos_status);
+        }
+    }
+
     /**The get power cmd from the supplicant gets updated by the nl only
      *on successful execution of the function call
      *we are oppositely mapped w.r.t mode in the driver