diff options
author | Michael Chan <michael.chan@broadcom.com> | 2016-06-13 09:25:28 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-15 02:16:13 +0300 |
commit | cf6645f8ebc69775a857b7c51928f3ad9e37aa66 (patch) | |
tree | e5b398a481ded827059c2cdc7e211fd08a4f4741 /drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | |
parent | 7659f50c3c38f808af074dcb5b54247e0cc9989e (diff) | |
download | linux-cf6645f8ebc69775a857b7c51928f3ad9e37aa66.tar.xz |
bnxt_en: Add function for VF driver to query default VLAN.
The PF can setup a default VLAN for a VF. The default VLAN tag is
automatically inserted and stripped without the knowledge of the
stack running on the VF. The VF driver needs to know that default
VLAN is enabled as VLAN acceleration on the RX side is no longer
supported. Call netdev_update_features() to fix up the VLAN features
as necessary. Also, VLAN strip mode must be enabled to strip out
the default VLAN tag.
Only allow VF default VLAN to be set if the firmware spec is >= 1.2.1.
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c index 363884dd9e8a..50d2007a2640 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c @@ -143,6 +143,9 @@ int bnxt_set_vf_vlan(struct net_device *dev, int vf_id, u16 vlan_id, u8 qos) u16 vlan_tag; int rc; + if (bp->hwrm_spec_code < 0x10201) + return -ENOTSUPP; + rc = bnxt_vf_ndo_prep(bp, vf_id); if (rc) return rc; |