Commit d57b1869 authored by YOSHIFUJI Hideaki's avatar YOSHIFUJI Hideaki Committed by David S. Miller

[NET] LLC: Fix whitespace errors.

Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 56d6c3d7
...@@ -67,7 +67,7 @@ static inline u16 llc_ui_next_link_no(int sap) ...@@ -67,7 +67,7 @@ static inline u16 llc_ui_next_link_no(int sap)
static inline __be16 llc_proto_type(u16 arphrd) static inline __be16 llc_proto_type(u16 arphrd)
{ {
return arphrd == ARPHRD_IEEE802_TR ? return arphrd == ARPHRD_IEEE802_TR ?
htons(ETH_P_TR_802_2) : htons(ETH_P_802_2); htons(ETH_P_TR_802_2) : htons(ETH_P_802_2);
} }
/** /**
...@@ -114,7 +114,7 @@ static int llc_ui_send_data(struct sock* sk, struct sk_buff *skb, int noblock) ...@@ -114,7 +114,7 @@ static int llc_ui_send_data(struct sock* sk, struct sk_buff *skb, int noblock)
struct llc_sock* llc = llc_sk(sk); struct llc_sock* llc = llc_sk(sk);
int rc = 0; int rc = 0;
if (unlikely(llc_data_accept_state(llc->state) || if (unlikely(llc_data_accept_state(llc->state) ||
llc->remote_busy_flag || llc->remote_busy_flag ||
llc->p_flag)) { llc->p_flag)) {
long timeout = sock_sndtimeo(sk, noblock); long timeout = sock_sndtimeo(sk, noblock);
...@@ -602,7 +602,7 @@ static int llc_ui_accept(struct socket *sock, struct socket *newsock, int flags) ...@@ -602,7 +602,7 @@ static int llc_ui_accept(struct socket *sock, struct socket *newsock, int flags)
int rc = -EOPNOTSUPP; int rc = -EOPNOTSUPP;
dprintk("%s: accepting on %02X\n", __FUNCTION__, dprintk("%s: accepting on %02X\n", __FUNCTION__,
llc_sk(sk)->laddr.lsap); llc_sk(sk)->laddr.lsap);
lock_sock(sk); lock_sock(sk);
if (unlikely(sk->sk_type != SOCK_STREAM)) if (unlikely(sk->sk_type != SOCK_STREAM))
goto out; goto out;
...@@ -617,7 +617,7 @@ static int llc_ui_accept(struct socket *sock, struct socket *newsock, int flags) ...@@ -617,7 +617,7 @@ static int llc_ui_accept(struct socket *sock, struct socket *newsock, int flags)
goto out; goto out;
} }
dprintk("%s: got a new connection on %02X\n", __FUNCTION__, dprintk("%s: got a new connection on %02X\n", __FUNCTION__,
llc_sk(sk)->laddr.lsap); llc_sk(sk)->laddr.lsap);
skb = skb_dequeue(&sk->sk_receive_queue); skb = skb_dequeue(&sk->sk_receive_queue);
rc = -EINVAL; rc = -EINVAL;
if (!skb->sk) if (!skb->sk)
...@@ -682,7 +682,7 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock, ...@@ -682,7 +682,7 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock,
if (flags & MSG_PEEK) { if (flags & MSG_PEEK) {
peek_seq = llc->copied_seq; peek_seq = llc->copied_seq;
seq = &peek_seq; seq = &peek_seq;
} }
target = sock_rcvlowat(sk, flags & MSG_WAITALL, len); target = sock_rcvlowat(sk, flags & MSG_WAITALL, len);
copied = 0; copied = 0;
...@@ -860,7 +860,7 @@ static int llc_ui_sendmsg(struct kiocb *iocb, struct socket *sock, ...@@ -860,7 +860,7 @@ static int llc_ui_sendmsg(struct kiocb *iocb, struct socket *sock,
goto release; goto release;
skb->dev = llc->dev; skb->dev = llc->dev;
skb->protocol = llc_proto_type(addr->sllc_arphrd); skb->protocol = llc_proto_type(addr->sllc_arphrd);
skb_reserve(skb, hdrlen); skb_reserve(skb, hdrlen);
rc = memcpy_fromiovec(skb_put(skb, copied), msg->msg_iov, copied); rc = memcpy_fromiovec(skb_put(skb, copied), msg->msg_iov, copied);
if (rc) if (rc)
goto out; goto out;
...@@ -1116,11 +1116,11 @@ static const struct proto_ops llc_ui_ops = { ...@@ -1116,11 +1116,11 @@ static const struct proto_ops llc_ui_ops = {
}; };
static char llc_proc_err_msg[] __initdata = static char llc_proc_err_msg[] __initdata =
KERN_CRIT "LLC: Unable to register the proc_fs entries\n"; KERN_CRIT "LLC: Unable to register the proc_fs entries\n";
static char llc_sysctl_err_msg[] __initdata = static char llc_sysctl_err_msg[] __initdata =
KERN_CRIT "LLC: Unable to register the sysctl entries\n"; KERN_CRIT "LLC: Unable to register the sysctl entries\n";
static char llc_sock_err_msg[] __initdata = static char llc_sock_err_msg[] __initdata =
KERN_CRIT "LLC: Unable to register the network family\n"; KERN_CRIT "LLC: Unable to register the network family\n";
static int __init llc2_init(void) static int __init llc2_init(void)
{ {
......
...@@ -854,7 +854,7 @@ static void llc_sk_init(struct sock* sk) ...@@ -854,7 +854,7 @@ static void llc_sk_init(struct sock* sk)
llc->n2 = 2; /* max retransmit */ llc->n2 = 2; /* max retransmit */
llc->k = 2; /* tx win size, will adjust dynam */ llc->k = 2; /* tx win size, will adjust dynam */
llc->rw = 128; /* rx win size (opt and equal to llc->rw = 128; /* rx win size (opt and equal to
* tx_win of remote LLC) */ * tx_win of remote LLC) */
skb_queue_head_init(&llc->pdu_unack_q); skb_queue_head_init(&llc->pdu_unack_q);
sk->sk_backlog_rcv = llc_backlog_rcv; sk->sk_backlog_rcv = llc_backlog_rcv;
} }
......
...@@ -164,7 +164,7 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev, ...@@ -164,7 +164,7 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev,
sap = llc_sap_find(pdu->dsap); sap = llc_sap_find(pdu->dsap);
if (unlikely(!sap)) {/* unknown SAP */ if (unlikely(!sap)) {/* unknown SAP */
dprintk("%s: llc_sap_find(%02X) failed!\n", __FUNCTION__, dprintk("%s: llc_sap_find(%02X) failed!\n", __FUNCTION__,
pdu->dsap); pdu->dsap);
goto drop; goto drop;
} }
/* /*
...@@ -173,9 +173,9 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev, ...@@ -173,9 +173,9 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev,
*/ */
rcv = rcu_dereference(sap->rcv_func); rcv = rcu_dereference(sap->rcv_func);
if (rcv) { if (rcv) {
struct sk_buff *cskb = skb_clone(skb, GFP_ATOMIC); struct sk_buff *cskb = skb_clone(skb, GFP_ATOMIC);
if (cskb) if (cskb)
rcv(cskb, dev, pt, orig_dev); rcv(cskb, dev, pt, orig_dev);
} }
dest = llc_pdu_type(skb); dest = llc_pdu_type(skb);
if (unlikely(!dest || !llc_type_handlers[dest - 1])) if (unlikely(!dest || !llc_type_handlers[dest - 1]))
......
...@@ -40,7 +40,7 @@ int llc_mac_hdr_init(struct sk_buff *skb, ...@@ -40,7 +40,7 @@ int llc_mac_hdr_init(struct sk_buff *skb,
case ARPHRD_IEEE802_TR: { case ARPHRD_IEEE802_TR: {
struct net_device *dev = skb->dev; struct net_device *dev = skb->dev;
struct trh_hdr *trh; struct trh_hdr *trh;
skb->mac.raw = skb_push(skb, sizeof(*trh)); skb->mac.raw = skb_push(skb, sizeof(*trh));
trh = tr_hdr(skb); trh = tr_hdr(skb);
trh->ac = AC; trh->ac = AC;
......
...@@ -39,7 +39,7 @@ void llc_pdu_set_pf_bit(struct sk_buff *skb, u8 bit_value) ...@@ -39,7 +39,7 @@ void llc_pdu_set_pf_bit(struct sk_buff *skb, u8 bit_value)
llc_pdu_decode_pdu_type(skb, &pdu_type); llc_pdu_decode_pdu_type(skb, &pdu_type);
pdu = llc_pdu_sn_hdr(skb); pdu = llc_pdu_sn_hdr(skb);
switch (pdu_type) { switch (pdu_type) {
case LLC_PDU_TYPE_I: case LLC_PDU_TYPE_I:
case LLC_PDU_TYPE_S: case LLC_PDU_TYPE_S:
......
...@@ -142,18 +142,18 @@ out: ...@@ -142,18 +142,18 @@ out:
} }
static char *llc_conn_state_names[] = { static char *llc_conn_state_names[] = {
[LLC_CONN_STATE_ADM] = "adm", [LLC_CONN_STATE_ADM] = "adm",
[LLC_CONN_STATE_SETUP] = "setup", [LLC_CONN_STATE_SETUP] = "setup",
[LLC_CONN_STATE_NORMAL] = "normal", [LLC_CONN_STATE_NORMAL] = "normal",
[LLC_CONN_STATE_BUSY] = "busy", [LLC_CONN_STATE_BUSY] = "busy",
[LLC_CONN_STATE_REJ] = "rej", [LLC_CONN_STATE_REJ] = "rej",
[LLC_CONN_STATE_AWAIT] = "await", [LLC_CONN_STATE_AWAIT] = "await",
[LLC_CONN_STATE_AWAIT_BUSY] = "await_busy", [LLC_CONN_STATE_AWAIT_BUSY] = "await_busy",
[LLC_CONN_STATE_AWAIT_REJ] = "await_rej", [LLC_CONN_STATE_AWAIT_REJ] = "await_rej",
[LLC_CONN_STATE_D_CONN] = "d_conn", [LLC_CONN_STATE_D_CONN] = "d_conn",
[LLC_CONN_STATE_RESET] = "reset", [LLC_CONN_STATE_RESET] = "reset",
[LLC_CONN_STATE_ERROR] = "error", [LLC_CONN_STATE_ERROR] = "error",
[LLC_CONN_STATE_TEMP] = "temp", [LLC_CONN_STATE_TEMP] = "temp",
}; };
static int llc_seq_core_show(struct seq_file *seq, void *v) static int llc_seq_core_show(struct seq_file *seq, void *v)
......
...@@ -175,7 +175,7 @@ struct llc_sap_state llc_sap_state_table[LLC_NR_SAP_STATES] = { ...@@ -175,7 +175,7 @@ struct llc_sap_state llc_sap_state_table[LLC_NR_SAP_STATES] = {
[LLC_SAP_STATE_INACTIVE - 1] = { [LLC_SAP_STATE_INACTIVE - 1] = {
.curr_state = LLC_SAP_STATE_INACTIVE, .curr_state = LLC_SAP_STATE_INACTIVE,
.transitions = llc_sap_inactive_state_transitions, .transitions = llc_sap_inactive_state_transitions,
}, },
[LLC_SAP_STATE_ACTIVE - 1] = { [LLC_SAP_STATE_ACTIVE - 1] = {
.curr_state = LLC_SAP_STATE_ACTIVE, .curr_state = LLC_SAP_STATE_ACTIVE,
.transitions = llc_sap_active_state_transitions, .transitions = llc_sap_active_state_transitions,
......
...@@ -201,7 +201,7 @@ static void llc_sap_state_process(struct llc_sap *sap, struct sk_buff *skb) ...@@ -201,7 +201,7 @@ static void llc_sap_state_process(struct llc_sap *sap, struct sk_buff *skb)
if (sock_queue_rcv_skb(skb->sk, skb)) if (sock_queue_rcv_skb(skb->sk, skb))
kfree_skb(skb); kfree_skb(skb);
} }
} }
kfree_skb(skb); kfree_skb(skb);
} }
...@@ -215,7 +215,7 @@ static void llc_sap_state_process(struct llc_sap *sap, struct sk_buff *skb) ...@@ -215,7 +215,7 @@ static void llc_sap_state_process(struct llc_sap *sap, struct sk_buff *skb)
* This function is called when upper layer wants to send a TEST pdu. * This function is called when upper layer wants to send a TEST pdu.
* Returns 0 for success, 1 otherwise. * Returns 0 for success, 1 otherwise.
*/ */
void llc_build_and_send_test_pkt(struct llc_sap *sap, void llc_build_and_send_test_pkt(struct llc_sap *sap,
struct sk_buff *skb, u8 *dmac, u8 dsap) struct sk_buff *skb, u8 *dmac, u8 dsap)
{ {
struct llc_sap_state_ev *ev = llc_sap_ev(skb); struct llc_sap_state_ev *ev = llc_sap_ev(skb);
...@@ -224,7 +224,7 @@ void llc_build_and_send_test_pkt(struct llc_sap *sap, ...@@ -224,7 +224,7 @@ void llc_build_and_send_test_pkt(struct llc_sap *sap,
ev->daddr.lsap = dsap; ev->daddr.lsap = dsap;
memcpy(ev->saddr.mac, skb->dev->dev_addr, IFHWADDRLEN); memcpy(ev->saddr.mac, skb->dev->dev_addr, IFHWADDRLEN);
memcpy(ev->daddr.mac, dmac, IFHWADDRLEN); memcpy(ev->daddr.mac, dmac, IFHWADDRLEN);
ev->type = LLC_SAP_EV_TYPE_PRIM; ev->type = LLC_SAP_EV_TYPE_PRIM;
ev->prim = LLC_TEST_PRIM; ev->prim = LLC_TEST_PRIM;
ev->prim_type = LLC_PRIM_TYPE_REQ; ev->prim_type = LLC_PRIM_TYPE_REQ;
......
...@@ -112,17 +112,17 @@ static struct llc_station llc_main_station; ...@@ -112,17 +112,17 @@ static struct llc_station llc_main_station;
static int llc_stat_ev_enable_with_dup_addr_check(struct sk_buff *skb) static int llc_stat_ev_enable_with_dup_addr_check(struct sk_buff *skb)
{ {
struct llc_station_state_ev *ev = llc_station_ev(skb); struct llc_station_state_ev *ev = llc_station_ev(skb);
return ev->type == LLC_STATION_EV_TYPE_SIMPLE && return ev->type == LLC_STATION_EV_TYPE_SIMPLE &&
ev->prim_type == ev->prim_type ==
LLC_STATION_EV_ENABLE_WITH_DUP_ADDR_CHECK ? 0 : 1; LLC_STATION_EV_ENABLE_WITH_DUP_ADDR_CHECK ? 0 : 1;
} }
static int llc_stat_ev_enable_without_dup_addr_check(struct sk_buff *skb) static int llc_stat_ev_enable_without_dup_addr_check(struct sk_buff *skb)
{ {
struct llc_station_state_ev *ev = llc_station_ev(skb); struct llc_station_state_ev *ev = llc_station_ev(skb);
return ev->type == LLC_STATION_EV_TYPE_SIMPLE && return ev->type == LLC_STATION_EV_TYPE_SIMPLE &&
ev->prim_type == ev->prim_type ==
LLC_STATION_EV_ENABLE_WITHOUT_DUP_ADDR_CHECK ? 0 : 1; LLC_STATION_EV_ENABLE_WITHOUT_DUP_ADDR_CHECK ? 0 : 1;
...@@ -130,8 +130,8 @@ static int llc_stat_ev_enable_without_dup_addr_check(struct sk_buff *skb) ...@@ -130,8 +130,8 @@ static int llc_stat_ev_enable_without_dup_addr_check(struct sk_buff *skb)
static int llc_stat_ev_ack_tmr_exp_lt_retry_cnt_max_retry(struct sk_buff *skb) static int llc_stat_ev_ack_tmr_exp_lt_retry_cnt_max_retry(struct sk_buff *skb)
{ {
struct llc_station_state_ev *ev = llc_station_ev(skb); struct llc_station_state_ev *ev = llc_station_ev(skb);
return ev->type == LLC_STATION_EV_TYPE_ACK_TMR && return ev->type == LLC_STATION_EV_TYPE_ACK_TMR &&
llc_main_station.retry_count < llc_main_station.retry_count <
llc_main_station.maximum_retry ? 0 : 1; llc_main_station.maximum_retry ? 0 : 1;
...@@ -139,8 +139,8 @@ static int llc_stat_ev_ack_tmr_exp_lt_retry_cnt_max_retry(struct sk_buff *skb) ...@@ -139,8 +139,8 @@ static int llc_stat_ev_ack_tmr_exp_lt_retry_cnt_max_retry(struct sk_buff *skb)
static int llc_stat_ev_ack_tmr_exp_eq_retry_cnt_max_retry(struct sk_buff *skb) static int llc_stat_ev_ack_tmr_exp_eq_retry_cnt_max_retry(struct sk_buff *skb)
{ {
struct llc_station_state_ev *ev = llc_station_ev(skb); struct llc_station_state_ev *ev = llc_station_ev(skb);
return ev->type == LLC_STATION_EV_TYPE_ACK_TMR && return ev->type == LLC_STATION_EV_TYPE_ACK_TMR &&
llc_main_station.retry_count == llc_main_station.retry_count ==
llc_main_station.maximum_retry ? 0 : 1; llc_main_station.maximum_retry ? 0 : 1;
...@@ -148,7 +148,7 @@ static int llc_stat_ev_ack_tmr_exp_eq_retry_cnt_max_retry(struct sk_buff *skb) ...@@ -148,7 +148,7 @@ static int llc_stat_ev_ack_tmr_exp_eq_retry_cnt_max_retry(struct sk_buff *skb)
static int llc_stat_ev_rx_null_dsap_xid_c(struct sk_buff *skb) static int llc_stat_ev_rx_null_dsap_xid_c(struct sk_buff *skb)
{ {
struct llc_station_state_ev *ev = llc_station_ev(skb); struct llc_station_state_ev *ev = llc_station_ev(skb);
struct llc_pdu_un *pdu = llc_pdu_un_hdr(skb); struct llc_pdu_un *pdu = llc_pdu_un_hdr(skb);
return ev->type == LLC_STATION_EV_TYPE_PDU && return ev->type == LLC_STATION_EV_TYPE_PDU &&
...@@ -306,7 +306,7 @@ static int llc_station_ac_send_test_r(struct sk_buff *skb) ...@@ -306,7 +306,7 @@ static int llc_station_ac_send_test_r(struct sk_buff *skb)
llc_pdu_decode_sa(skb, mac_da); llc_pdu_decode_sa(skb, mac_da);
llc_pdu_decode_ssap(skb, &dsap); llc_pdu_decode_ssap(skb, &dsap);
llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP); llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP);
llc_pdu_init_as_test_rsp(nskb, skb); llc_pdu_init_as_test_rsp(nskb, skb);
rc = llc_mac_hdr_init(nskb, llc_station_mac_sa, mac_da); rc = llc_mac_hdr_init(nskb, llc_station_mac_sa, mac_da);
if (unlikely(rc)) if (unlikely(rc))
goto free; goto free;
......
/* /*
* sysctl_net_llc.c: sysctl interface to LLC net subsystem. * sysctl_net_llc.c: sysctl interface to LLC net subsystem.
* *
* Arnaldo Carvalho de Melo <acme@conectiva.com.br> * Arnaldo Carvalho de Melo <acme@conectiva.com.br>
*/ */
...@@ -72,7 +72,7 @@ static struct ctl_table llc2_dir_timeout_table[] = { ...@@ -72,7 +72,7 @@ static struct ctl_table llc2_dir_timeout_table[] = {
.procname = "timeout", .procname = "timeout",
.mode = 0555, .mode = 0555,
.child = llc2_timeout_table, .child = llc2_timeout_table,
}, },
{ 0 }, { 0 },
}; };
...@@ -82,7 +82,7 @@ static struct ctl_table llc_table[] = { ...@@ -82,7 +82,7 @@ static struct ctl_table llc_table[] = {
.procname = "llc2", .procname = "llc2",
.mode = 0555, .mode = 0555,
.child = llc2_dir_timeout_table, .child = llc2_dir_timeout_table,
}, },
{ {
.ctl_name = NET_LLC_STATION, .ctl_name = NET_LLC_STATION,
.procname = "station", .procname = "station",
...@@ -98,7 +98,7 @@ static struct ctl_table llc_dir_table[] = { ...@@ -98,7 +98,7 @@ static struct ctl_table llc_dir_table[] = {
.procname = "llc", .procname = "llc",
.mode = 0555, .mode = 0555,
.child = llc_table, .child = llc_table,
}, },
{ 0 }, { 0 },
}; };
......
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