summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/bcm_sf2_cfp.c
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2020-03-30 23:38:51 +0200
committerDavid S. Miller <davem@davemloft.net>2020-03-31 04:55:42 +0200
commit5ae8c0d51ace3bdbfb89c27e7661f081cc9287de (patch)
treefb98439f61b8e0c9492cffa10f91fea6b3045c00 /drivers/net/dsa/bcm_sf2_cfp.c
parentnet: dsa: bcm_sf2: Disable learning for ASP port (diff)
downloadlinux-5ae8c0d51ace3bdbfb89c27e7661f081cc9287de.tar.xz
linux-5ae8c0d51ace3bdbfb89c27e7661f081cc9287de.zip
net: dsa: bcm_sf2: Check earlier for FLOW_EXT and FLOW_MAC_EXT
We do not currently support matching on FLOW_EXT or FLOW_MAC_EXT, but we were not checking for those bits being set in the flow specification. The check for FLOW_EXT and FLOW_MAC_EXT are separated out because a subsequent commit will add support for matching VLAN TCI which are covered by FLOW_EXT. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/bcm_sf2_cfp.c')
-rw-r--r--drivers/net/dsa/bcm_sf2_cfp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/dsa/bcm_sf2_cfp.c b/drivers/net/dsa/bcm_sf2_cfp.c
index f9785027c096..40ea88c304de 100644
--- a/drivers/net/dsa/bcm_sf2_cfp.c
+++ b/drivers/net/dsa/bcm_sf2_cfp.c
@@ -878,8 +878,9 @@ static int bcm_sf2_cfp_rule_set(struct dsa_switch *ds, int port,
int ret = -EINVAL;
/* Check for unsupported extensions */
- if ((fs->flow_type & FLOW_EXT) && (fs->m_ext.vlan_etype ||
- fs->m_ext.data[1]))
+ if ((fs->flow_type & FLOW_EXT) ||
+ (fs->flow_type & FLOW_MAC_EXT) ||
+ fs->m_ext.data[1])
return -EINVAL;
if (fs->location != RX_CLS_LOC_ANY &&