Browse Source

net: hsr: rename files to introduce prp support

As prp re-uses the code from hsr, rename the existing files that can
be re-use with a hsr_prp prefix.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Murali Karicheri 6 years ago
parent
commit
c29bd266ce

+ 5 - 5
net/hsr-prp/Makefile

@@ -1,9 +1,9 @@
 #
-# Makefile for HSR
+# Makefile for HSR & PRP
 #
 
-obj-$(CONFIG_HSR_PRP)	+= hsr.o
+obj-$(CONFIG_HSR_PRP)	+= hsr-prp.o
 
-hsr-y			:= hsr_main.o hsr_framereg.o hsr_device.o \
-			   hsr_netlink.o hsr_slave.o hsr_forward.o
-hsr-$(CONFIG_DEBUG_FS) += hsr_debugfs.o
+hsr-prp-y		:= hsr_prp_main.o hsr_prp_framereg.o hsr_prp_device.o \
+			   hsr_netlink.o hsr_prp_slave.o hsr_prp_forward.o
+hsr-prp-$(CONFIG_DEBUG_FS) += hsr_prp_debugfs.o

+ 4 - 4
net/hsr-prp/hsr_main.c

@@ -9,11 +9,11 @@
 #include <linux/rculist.h>
 #include <linux/timer.h>
 #include <linux/etherdevice.h>
-#include "hsr_main.h"
-#include "hsr_device.h"
+#include "hsr_prp_main.h"
+#include "hsr_prp_device.h"
 #include "hsr_netlink.h"
-#include "hsr_framereg.h"
-#include "hsr_slave.h"
+#include "hsr_prp_framereg.h"
+#include "hsr_prp_slave.h"
 
 static int hsr_netdev_notify(struct notifier_block *nb, unsigned long event,
 			     void *ptr)

+ 4 - 4
net/hsr-prp/hsr_netlink.c

@@ -7,13 +7,13 @@
  * Routines for handling Netlink messages for HSR.
  */
 
-#include "hsr_netlink.h"
 #include <linux/kernel.h>
 #include <net/rtnetlink.h>
 #include <net/genetlink.h>
