diff options
| author | Srinivas Dasari <dasaris@codeaurora.org> | 2017-05-27 11:02:40 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-05-30 00:59:52 -0700 |
| commit | 8ade026141eb5c7b6fbc4eb749d7b5c059dfacb0 (patch) | |
| tree | d20b6e0104a5d0c7f3ef406c5049b90192e79405 /core | |
| parent | d10bcb7ec412e3fadf174931866e3b125edc8081 (diff) | |
qcacld-3.0: Increase cld80211 family nlmsg size to 8K bytes
Current cld80211 nl message size depends on PAGE_SIZE. PAGE_SIZE
can be 4K and thus it's limiting the maximum nl message size to
4K bytes. Make the max supported nl message size to 8K bytes
irrespective of PAGE_SIZE.
Change-Id: I58fe8f85a5c9a0476fc5df75d0caa342cc261967
CRs-Fixed: 2053305
Diffstat (limited to 'core')
| -rw-r--r-- | core/utils/nlink/src/wlan_nlink_srv.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/core/utils/nlink/src/wlan_nlink_srv.c b/core/utils/nlink/src/wlan_nlink_srv.c index 87390264ca39..6416eb042d76 100644 --- a/core/utils/nlink/src/wlan_nlink_srv.c +++ b/core/utils/nlink/src/wlan_nlink_srv.c @@ -43,6 +43,8 @@ #include <wlan_nlink_srv.h> #include <qdf_trace.h> +#define WLAN_CLD80211_MAX_SIZE (SKB_WITH_OVERHEAD(8192UL) - NLMSG_HDRLEN) + #if defined(CONFIG_CNSS_LOGGER) #include <net/cnss_logger.h> @@ -453,7 +455,17 @@ static int send_msg_to_cld80211(int mcgroup_id, int pid, int app_id, if (in_interrupt() || irqs_disabled() || in_atomic()) flags = GFP_ATOMIC; - msg = nlmsg_new(NLMSG_DEFAULT_SIZE, flags); + if (len > NLMSG_DEFAULT_SIZE) { + if (len > WLAN_CLD80211_MAX_SIZE) { + QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, + "buf size:%d if more than max size: %d", + len, WLAN_CLD80211_MAX_SIZE); + return -ENOMEM; + } + msg = nlmsg_new(WLAN_CLD80211_MAX_SIZE, flags); + } else { + msg = nlmsg_new(NLMSG_DEFAULT_SIZE, flags); + } if (!msg) { QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, "nlmsg malloc fails"); |
