wlan: In HDD don't free PNO request parameters on timeout

In HDD, If timeout happens while waiting for PNO response to the PNO
request sent to firmware then don't free the memory in HDD as same
is taken care in WDA.
Increase PNO response timeout (WLAN_WAIT_TIME_PNO) to 2sec from
500msec and update probe request template appropriately.

Change-Id: Ica11f06f6b4b535f7f9870d7420b9ca50e37ad6c
CRs-Fixed: 801767
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index 24a0a07..aa81049 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -208,7 +208,7 @@
 #define HDD_PNO_SCAN_TIMERS_SET_ONE      1
 /* value should not be greater than PNO_MAX_SCAN_TIMERS */
 #define HDD_PNO_SCAN_TIMERS_SET_MULTIPLE 6
-#define WLAN_WAIT_TIME_PNO  500
+#define WLAN_WAIT_TIME_PNO  2000
 #endif
 
 #define MAX_USER_COMMAND_SIZE 4096
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 09d000c..13a5d2f 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -14145,7 +14145,8 @@
     vos_mem_zero(pnoRequest.p24GProbeTemplate, SIR_PNO_MAX_PB_REQ_SIZE);
     vos_mem_zero(pnoRequest.p5GProbeTemplate, SIR_PNO_MAX_PB_REQ_SIZE);
 
-    if ((0 < request->ie_len) && (NULL != request->ie))
+    if ((0 < request->ie_len) && (request->ie_len <= SIR_PNO_MAX_PB_REQ_SIZE) &&
+        (NULL != request->ie))
     {
         pnoRequest.us24GProbeTemplateLen = request->ie_len;
         memcpy(pnoRequest.p24GProbeTemplate, request->ie,
@@ -14220,7 +14221,6 @@
         VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
                   FL("Timed out waiting for PNO to be Enabled"));
         ret = 0;
-        goto error;
     }
 
     ret = pAdapter->pno_req_status;