@ -2139,8 +2139,6 @@ static int qlcnic_83xx_get_nic_configuration(struct qlcnic_adapter *adapter)
ahw - > max_mac_filters = nic_info . max_mac_filters ;
ahw - > max_mtu = nic_info . max_mtu ;
adapter - > max_tx_rings = ahw - > max_tx_ques ;
adapter - > max_sds_rings = ahw - > max_rx_ques ;
/* eSwitch capability indicates vNIC mode.
* vNIC and SRIOV are mutually exclusive operational modes .
* If SR - IOV capability is detected , SR - IOV physical function
@ -2161,6 +2159,7 @@ static int qlcnic_83xx_get_nic_configuration(struct qlcnic_adapter *adapter)
int qlcnic_83xx_configure_opmode ( struct qlcnic_adapter * adapter )
{
struct qlcnic_hardware_context * ahw = adapter - > ahw ;
u16 max_sds_rings , max_tx_rings ;
int ret ;
ret = qlcnic_83xx_get_nic_configuration ( adapter ) ;
@ -2173,18 +2172,21 @@ int qlcnic_83xx_configure_opmode(struct qlcnic_adapter *adapter)
if ( qlcnic_83xx_config_vnic_opmode ( adapter ) )
return - EIO ;
adapter - > max_sds_rings = QLCNIC_MAX_VNIC_SDS_RINGS ;
adapter - > max_tx_rings = QLCNIC_MAX_VNIC_TX_RINGS ;
max_sds_rings = QLCNIC_MAX_VNIC_SDS_RINGS ;
max_tx_rings = QLCNIC_MAX_VNIC_TX_RINGS ;
} else if ( ret = = QLC_83XX_DEFAULT_OPMODE ) {
ahw - > nic_mode = QLCNIC_DEFAULT_MODE ;
adapter - > nic_ops - > init_driver = qlcnic_83xx_init_default_driver ;
ahw - > idc . state_entry = qlcnic_83xx_idc_ready_state_entry ;
adapter - > max_sds_rings = QLCNIC_MAX_SDS_RINGS ;
adapter - > max_tx_rings = QLCNIC_MAX_TX_RINGS ;
max_sds_rings = QLCNIC_MAX_SDS_RINGS ;
max_tx_rings = QLCNIC_MAX_TX_RINGS ;
} else {
return - EIO ;
}
adapter - > max_sds_rings = min ( ahw - > max_rx_ques , max_sds_rings ) ;
adapter - > max_tx_rings = min ( ahw - > max_tx_ques , max_tx_rings ) ;
return 0 ;
}