Commit 2604999d authored by Kai Germaschewski's avatar Kai Germaschewski

ISDN: Remove ISDN_NET_CONNECTED flags

The same information is present as (->isdn_slot >= 0), so don't
duplicate it (and risk it getting out of sync)
parent 5617cf15
...@@ -265,7 +265,6 @@ isdn_net_bind_channel(isdn_net_local * lp, int idx) ...@@ -265,7 +265,6 @@ isdn_net_bind_channel(isdn_net_local * lp, int idx)
save_flags(flags); save_flags(flags);
cli(); cli();
lp->flags |= ISDN_NET_CONNECTED;
lp->isdn_slot = idx; lp->isdn_slot = idx;
isdn_slot_set_rx_netdev(lp->isdn_slot, lp->netdev); isdn_slot_set_rx_netdev(lp->isdn_slot, lp->netdev);
isdn_slot_set_st_netdev(lp->isdn_slot, lp->netdev); isdn_slot_set_st_netdev(lp->isdn_slot, lp->netdev);
...@@ -297,7 +296,6 @@ isdn_net_unbind_channel(isdn_net_local * lp) ...@@ -297,7 +296,6 @@ isdn_net_unbind_channel(isdn_net_local * lp)
isdn_slot_set_st_netdev(lp->isdn_slot, NULL); isdn_slot_set_st_netdev(lp->isdn_slot, NULL);
isdn_slot_free(lp->isdn_slot, ISDN_USAGE_NET); isdn_slot_free(lp->isdn_slot, ISDN_USAGE_NET);
} }
lp->flags &= ~ISDN_NET_CONNECTED;
lp->isdn_slot = -1; lp->isdn_slot = -1;
restore_flags(flags); restore_flags(flags);
...@@ -1556,7 +1554,6 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup) ...@@ -1556,7 +1554,6 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup)
isdn_slot_set_st_netdev(idx, lp->netdev); isdn_slot_set_st_netdev(idx, lp->netdev);
lp->isdn_slot = slot; lp->isdn_slot = slot;
lp->ppp_slot = -1; lp->ppp_slot = -1;
lp->flags |= ISDN_NET_CONNECTED;
lp->outgoing = 0; lp->outgoing = 0;
lp->huptimer = 0; lp->huptimer = 0;
......
...@@ -159,7 +159,7 @@ static inline void isdn_net_device_wake_queue(isdn_net_local *lp) ...@@ -159,7 +159,7 @@ static inline void isdn_net_device_wake_queue(isdn_net_local *lp)
static inline int isdn_net_bound(isdn_net_local *lp) static inline int isdn_net_bound(isdn_net_local *lp)
{ {
return lp->flags & ISDN_NET_CONNECTED; return lp->isdn_slot >= 0;
} }
static inline int static inline int
......
...@@ -255,7 +255,6 @@ typedef struct { ...@@ -255,7 +255,6 @@ typedef struct {
/*=================== Start of ip-over-ISDN stuff =========================*/ /*=================== Start of ip-over-ISDN stuff =========================*/
/* Feature- and status-flags for a net-interface */ /* Feature- and status-flags for a net-interface */
#define ISDN_NET_CONNECTED 0x01 /* Bound to ISDN-Channel */
#define ISDN_NET_SECURE 0x02 /* Accept calls from phonelist only */ #define ISDN_NET_SECURE 0x02 /* Accept calls from phonelist only */
#define ISDN_NET_CALLBACK 0x04 /* activate callback */ #define ISDN_NET_CALLBACK 0x04 /* activate callback */
#define ISDN_NET_CBHUP 0x08 /* hangup before callback */ #define ISDN_NET_CBHUP 0x08 /* hangup before callback */
......
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