aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic
diff options
context:
space:
mode:
authorRajesh Borundia <rajesh.borundia@qlogic.com>2011-02-22 22:21:25 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-23 17:23:33 -0500
commitd12b0d9adc46888e3bb0224886105bf3b188553b (patch)
tree1c042239af546d4f4e606f114942bb28b8d3f15b /drivers/net/qlcnic
parent9ce13ca8fc43f6fbb7ee55a283d44ff2f4ba1c06 (diff)
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: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic')
-rw-r--r--drivers/net/qlcnic/qlcnic.h4
-rw-r--r--drivers/net/qlcnic/qlcnic_main.c6
2 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h
index fa7f794de29c..dc44564ef6f9 100644
--- a/drivers/net/qlcnic/qlcnic.h
+++ b/drivers/net/qlcnic/qlcnic.h
@@ -1132,14 +1132,10 @@ struct qlcnic_eswitch {
1132#define MAX_BW 100 /* % of link speed */ 1132#define MAX_BW 100 /* % of link speed */
1133#define MAX_VLAN_ID 4095 1133#define MAX_VLAN_ID 4095
1134#define MIN_VLAN_ID 2 1134#define MIN_VLAN_ID 2
1135#define MAX_TX_QUEUES 1
1136#define MAX_RX_QUEUES 4
1137#define DEFAULT_MAC_LEARN 1 1135#define DEFAULT_MAC_LEARN 1
1138 1136
1139#define IS_VALID_VLAN(vlan) (vlan >= MIN_VLAN_ID && vlan < MAX_VLAN_ID) 1137#define IS_VALID_VLAN(vlan) (vlan >= MIN_VLAN_ID && vlan < MAX_VLAN_ID)
1140#define IS_VALID_BW(bw) (bw <= MAX_BW) 1138#define IS_VALID_BW(bw) (bw <= MAX_BW)
1141#define IS_VALID_TX_QUEUES(que) (que > 0 && que <= MAX_TX_QUEUES)
1142#define IS_VALID_RX_QUEUES(que) (que > 0 && que <= MAX_RX_QUEUES)
1143 1139
1144struct qlcnic_pci_func_cfg { 1140struct qlcnic_pci_func_cfg {
1145 u16 func_type; 1141 u16 func_type;
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index 4994b947fd21..cd88c7e1bfa9 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -3653,10 +3653,8 @@ validate_npar_config(struct qlcnic_adapter *adapter,
3653 if (adapter->npars[pci_func].type != QLCNIC_TYPE_NIC) 3653 if (adapter->npars[pci_func].type != QLCNIC_TYPE_NIC)
3654 return QL_STATUS_INVALID_PARAM; 3654 return QL_STATUS_INVALID_PARAM;
3655 3655
3656 if (!IS_VALID_BW(np_cfg[i].min_bw) 3656 if (!IS_VALID_BW(np_cfg[i].min_bw) ||
3657 || !IS_VALID_BW(np_cfg[i].max_bw) 3657 !IS_VALID_BW(np_cfg[i].max_bw))
3658 || !IS_VALID_RX_QUEUES(np_cfg[i].max_rx_queues)
3659 || !IS_VALID_TX_QUEUES(np_cfg[i].max_tx_queues))
3660 return QL_STATUS_INVALID_PARAM; 3658 return QL_STATUS_INVALID_PARAM;
3661 } 3659 }
3662 return 0; 3660 return 0;