From 5613a7b5d019f5b42b07569eecafb3946308d084 Mon Sep 17 00:00:00 2001 From: Tarun Karela Date: Tue, 29 May 2018 15:13:48 +0100 Subject: [PATCH] [9610] wlbt: Patch for wbtld to work on Android P Provided by purnendu - netlink api has changed and that affects wbtld. Committing it under original bugid Change-Id: I0eb84fbb4e04523e3b73541a1174a53be610d730 SCSC-Bug-Id: SSB-36810 Signed-off-by: Tarun Karela --- drivers/misc/samsung/scsc/scsc_wlbtd.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/misc/samsung/scsc/scsc_wlbtd.c b/drivers/misc/samsung/scsc/scsc_wlbtd.c index d179b0fd2f50..281c7029ca87 100755 --- a/drivers/misc/samsung/scsc/scsc_wlbtd.c +++ b/drivers/misc/samsung/scsc/scsc_wlbtd.c @@ -87,7 +87,7 @@ static struct nla_policy policies_build_type[] = { /** * Actual message type definition. */ -struct genl_ops scsc_ops[] = { +const struct genl_ops scsc_ops[] = { { .cmd = EVENT_SCSC, .flags = 0, @@ -106,19 +106,25 @@ struct genl_ops scsc_ops[] = { /* The netlink family */ static struct genl_family scsc_nlfamily = { - .id = GENL_ID_GENERATE, /* Don't bother with a hardcoded ID */ + .id = 0, /* Don't bother with a hardcoded ID */ .name = "scsc_nl_family", /* Have users key off the name instead */ .hdrsize = 0, /* No private header */ .version = 1, .maxattr = __ATTR_MAX, + .module = THIS_MODULE, + .ops = scsc_ops, + .n_ops = ARRAY_SIZE(scsc_ops), + .mcgrps = scsc_mcgrp, + .n_mcgrps = ARRAY_SIZE(scsc_mcgrp), }; int scsc_wlbtd_init(void) { int r = 0; /* register the family so that wlbtd can bind */ - r = genl_register_family_with_ops_groups(&scsc_nlfamily, scsc_ops, - scsc_mcgrp); + /*r = genl_register_family_with_ops_groups(&scsc_nlfamily, scsc_ops, + scsc_mcgrp); */ + r = genl_register_family(&scsc_nlfamily); if (r) { SCSC_TAG_ERR(WLBTD, "Failed to register family. (%d)\n", r); return -1; -- 2.20.1