isdn/gigaset: correct CAPI connection state storage

CAPI applications can handle several connections in parallel,
so one connection state per application isn't sufficient.
Store the connection state in the channel structure instead.

Impact: bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Tilman Schmidt
2010-06-21 13:55:20 +00:00
committed by David S. Miller
parent 1ce368ff28
commit 1b4843c5e8
3 changed files with 180 additions and 53 deletions
File diff suppressed because it is too large Load Diff
+4
View File
@@ -649,6 +649,10 @@ static struct bc_state *gigaset_initbcs(struct bc_state *bcs,
for (i = 0; i < AT_NUM; ++i)
bcs->commands[i] = NULL;
spin_lock_init(&bcs->aplock);
bcs->ap = NULL;
bcs->apconnstate = 0;
gig_dbg(DEBUG_INIT, " setting up bcs[%d]->hw", channel);
if (cs->ops->initbcshw(bcs))
return bcs;
+3 -1
View File
@@ -403,7 +403,9 @@ struct bc_state {
struct bas_bc_state *bas; /* usb hardware driver (base) */
} hw;
void *ap; /* LL application structure */
void *ap; /* associated LL application */
int apconnstate; /* LL application connection state */
spinlock_t aplock;
};
struct cardstate {