mirror of
https://github.com/Ansuel/openwrt.git
synced 2025-12-16 06:59:40 +00:00
realtek: Keep extern declaration in headers
The common declarations should not be spread around in different source files but kept inside the header files. This is unfortunately currently not the best place to store them because soc_info is actually from non-DSA code. But it is at least better than having them in diffent source files. Signed-off-by: Sven Eckelmann <sven@narfation.org> Link: https://github.com/openwrt/openwrt/pull/20906 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
7704e500e5
commit
1518753474
@ -16,16 +16,6 @@
|
||||
|
||||
#include "rtl83xx.h"
|
||||
|
||||
extern struct rtl83xx_soc_info soc_info;
|
||||
|
||||
extern const struct rtl838x_reg rtl838x_reg;
|
||||
extern const struct rtl838x_reg rtl839x_reg;
|
||||
extern const struct rtl838x_reg rtl930x_reg;
|
||||
extern const struct rtl838x_reg rtl931x_reg;
|
||||
|
||||
extern const struct dsa_switch_ops rtl83xx_switch_ops;
|
||||
extern const struct dsa_switch_ops rtl93xx_switch_ops;
|
||||
|
||||
struct phylink_pcs *rtpcs_create(struct device *dev, struct device_node *np, int port);
|
||||
|
||||
int rtl83xx_port_get_stp_state(struct rtl838x_switch_priv *priv, int port)
|
||||
|
||||
@ -16,8 +16,6 @@ static const u8 ipv6_all_hosts_mcast_addr_base[ETH_ALEN] =
|
||||
static const u8 ipv6_all_hosts_mcast_addr_mask[ETH_ALEN] =
|
||||
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
|
||||
|
||||
extern struct rtl83xx_soc_info soc_info;
|
||||
|
||||
static void rtldsa_init_counters(struct rtl838x_switch_priv *priv);
|
||||
static void rtldsa_port_xstp_state_set(struct rtl838x_switch_priv *priv, int port,
|
||||
u8 state, u16 mst_slot);
|
||||
|
||||
@ -7,7 +7,6 @@
|
||||
#include "rtl83xx.h"
|
||||
|
||||
static struct rtl838x_switch_priv *switch_priv;
|
||||
extern struct rtl83xx_soc_info soc_info;
|
||||
|
||||
enum scheduler_type {
|
||||
WEIGHTED_FAIR_QUEUE = 0,
|
||||
|
||||
@ -20,8 +20,6 @@
|
||||
#define RTL839X_VLAN_PORT_TAG_STS_CTRL_IGR_P_OTAG_KEEP_MASK GENMASK(1,1)
|
||||
#define RTL839X_VLAN_PORT_TAG_STS_CTRL_IGR_P_ITAG_KEEP_MASK GENMASK(0,0)
|
||||
|
||||
extern struct rtl83xx_soc_info soc_info;
|
||||
|
||||
/* Definition of the RTL839X-specific template field IDs as used in the PIE */
|
||||
enum template_field_id {
|
||||
TEMPLATE_FIELD_SPMMASK = 0,
|
||||
|
||||
@ -207,4 +207,15 @@ void rtl930x_pie_rule_dump_raw(u32 r[]);
|
||||
|
||||
void rtl931x_print_matrix(void);
|
||||
|
||||
extern const struct dsa_switch_ops rtl83xx_switch_ops;
|
||||
extern const struct dsa_switch_ops rtl93xx_switch_ops;
|
||||
|
||||
extern const struct rtl838x_reg rtl838x_reg;
|
||||
extern const struct rtl838x_reg rtl839x_reg;
|
||||
extern const struct rtl838x_reg rtl930x_reg;
|
||||
extern const struct rtl838x_reg rtl931x_reg;
|
||||
|
||||
/* TODO actually from arch/mips/rtl838x/prom.c */
|
||||
extern struct rtl83xx_soc_info soc_info;
|
||||
|
||||
#endif /* _NET_DSA_RTL83XX_H */
|
||||
|
||||
@ -33,8 +33,6 @@
|
||||
/* get shift for given led in any set */
|
||||
#define RTL930X_LED_SET_LEDX_SHIFT(x) (16 * (x % 2))
|
||||
|
||||
extern struct rtl83xx_soc_info soc_info;
|
||||
|
||||
/* Definition of the RTL930X-specific template field IDs as used in the PIE */
|
||||
enum template_field_id {
|
||||
TEMPLATE_FIELD_SPM0 = 0, /* Source portmask ports 0-15 */
|
||||
|
||||
@ -25,8 +25,6 @@
|
||||
#define RTL931X_VLAN_PORT_TAG_ITPID_IDX_MASK GENMASK(2,1)
|
||||
#define RTL931X_VLAN_PORT_TAG_ITPID_KEEP_MASK GENMASK(0,0)
|
||||
|
||||
extern struct rtl83xx_soc_info soc_info;
|
||||
|
||||
/* Definition of the RTL931X-specific template field IDs as used in the PIE */
|
||||
enum template_field_id {
|
||||
TEMPLATE_FIELD_SPM0 = 1,
|
||||
|
||||
@ -23,8 +23,6 @@
|
||||
#include <asm/mach-rtl838x/mach-rtl83xx.h>
|
||||
#include "rtl838x_eth.h"
|
||||
|
||||
extern struct rtl83xx_soc_info soc_info;
|
||||
|
||||
int rtl83xx_setup_tc(struct net_device *dev, enum tc_setup_type type, void *type_data);
|
||||
|
||||
/* Maximum number of RX rings is 8 on RTL83XX and 32 on the 93XX
|
||||
|
||||
@ -469,4 +469,7 @@ struct rtl838x_eth_reg {
|
||||
bool (*decode_tag)(struct p_hdr *h, struct dsa_tag *tag);
|
||||
};
|
||||
|
||||
/* TODO actually from arch/mips/rtl838x/prom.c */
|
||||
extern struct rtl83xx_soc_info soc_info;
|
||||
|
||||
#endif /* _RTL838X_ETH_H */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user