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

Commit 507c45f3 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cnss_prealloc: Differentiate prealloc table by WLAN chip"

parents 7056d42f 2532eeb1
Loading
Loading
Loading
Loading
+52 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012,2014-2017 The Linux Foundation. All rights reserved.
/* Copyright (c) 2012,2014-2017,2019 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -43,6 +43,56 @@ struct wcnss_prealloc {
};

/* pre-alloced mem for WLAN driver */

#ifdef CONFIG_CNSS_QCA6390
/* This table should be paired with WLAN chip attached ideally.
 * For QCA6390, roughly 800KB pre-allocation required.
 *
 * Be noted, currently not all QCA6390 attachment defined CNSS_QCA6390,
 * like on which single-DT feature enabled.
 */
static struct wcnss_prealloc wcnss_allocs[] = {
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
	{0, 16 * 1024, NULL},
	{0, 16 * 1024, NULL},
	{0, 16 * 1024, NULL},
	{0, 16 * 1024, NULL},
	{0, 16 * 1024, NULL},
	{0, 16 * 1024, NULL},
	{0, 32 * 1024, NULL},
	{0, 32 * 1024, NULL},
	{0, 32 * 1024, NULL},
	{0, 32 * 1024, NULL},
	{0, 32 * 1024, NULL},
	{0, 32 * 1024, NULL},
	{0, 64 * 1024, NULL},
	{0, 64 * 1024, NULL},
	{0, 64 * 1024, NULL},
	{0, 64 * 1024, NULL},
};
#else
static struct wcnss_prealloc wcnss_allocs[] = {
	{0, 8  * 1024, NULL},
	{0, 8  * 1024, NULL},
@@ -118,6 +168,7 @@ static struct wcnss_prealloc wcnss_allocs[] = {
	{0, 128 * 1024, NULL},
	{0, 128 * 1024, NULL},
};
#endif

int wcnss_prealloc_init(void)
{