diff options
author | Rajesh Borundia <rajesh.borundia@qlogic.com> | 2013-04-19 07:01:12 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-19 16:14:40 -0400 |
commit | 91b7282b613d4da65e8b4c87d521156cdc64c169 (patch) | |
tree | 1b412de7cd339ab96922cd9e427572bf123c8ff0 /drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c | |
parent | 4000e7a78d12d71e37fcd2366c73fcb02e97fffb (diff) | |
download | linux-stable-91b7282b613d4da65e8b4c87d521156cdc64c169.tar.gz linux-stable-91b7282b613d4da65e8b4c87d521156cdc64c169.tar.bz2 linux-stable-91b7282b613d4da65e8b4c87d521156cdc64c169.zip |
qlcnic: Support VLAN id config.
o Add support for VLAN id configuration per VF using
iproute2 tool.
o VLAN id's 1-4094 are treated as PVID by the PF and
Guest VLAN tagging is not allowed by default.
o PVID is disabled when the VLAN id is set to 0
o Guest VLAN tagging is allowed when the VLAN id is set to 4095.
o Only one Guest VLAN id is supported.
o VLAN id can be changed only when the VF driver is not loaded.
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c index c3cbfaea97c3..6a6512ba9f38 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c @@ -468,7 +468,7 @@ int qlcnic_nic_del_mac(struct qlcnic_adapter *adapter, const u8 *addr) return err; } -int qlcnic_nic_add_mac(struct qlcnic_adapter *adapter, const u8 *addr) +int qlcnic_nic_add_mac(struct qlcnic_adapter *adapter, const u8 *addr, u16 vlan) { struct list_head *head; struct qlcnic_mac_list_s *cur; @@ -487,7 +487,7 @@ int qlcnic_nic_add_mac(struct qlcnic_adapter *adapter, const u8 *addr) memcpy(cur->mac_addr, addr, ETH_ALEN); if (qlcnic_sre_macaddr_change(adapter, - cur->mac_addr, 0, QLCNIC_MAC_ADD)) { + cur->mac_addr, vlan, QLCNIC_MAC_ADD)) { kfree(cur); return -EIO; } @@ -496,7 +496,7 @@ int qlcnic_nic_add_mac(struct qlcnic_adapter *adapter, const u8 *addr) return 0; } -void __qlcnic_set_multi(struct net_device *netdev) +void __qlcnic_set_multi(struct net_device *netdev, u16 vlan) { struct qlcnic_adapter *adapter = netdev_priv(netdev); struct netdev_hw_addr *ha; @@ -509,8 +509,8 @@ void __qlcnic_set_multi(struct net_device *netdev) return; if (!qlcnic_sriov_vf_check(adapter)) - qlcnic_nic_add_mac(adapter, adapter->mac_addr); - qlcnic_nic_add_mac(adapter, bcast_addr); + qlcnic_nic_add_mac(adapter, adapter->mac_addr, vlan); + qlcnic_nic_add_mac(adapter, bcast_addr, vlan); if (netdev->flags & IFF_PROMISC) { if (!(adapter->flags & QLCNIC_PROMISC_DISABLED)) @@ -526,12 +526,12 @@ void __qlcnic_set_multi(struct net_device *netdev) if (!netdev_mc_empty(netdev) && !qlcnic_sriov_vf_check(adapter)) { netdev_for_each_mc_addr(ha, netdev) { - qlcnic_nic_add_mac(adapter, ha->addr); + qlcnic_nic_add_mac(adapter, ha->addr, vlan); } } if (qlcnic_sriov_vf_check(adapter)) - qlcnic_vf_add_mc_list(netdev); + qlcnic_vf_add_mc_list(netdev, vlan); send_fw_cmd: if (!qlcnic_sriov_vf_check(adapter)) { @@ -570,7 +570,7 @@ void qlcnic_set_multi(struct net_device *netdev) qlcnic_sriov_vf_schedule_multi(adapter->netdev); return; } - __qlcnic_set_multi(netdev); + __qlcnic_set_multi(netdev, 0); } int qlcnic_82xx_nic_set_promisc(struct qlcnic_adapter *adapter, u32 mode) @@ -592,7 +592,7 @@ int qlcnic_82xx_nic_set_promisc(struct qlcnic_adapter *adapter, u32 mode) (struct cmd_desc_type0 *)&req, 1); } -void qlcnic_free_mac_list(struct qlcnic_adapter *adapter) +void qlcnic_82xx_free_mac_list(struct qlcnic_adapter *adapter) { struct qlcnic_mac_list_s *cur; struct list_head *head = &adapter->mac_list; |