wlan: fix warnings due to revised abstracted types

Change "wlan: use correct base type for abstracted types" fixed the
definitions of some abstracted types so that they are appropriate for
both ILP32 and LP64 architectures.  However these changes introduced
some compiler warnings in places where the compiler is detecting
mismatches between int and long base types.  Fix those compiler
warnings by modifying the code to match the new underlying base types.

Change-Id: Ibd6de39e98fe21e0cadf19aa781893fd4c7b879a
CRs-fixed: 567110
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index ae172ca..7212e1f 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -3358,7 +3358,7 @@
          // If successfully read from the registry, use the value read.
          // If not, use the default value.
          if ( match_status == VOS_STATUS_SUCCESS && (WLAN_PARAM_Integer == pRegEntry->RegType)) {
-            rv = kstrtoul(value_str, 10, &value);
+            rv = kstrtou32(value_str, 10, &value);
             if (rv < 0) {
                 hddLog(LOGE, "%s: Reg Parameter %s invalid. Enforcing default",
                        __func__, pRegEntry->RegName);
@@ -3366,7 +3366,7 @@
             }
          }
          else if ( match_status == VOS_STATUS_SUCCESS && (WLAN_PARAM_HexInteger == pRegEntry->RegType)) {
-            rv = kstrtoul(value_str, 16, &value);
+            rv = kstrtou32(value_str, 16, &value);
             if (rv < 0) {
                 hddLog(LOGE, "%s: Reg paramter %s invalid. Enforcing default",
                        __func__, pRegEntry->RegName);
@@ -3421,7 +3421,7 @@
          // If not, use the default value.
          if (VOS_STATUS_SUCCESS == match_status)
          {
-            rv = kstrtol(value_str, 10, &svalue);
+            rv = kstrtos32(value_str, 10, &svalue);
             if (rv < 0) {
                 hddLog(VOS_TRACE_LEVEL_WARN, "%s: Reg Parameter %s invalid. Enforcing Default",
                        __func__, pRegEntry->RegName);
@@ -4707,7 +4707,7 @@
    switch (pRegEntry->RegType)
    {
    case WLAN_PARAM_Integer:
-      rv = kstrtoul(value_str, 10, &value);
+      rv = kstrtou32(value_str, 10, &value);
       if (rv < 0)
           goto done;
       if (value < pRegEntry->VarMin)
@@ -4728,7 +4728,7 @@
       break;
 
    case WLAN_PARAM_HexInteger:
-      rv = kstrtoul(value_str, 16, &value);
+      rv = kstrtou32(value_str, 16, &value);
       if (rv < 0)
          goto done;
       if (value < pRegEntry->VarMin)
@@ -4749,7 +4749,7 @@
       break;
 
    case WLAN_PARAM_SignedInteger:
-      rv = kstrtol(value_str, 10, &svalue);
+      rv = kstrtos32(value_str, 10, &svalue);
       if (rv < 0)
          goto done;
       if (svalue < (v_S31_t)pRegEntry->VarMin)
diff --git a/CORE/HDD/src/wlan_hdd_ftm.c b/CORE/HDD/src/wlan_hdd_ftm.c
index 44b5936..fef4a8c 100644
--- a/CORE/HDD/src/wlan_hdd_ftm.c
+++ b/CORE/HDD/src/wlan_hdd_ftm.c
@@ -914,7 +914,7 @@
     }
 
     lenRes = snprintf(buf, lenBuf, "\n chainSelect: %s\n rxmode: %s\n "
-                                   "txpktgen: %s\n  txifs: %ld\n  txrate: ",
+                                   "txpktgen: %s\n  txifs: %d\n  txrate: ",
                       chain[ftm_status.chainSelect], rx[ftm_status.rxmode],
                       tx[ftm_status.frameGenEnabled],
                       ftm_status.frameParams.interFrameSpace);
@@ -948,7 +948,7 @@
     buf += lenRes;
     lenBuf -= lenRes;
 
-    lenRes = snprintf(buf, lenBuf, "\n  txpower: %d\n  txpktcnt: %ld\n  "
+    lenRes = snprintf(buf, lenBuf, "\n  txpower: %d\n  txpktcnt: %d\n  "
                                    "txpktlen: %d\n", ftm_status.txpower,
                       ftm_status.frameParams.numTestPackets,
                       ftm_status.frameParams.payloadLength);
diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c
index e40f792..e890d46 100644
--- a/CORE/HDD/src/wlan_hdd_hostapd.c
+++ b/CORE/HDD/src/wlan_hdd_hostapd.c
@@ -3691,7 +3691,7 @@
    }
 
    wrqu->data.length = len;
-   rc = snprintf(pLinkSpeed, len, "%lu", link_speed);
+   rc = snprintf(pLinkSpeed, len, "%u", link_speed);
 
    if ((rc < 0) || (rc >= len))
    {
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index ad8c6db..5a6e8cb 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -1237,7 +1237,7 @@
    temp_total_len += temp_len;
 
    /*age*/
-   temp_len = snprintf(pTemp, (sizeof(temp) - temp_total_len), "age=%ld\n",
+   temp_len = snprintf(pTemp, (sizeof(temp) - temp_total_len), "age=%d\n",
                   pApMetaInfo->ApInfo.age);
    pTemp += temp_len;
    temp_total_len += temp_len;
@@ -1434,7 +1434,7 @@
             }
 
             len = snprintf(pDest, HDD_BATCH_SCAN_AP_META_INFO_SIZE,
-                      "scancount=%ld\n", pAdapter->numScanList);
+                      "scancount=%u\n", pAdapter->numScanList);
             pDest += len;
             cur_len += len;
 
@@ -6520,7 +6520,7 @@
    tCsrScanRequest scanReq;
    tCsrChannelInfo channelInfo;
    eHalStatus halStatus;
-   unsigned long scanId;
+   tANI_U32 scanId;
    hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
 
    vos_mem_zero(&scanReq, sizeof(tCsrScanRequest));
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index a92a066..2f4798c 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -2513,7 +2513,7 @@
 
    wrqu->data.length = len;
    // return the linkspeed in the format required by the WiFi Framework
-   rc = snprintf(pLinkSpeed, len, "%lu", link_speed);
+   rc = snprintf(pLinkSpeed, len, "%u", link_speed);
    if ((rc < 0) || (rc >= len))
    {
        // encoding or length error?
@@ -3032,7 +3032,7 @@
                return VOS_STATUS_E_FAILURE;
         }
 
-        if (4 != sscanf(ptr,"%hhu %hhu %hhu %lu",
+        if (4 != sscanf(ptr,"%hhu %hhu %hhu %u",
                         &(tTxPerTrackingParam.ucTxPerTrackingEnable),
                         &(tTxPerTrackingParam.ucTxPerTrackingPeriod),
                         &(tTxPerTrackingParam.ucTxPerTrackingRatio),
@@ -6523,7 +6523,7 @@
            pnoRequest.aNetworks[i].ssId.length);
     ptr += pnoRequest.aNetworks[i].ssId.length;
 
-    ucParams = sscanf(ptr,"%lu %lu %hhu %n",
+    ucParams = sscanf(ptr,"%u %u %hhu %n",
                       &(pnoRequest.aNetworks[i].authentication),
                       &(pnoRequest.aNetworks[i].encryption),
                       &(pnoRequest.aNetworks[i].ucChannelCount),
@@ -6579,7 +6579,7 @@
       }
     }
 
-    if (1 != sscanf(ptr,"%lu %n",
+    if (1 != sscanf(ptr,"%u %n",
                     &(pnoRequest.aNetworks[i].bcastNetwType),
                     &nOffset))
     {
@@ -6636,7 +6636,7 @@
 
      for ( i = 0; i < pnoRequest.scanTimers.ucScanTimersCount; i++ )
      {
-        ucParams = sscanf(ptr,"%lu %lu %n",
+        ucParams = sscanf(ptr,"%u %u %n",
            &(pnoRequest.scanTimers.aTimerValues[i].uTimerValue),
            &( pnoRequest.scanTimers.aTimerValues[i].uTimerRepeat),
            &nOffset);
@@ -6966,7 +6966,7 @@
 
     ptr += nOffset;
 
-    if (1 != sscanf(ptr,"%lu %n", &(uValue), &nOffset))
+    if (1 != sscanf(ptr,"%u %n", &(uValue), &nOffset))
     {
         VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
                   "Invalid input parameter value %s",ptr);
diff --git a/CORE/VOSS/src/vos_timer.c b/CORE/VOSS/src/vos_timer.c
index 81262c6..775f7ee 100644
--- a/CORE/VOSS/src/vos_timer.c
+++ b/CORE/VOSS/src/vos_timer.c
@@ -116,30 +116,27 @@
 
 
 /*----------------------------------------------------------------------------
-  
-  \brief  vos_linux_timer_callback() - internal vos entry point which is 
-          called when the timer interval expires 
 
-  This function in turn calls the vOS client callback and changes the 
-  state of the timer from running (ACTIVE) to expired (INIT). 
-  
-  
-  \param uTimerID - return value of the timeSetEvent() from the 
-      vos_timer_start() API which 
+  \brief  vos_linux_timer_callback() - internal vos entry point which is
+          called when the timer interval expires
 
-  \param dwUser - this is supplied by the fourth parameter of the timeSetEvent()
-      which is the timer structure being passed as the userData
+  This function in turn calls the vOS client callback and changes the
+  state of the timer from running (ACTIVE) to expired (INIT).
 
-  \param uMsg - Reserved / Not Used
 
-  \param dw1  - Reserved / Not Used
+  \param data - pointer to the timer control block which describes the
+                timer that expired
 
-  \param dw2  - Reserved / Not Used
-  
   \return  nothing
+
+  Note: function signature is defined by the Linux kernel.  The fact
+  that the argument is "unsigned long" instead of "void *" is
+  unfortunately imposed upon us.  But we can safely pass a pointer via
+  this parameter for LP32 and LP64 architectures.
+
   --------------------------------------------------------------------------*/
 
-static void vos_linux_timer_callback ( v_U32_t data ) 
+static void vos_linux_timer_callback (unsigned long data)
 {
    vos_timer_t *timer = ( vos_timer_t *)data; 
    vos_msg_t msg;