Commit d12b0d9a authored by Rajesh Borundia's avatar Rajesh Borundia Committed by David S. Miller

qlcnic: Remove validation for max tx and max rx queues

Max rx queues and tx queues are governed by fimware.
So driver should not validate these values.
Signed-off-by: default avatarRajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: default avatarAmit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9ce13ca8
...@@ -1132,14 +1132,10 @@ struct qlcnic_eswitch { ...@@ -1132,14 +1132,10 @@ struct qlcnic_eswitch {
#define MAX_BW 100 /* % of link speed */ #define MAX_BW 100 /* % of link speed */
#define MAX_VLAN_ID 4095 #define MAX_VLAN_ID 4095
#define MIN_VLAN_ID 2 #define MIN_VLAN_ID 2
#define MAX_TX_QUEUES 1
#define MAX_RX_QUEUES 4
#define DEFAULT_MAC_LEARN 1 #define DEFAULT_MAC_LEARN 1
#define IS_VALID_VLAN(vlan) (vlan >= MIN_VLAN_ID && vlan < MAX_VLAN_ID) #define IS_VALID_VLAN(vlan) (vlan >= MIN_VLAN_ID && vlan < MAX_VLAN_ID)
#define IS_VALID_BW(bw) (bw <= MAX_BW) #define IS_VALID_BW(bw) (bw <= MAX_BW)
#define IS_VALID_TX_QUEUES(que) (que > 0 && que <= MAX_TX_QUEUES)
#define IS_VALID_RX_QUEUES(que) (que > 0 && que <= MAX_RX_QUEUES)
struct qlcnic_pci_func_cfg { struct qlcnic_pci_func_cfg {
u16 func_type; u16 func_type;
......
...@@ -3653,10 +3653,8 @@ validate_npar_config(struct qlcnic_adapter *adapter, ...@@ -3653,10 +3653,8 @@ validate_npar_config(struct qlcnic_adapter *adapter,
if (adapter->npars[pci_func].type != QLCNIC_TYPE_NIC) if (adapter->npars[pci_func].type != QLCNIC_TYPE_NIC)
return QL_STATUS_INVALID_PARAM; return QL_STATUS_INVALID_PARAM;
if (!IS_VALID_BW(np_cfg[i].min_bw) if (!IS_VALID_BW(np_cfg[i].min_bw) ||
|| !IS_VALID_BW(np_cfg[i].max_bw) !IS_VALID_BW(np_cfg[i].max_bw))
|| !IS_VALID_RX_QUEUES(np_cfg[i].max_rx_queues)
|| !IS_VALID_TX_QUEUES(np_cfg[i].max_tx_queues))
return QL_STATUS_INVALID_PARAM; return QL_STATUS_INVALID_PARAM;
} }
return 0; return 0;
......
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