diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index 42233df..9a0b677 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -263,9 +263,9 @@
 {
 	ax25_cb *ax25=(ax25_cb *)data;
 	struct sock *sk;
-	
+
 	sk=ax25->sk;
-	
+
 	bh_lock_sock(sk);
 	sock_hold(sk);
 	ax25_destroy_socket(ax25);
@@ -369,57 +369,57 @@
 		ax25_disconnect(ax25, ENETRESET);
 		break;
 
-  	case AX25_WINDOW:
-  		if (ax25->modulus == AX25_MODULUS) {
-  			if (ax25_ctl.arg < 1 || ax25_ctl.arg > 7)
-  				return -EINVAL;
-  		} else {
-  			if (ax25_ctl.arg < 1 || ax25_ctl.arg > 63)
-  				return -EINVAL;
-  		}
-  		ax25->window = ax25_ctl.arg;
-  		break;
+	case AX25_WINDOW:
+		if (ax25->modulus == AX25_MODULUS) {
+			if (ax25_ctl.arg < 1 || ax25_ctl.arg > 7)
+				return -EINVAL;
+		} else {
+			if (ax25_ctl.arg < 1 || ax25_ctl.arg > 63)
+				return -EINVAL;
+		}
+		ax25->window = ax25_ctl.arg;
+		break;
 
-  	case AX25_T1:
+	case AX25_T1:
 		if (ax25_ctl.arg < 1)
-  			return -EINVAL;
-  		ax25->rtt = (ax25_ctl.arg * HZ) / 2;
-  		ax25->t1  = ax25_ctl.arg * HZ;
-  		break;
-
-  	case AX25_T2:
-  		if (ax25_ctl.arg < 1)
-  			return -EINVAL;
-  		ax25->t2 = ax25_ctl.arg * HZ;
-  		break;
-
-  	case AX25_N2:
-  		if (ax25_ctl.arg < 1 || ax25_ctl.arg > 31)
 			return -EINVAL;
-  		ax25->n2count = 0;
-  		ax25->n2 = ax25_ctl.arg;
-  		break;
+		ax25->rtt = (ax25_ctl.arg * HZ) / 2;
+		ax25->t1  = ax25_ctl.arg * HZ;
+		break;
 
-  	case AX25_T3:
-  		if (ax25_ctl.arg < 0)
-  			return -EINVAL;
-  		ax25->t3 = ax25_ctl.arg * HZ;
-  		break;
+	case AX25_T2:
+		if (ax25_ctl.arg < 1)
+			return -EINVAL;
+		ax25->t2 = ax25_ctl.arg * HZ;
+		break;
 
-  	case AX25_IDLE:
-  		if (ax25_ctl.arg < 0)
-  			return -EINVAL;
-  		ax25->idle = ax25_ctl.arg * 60 * HZ;
-  		break;
+	case AX25_N2:
+		if (ax25_ctl.arg < 1 || ax25_ctl.arg > 31)
+			return -EINVAL;
+		ax25->n2count = 0;
+		ax25->n2 = ax25_ctl.arg;
+		break;
 
-  	case AX25_PACLEN:
-  		if (ax25_ctl.arg < 16 || ax25_ctl.arg > 65535)
-  			return -EINVAL;
-  		ax25->paclen = ax25_ctl.arg;
-  		break;
+	case AX25_T3:
+		if (ax25_ctl.arg < 0)
+			return -EINVAL;
+		ax25->t3 = ax25_ctl.arg * HZ;
+		break;
 
-  	default:
-  		return -EINVAL;
+	case AX25_IDLE:
+		if (ax25_ctl.arg < 0)
+			return -EINVAL;
+		ax25->idle = ax25_ctl.arg * 60 * HZ;
+		break;
+
+	case AX25_PACLEN:
+		if (ax25_ctl.arg < 16 || ax25_ctl.arg > 65535)
+			return -EINVAL;
+		ax25->paclen = ax25_ctl.arg;
+		break;
+
+	default:
+		return -EINVAL;
 	  }
 
 	return 0;
@@ -1209,7 +1209,7 @@
 
 	if (sk->sk_type == SOCK_SEQPACKET &&
 	    (ax25t=ax25_find_cb(&ax25->source_addr, &fsa->fsa_ax25.sax25_call, digi,
-		    	 ax25->ax25_dev->dev))) {
+			 ax25->ax25_dev->dev))) {
 		kfree(digi);
 		err = -EADDRINUSE;		/* Already such a connection */
 		ax25_cb_put(ax25t);
@@ -1456,7 +1456,7 @@
 		err = -EMSGSIZE;
 		goto out;
 	}
