Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02797794 authored by Jeff Johnson's avatar Jeff Johnson Committed by Kiet Lam
Browse files

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
parent b22689d7
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -3358,7 +3358,7 @@ static VOS_STATUS hdd_apply_cfg_ini( hdd_context_t *pHddCtx, tCfgIniEntry* iniTa
         // 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 @@ static VOS_STATUS hdd_apply_cfg_ini( hdd_context_t *pHddCtx, tCfgIniEntry* iniTa
            }
         }
         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 @@ static VOS_STATUS hdd_apply_cfg_ini( hdd_context_t *pHddCtx, tCfgIniEntry* iniTa
         // 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 @@ VOS_STATUS hdd_execute_config_command(hdd_context_t *pHddCtx, char *command)
   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 @@ VOS_STATUS hdd_execute_config_command(hdd_context_t *pHddCtx, char *command)
      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 @@ VOS_STATUS hdd_execute_config_command(hdd_context_t *pHddCtx, char *command)
      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)
+2 −2
Original line number Diff line number Diff line
@@ -914,7 +914,7 @@ static VOS_STATUS wlan_ftm_priv_get_status(hdd_adapter_t *pAdapter,char *buf)
    }

    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 @@ static VOS_STATUS wlan_ftm_priv_get_status(hdd_adapter_t *pAdapter,char *buf)
    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);
+1 −1
Original line number Diff line number Diff line
@@ -3691,7 +3691,7 @@ int iw_get_softap_linkspeed(struct net_device *dev,
   }

   wrqu->data.length = len;
   rc = snprintf(pLinkSpeed, len, "%lu", link_speed);
   rc = snprintf(pLinkSpeed, len, "%u", link_speed);

   if ((rc < 0) || (rc >= len))
   {
+3 −3
Original line number Diff line number Diff line
@@ -1237,7 +1237,7 @@ hdd_format_batch_scan_rsp
   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 @@ int hdd_return_batch_scan_rsp_to_user
            }

            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 @@ void hdd_wlan_initial_scan(hdd_adapter_t *pAdapter)
   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));
+6 −6
Original line number Diff line number Diff line
@@ -2513,7 +2513,7 @@ static int iw_get_linkspeed(struct net_device *dev,

   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 @@ static int iw_set_priv(struct net_device *dev,
               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 @@ VOS_STATUS iw_set_pno(struct net_device *dev, struct iw_request_info *info,
           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 @@ VOS_STATUS iw_set_pno(struct net_device *dev, struct iw_request_info *info,
      }
    }

    if (1 != sscanf(ptr,"%lu %n",
    if (1 != sscanf(ptr,"%u %n",
                    &(pnoRequest.aNetworks[i].bcastNetwType),
                    &nOffset))
    {
@@ -6636,7 +6636,7 @@ VOS_STATUS iw_set_pno(struct net_device *dev, struct iw_request_info *info,

     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 @@ VOS_STATUS iw_set_power_params(struct net_device *dev, struct iw_request_info *i

    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);
Loading