From de62262eef3eb2cdc3eff344b1cfe5c45851bdce Mon Sep 17 00:00:00 2001 From: Par-Gunnar Hjalmdahl Date: Wed, 31 Aug 2011 20:03:17 +0530 Subject: cg2900: Do not send RX data to wrong user This patch corrects an issue where received data was sent to the wrong user depending on which user first opened the channel. ST-Ericsson Linux next: Not tested, ER 282957 ST-Ericsson ID: 333690 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I14c0bb64e2bd2c0d175da0407af3da179920d015 Signed-off-by: Par-Gunnar Hjalmdahl Signed-off-by: Virupax Sadashivpetimath Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/29927 --- drivers/staging/cg2900/mfd/cg2900_chip.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/staging/cg2900/mfd/cg2900_chip.c b/drivers/staging/cg2900/mfd/cg2900_chip.c index fa243dcab15..9807b665efb 100644 --- a/drivers/staging/cg2900/mfd/cg2900_chip.c +++ b/drivers/staging/cg2900/mfd/cg2900_chip.c @@ -2075,10 +2075,15 @@ static void data_from_chip(struct cg2900_chip_dev *dev, goto user_found; } - /* Search through the list of all open channels to find the user */ + /* + * Search through the list of all open channels to find the user. + * We skip the audio channels since they have already been checked + * earlier in this function. + */ list_for_each(cursor, &info->open_channels) { tmp = list_entry(cursor, struct cg2900_channel_item, list); - if (tmp->user->h4_channel == h4_channel) { + if (tmp->user->h4_channel == h4_channel && + !tmp->user->is_audio) { user = tmp->user; goto user_found; } -- cgit v1.2.3