-		
+
 	if (usax != NULL) {
 		if (usax->sax25_family != AF_AX25) {
 			err = -EINVAL;
@@ -1470,8 +1470,8 @@
 		else if (addr_len != sizeof(struct full_sockaddr_ax25)) {
 			/* support for old structure may go away some time */
 			if ((addr_len < sizeof(struct sockaddr_ax25) + sizeof(ax25_address) * 6) ||
-		    	    (addr_len > sizeof(struct full_sockaddr_ax25))) {
-		    		err = -EINVAL;
+			    (addr_len > sizeof(struct full_sockaddr_ax25))) {
+				err = -EINVAL;
 				goto out;
 			}
 
@@ -1624,7 +1624,7 @@
 
 	/* Now we can treat all alike */
 	skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT,
-	                        flags & MSG_DONTWAIT, &err);
+				flags & MSG_DONTWAIT, &err);
 	if (skb == NULL)
 		goto out;
 
@@ -1869,7 +1869,7 @@
 	return hlist_entry( ((struct ax25_cb *)v)->ax25_node.next,
 			    struct ax25_cb, ax25_node);
 }
-	
+
 static void ax25_info_stop(struct seq_file *seq, void *v)
 {
 	spin_unlock_bh(&ax25_list_lock);
diff --git a/net/ax25/ax25_addr.c b/net/ax25/ax25_addr.c
index 97a49c7..419e718 100644
--- a/net/ax25/ax25_addr.c
+++ b/net/ax25/ax25_addr.c
@@ -126,10 +126,10 @@
 		ct++;
 	}
 
- 	if ((a->ax25_call[ct] & 0x1E) == (b->ax25_call[ct] & 0x1E))	/* SSID without control bit */
- 		return 0;
+	if ((a->ax25_call[ct] & 0x1E) == (b->ax25_call[ct] & 0x1E))	/* SSID without control bit */
+		return 0;
 
- 	return 2;			/* Partial match */
+	return 2;			/* Partial match */
 }
 
 EXPORT_SYMBOL(ax25cmp);
diff --git a/net/ax25/ax25_ip.c b/net/ax25/ax25_ip.c
index 136c3ae..8d62d86 100644
--- a/net/ax25/ax25_ip.c
+++ b/net/ax25/ax25_ip.c
@@ -55,46 +55,46 @@
 	if (type == ETH_P_AX25)
 		return 0;
 
-  	/* header is an AX.25 UI frame from us to them */
- 	buff = skb_push(skb, AX25_HEADER_LEN);
-  	*buff++ = 0x00;	/* KISS DATA */
+	/* header is an AX.25 UI frame from us to them */
+	buff = skb_push(skb, AX25_HEADER_LEN);
+	*buff++ = 0x00;	/* KISS DATA */
 
 	if (daddr != NULL)
 		memcpy(buff, daddr, dev->addr_len);	/* Address specified */
 
-  	buff[6] &= ~AX25_CBIT;
-  	buff[6] &= ~AX25_EBIT;
-  	buff[6] |= AX25_SSSID_SPARE;
-  	buff    += AX25_ADDR_LEN;
+	buff[6] &= ~AX25_CBIT;
+	buff[6] &= ~AX25_EBIT;
+	buff[6] |= AX25_SSSID_SPARE;
+	buff    += AX25_ADDR_LEN;
 
-  	if (saddr != NULL)
-  		memcpy(buff, saddr, dev->addr_len);
-  	else
-  		memcpy(buff, dev->dev_addr, dev->addr_len);
+	if (saddr != NULL)
+		memcpy(buff, saddr, dev->addr_len);
+	else
+		memcpy(buff, dev->dev_addr, dev->addr_len);
 
-  	buff[6] &= ~AX25_CBIT;
-  	buff[6] |= AX25_EBIT;
-  	buff[6] |= AX25_SSSID_SPARE;
-  	buff    += AX25_ADDR_LEN;
+	buff[6] &= ~AX25_CBIT;
+	buff[6] |= AX25_EBIT;
+	buff[6] |= AX25_SSSID_SPARE;
+	buff    += AX25_ADDR_LEN;
 
-  	*buff++  = AX25_UI;	/* UI */
+	*buff++  = AX25_UI;	/* UI */
 
-  	/* Append a suitable AX.25 PID */
-  	switch (type) {
-  	case ETH_P_IP:
-  		*buff++ = AX25_P_IP;
- 		break;
-  	case ETH_P_ARP:
-  		*buff++ = AX25_P_ARP;
-  		break;
-  	default:
-  		printk(KERN_ERR "AX.25: ax25_hard_header - wrong protocol type 0x%2.2x\n", type);
-  		*buff++ = 0;
-  		break;
- 	}
+	/* Append a suitable AX.25 PID */
+	switch (type) {
+	case ETH_P_IP:
+		*buff++ = AX25_P_IP;
+		break;
+	case ETH_P_ARP:
+		*buff++ = AX25_P_ARP;
+		break;
+	default:
+		printk(KERN_ERR "AX.25: ax25_hard_header - wrong protocol type 0x%2.2x\n", type);
+		*buff++ = 0;
+		break;
+	}
 
 	if (daddr != NULL)
-	  	return AX25_HEADER_LEN;
+		return AX25_HEADER_LEN;
 
 	return -AX25_HEADER_LEN;	/* Unfinished header */
 }
@@ -114,8 +114,8 @@
 	dst = (ax25_address *)(bp + 1);
 	src = (ax25_address *)(bp + 8);
 
