#include <bfa.h>
 #include <bfi/bfi_lps.h>
 #include <cs/bfa_debug.h>
+#include <defs/bfa_defs_pci.h>
 
 BFA_TRC_FILE(HAL, LPS);
 BFA_MODULE(lps);
 #define BFA_LPS_MIN_LPORTS     (1)
 #define BFA_LPS_MAX_LPORTS     (256)
 
+/*
+ * Maximum Vports supported per physical port or vf.
+ */
+#define BFA_LPS_MAX_VPORTS_SUPP_CB  255
+#define BFA_LPS_MAX_VPORTS_SUPP_CT  190
+
 /**
  * forward declarations
  */
                bfa_cb_lps_cvl_event(lps->bfa->bfad, lps->uarg);
 }
 
+u32
+bfa_lps_get_max_vport(struct bfa_s *bfa)
+{
+       struct bfa_ioc_attr_s ioc_attr;
+
+       bfa_get_attr(bfa, &ioc_attr);
+
+       if (ioc_attr.pci_attr.device_id == BFA_PCI_DEVICE_ID_CT)
+               return (BFA_LPS_MAX_VPORTS_SUPP_CT);
+       else
+               return (BFA_LPS_MAX_VPORTS_SUPP_CB);
+}
+
 /**
  *  lps_public BFA LPS public functions
  */
 
 void bfa_fcs_vport_online(struct bfa_fcs_vport_s *vport);
 void bfa_fcs_vport_offline(struct bfa_fcs_vport_s *vport);
 void bfa_fcs_vport_delete_comp(struct bfa_fcs_vport_s *vport);
-u32 bfa_fcs_vport_get_max(struct bfa_fcs_s *fcs);
 
 #endif /* __FCS_VPORT_H__ */
 
 
  * bfa lport service api
  */
 
+u32    bfa_lps_get_max_vport(struct bfa_s *bfa);
 struct bfa_lps_s *bfa_lps_alloc(struct bfa_s *bfa);
 void bfa_lps_delete(struct bfa_lps_s *lps);
 void bfa_lps_discard(struct bfa_lps_s *lps);
 
 struct bfa_fcs_fabric_s;
 
 /*
-* @todo : need to move to a global config file.
- * Maximum Vports supported per physical port or vf.
- */
-#define BFA_FCS_MAX_VPORTS_SUPP_CB  255
-#define BFA_FCS_MAX_VPORTS_SUPP_CT  191
-
-/*
-* @todo : need to move to a global config file.
  * Maximum Rports supported per port (physical/logical).
  */
 #define BFA_FCS_MAX_RPORTS_SUPP  256   /* @todo : tentative value */
 
                port_info->port_wwn = bfa_fcs_port_get_pwwn(port);
                port_info->node_wwn = bfa_fcs_port_get_nwwn(port);
 
-               port_info->max_vports_supp = bfa_fcs_vport_get_max(port->fcs);
+               port_info->max_vports_supp =
+                       bfa_lps_get_max_vport(port->fcs->bfa);
                port_info->num_vports_inuse =
                        bfa_fcs_fabric_vport_count(port->fabric);
                port_info->max_rports_supp = BFA_FCS_MAX_RPORTS_SUPP;
 
        bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_DELCOMP);
 }
 
-u32
-bfa_fcs_vport_get_max(struct bfa_fcs_s *fcs)
-{
-       struct bfa_ioc_attr_s ioc_attr;
-
-       bfa_get_attr(fcs->bfa, &ioc_attr);
-
-       if (ioc_attr.pci_attr.device_id == BFA_PCI_DEVICE_ID_CT)
-               return BFA_FCS_MAX_VPORTS_SUPP_CT;
-       else
-               return BFA_FCS_MAX_VPORTS_SUPP_CB;
-}
-
-
-
 /**
  *  fcs_vport_api Virtual port API
  */
                return BFA_STATUS_VPORT_EXISTS;
 
        if (bfa_fcs_fabric_vport_count(&fcs->fabric) ==
-           bfa_fcs_vport_get_max(fcs))
+               bfa_lps_get_max_vport(fcs->bfa))
                return BFA_STATUS_VPORT_MAX;
 
        vport->lps = bfa_lps_alloc(fcs->bfa);