X25: Use identifiers for cyclades device to x25 interface
Change magic numbers to identifiers for X25 interface. Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4d99503e0b
commit
5d74731437
@@ -634,11 +634,12 @@ static netdev_tx_t cycx_netdevice_hard_start_xmit(struct sk_buff *skb,
|
|||||||
}
|
}
|
||||||
} else { /* chan->protocol == ETH_P_X25 */
|
} else { /* chan->protocol == ETH_P_X25 */
|
||||||
switch (skb->data[0]) {
|
switch (skb->data[0]) {
|
||||||
case 0: break;
|
case X25_IFACE_DATA:
|
||||||
case 1: /* Connect request */
|
break;
|
||||||
|
case X25_IFACE_CONNECT:
|
||||||
cycx_x25_chan_connect(dev);
|
cycx_x25_chan_connect(dev);
|
||||||
goto free_packet;
|
goto free_packet;
|
||||||
case 2: /* Disconnect request */
|
case X25_IFACE_DISCONNECT:
|
||||||
cycx_x25_chan_disconnect(dev);
|
cycx_x25_chan_disconnect(dev);
|
||||||
goto free_packet;
|
goto free_packet;
|
||||||
default:
|
default:
|
||||||
@@ -1406,7 +1407,8 @@ static void cycx_x25_set_chan_state(struct net_device *dev, u8 state)
|
|||||||
reset_timer(dev);
|
reset_timer(dev);
|
||||||
|
|
||||||
if (chan->protocol == ETH_P_X25)
|
if (chan->protocol == ETH_P_X25)
|
||||||
cycx_x25_chan_send_event(dev, 1);
|
cycx_x25_chan_send_event(dev,
|
||||||
|
X25_IFACE_CONNECT);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case WAN_CONNECTING:
|
case WAN_CONNECTING:
|
||||||
@@ -1424,7 +1426,8 @@ static void cycx_x25_set_chan_state(struct net_device *dev, u8 state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (chan->protocol == ETH_P_X25)
|
if (chan->protocol == ETH_P_X25)
|
||||||
cycx_x25_chan_send_event(dev, 2);
|
cycx_x25_chan_send_event(dev,
|
||||||
|
X25_IFACE_DISCONNECT);
|
||||||
|
|
||||||
netif_wake_queue(dev);
|
netif_wake_queue(dev);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user