Skip to content

Commit

Permalink
X25: Use identifiers for cyclades device to x25 interface
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
andrew hendry authored and David S. Miller committed Apr 22, 2010
1 parent 4d99503 commit 5d74731
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions drivers/net/wan/cycx_x25.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,11 +634,12 @@ static netdev_tx_t cycx_netdevice_hard_start_xmit(struct sk_buff *skb,
}
} else { /* chan->protocol == ETH_P_X25 */
switch (skb->data[0]) {
case 0: break;
case 1: /* Connect request */
case X25_IFACE_DATA:
break;
case X25_IFACE_CONNECT:
cycx_x25_chan_connect(dev);
goto free_packet;
case 2: /* Disconnect request */
case X25_IFACE_DISCONNECT:
cycx_x25_chan_disconnect(dev);
goto free_packet;
default:
Expand Down Expand Up @@ -1406,7 +1407,8 @@ static void cycx_x25_set_chan_state(struct net_device *dev, u8 state)
reset_timer(dev);

if (chan->protocol == ETH_P_X25)
cycx_x25_chan_send_event(dev, 1);
cycx_x25_chan_send_event(dev,
X25_IFACE_CONNECT);

break;
case WAN_CONNECTING:
Expand All @@ -1424,7 +1426,8 @@ static void cycx_x25_set_chan_state(struct net_device *dev, u8 state)
}

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);
break;
Expand Down

0 comments on commit 5d74731

Please sign in to comment.