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

Commit 60941392 authored by Conner Huff's avatar Conner Huff Committed by Gerrit - the friendly Code Review server
Browse files

core: Update netlink policy structure



Newer versions of kernel require attribute structs
to define lengths exactly.

Change-Id: I7195b4974cf18ff3b3cbeb4d2ed863ff97ab7b92
Acked-by: default avatarRyan Chapman <rchapman@qti.qualcomm.com>
Signed-off-by: default avatarConner Huff <chuff@codeaurora.org>
parent 1ea6d3f0
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -9,15 +9,18 @@
#include <net/sock.h>
#include <linux/skbuff.h>

#define RMNET_CORE_GENL_MAX_STR_LEN	255

/* Static Functions and Definitions */
static struct nla_policy rmnet_genl_attr_policy[RMNET_CORE_GENL_ATTR_MAX +
						1] = {
	[RMNET_CORE_GENL_ATTR_INT]  = { .type = NLA_S32 },
	[RMNET_CORE_GENL_ATTR_PID_BPS] = { .len =
	[RMNET_CORE_GENL_ATTR_PID_BPS] = { .type = NLA_EXACT_LEN, .len =
				sizeof(struct rmnet_core_pid_bps_resp) },
	[RMNET_CORE_GENL_ATTR_PID_BOOST] = { .len =
	[RMNET_CORE_GENL_ATTR_PID_BOOST] = { .type = NLA_EXACT_LEN, .len =
				sizeof(struct rmnet_core_pid_boost_req) },
	[RMNET_CORE_GENL_ATTR_STR]  = { .type = NLA_NUL_STRING },
	[RMNET_CORE_GENL_ATTR_STR]  = { .type = NLA_NUL_STRING, .len =
				RMNET_CORE_GENL_MAX_STR_LEN },
};

#define RMNET_CORE_GENL_OP(_cmd, _func)			\