net: core: Send only BIND and LISTEN events.

Currently DPM is listening for all netlink events
and there is battery drain because of that. Since,
DPM is interested only in BIND and LISTEN events,
changes are to process only BIND and LSTEN events
and skip the rest for the sockev client.

CRs-Fixed: 945890
Change-Id: Iae11027945b981538f9c16ae9d5cd1ecf88a3743
Signed-off-by: Susheel Yadagiri <syadagir@codeaurora.org>
Signed-off-by: Ravinder Konka <rkonka@codeaurora.org>
This commit is contained in:
Ravinder Konka 2015-11-26 11:43:22 -08:00 committed by David Keitel
parent 41d630980d
commit 3319385988

View file

@ -78,6 +78,9 @@ static int sockev_client_cb(struct notifier_block *nb,
if (sock->sk->sk_family != AF_INET && sock->sk->sk_family != AF_INET6)
goto done;
if (event != SOCKEV_BIND && event != SOCKEV_LISTEN)
goto done;
skb = nlmsg_new(sizeof(struct sknlsockevmsg), GFP_KERNEL);
if (skb == NULL)
goto done;