wlan: New DWELLTIME ioctl interfaces break backward compatibility.

The new interface for getting and setting the dwell times break
the interface for old application programs. The fix is to allow
setting and getting of various active/passive dwelltimes while
maintaining the backward compatibility with old applications.

Change-Id: I162a1cfe63195f05a30c396fbca035615519d5f4
CRs-Fixed: 677297
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 65b10c8..16d675d 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -2003,6 +2003,12 @@
                 (int)pCfg->nPassiveMinChnTime);
         return ret;
     }
+    else if (strncmp(command, "GETDWELLTIME", 12) == 0)
+    {
+        *len = scnprintf(extra, n, "GETDWELLTIME %u \n",
+                (int)pCfg->nActiveMaxChnTime);
+        return ret;
+    }
     else
     {
         ret = -EINVAL;
@@ -2095,6 +2101,22 @@
         smeConfig.csrConfig.nPassiveMinChnTime = val;
         sme_UpdateConfig(hHal, &smeConfig);
     }
+    else if (strncmp(command, "SETDWELLTIME", 12) == 0)
+    {
+        value = value + 13;
+        temp = kstrtou32(value, 10, &val);
+        if (temp != 0 || val < CFG_ACTIVE_MAX_CHANNEL_TIME_MIN ||
+                         val > CFG_ACTIVE_MAX_CHANNEL_TIME_MAX )
+        {
+            VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+             "%s: argument passed for SETDWELLTIME is incorrect", __func__);
+            ret = -EFAULT;
+            return ret;
+        }
+        pCfg->nActiveMaxChnTime = val;
+        smeConfig.csrConfig.nActiveMaxChnTime = val;
+        sme_UpdateConfig(hHal, &smeConfig);
+    }
     else
     {
         ret = -EINVAL;