-#include "hsr_main.h"
-#include "hsr_device.h"
-#include "hsr_framereg.h"
+#include "hsr_netlink.h"
+#include "hsr_prp_main.h"
+#include "hsr_prp_device.h"
+#include "hsr_prp_framereg.h"
 
 static const struct nla_policy hsr_policy[IFLA_HSR_MAX + 1] = {
 	[IFLA_HSR_SLAVE1]		= { .type = NLA_U32 },

+ 3 - 3
net/hsr-prp/hsr_debugfs.c → net/hsr-prp/hsr_prp_debugfs.c

@@ -1,5 +1,5 @@
 /*
- * hsr_debugfs code
+ * hsr_prp_debugfs code
  * Copyright (C) 2019 Texas Instruments Incorporated
  *
  * Author(s):
@@ -17,8 +17,8 @@
 #include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/debugfs.h>
-#include "hsr_main.h"
-#include "hsr_framereg.h"
+#include "hsr_prp_main.h"
+#include "hsr_prp_framereg.h"
 
 static void print_mac_address(struct seq_file *sfp, unsigned char *mac)
 {

+ 5 - 5
net/hsr-prp/hsr_device.c → net/hsr-prp/hsr_prp_device.c

@@ -13,11 +13,11 @@
 #include <linux/etherdevice.h>
 #include <linux/rtnetlink.h>
 #include <linux/pkt_sched.h>
-#include "hsr_device.h"
-#include "hsr_slave.h"
-#include "hsr_framereg.h"
-#include "hsr_main.h"
-#include "hsr_forward.h"
+#include "hsr_prp_device.h"
+#include "hsr_prp_slave.h"
+#include "hsr_prp_framereg.h"
+#include "hsr_prp_main.h"
+#include "hsr_prp_forward.h"
 
 static bool is_admin_up(struct net_device *dev)
 {

+ 1 - 1
net/hsr-prp/hsr_device.h → net/hsr-prp/hsr_prp_device.h

@@ -9,7 +9,7 @@
 #define __HSR_DEVICE_H
 
 #include <linux/netdevice.h>
-#include "hsr_main.h"
+#include "hsr_prp_main.h"
 
 void hsr_dev_setup(struct net_device *dev);
 int hsr_dev_finalize(struct net_device *hsr_dev, struct net_device *slave[2],

+ 3 - 3
net/hsr-prp/hsr_forward.c → net/hsr-prp/hsr_prp_forward.c

@@ -5,13 +5,13 @@
  *	2011-2014 Arvid Brodin, arvid.brodin@alten.se
  */
 
-#include "hsr_forward.h"
 #include <linux/types.h>
 #include <linux/skbuff.h>
 #include <linux/etherdevice.h>
 #include <linux/if_vlan.h>
-#include "hsr_main.h"
-#include "hsr_framereg.h"
+#include "hsr_prp_forward.h"
+#include "hsr_prp_main.h"
+#include "hsr_prp_framereg.h"
 
 struct hsr_node;
 

+ 1 - 1
net/hsr-prp/hsr_forward.h → net/hsr-prp/hsr_prp_forward.h

@@ -9,7 +9,7 @@
 #define __HSR_FORWARD_H
 
 #include <linux/netdevice.h>
-#include "hsr_main.h"
+#include "hsr_prp_main.h"
 
 void hsr_forward_skb(struct sk_buff *skb, struct hsr_port *port);
 

+ 2 - 2
net/hsr-prp/hsr_framereg.c → net/hsr-prp/hsr_prp_framereg.c

@@ -14,8 +14,8 @@
 #include <linux/etherdevice.h>
 #include <linux/slab.h>
 #include <linux/rculist.h>
-#include "hsr_main.h"
-#include "hsr_framereg.h"
+#include "hsr_prp_main.h"
+#include "hsr_prp_framereg.h"
 #include "hsr_netlink.h"
 
 /*	TODO: use hash lists for mac addresses (linux/jhash.h)?    */

+ 1 - 1
net/hsr-prp/hsr_framereg.h → net/hsr-prp/hsr_prp_framereg.h

@@ -8,7 +8,7 @@
 #ifndef __HSR_FRAMEREG_H
 #define __HSR_FRAMEREG_H
 
-#include "hsr_main.h"
+#include "hsr_prp_main.h"
 
 struct hsr_node;
 

+ 5 - 5
net/hsr-prp/hsr_slave.c → net/hsr-prp/hsr_prp_slave.c

@@ -5,14 +5,14 @@
  *	2011-2014 Arvid Brodin, arvid.brodin@alten.se
  */
 
-#include "hsr_slave.h"
 #include <linux/etherdevice.h>
 #include <linux/if_arp.h>
 #include <linux/if_vlan.h>
-#include "hsr_main.h"
-#include "hsr_device.h"
-#include "hsr_forward.h"
-#include "hsr_framereg.h"
+#include "hsr_prp_slave.h"
+#include "hsr_prp_main.h"
+#include "hsr_prp_device.h"
+#include "hsr_prp_forward.h"
+#include "hsr_prp_framereg.h"
 
 static rx_handler_result_t hsr_handle_frame(struct sk_buff **pskb)
 {

+ 1 - 1
net/hsr-prp/hsr_slave.h → net/hsr-prp/hsr_prp_slave.h

@@ -10,7 +10,7 @@
 #include <linux/skbuff.h>
 #include <linux/netdevice.h>
 #include <linux/rtnetlink.h>
-#include "hsr_main.h"
+#include "hsr_prp_main.h"
 
 int hsr_add_port(struct hsr_priv *hsr, struct net_device *dev,
 		 enum hsr_port_type pt);