LLC: small cleanups, leave debug on for a while

. dprintk already puts the log level
. fix some comments to match new behaviour
parent c9581bb6
...@@ -33,15 +33,15 @@ ...@@ -33,15 +33,15 @@
/* Connection state table structure */ /* Connection state table structure */
struct llc_conn_state_trans { struct llc_conn_state_trans {
llc_conn_ev_t ev; llc_conn_ev_t ev;
u8 next_state; u8 next_state;
llc_conn_ev_qfyr_t *ev_qualifiers; llc_conn_ev_qfyr_t *ev_qualifiers;
llc_conn_action_t *ev_actions; llc_conn_action_t *ev_actions;
}; };
struct llc_conn_state { struct llc_conn_state {
u8 current_state; u8 current_state;
struct llc_conn_state_trans **transitions; struct llc_conn_state_trans **transitions;
}; };
extern struct llc_conn_state llc_conn_state_table[]; extern struct llc_conn_state llc_conn_state_table[];
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <linux/timer.h> #include <linux/timer.h>
#include <net/llc_if.h> #include <net/llc_if.h>
#undef DEBUG_LLC_CONN_ALLOC #define DEBUG_LLC_CONN_ALLOC
struct llc_timer { struct llc_timer {
struct timer_list timer; struct timer_list timer;
......
...@@ -241,9 +241,8 @@ int llc_conn_ev_rx_i_cmd_pbit_set_x_inval_ns(struct sock *sk, ...@@ -241,9 +241,8 @@ int llc_conn_ev_rx_i_cmd_pbit_set_x_inval_ns(struct sock *sk,
u16 rc = !LLC_PDU_IS_CMD(pdu) && !LLC_PDU_TYPE_IS_I(pdu) && ns != vr && u16 rc = !LLC_PDU_IS_CMD(pdu) && !LLC_PDU_TYPE_IS_I(pdu) && ns != vr &&
llc_util_ns_inside_rx_window(ns, vr, llc_sk(sk)->rw) ? 0 : 1; llc_util_ns_inside_rx_window(ns, vr, llc_sk(sk)->rw) ? 0 : 1;
if (!rc) if (!rc)
dprintk(KERN_WARNING "rx_i_cmd_p_bit_set_x_inval_ns matched," dprintk("%s: matched, state=%d, ns=%d, vr=%d\n",
"state = %d, ns = %d, vr = %d\n", __FUNCTION__, llc_sk(sk)->state, ns, vr);
llc_sk(sk)->state, ns, vr);
return rc; return rc;
} }
...@@ -317,9 +316,8 @@ int llc_conn_ev_rx_i_rsp_fbit_set_x_inval_ns(struct sock *sk, ...@@ -317,9 +316,8 @@ int llc_conn_ev_rx_i_rsp_fbit_set_x_inval_ns(struct sock *sk,
u16 rc = !LLC_PDU_IS_RSP(pdu) && !LLC_PDU_TYPE_IS_I(pdu) && ns != vr && u16 rc = !LLC_PDU_IS_RSP(pdu) && !LLC_PDU_TYPE_IS_I(pdu) && ns != vr &&
llc_util_ns_inside_rx_window(ns, vr, llc_sk(sk)->rw) ? 0 : 1; llc_util_ns_inside_rx_window(ns, vr, llc_sk(sk)->rw) ? 0 : 1;
if (!rc) if (!rc)
dprintk(KERN_WARNING "conn_ev_rx_i_rsp_fbit_set_x_inval_ns " dprintk("%s: matched, state=%d, ns=%d, vr=%d\n",
"matched : state = %d, ns = %d, vr = %d\n", __FUNCTION__, llc_sk(sk)->state, ns, vr);
llc_sk(sk)->state, ns, vr);
return rc; return rc;
} }
...@@ -584,9 +582,8 @@ int llc_conn_ev_rx_zzz_cmd_pbit_set_x_inval_nr(struct sock *sk, ...@@ -584,9 +582,8 @@ int llc_conn_ev_rx_zzz_cmd_pbit_set_x_inval_nr(struct sock *sk,
if (!LLC_PDU_IS_CMD(pdu) && if (!LLC_PDU_IS_CMD(pdu) &&
(!LLC_PDU_TYPE_IS_I(pdu) || !LLC_PDU_TYPE_IS_S(pdu)) && (!LLC_PDU_TYPE_IS_I(pdu) || !LLC_PDU_TYPE_IS_S(pdu)) &&
nr != vs && llc_util_nr_inside_tx_window(sk, nr)) { nr != vs && llc_util_nr_inside_tx_window(sk, nr)) {
dprintk(KERN_ERR "conn_ev_rx_zzz_cmd_inv_nr matched, state = " dprintk("%s: matched, state=%d, vs=%d, nr=%d\n",
"%d, vs = %d, nr = %d\n", __FUNCTION__, llc_sk(sk)->state, vs, nr);
llc_sk(sk)->state, vs, nr);
rc = 0; rc = 0;
} }
return rc; return rc;
...@@ -604,9 +601,8 @@ int llc_conn_ev_rx_zzz_rsp_fbit_set_x_inval_nr(struct sock *sk, ...@@ -604,9 +601,8 @@ int llc_conn_ev_rx_zzz_rsp_fbit_set_x_inval_nr(struct sock *sk,
(!LLC_PDU_TYPE_IS_I(pdu) || !LLC_PDU_TYPE_IS_S(pdu)) && (!LLC_PDU_TYPE_IS_I(pdu) || !LLC_PDU_TYPE_IS_S(pdu)) &&
nr != vs && llc_util_nr_inside_tx_window(sk, nr)) { nr != vs && llc_util_nr_inside_tx_window(sk, nr)) {
rc = 0; rc = 0;
dprintk(KERN_ERR "conn_ev_rx_zzz_fbit_set_x_inval_nr matched, " dprintk("%s: matched, state=%d, vs=%d, nr=%d\n",
"state = %d, vs = %d, nr = %d\n", __FUNCTION__, llc_sk(sk)->state, vs, nr);
llc_sk(sk)->state, vs, nr);
} }
return rc; return rc;
} }
......
...@@ -52,7 +52,7 @@ int mac_send_pdu(struct sk_buff *skb) ...@@ -52,7 +52,7 @@ int mac_send_pdu(struct sk_buff *skb)
int pri = GFP_ATOMIC, rc = -1; int pri = GFP_ATOMIC, rc = -1;
if (!skb->dev) { if (!skb->dev) {
dprintk(KERN_ERR "%s: skb->dev == NULL!", __FUNCTION__); dprintk("%s: skb->dev == NULL!", __FUNCTION__);
goto out; goto out;
} }
if (skb->sk) if (skb->sk)
...@@ -89,7 +89,7 @@ int mac_indicate(struct sk_buff *skb, struct net_device *dev, ...@@ -89,7 +89,7 @@ int mac_indicate(struct sk_buff *skb, struct net_device *dev,
* receives, do not try to analyse it. * receives, do not try to analyse it.
*/ */
if (skb->pkt_type == PACKET_OTHERHOST) { if (skb->pkt_type == PACKET_OTHERHOST) {
dprintk(KERN_INFO "%s: PACKET_OTHERHOST\n", __FUNCTION__); dprintk("%s: PACKET_OTHERHOST\n", __FUNCTION__);
goto drop; goto drop;
} }
skb = skb_share_check(skb, GFP_ATOMIC); skb = skb_share_check(skb, GFP_ATOMIC);
...@@ -146,7 +146,7 @@ int mac_indicate(struct sk_buff *skb, struct net_device *dev, ...@@ -146,7 +146,7 @@ int mac_indicate(struct sk_buff *skb, struct net_device *dev,
rc = llc_pdu_router(llc_sk(sk)->sap, sk, skb, rc = llc_pdu_router(llc_sk(sk)->sap, sk, skb,
LLC_TYPE_2); LLC_TYPE_2);
} else { } else {
dprintk(KERN_INFO "%s: add to backlog\n", __FUNCTION__); dprintk("%s: add to backlog\n", __FUNCTION__);
llc_set_backlog_type(skb, LLC_PACKET); llc_set_backlog_type(skb, LLC_PACKET);
sk_add_backlog(sk, skb); sk_add_backlog(sk, skb);
rc = 0; rc = 0;
......
...@@ -233,8 +233,7 @@ void __llc_sock_free(struct sock *sk, u8 free) ...@@ -233,8 +233,7 @@ void __llc_sock_free(struct sock *sk, u8 free)
llc->state = LLC_CONN_OUT_OF_SVC; llc->state = LLC_CONN_OUT_OF_SVC;
/* stop all (possibly) running timers */ /* stop all (possibly) running timers */
llc_conn_ac_stop_all_timers(sk, NULL); llc_conn_ac_stop_all_timers(sk, NULL);
/* handle return of frames on lists */ #ifdef DEBUG_LLC_CONN_ALLOC
#if 0
printk(KERN_INFO "%s: unackq=%d, txq=%d\n", __FUNCTION__, printk(KERN_INFO "%s: unackq=%d, txq=%d\n", __FUNCTION__,
skb_queue_len(&llc->pdu_unack_q), skb_queue_len(&llc->pdu_unack_q),
skb_queue_len(&sk->write_queue)); skb_queue_len(&sk->write_queue));
......
...@@ -52,8 +52,7 @@ void llc_sap_assign_sock(struct llc_sap *sap, struct sock *sk) ...@@ -52,8 +52,7 @@ void llc_sap_assign_sock(struct llc_sap *sap, struct sock *sk)
* @sap: SAP * @sap: SAP
* @sk: pointer to connection * @sk: pointer to connection
* *
* This function removes a connection from connection_list of a SAP. * This function removes a connection from sk_list.list of a SAP.
* List locking is performed by caller (rtn_all_conns).
*/ */
void llc_sap_unassign_sock(struct llc_sap *sap, struct sock *sk) void llc_sap_unassign_sock(struct llc_sap *sap, struct sock *sk)
{ {
......
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