diff options
Diffstat (limited to 'net/llc')
-rw-r--r-- | net/llc/af_llc.c | 18 | ||||
-rw-r--r-- | net/llc/llc_conn.c | 2 | ||||
-rw-r--r-- | net/llc/llc_input.c | 8 | ||||
-rw-r--r-- | net/llc/llc_output.c | 2 | ||||
-rw-r--r-- | net/llc/llc_pdu.c | 2 | ||||
-rw-r--r-- | net/llc/llc_proc.c | 20 | ||||
-rw-r--r-- | net/llc/llc_s_st.c | 2 | ||||
-rw-r--r-- | net/llc/llc_sap.c | 6 | ||||
-rw-r--r-- | net/llc/llc_station.c | 22 | ||||
-rw-r--r-- | net/llc/sysctl_net_llc.c | 10 |
10 files changed, 46 insertions, 46 deletions
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index 190bb3e..7d9fa38 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c @@ -67,7 +67,7 @@ static inline u16 llc_ui_next_link_no(int sap) static inline __be16 llc_proto_type(u16 arphrd) { 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) struct llc_sock* llc = llc_sk(sk); int rc = 0; - if (unlikely(llc_data_accept_state(llc->state) || + if (unlikely(llc_data_accept_state(llc->state) || llc->remote_busy_flag || llc->p_flag)) { long timeout = sock_sndtimeo(sk, noblock); @@ -602,7 +602,7 @@ static int llc_ui_accept(struct socket *sock, struct socket *newsock, int flags) int rc = -EOPNOTSUPP; dprintk("%s: accepting on %02X\n", __FUNCTION__, - llc_sk(sk)->laddr.lsap); + llc_sk(sk)->laddr.lsap); lock_sock(sk); if (unlikely(sk->sk_type != SOCK_STREAM)) goto out; @@ -617,7 +617,7 @@ static int llc_ui_accept(struct socket *sock, struct socket *newsock, int flags) goto out; } 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); rc = -EINVAL; if (!skb->sk) @@ -682,7 +682,7 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock, if (flags & MSG_PEEK) { peek_seq = llc->copied_seq; seq = &peek_seq; - } + } target = sock_rcvlowat(sk, flags & MSG_WAITALL, len); copied = 0; @@ -860,7 +860,7 @@ static int llc_ui_sendmsg(struct kiocb *iocb, struct socket *sock, goto release; skb->dev = llc->dev; 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); if (rc) goto out; @@ -1116,11 +1116,11 @@ static const struct proto_ops llc_ui_ops = { }; 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 = - 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 = - 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) { diff --git a/net/llc/llc_conn.c b/net/llc/llc_conn.c index c761c15..3b8cfbe 100644 --- a/net/llc/llc_conn.c +++ b/net/llc/llc_conn.c @@ -854,7 +854,7 @@ static void llc_sk_init(struct sock* sk) llc->n2 = 2; /* max retransmit */ llc->k = 2; /* tx win size, will adjust dynam */ 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); sk->sk_backlog_rcv = llc_backlog_rcv; } diff --git a/net/llc/llc_input.c b/net/llc/llc_input.c index db82aff..b3f65d1 100644 --- a/net/llc/llc_input.c +++ b/net/llc/llc_input.c @@ -164,7 +164,7 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev, sap = llc_sap_find(pdu->dsap); if (unlikely(!sap)) {/* unknown SAP */ dprintk("%s: llc_sap_find(%02X) failed!\n", __FUNCTION__, - pdu->dsap); + pdu->dsap); goto drop; } /* @@ -173,9 +173,9 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev, */ rcv = rcu_dereference(sap->rcv_func); if (rcv) { - struct sk_buff *cskb = skb_clone(skb, GFP_ATOMIC); - if (cskb) - rcv(cskb, dev, pt, orig_dev); + struct sk_buff *cskb = skb_clone(skb, GFP_ATOMIC); + if (cskb) + rcv(cskb, dev, pt, orig_dev); } dest = llc_pdu_type(skb); if (unlikely(!dest || !llc_type_handlers[dest - 1])) diff --git a/net/llc/llc_output.c b/net/llc/llc_output.c index b4e668e..f4291f3 100644 --- a/net/llc/llc_output.c +++ b/net/llc/llc_output.c @@ -40,7 +40,7 @@ int llc_mac_hdr_init(struct sk_buff *skb, case ARPHRD_IEEE802_TR: { struct net_device *dev = skb->dev; struct trh_hdr *trh; - + skb->mac.raw = skb_push(skb, sizeof(*trh)); trh = tr_hdr(skb); trh->ac = AC; diff --git a/net/llc/llc_pdu.c b/net/llc/llc_pdu.c index a28ce52..fa83243 100644 --- a/net/llc/llc_pdu.c +++ b/net/llc/llc_pdu.c @@ -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); pdu = llc_pdu_sn_hdr(skb); - + switch (pdu_type) { case LLC_PDU_TYPE_I: case LLC_PDU_TYPE_S: diff --git a/net/llc/llc_proc.c b/net/llc/llc_proc.c index 19308fe..3ab9d9f 100644 --- a/net/llc/llc_proc.c +++ b/net/llc/llc_proc.c @@ -142,18 +142,18 @@ out: } static char *llc_conn_state_names[] = { - [LLC_CONN_STATE_ADM] = "adm", - [LLC_CONN_STATE_SETUP] = "setup", + [LLC_CONN_STATE_ADM] = "adm", + [LLC_CONN_STATE_SETUP] = "setup", [LLC_CONN_STATE_NORMAL] = "normal", - [LLC_CONN_STATE_BUSY] = "busy", - [LLC_CONN_STATE_REJ] = "rej", - [LLC_CONN_STATE_AWAIT] = "await", + [LLC_CONN_STATE_BUSY] = "busy", + [LLC_CONN_STATE_REJ] = "rej", + [LLC_CONN_STATE_AWAIT] = "await", [LLC_CONN_STATE_AWAIT_BUSY] = "await_busy", [LLC_CONN_STATE_AWAIT_REJ] = "await_rej", [LLC_CONN_STATE_D_CONN] = "d_conn", - [LLC_CONN_STATE_RESET] = "reset", - [LLC_CONN_STATE_ERROR] = "error", - [LLC_CONN_STATE_TEMP] = "temp", + [LLC_CONN_STATE_RESET] = "reset", + [LLC_CONN_STATE_ERROR] = "error", + [LLC_CONN_STATE_TEMP] = "temp", }; static int llc_seq_core_show(struct seq_file *seq, void *v) @@ -208,7 +208,7 @@ static int llc_seq_core_open(struct inode *inode, struct file *file) return seq_open(file, &llc_seq_core_ops); } -static struct file_operations llc_seq_socket_fops = { +static const struct file_operations llc_seq_socket_fops = { .owner = THIS_MODULE, .open = llc_seq_socket_open, .read = seq_read, @@ -216,7 +216,7 @@ static struct file_operations llc_seq_socket_fops = { .release = seq_release, }; -static struct file_operations llc_seq_core_fops = { +static const struct file_operations llc_seq_core_fops = { .owner = THIS_MODULE, .open = llc_seq_core_open, .read = seq_read, diff --git a/net/llc/llc_s_st.c b/net/llc/llc_s_st.c index 6a43201..135f7d8 100644 --- a/net/llc/llc_s_st.c +++ b/net/llc/llc_s_st.c @@ -175,7 +175,7 @@ struct llc_sap_state llc_sap_state_table[LLC_NR_SAP_STATES] = { [LLC_SAP_STATE_INACTIVE - 1] = { .curr_state = LLC_SAP_STATE_INACTIVE, .transitions = llc_sap_inactive_state_transitions, - }, + }, [LLC_SAP_STATE_ACTIVE - 1] = { .curr_state = LLC_SAP_STATE_ACTIVE, .transitions = llc_sap_active_state_transitions, diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c index 61cb8cf..2615dc8 100644 --- a/net/llc/llc_sap.c +++ b/net/llc/llc_sap.c @@ -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)) kfree_skb(skb); } - } + } kfree_skb(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. * 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 llc_sap_state_ev *ev = llc_sap_ev(skb); @@ -224,7 +224,7 @@ void llc_build_and_send_test_pkt(struct llc_sap *sap, ev->daddr.lsap = dsap; memcpy(ev->saddr.mac, skb->dev->dev_addr, IFHWADDRLEN); memcpy(ev->daddr.mac, dmac, IFHWADDRLEN); - + ev->type = LLC_SAP_EV_TYPE_PRIM; ev->prim = LLC_TEST_PRIM; ev->prim_type = LLC_PRIM_TYPE_REQ; diff --git a/net/llc/llc_station.c b/net/llc/llc_station.c index 8275bd3..576355a 100644 --- a/net/llc/llc_station.c +++ b/net/llc/llc_station.c @@ -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) { - 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 && 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) { - 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 && ev->prim_type == 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) 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 && llc_main_station.retry_count < 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) 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 && llc_main_station.retry_count == 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) 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); return ev->type == LLC_STATION_EV_TYPE_PDU && @@ -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_ssap(skb, &dsap); 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); if (unlikely(rc)) goto free; diff --git a/net/llc/sysctl_net_llc.c b/net/llc/sysctl_net_llc.c index 45d7dd9..46992d0 100644 --- a/net/llc/sysctl_net_llc.c +++ b/net/llc/sysctl_net_llc.c @@ -1,6 +1,6 @@ /* * sysctl_net_llc.c: sysctl interface to LLC net subsystem. - * + * * Arnaldo Carvalho de Melo <acme@conectiva.com.br> */ @@ -72,7 +72,7 @@ static struct ctl_table llc2_dir_timeout_table[] = { .procname = "timeout", .mode = 0555, .child = llc2_timeout_table, - }, + }, { 0 }, }; @@ -82,7 +82,7 @@ static struct ctl_table llc_table[] = { .procname = "llc2", .mode = 0555, .child = llc2_dir_timeout_table, - }, + }, { .ctl_name = NET_LLC_STATION, .procname = "station", @@ -98,7 +98,7 @@ static struct ctl_table llc_dir_table[] = { .procname = "llc", .mode = 0555, .child = llc_table, - }, + }, { 0 }, }; @@ -116,7 +116,7 @@ static struct ctl_table_header *llc_table_header; int __init llc_sysctl_init(void) { - llc_table_header = register_sysctl_table(llc_root_table, 1); + llc_table_header = register_sysctl_table(llc_root_table); return llc_table_header ? 0 : -ENOMEM; } |