diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-20 21:04:47 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-20 21:04:47 -0700 |
commit | 3b59bf081622b6446db77ad06c93fe23677bc533 (patch) | |
tree | 3f4bb5a27c90cc86994a1f6d3c53fbf9208003cb /drivers/isdn/pcbit/callbacks.c | |
parent | e45836fafe157df137a837093037f741ad8f4c90 (diff) | |
parent | bbdb32cb5b73597386913d052165423b9d736145 (diff) | |
download | op-kernel-dev-3b59bf081622b6446db77ad06c93fe23677bc533.zip op-kernel-dev-3b59bf081622b6446db77ad06c93fe23677bc533.tar.gz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking merge from David Miller:
"1) Move ixgbe driver over to purely page based buffering on receive.
From Alexander Duyck.
2) Add receive packet steering support to e1000e, from Bruce Allan.
3) Convert TCP MD5 support over to RCU, from Eric Dumazet.
4) Reduce cpu usage in handling out-of-order TCP packets on modern
systems, also from Eric Dumazet.
5) Support the IP{,V6}_UNICAST_IF socket options, making the wine
folks happy, from Erich Hoover.
6) Support VLAN trunking from guests in hyperv driver, from Haiyang
Zhang.
7) Support byte-queue-limtis in r8169, from Igor Maravic.
8) Outline code intended for IP_RECVTOS in IP_PKTOPTIONS existed but
was never properly implemented, Jiri Benc fixed that.
9) 64-bit statistics support in r8169 and 8139too, from Junchang Wang.
10) Support kernel side dump filtering by ctmark in netfilter
ctnetlink, from Pablo Neira Ayuso.
11) Support byte-queue-limits in gianfar driver, from Paul Gortmaker.
12) Add new peek socket options to assist with socket migration, from
Pavel Emelyanov.
13) Add sch_plug packet scheduler whose queue is controlled by
userland daemons using explicit freeze and release commands. From
Shriram Rajagopalan.
14) Fix FCOE checksum offload handling on transmit, from Yi Zou."
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1846 commits)
Fix pppol2tp getsockname()
Remove printk from rds_sendmsg
ipv6: fix incorrent ipv6 ipsec packet fragment
cpsw: Hook up default ndo_change_mtu.
net: qmi_wwan: fix build error due to cdc-wdm dependecy
netdev: driver: ethernet: Add TI CPSW driver
netdev: driver: ethernet: add cpsw address lookup engine support
phy: add am79c874 PHY support
mlx4_core: fix race on comm channel
bonding: send igmp report for its master
fs_enet: Add MPC5125 FEC support and PHY interface selection
net: bpf_jit: fix BPF_S_LDX_B_MSH compilation
net: update the usage of CHECKSUM_UNNECESSARY
fcoe: use CHECKSUM_UNNECESSARY instead of CHECKSUM_PARTIAL on tx
net: do not do gso for CHECKSUM_UNNECESSARY in netif_needs_gso
ixgbe: Fix issues with SR-IOV loopback when flow control is disabled
net/hyperv: Fix the code handling tx busy
ixgbe: fix namespace issues when FCoE/DCB is not enabled
rtlwifi: Remove unused ETH_ADDR_LEN defines
igbvf: Use ETH_ALEN
...
Fix up fairly trivial conflicts in drivers/isdn/gigaset/interface.c and
drivers/net/usb/{Kconfig,qmi_wwan.c} as per David.
Diffstat (limited to 'drivers/isdn/pcbit/callbacks.c')
-rw-r--r-- | drivers/isdn/pcbit/callbacks.c | 303 |
1 files changed, 150 insertions, 153 deletions
diff --git a/drivers/isdn/pcbit/callbacks.c b/drivers/isdn/pcbit/callbacks.c index 976143b..efb6d6a 100644 --- a/drivers/isdn/pcbit/callbacks.c +++ b/drivers/isdn/pcbit/callbacks.c @@ -2,16 +2,16 @@ * Callbacks for the FSM * * Copyright (C) 1996 Universidade de Lisboa - * + * * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * - * This software may be used and distributed according to the terms of + * This software may be used and distributed according to the terms of * the GNU General Public License, incorporated herein by reference. */ /* * Fix: 19981230 - Carlos Morgado <chbm@techie.com> - * Port of Nelson Escravana's <nelson.escravana@usa.net> fix to CalledPN + * Port of Nelson Escravana's <nelson.escravana@usa.net> fix to CalledPN * NULL pointer dereference in cb_in_1 (originally fixed in 2.0) */ @@ -39,86 +39,86 @@ ushort last_ref_num = 1; * */ -void cb_out_1(struct pcbit_dev * dev, struct pcbit_chan* chan, - struct callb_data *cbdata) +void cb_out_1(struct pcbit_dev *dev, struct pcbit_chan *chan, + struct callb_data *cbdata) { struct sk_buff *skb; int len; - ushort refnum; + ushort refnum; #ifdef DEBUG - printk(KERN_DEBUG "Called Party Number: %s\n", - cbdata->data.setup.CalledPN); + printk(KERN_DEBUG "Called Party Number: %s\n", + cbdata->data.setup.CalledPN); #endif - /* - * hdr - kmalloc in capi_conn_req - * - kfree when msg has been sent - */ + /* + * hdr - kmalloc in capi_conn_req + * - kfree when msg has been sent + */ - if ((len = capi_conn_req(cbdata->data.setup.CalledPN, &skb, + if ((len = capi_conn_req(cbdata->data.setup.CalledPN, &skb, chan->proto)) < 0) - { - printk("capi_conn_req failed\n"); - return; - } + { + printk("capi_conn_req failed\n"); + return; + } - refnum = last_ref_num++ & 0x7fffU; + refnum = last_ref_num++ & 0x7fffU; - chan->callref = 0; - chan->layer2link = 0; - chan->snum = 0; - chan->s_refnum = refnum; + chan->callref = 0; + chan->layer2link = 0; + chan->snum = 0; + chan->s_refnum = refnum; - pcbit_l2_write(dev, MSG_CONN_REQ, refnum, skb, len); + pcbit_l2_write(dev, MSG_CONN_REQ, refnum, skb, len); } /* * rcv CONNECT * will go into ACTIVE state * send CONN_ACTIVE_RESP - * send Select protocol request + * send Select protocol request */ -void cb_out_2(struct pcbit_dev * dev, struct pcbit_chan* chan, - struct callb_data *data) +void cb_out_2(struct pcbit_dev *dev, struct pcbit_chan *chan, + struct callb_data *data) { - isdn_ctrl ictl; - struct sk_buff *skb; + isdn_ctrl ictl; + struct sk_buff *skb; int len; - ushort refnum; + ushort refnum; - if ((len=capi_conn_active_resp(chan, &skb)) < 0) - { - printk("capi_conn_active_req failed\n"); - return; - } + if ((len = capi_conn_active_resp(chan, &skb)) < 0) + { + printk("capi_conn_active_req failed\n"); + return; + } - refnum = last_ref_num++ & 0x7fffU; - chan->s_refnum = refnum; + refnum = last_ref_num++ & 0x7fffU; + chan->s_refnum = refnum; - pcbit_l2_write(dev, MSG_CONN_ACTV_RESP, refnum, skb, len); + pcbit_l2_write(dev, MSG_CONN_ACTV_RESP, refnum, skb, len); - ictl.command = ISDN_STAT_DCONN; - ictl.driver=dev->id; - ictl.arg=chan->id; - dev->dev_if->statcallb(&ictl); + ictl.command = ISDN_STAT_DCONN; + ictl.driver = dev->id; + ictl.arg = chan->id; + dev->dev_if->statcallb(&ictl); - /* ACTIVE D-channel */ + /* ACTIVE D-channel */ - /* Select protocol */ + /* Select protocol */ - if ((len=capi_select_proto_req(chan, &skb, 1 /*outgoing*/)) < 0) { - printk("capi_select_proto_req failed\n"); - return; - } + if ((len = capi_select_proto_req(chan, &skb, 1 /*outgoing*/)) < 0) { + printk("capi_select_proto_req failed\n"); + return; + } - refnum = last_ref_num++ & 0x7fffU; - chan->s_refnum = refnum; + refnum = last_ref_num++ & 0x7fffU; + chan->s_refnum = refnum; - pcbit_l2_write(dev, MSG_SELP_REQ, refnum, skb, len); + pcbit_l2_write(dev, MSG_SELP_REQ, refnum, skb, len); } @@ -127,22 +127,22 @@ void cb_out_2(struct pcbit_dev * dev, struct pcbit_chan* chan, * inform user */ -void cb_in_1(struct pcbit_dev * dev, struct pcbit_chan* chan, - struct callb_data *cbdata) +void cb_in_1(struct pcbit_dev *dev, struct pcbit_chan *chan, + struct callb_data *cbdata) { - isdn_ctrl ictl; - unsigned short refnum; - struct sk_buff *skb; + isdn_ctrl ictl; + unsigned short refnum; + struct sk_buff *skb; int len; - ictl.command = ISDN_STAT_ICALL; - ictl.driver=dev->id; - ictl.arg=chan->id; - - /* - * ictl.num >= strlen() + strlen() + 5 - */ + ictl.command = ISDN_STAT_ICALL; + ictl.driver = dev->id; + ictl.arg = chan->id; + + /* + * ictl.num >= strlen() + strlen() + 5 + */ if (cbdata->data.setup.CallingPN == NULL) { printk(KERN_DEBUG "NULL CallingPN to phone; using 0\n"); @@ -167,18 +167,18 @@ void cb_in_1(struct pcbit_dev * dev, struct pcbit_chan* chan, printk(KERN_DEBUG "statstr: %s\n", ictl.num); #endif - dev->dev_if->statcallb(&ictl); + dev->dev_if->statcallb(&ictl); + - - if ((len=capi_conn_resp(chan, &skb)) < 0) { - printk(KERN_DEBUG "capi_conn_resp failed\n"); - return; + if ((len = capi_conn_resp(chan, &skb)) < 0) { + printk(KERN_DEBUG "capi_conn_resp failed\n"); + return; } - refnum = last_ref_num++ & 0x7fffU; - chan->s_refnum = refnum; + refnum = last_ref_num++ & 0x7fffU; + chan->s_refnum = refnum; - pcbit_l2_write(dev, MSG_CONN_RESP, refnum, skb, len); + pcbit_l2_write(dev, MSG_CONN_RESP, refnum, skb, len); } /* @@ -187,24 +187,24 @@ void cb_in_1(struct pcbit_dev * dev, struct pcbit_chan* chan, * send CONNECT message CONNECT_ACTIVE_REQ in CAPI */ -void cb_in_2(struct pcbit_dev * dev, struct pcbit_chan* chan, +void cb_in_2(struct pcbit_dev *dev, struct pcbit_chan *chan, struct callb_data *data) { - unsigned short refnum; + unsigned short refnum; struct sk_buff *skb; - int len; - - if ((len = capi_conn_active_req(chan, &skb)) < 0) { - printk(KERN_DEBUG "capi_conn_active_req failed\n"); - return; - } + int len; + + if ((len = capi_conn_active_req(chan, &skb)) < 0) { + printk(KERN_DEBUG "capi_conn_active_req failed\n"); + return; + } - refnum = last_ref_num++ & 0x7fffU; - chan->s_refnum = refnum; + refnum = last_ref_num++ & 0x7fffU; + chan->s_refnum = refnum; printk(KERN_DEBUG "sending MSG_CONN_ACTV_REQ\n"); - pcbit_l2_write(dev, MSG_CONN_ACTV_REQ, refnum, skb, len); + pcbit_l2_write(dev, MSG_CONN_ACTV_REQ, refnum, skb, len); } /* @@ -213,23 +213,23 @@ void cb_in_2(struct pcbit_dev * dev, struct pcbit_chan* chan, * */ -void cb_in_3(struct pcbit_dev * dev, struct pcbit_chan* chan, +void cb_in_3(struct pcbit_dev *dev, struct pcbit_chan *chan, struct callb_data *data) { - unsigned short refnum; - struct sk_buff *skb; + unsigned short refnum; + struct sk_buff *skb; int len; - - if ((len = capi_select_proto_req(chan, &skb, 0 /*incoming*/)) < 0) - { - printk("capi_select_proto_req failed\n"); - return; - } - refnum = last_ref_num++ & 0x7fffU; - chan->s_refnum = refnum; + if ((len = capi_select_proto_req(chan, &skb, 0 /*incoming*/)) < 0) + { + printk("capi_select_proto_req failed\n"); + return; + } + + refnum = last_ref_num++ & 0x7fffU; + chan->s_refnum = refnum; - pcbit_l2_write(dev, MSG_SELP_REQ, refnum, skb, len); + pcbit_l2_write(dev, MSG_SELP_REQ, refnum, skb, len); } @@ -239,52 +239,52 @@ void cb_in_3(struct pcbit_dev * dev, struct pcbit_chan* chan, * send disconnect resp * send msg to user */ -void cb_disc_1(struct pcbit_dev * dev, struct pcbit_chan* chan, +void cb_disc_1(struct pcbit_dev *dev, struct pcbit_chan *chan, struct callb_data *data) { - struct sk_buff *skb; + struct sk_buff *skb; int len; - ushort refnum; - isdn_ctrl ictl; - - if ((len = capi_disc_resp(chan, &skb)) < 0) { - printk("capi_disc_resp failed\n"); - return; - } - - refnum = last_ref_num++ & 0x7fffU; - chan->s_refnum = refnum; - - pcbit_l2_write(dev, MSG_DISC_RESP, refnum, skb, len); - - ictl.command = ISDN_STAT_BHUP; - ictl.driver=dev->id; - ictl.arg=chan->id; - dev->dev_if->statcallb(&ictl); + ushort refnum; + isdn_ctrl ictl; + + if ((len = capi_disc_resp(chan, &skb)) < 0) { + printk("capi_disc_resp failed\n"); + return; + } + + refnum = last_ref_num++ & 0x7fffU; + chan->s_refnum = refnum; + + pcbit_l2_write(dev, MSG_DISC_RESP, refnum, skb, len); + + ictl.command = ISDN_STAT_BHUP; + ictl.driver = dev->id; + ictl.arg = chan->id; + dev->dev_if->statcallb(&ictl); } - + /* * User HANGUP on active/call proceeding state * send disc.req */ -void cb_disc_2(struct pcbit_dev * dev, struct pcbit_chan* chan, +void cb_disc_2(struct pcbit_dev *dev, struct pcbit_chan *chan, struct callb_data *data) { - struct sk_buff *skb; + struct sk_buff *skb; int len; - ushort refnum; + ushort refnum; - if ((len = capi_disc_req(chan->callref, &skb, CAUSE_NORMAL)) < 0) - { - printk("capi_disc_req failed\n"); - return; - } + if ((len = capi_disc_req(chan->callref, &skb, CAUSE_NORMAL)) < 0) + { + printk("capi_disc_req failed\n"); + return; + } - refnum = last_ref_num++ & 0x7fffU; - chan->s_refnum = refnum; + refnum = last_ref_num++ & 0x7fffU; + chan->s_refnum = refnum; - pcbit_l2_write(dev, MSG_DISC_REQ, refnum, skb, len); + pcbit_l2_write(dev, MSG_DISC_REQ, refnum, skb, len); } /* @@ -292,18 +292,18 @@ void cb_disc_2(struct pcbit_dev * dev, struct pcbit_chan* chan, * Problem: when the HL driver sends the disc req itself * LL receives BHUP */ -void cb_disc_3(struct pcbit_dev * dev, struct pcbit_chan* chan, +void cb_disc_3(struct pcbit_dev *dev, struct pcbit_chan *chan, struct callb_data *data) { - isdn_ctrl ictl; + isdn_ctrl ictl; - ictl.command = ISDN_STAT_BHUP; - ictl.driver=dev->id; - ictl.arg=chan->id; - dev->dev_if->statcallb(&ictl); + ictl.command = ISDN_STAT_BHUP; + ictl.driver = dev->id; + ictl.arg = chan->id; + dev->dev_if->statcallb(&ictl); } -void cb_notdone(struct pcbit_dev * dev, struct pcbit_chan* chan, +void cb_notdone(struct pcbit_dev *dev, struct pcbit_chan *chan, struct callb_data *data) { } @@ -311,38 +311,35 @@ void cb_notdone(struct pcbit_dev * dev, struct pcbit_chan* chan, /* * send activate b-chan protocol */ -void cb_selp_1(struct pcbit_dev * dev, struct pcbit_chan* chan, - struct callb_data *data) +void cb_selp_1(struct pcbit_dev *dev, struct pcbit_chan *chan, + struct callb_data *data) { - struct sk_buff *skb; + struct sk_buff *skb; int len; - ushort refnum; + ushort refnum; - if ((len = capi_activate_transp_req(chan, &skb)) < 0) - { - printk("capi_conn_activate_transp_req failed\n"); - return; - } + if ((len = capi_activate_transp_req(chan, &skb)) < 0) + { + printk("capi_conn_activate_transp_req failed\n"); + return; + } - refnum = last_ref_num++ & 0x7fffU; - chan->s_refnum = refnum; + refnum = last_ref_num++ & 0x7fffU; + chan->s_refnum = refnum; - pcbit_l2_write(dev, MSG_ACT_TRANSP_REQ, refnum, skb, len); + pcbit_l2_write(dev, MSG_ACT_TRANSP_REQ, refnum, skb, len); } /* * Inform User that the B-channel is available */ -void cb_open(struct pcbit_dev * dev, struct pcbit_chan* chan, - struct callb_data *data) +void cb_open(struct pcbit_dev *dev, struct pcbit_chan *chan, + struct callb_data *data) { - isdn_ctrl ictl; + isdn_ctrl ictl; - ictl.command = ISDN_STAT_BCONN; - ictl.driver=dev->id; - ictl.arg=chan->id; - dev->dev_if->statcallb(&ictl); + ictl.command = ISDN_STAT_BCONN; + ictl.driver = dev->id; + ictl.arg = chan->id; + dev->dev_if->statcallb(&ictl); } - - - |