mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-24 23:19:31 -05:00
48 lines
1.8 KiB
Diff
48 lines
1.8 KiB
Diff
From c3ef29be79ea5d1c67cde62c7666cb6d4778383c Mon Sep 17 00:00:00 2001
|
|
From: Srinivas Girigowda <sgirigow@codeaurora.org>
|
|
Date: Fri, 21 Oct 2016 14:17:14 -0700
|
|
Subject: [PATCH] qcacld-2.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
|
|
Bug: 31750554
|
|
Signed-off-by: Srinivas Girigowda <sgirigow@codeaurora.org>
|
|
---
|
|
drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_ocb.c | 11 ++++++-----
|
|
1 file changed, 6 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_ocb.c b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_ocb.c
|
|
index 3e2d88987e013..eec9b9e094480 100644
|
|
--- a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_ocb.c
|
|
+++ b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_ocb.c
|
|
@@ -406,10 +406,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;
|
|
@@ -904,7 +905,7 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy,
|
|
void *def_tx_param = NULL;
|
|
uint32_t def_tx_param_size = 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;
|