-  	if (arp_find(bp + 1, skb))
-  		return 1;
+	if (arp_find(bp + 1, skb))
+		return 1;
 
 	route = ax25_get_route(dst, NULL);
 	if (route) {
@@ -127,8 +127,8 @@
 	if (dev == NULL)
 		dev = skb->dev;
 
-        if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) {
-                goto put;
+	if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) {
+		goto put;
 	}
 
 	if (bp[16] == AX25_P_IP) {
@@ -175,8 +175,8 @@
 			ourskb->nh.raw = ourskb->data;
 
 			ax25=ax25_send_frame(
-			    ourskb, 
-			    ax25_dev->values[AX25_VALUES_PACLEN], 
+			    ourskb,
+			    ax25_dev->values[AX25_VALUES_PACLEN],
 			    &src_c,
 			    &dst_c, digipeat, dev);
 			if (ax25) {
@@ -186,13 +186,13 @@
 		}
 	}
 
-  	bp[7]  &= ~AX25_CBIT;
-  	bp[7]  &= ~AX25_EBIT;
-  	bp[7]  |= AX25_SSSID_SPARE;
+	bp[7]  &= ~AX25_CBIT;
+	bp[7]  &= ~AX25_EBIT;
+	bp[7]  |= AX25_SSSID_SPARE;
 
-  	bp[14] &= ~AX25_CBIT;
-  	bp[14] |= AX25_EBIT;
-  	bp[14] |= AX25_SSSID_SPARE;
+	bp[14] &= ~AX25_CBIT;
+	bp[14] |= AX25_EBIT;
+	bp[14] |= AX25_SSSID_SPARE;
 
 	skb_pull(skb, AX25_KISS_HEADER_LEN);
 
@@ -211,7 +211,7 @@
 	if (route)
 		ax25_put_route(route);
 
-  	return 1;
+	return 1;
 }
 
 #else	/* INET */
diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c
index 0a03816..7078861 100644
--- a/net/ax25/ax25_route.c
+++ b/net/ax25/ax25_route.c
@@ -87,7 +87,7 @@
 	ax25_rt = ax25_route_list;
 	while (ax25_rt != NULL) {
 		if (ax25cmp(&ax25_rt->callsign, &route->dest_addr) == 0 &&
-		            ax25_rt->dev == ax25_dev->dev) {
+			    ax25_rt->dev == ax25_dev->dev) {
 			kfree(ax25_rt->digipeat);
 			ax25_rt->digipeat = NULL;
 			if (route->digi_count != 0) {
@@ -252,8 +252,8 @@
 {
 	struct ax25_route *ax25_rt;
 	int i = 1;
- 
- 	read_lock(&ax25_route_lock);
+
+	read_lock(&ax25_route_lock);
 	if (*pos == 0)
 		return SEQ_START_TOKEN;
 
@@ -269,7 +269,7 @@
 static void *ax25_rt_seq_next(struct seq_file *seq, void *v, loff_t *pos)
 {
 	++*pos;
-	return (v == SEQ_START_TOKEN) ? ax25_route_list : 
+	return (v == SEQ_START_TOKEN) ? ax25_route_list :
 		((struct ax25_route *) v)->next;
 }
 
diff --git a/net/ax25/ax25_std_timer.c b/net/ax25/ax25_std_timer.c
index a29c480..e3528b1 100644
--- a/net/ax25/ax25_std_timer.c
+++ b/net/ax25/ax25_std_timer.c
@@ -34,7 +34,7 @@
 void ax25_std_heartbeat_expiry(ax25_cb *ax25)
 {
 	struct sock *sk=ax25->sk;
-	
+
 	if (sk)
 		bh_lock_sock(sk);
 
diff --git a/net/ax25/ax25_subr.c b/net/ax25/ax25_subr.c
index c41dbe5..85c58c4 100644
--- a/net/ax25/ax25_subr.c
+++ b/net/ax25/ax25_subr.c
@@ -56,7 +56,7 @@
 	 */
 	if (ax25->va != nr) {
 		while (skb_peek(&ax25->ack_queue) != NULL && ax25->va != nr) {
-		        skb = skb_dequeue(&ax25->ack_queue);
+			skb = skb_dequeue(&ax25->ack_queue);
 			kfree_skb(skb);
 			ax25->va = (ax25->va + 1) % ax25->modulus;
 		}
@@ -65,7 +65,7 @@
 
 void ax25_requeue_frames(ax25_cb *ax25)
 {
-        struct sk_buff *skb, *skb_prev = NULL;
+	struct sk_buff *skb, *skb_prev = NULL;
 
 	/*
 	 * Requeue all the un-ack-ed frames on the output queue to be picked
diff --git a/net/ax25/ax25_uid.c b/net/ax25/ax25_uid.c
index 5e9a81e..7f4c294 100644
--- a/net/ax25/ax25_uid.c
+++ b/net/ax25/ax25_uid.c
@@ -164,7 +164,7 @@
 	++*pos;
 
 	return hlist_entry(((ax25_uid_assoc *)v)->uid_node.next,
-	                   ax25_uid_assoc, uid_node);
+			   ax25_uid_assoc, uid_node);
 }
 
 static void ax25_uid_seq_stop(struct seq_file *seq, void *v)
