diag: Implement new polling response mechanism
PC tools send various polling commands to target to detect its
presence. Initially modem used to respond to all pollings. However,
with new targets, we have applications processor as master as well
as subsystem restart. Due to these new features, modem does not respond
all the time. This change implements a new mechanism to respond to
polling.
The DIAG driver maintains a flag variable to keep track of any polling
command registered by a remote peripheral. As long as any polling command
is present, diag driver ignores a special polling request. If no peripheral
has registered for any polling at all, then diag responds to this special
polling request.
Change-Id: I6ba1744dd3dd4982027b671efce3beffb9a27786
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
diff --git a/drivers/char/diag/diagfwd_cntl.c b/drivers/char/diag/diagfwd_cntl.c
index df2cd65..22a2ccb 100644
--- a/drivers/char/diag/diagfwd_cntl.c
+++ b/drivers/char/diag/diagfwd_cntl.c
@@ -192,6 +192,7 @@
void diagfwd_cntl_init(void)
{
+ driver->polling_reg_flag = 0;
if (driver->buf_in_cntl == NULL) {
driver->buf_in_cntl = kzalloc(IN_BUF_SIZE, GFP_KERNEL);
if (driver->buf_in_cntl == NULL)