Commit 1b4843c5 authored by Tilman Schmidt's avatar Tilman Schmidt Committed by David S. Miller

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: default avatarTilman Schmidt <tilman@imap.cc>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1ce368ff
This diff is collapsed.
...@@ -649,6 +649,10 @@ static struct bc_state *gigaset_initbcs(struct bc_state *bcs, ...@@ -649,6 +649,10 @@ static struct bc_state *gigaset_initbcs(struct bc_state *bcs,
for (i = 0; i < AT_NUM; ++i) for (i = 0; i < AT_NUM; ++i)
bcs->commands[i] = NULL; 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); gig_dbg(DEBUG_INIT, " setting up bcs[%d]->hw", channel);
if (cs->ops->initbcshw(bcs)) if (cs->ops->initbcshw(bcs))
return bcs; return bcs;
......
...@@ -403,7 +403,9 @@ struct bc_state { ...@@ -403,7 +403,9 @@ struct bc_state {
struct bas_bc_state *bas; /* usb hardware driver (base) */ struct bas_bc_state *bas; /* usb hardware driver (base) */
} hw; } hw;
void *ap; /* LL application structure */ void *ap; /* associated LL application */
int apconnstate; /* LL application connection state */
spinlock_t aplock;
}; };
struct cardstate { struct cardstate {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment