Skip to content

Commit

Permalink
[media] siano: use a separate completion for stats
Browse files Browse the repository at this point in the history
Instead of re-use tune_done also for stats, the better is to use
a different completion.
Also, it was noticed that sometimes, the driver answers with
MSG_SMS_SIGNAL_DETECTED_IND for status request. Fix the code to
also handle those other signal indicators.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Mar 21, 2013
1 parent faab682 commit 76e41a6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/media/common/siano/smsdvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ struct smsdvb_client_t {
fe_status_t fe_status;

struct completion tune_done;
struct completion stats_done;

struct SMSHOSTLIB_STATISTICS_DVB_S sms_stat_dvb;
int event_fe_state;
Expand Down Expand Up @@ -349,7 +350,6 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
pReceptionData->ErrorTSPackets = 0;
}

complete(&client->tune_done);
break;
}
default:
Expand All @@ -376,6 +376,7 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
client->fe_status = 0;
sms_board_dvb3_event(client, DVB3_EVENT_FE_UNLOCK);
}
complete(&client->stats_done);
}

return 0;
Expand Down Expand Up @@ -471,7 +472,7 @@ static int smsdvb_send_statistics_request(struct smsdvb_client_t *client)
sizeof(struct SmsMsgHdr_ST), 0 };

rc = smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg),
&client->tune_done);
&client->stats_done);

return rc;
}
Expand Down Expand Up @@ -1002,6 +1003,7 @@ static int smsdvb_hotplug(struct smscore_device_t *coredev,
client->coredev = coredev;

init_completion(&client->tune_done);
init_completion(&client->stats_done);

kmutex_lock(&g_smsdvb_clientslock);

Expand Down

0 comments on commit 76e41a6

Please sign in to comment.