summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnson <jjohnson@codeaurora.org>2016-10-19 07:34:42 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-10-29 17:18:00 -0700
commit929ad039e82fbc48d4cff5742183ba73ec8b18f0 (patch)
tree6c7194d015d2497503f46f3a0ebc2df3a76b9745
parent58ce4da2f150d0bab2b6967d8ba433171d284109 (diff)
qcacld-3.0: Fix hdd_ocb_config_new() signature
hdd_ocb_config_new() takes four "length" parameters, currently defined to be of type 'int'. Since these are summed to calculate the size of a dynamic memory allocation they must be non-negative so change them to 'uint32_t'. Change-Id: Ie66bbb7c69aba92d9d846cb90628110b3bea8f74 CRs-Fixed: 1079596 (cherry picked from commit a3047fb23625dfae22520c106e8b90093590b3d4)
-rw-r--r--core/hdd/src/wlan_hdd_ocb.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/hdd/src/wlan_hdd_ocb.c b/core/hdd/src/wlan_hdd_ocb.c
index 78d25b3c25fa..64ac5a0ebb42 100644
--- a/core/hdd/src/wlan_hdd_ocb.c
+++ b/core/hdd/src/wlan_hdd_ocb.c
@@ -302,10 +302,11 @@ static int hdd_ocb_register_sta(hdd_adapter_t *adapter)
*
* Return: A pointer to the OCB configuration struct, NULL on failure.
*/
-static struct sir_ocb_config *hdd_ocb_config_new(int num_channels,
- int num_schedule,
- int ndl_chan_list_len,
- int ndl_active_state_list_len)
+static
+struct sir_ocb_config *hdd_ocb_config_new(uint32_t num_channels,
+ uint32_t num_schedule,
+ uint32_t ndl_chan_list_len,
+ uint32_t ndl_active_state_list_len)
{
struct sir_ocb_config *ret = 0;
uint32_t len;
@@ -791,7 +792,7 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy,
uint32_t ndl_active_state_list_len;
uint32_t flags = 0;
int i;
- int channel_count, schedule_size;
+ uint32_t channel_count, schedule_size;
struct sir_ocb_config *config;
int rc = -EINVAL;
uint8_t *mac_addr;