Commit 3a68ca01 authored by Kai Germaschewski's avatar Kai Germaschewski

ISDN: exclusive handling in isdn_net_force_dial_lp()

When using exclusive mode, we already reserved our channel
at the time that mode was set, so no need to get a free channel
in this case.

Also, indent cleanups to isdn_net_start_xmit().
parent e9858030
......@@ -1043,7 +1043,6 @@ isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
return isdn_x25_start_xmit(skb, ndev);
/* auto-dialing xmit function */
{
isdn_net_adjust_hdr(skb, ndev);
isdn_dumppkt("S:", skb->data, skb->len, 40);
......@@ -1133,7 +1132,6 @@ isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
} else
netif_stop_queue(ndev);
}
}
return 1;
}
......@@ -1696,27 +1694,32 @@ isdn_net_force_dial_lp(isdn_net_local * lp)
save_flags(flags);
cli();
/* Grab a free ISDN-Channel */
if (lp->exclusive >= 0) {
chi = lp->exclusive;
} else {
chi = isdn_get_free_slot(ISDN_USAGE_NET, lp->l2_proto, lp->l3_proto,
lp->pre_device, lp->pre_channel, lp->msn);
}
if (chi < 0) {
printk(KERN_WARNING "isdn_net_force_dial: No channel for %s\n", lp->name);
restore_flags(flags);
return -EAGAIN;
goto err;
}
/* Connect interface with channel */
isdn_net_bind_channel(lp, chi);
if (lp->p_encap == ISDN_NET_ENCAP_SYNCPPP)
if (isdn_ppp_bind(lp) < 0) {
isdn_net_unbind_channel(lp);
restore_flags(flags);
return -EAGAIN;
goto err;
}
/* Initiate dialing */
restore_flags(flags);
init_dialout(lp);
return 0;
err:
restore_flags(flags);
return -EAGAIN;
}
/*
......
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