mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
nvethernet: Add VLAN add/del actions
Bug 200565888 Change-Id: I20e33a09af0d64bc5beaa49d83aae98394d6998f Signed-off-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2313481 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com> Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
663753148e
commit
5ab61e947e
@@ -41,6 +41,7 @@ nvethernet-objs:= ether_linux.o \
|
||||
$(OSI_DMA)/eqos_dma.o \
|
||||
$(OSI_DMA)/eqos_desc.o \
|
||||
$(OSI_DMA)/mgbe_desc.o \
|
||||
$(OSI_CORE)/mgbe_mmc.o
|
||||
$(OSI_CORE)/mgbe_mmc.o \
|
||||
$(OSI_CORE)/vlan_filter.o
|
||||
|
||||
nvethernet-$(CONFIG_NVETHERNET_SELFTESTS) += selftests.o
|
||||
|
||||
@@ -2729,13 +2729,14 @@ static int ether_vlan_rx_add_vid(struct net_device *ndev, __be16 vlan_proto,
|
||||
{
|
||||
struct ether_priv_data *pdata = netdev_priv(ndev);
|
||||
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
||||
unsigned int vlan_id = (vid | OSI_VLAN_ACTION_ADD);
|
||||
int ret = -1;
|
||||
|
||||
if (pdata->vlan_hash_filtering == OSI_HASH_FILTER_MODE) {
|
||||
dev_err(pdata->dev,
|
||||
"HASH FILTERING for VLAN tag is not supported in SW\n");
|
||||
} else {
|
||||
ret = osi_update_vlan_id(osi_core, vid);
|
||||
ret = osi_update_vlan_id(osi_core, vlan_id);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -2765,6 +2766,7 @@ static int ether_vlan_rx_kill_vid(struct net_device *ndev, __be16 vlan_proto,
|
||||
{
|
||||
struct ether_priv_data *pdata = netdev_priv(ndev);
|
||||
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
||||
unsigned int vlan_id = (vid | OSI_VLAN_ACTION_DEL);
|
||||
int ret = -1;
|
||||
|
||||
if (!netif_running(ndev)) {
|
||||
@@ -2778,7 +2780,7 @@ static int ether_vlan_rx_kill_vid(struct net_device *ndev, __be16 vlan_proto,
|
||||
/* By default, receive only VLAN pkt with VID = 1 because
|
||||
* writing 0 will pass all VLAN pkt
|
||||
*/
|
||||
ret = osi_update_vlan_id(osi_core, 0x1U);
|
||||
ret = osi_update_vlan_id(osi_core, vlan_id);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user