Commit 1502caff authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by David S. Miller

[LLC] move reason to the {station,sap,conn}_ev structs

Slowly killing the ugly struct forest.
parent 86b74abd
......@@ -126,7 +126,6 @@ struct llc_conn_ev_prim_if {
/* Event LLC_CONN_EV_TYPE_PDU interface */
struct llc_conn_ev_pdu_if {
u8 ev;
u8 reason;
};
union llc_conn_ev_if {
......@@ -137,6 +136,7 @@ union llc_conn_ev_if {
struct llc_conn_state_ev {
u8 type;
u8 reason;
u8 status;
u8 flag;
struct llc_prim_if_block *ind_prim;
......
......@@ -41,18 +41,14 @@ struct llc_stat_ev_prim_if {
u8 type; /* request, indicate, response, confirm */
};
struct llc_stat_ev_pdu_if {
u8 reason;
};
union llc_stat_ev_if {
struct llc_stat_ev_simple_if a; /* 'a' for simple, easy ... */
struct llc_stat_ev_prim_if prim;
struct llc_stat_ev_pdu_if pdu;
};
struct llc_station_state_ev {
u8 type;
u8 reason;
union llc_stat_ev_if data;
struct list_head node; /* node in station->ev_q.list */
};
......
......@@ -70,7 +70,6 @@ struct llc_addr {
struct llc_prim_reset {
struct sock *sk;
u16 link;
u8 reason; /* used only by indicate */
};
/* Sending data in conection-less mode */
......
......@@ -49,7 +49,6 @@ struct llc_sap_ev_prim_if {
struct llc_sap_ev_pdu_if {
u8 ev;
u8 reason;
};
union llc_sap_ev_if {
......@@ -62,6 +61,7 @@ struct llc_prim_if_block;
struct llc_sap_state_ev {
u8 type;
u8 reason;
u8 ind_cfm_flag;
struct llc_prim_if_block *prim;
union llc_sap_ev_if data;
......
......@@ -129,13 +129,7 @@ int llc_conn_ac_disc_ind(struct sock *sk, struct sk_buff *skb)
rc = 1;
}
if (!rc) {
/*
* FIXME: ev needs reason field,
* perhaps the ev->status is enough,
* have to check,
* better way to signal its a disc
*/
/* prim_data->disc.reason = reason; */
ev->reason = reason;
ev->flag = LLC_DISC_PRIM + 1;
ev->ind_prim = (void *)1;
}
......@@ -146,8 +140,7 @@ int llc_conn_ac_disc_confirm(struct sock *sk, struct sk_buff *skb)
{
struct llc_conn_state_ev *ev = llc_conn_ev(skb);
/* here we use the ev->status, humm */
/* prim_data->disc.reason = ev->status; */
ev->reason = ev->status;
ev->flag = LLC_DISC_PRIM + 1;
ev->cfm_prim = (void *)1;
return 0;
......@@ -196,11 +189,11 @@ int llc_conn_ac_rst_ind(struct sock *sk, struct sk_buff *skb)
union llc_u_prim_data *prim_data = prim->data;
prim_data->res.sk = sk;
prim_data->res.reason = reason;
prim_data->res.link = llc->link;
prim->data = prim_data;
prim->prim = LLC_RESET_PRIM;
prim->sap = sap;
ev->reason = reason;
ev->flag = 1;
ev->ind_prim = prim;
}
......
......@@ -217,7 +217,7 @@ static void llc_station_rcv(struct sk_buff *skb)
struct llc_station_state_ev *ev = llc_station_ev(skb);
ev->type = LLC_STATION_EV_TYPE_PDU;
ev->data.pdu.reason = 0;
ev->reason = 0;
llc_station_state_process(station, skb);
}
......@@ -237,7 +237,7 @@ int llc_conn_rcv(struct sock* sk, struct sk_buff *skb)
if (!llc->dev)
llc->dev = skb->dev;
ev->type = LLC_CONN_EV_TYPE_PDU;
ev->data.pdu.reason = 0;
ev->reason = 0;
return llc_conn_state_process(sk, skb);
}
......@@ -253,7 +253,7 @@ static void llc_sap_rcv(struct llc_sap *sap, struct sk_buff *skb)
struct llc_sap_state_ev *ev = llc_sap_ev(skb);
ev->type = LLC_SAP_EV_TYPE_PDU;
ev->data.pdu.reason = 0;
ev->reason = 0;
llc_sap_state_process(sap, skb);
}
......
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