android_kernel_cmhtcleo/arch/arm/mach-msm/rpc_server_dog_keepalive.c

54 lines
1.5 KiB
C
Raw Normal View History

2010-08-27 09:19:57 +00:00
/* arch/arm/mach-msm/rpc_server_dog_keepalive.c
*
* Copyright (C) 2007 Google, Inc.
* Author: Iliyan Malchev <ibm@android.com>
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <mach/msm_rpcrouter.h>
#include <mach/msm_rpc_version.h>
#include <mach/amss_para.h>
2010-08-27 09:19:57 +00:00
/* dog_keepalive server definitions */
#define DOG_KEEPALIVE_PROG 0x30000015
/* TODO: Remove server registration with _VERS when modem is upated with _COMP*/
static int handle_rpc_call(struct msm_rpc_server *server,
struct rpc_request_hdr *req, unsigned len)
{
if (req->procedure==amss_get_num_value(RPC_DOG_KEEPALIVE_NULL))
2010-08-27 09:19:57 +00:00
return 0;
else if (req->procedure==amss_get_num_value(RPC_DOG_KEEPALIVE_BEACON))
2010-08-27 09:19:57 +00:00
return 0;
else
2010-08-27 09:19:57 +00:00
return -ENODEV;
}
static struct msm_rpc_server rpc_server = {
.prog = DOG_KEEPALIVE_PROG,
.rpc_call = handle_rpc_call,
};
static int __init rpc_server_init(void)
{
/* Dual server registration to support backwards compatibility vers */
rpc_server.vers = amss_get_num_value(DOG_KEEPALIVE_VERS);
2010-08-27 09:19:57 +00:00
return msm_rpc_create_server(&rpc_server);
}
module_init(rpc_server_init);