diff options
| author | Srinivas Girigowda <sgirigow@codeaurora.org> | 2016-12-07 14:45:34 -0800 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2017-02-06 18:17:55 -0800 |
| commit | 5bc0796592d8d92e1e45da52280c5406048b9997 (patch) | |
| tree | 1d98945db8d925c25280e1df6e48d04dbae46773 | |
| parent | 7be82c1b6ea8b20308cc722e33733108a3b9fd00 (diff) | |
qcacmn: Fix incorrect data type assignment
In function wma_get_buf_extscan_change_monitor_cmd() and
wma_get_buf_iextscan_hotlist_cmd(), numAp is of type uint32_t
but it is assigned to variable numap of type int.
Fix this by making 'numap' also of same type 'uint32_t'.
Change-Id: I02502f05d2305f62cbde47db2893770673d19fc3
CRs-Fixed: 1096384
| -rw-r--r-- | wmi/src/wmi_unified_tlv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index f91efdc0ba3a..c764fa4cf13d 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -5314,10 +5314,10 @@ static QDF_STATUS wmi_get_buf_extscan_change_monitor_cmd(wmi_unified_t wmi_handl uint8_t *buf_ptr; int j; int len = sizeof(*cmd); - int numap = psigchange->num_ap; + uint32_t numap = psigchange->num_ap; struct ap_threshold_params *src_ap = psigchange->ap; - if (!numap) { + if (!numap || (numap > WMI_WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS)) { WMI_LOGE("%s: Invalid number of bssid's", __func__); return QDF_STATUS_E_INVAL; } @@ -11250,7 +11250,7 @@ QDF_STATUS send_get_buf_extscan_hotlist_cmd_tlv(wmi_unified_t wmi_handle, int cmd_len = 0; int num_entries; int min_entries = 0; - int numap = photlist->numAp; + uint32_t numap = photlist->numAp; int len = sizeof(*cmd); len += WMI_TLV_HDR_SIZE; @@ -11262,7 +11262,7 @@ QDF_STATUS send_get_buf_extscan_hotlist_cmd_tlv(wmi_unified_t wmi_handle, /* setbssid hotlist expects the bssid list * to be non zero value */ - if ((numap <= 0) || (numap > WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS)) { + if (!numap || (numap > WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS)) { WMI_LOGE("Invalid number of APs: %d", numap); return QDF_STATUS_E_INVAL; } |
