qcacmn: 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
This commit is contained in:
Srinivas Dasari
2017-06-14 15:59:52 +05:30
کامیت شده توسط snandini
والد 6e56986cae
کامیت 6d2ffaa980

مشاهده پرونده

@@ -276,6 +276,8 @@ qdf_export_symbol(nl_srv_is_initialized);
#include <net/cnss_nl.h>
#endif
#define WLAN_CLD80211_MAX_SIZE (SKB_WITH_OVERHEAD(8192UL) - NLMSG_HDRLEN)
/* Global variables */
static DEFINE_MUTEX(nl_srv_sem);
static struct sock *nl_srv_sock;
@@ -459,7 +461,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, (int) 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");