[PATCH 1/4] Use constant for smd buffer size

Eugene Krasnikov k.eugene.e at gmail.com
Thu Aug 8 10:25:52 EDT 2013


From: Pontus Fuchs <pontus.fuchs at gmail.com>

In preparation for future work.

Signed-off-by: Pontus Fuchs <pontus.fuchs at gmail.com>
---
 main.c | 2 +-
 smd.h  | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/main.c b/main.c
index 71b2817..a000369 100644
--- a/main.c
+++ b/main.c
@@ -217,7 +217,7 @@ static int wcn36xx_start(struct ieee80211_hw *hw)
 	}
 
 	/* Maximum SMD message size is 4k */
-	wcn->smd_buf = kmalloc(4096, GFP_KERNEL);
+	wcn->smd_buf = kmalloc(WCN36XX_SMD_BUF_SIZE, GFP_KERNEL);
 	if (!wcn->smd_buf) {
 		wcn36xx_error("Failed to allocate smd buf");
 		ret = -ENOMEM;
diff --git a/smd.h b/smd.h
index 12c40cd..c7430ea 100644
--- a/smd.h
+++ b/smd.h
@@ -23,6 +23,8 @@
 /* Max shared size is 4k but we take less.*/
 #define WCN36XX_NV_FRAGMENT_SIZE			3072
 
+#define WCN36XX_SMD_BUF_SIZE				4096
+
 #define SMD_MSG_TIMEOUT 200
 #define WCN36XX_SMSM_WLAN_TX_ENABLE			0x00000400
 #define WCN36XX_SMSM_WLAN_TX_RINGS_EMPTY		0x00000200
-- 
1.8.2.2




More information about the wcn36xx mailing list