Skip to content

Commit 9f66816

Browse files
ffainellidavem330
authored andcommitted
net: dsa: bcm_sf2: Utilize b53_get_tag_protocol()
Utilize the much more capable b53_get_tag_protocol() which takes care of all Broadcom switches specifics to resolve which port can have Broadcom tags enabled or not. Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e94a62f commit 9f66816

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

drivers/net/dsa/b53/b53_common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,8 +1495,7 @@ static bool b53_can_enable_brcm_tags(struct dsa_switch *ds, int port)
14951495
return false;
14961496
}
14971497

1498-
static enum dsa_tag_protocol b53_get_tag_protocol(struct dsa_switch *ds,
1499-
int port)
1498+
enum dsa_tag_protocol b53_get_tag_protocol(struct dsa_switch *ds, int port)
15001499
{
15011500
struct b53_device *dev = ds->priv;
15021501

@@ -1514,6 +1513,7 @@ static enum dsa_tag_protocol b53_get_tag_protocol(struct dsa_switch *ds,
15141513

15151514
return DSA_TAG_PROTO_BRCM;
15161515
}
1516+
EXPORT_SYMBOL(b53_get_tag_protocol);
15171517

15181518
int b53_mirror_add(struct dsa_switch *ds, int port,
15191519
struct dsa_mall_mirror_tc_entry *mirror, bool ingress)

drivers/net/dsa/b53/b53_priv.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ int b53_fdb_dump(struct dsa_switch *ds, int port,
310310
dsa_fdb_dump_cb_t *cb, void *data);
311311
int b53_mirror_add(struct dsa_switch *ds, int port,
312312
struct dsa_mall_mirror_tc_entry *mirror, bool ingress);
313+
enum dsa_tag_protocol b53_get_tag_protocol(struct dsa_switch *ds, int port);
313314
void b53_mirror_del(struct dsa_switch *ds, int port,
314315
struct dsa_mall_mirror_tc_entry *mirror);
315316
int b53_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy);

drivers/net/dsa/bcm_sf2.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@
3535
#include "b53/b53_priv.h"
3636
#include "b53/b53_regs.h"
3737

38-
static enum dsa_tag_protocol bcm_sf2_sw_get_tag_protocol(struct dsa_switch *ds,
39-
int port)
40-
{
41-
return DSA_TAG_PROTO_BRCM;
42-
}
43-
4438
static void bcm_sf2_imp_setup(struct dsa_switch *ds, int port)
4539
{
4640
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
@@ -861,7 +855,7 @@ static const struct b53_io_ops bcm_sf2_io_ops = {
861855
};
862856

863857
static const struct dsa_switch_ops bcm_sf2_ops = {
864-
.get_tag_protocol = bcm_sf2_sw_get_tag_protocol,
858+
.get_tag_protocol = b53_get_tag_protocol,
865859
.setup = bcm_sf2_sw_setup,
866860
.get_strings = b53_get_strings,
867861
.get_ethtool_stats = b53_get_ethtool_stats,

0 commit comments

Comments
 (0)