Commit 3e5c112f authored by Vlad Yasevich's avatar Vlad Yasevich Committed by David S. Miller

qlcnic: Use generic fdb handler when driver options are not enabled.

Allow qlcnic to use the generic fdb handler when the driver options
are not enabled.   Untill the driver is fully fixed, this allows
the use of the FDB interface with qlogic driver, but simply puts
the driver into promisc mode since the driver currently does not
support IFF_UNICAST_FLT.

CC: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Acked-by: default avatarJitendra Kalsaria <jitendra.kalsaria@qlogic.com>
CC: Sony Chacko <sony.chacko@qlogic.com>
CC: linux-driver@qlogic.com
Signed-off-by: default avatarVlad Yasevich <vyasevic@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 75a75ee4
...@@ -253,11 +253,8 @@ static int qlcnic_fdb_del(struct ndmsg *ndm, struct nlattr *tb[], ...@@ -253,11 +253,8 @@ static int qlcnic_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
struct qlcnic_adapter *adapter = netdev_priv(netdev); struct qlcnic_adapter *adapter = netdev_priv(netdev);
int err = -EOPNOTSUPP; int err = -EOPNOTSUPP;
if (!adapter->fdb_mac_learn) { if (!adapter->fdb_mac_learn)
pr_info("%s: Driver mac learn is enabled, FDB operation not allowed\n", return ndo_dflt_fdb_del(ndm, tb, netdev, addr);
__func__);
return err;
}
if (adapter->flags & QLCNIC_ESWITCH_ENABLED) { if (adapter->flags & QLCNIC_ESWITCH_ENABLED) {
if (is_unicast_ether_addr(addr)) if (is_unicast_ether_addr(addr))
...@@ -277,11 +274,8 @@ static int qlcnic_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], ...@@ -277,11 +274,8 @@ static int qlcnic_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
struct qlcnic_adapter *adapter = netdev_priv(netdev); struct qlcnic_adapter *adapter = netdev_priv(netdev);
int err = 0; int err = 0;
if (!adapter->fdb_mac_learn) { if (!adapter->fdb_mac_learn)
pr_info("%s: Driver mac learn is enabled, FDB operation not allowed\n", return ndo_dflt_fdb_add(ndm, tb, netdev, addr, flags);
__func__);
return -EOPNOTSUPP;
}
if (!(adapter->flags & QLCNIC_ESWITCH_ENABLED)) { if (!(adapter->flags & QLCNIC_ESWITCH_ENABLED)) {
pr_info("%s: FDB e-switch is not enabled\n", __func__); pr_info("%s: FDB e-switch is not enabled\n", __func__);
...@@ -306,11 +300,8 @@ static int qlcnic_fdb_dump(struct sk_buff *skb, struct netlink_callback *ncb, ...@@ -306,11 +300,8 @@ static int qlcnic_fdb_dump(struct sk_buff *skb, struct netlink_callback *ncb,
{ {
struct qlcnic_adapter *adapter = netdev_priv(netdev); struct qlcnic_adapter *adapter = netdev_priv(netdev);
if (!adapter->fdb_mac_learn) { if (!adapter->fdb_mac_learn)
pr_info("%s: Driver mac learn is enabled, FDB operation not allowed\n", return ndo_dflt_fdb_dump(skb, ncb, netdev, idx);
__func__);
return -EOPNOTSUPP;
}
if (adapter->flags & QLCNIC_ESWITCH_ENABLED) if (adapter->flags & QLCNIC_ESWITCH_ENABLED)
idx = ndo_dflt_fdb_dump(skb, ncb, netdev, idx); idx = ndo_dflt_fdb_dump(skb, ncb, netdev, idx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment