be2net: Fix number of VLANs supported in UMC mode for BE3-R.
authorAjit Khaparde <ajit.khaparde@emulex.com>
Fri, 27 Sep 2013 20:18:16 +0000 (15:18 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Sep 2013 21:11:49 +0000 (17:11 -0400)
In BE3-R, when UMC is enabled, the number of VLANs that can be added
to the interface is reduced to 15.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be.h
drivers/net/ethernet/emulex/benet/be_main.c

index 95d303d2da9424c6cd75dc7073dd70026c17b3a7..db020230bd0bba5ec72186bed9539357ec315abc 100644 (file)
@@ -88,6 +88,7 @@ static inline char *nic_name(struct pci_dev *pdev)
 #define BE_MIN_MTU             256
 
 #define BE_NUM_VLANS_SUPPORTED 64
+#define BE_UMC_NUM_VLANS_SUPPORTED     15
 #define BE_MAX_EQD             96u
 #define        BE_MAX_TX_FRAG_COUNT    30
 
index 036f5830fee4242d1cd085c5fdc65ee1eb4c06dd..2962d2ff9f1c57afd5a231f6a621d36a8e4b9159 100644 (file)
@@ -2985,6 +2985,8 @@ static void BEx_get_resources(struct be_adapter *adapter,
 
        if (adapter->function_mode & FLEX10_MODE)
                res->max_vlans = BE_NUM_VLANS_SUPPORTED/8;
+       else if (adapter->function_mode & UMC_ENABLED)
+               res->max_vlans = BE_UMC_NUM_VLANS_SUPPORTED;
        else
                res->max_vlans = BE_NUM_VLANS_SUPPORTED;
        res->max_mcast_mac = BE_MAX_MC;