diff options
author | Rajesh Borundia <rajesh.borundia@qlogic.com> | 2010-07-23 17:24:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-24 23:42:18 -0400 |
commit | 9963a8bde60f3c139b7683e2ec7e0bf83c0d7581 (patch) | |
tree | a4084b83978013cd7eede26240e303e1b1c05d6c /drivers/net/qlcnic | |
parent | 2a88e7e559f2358f4e1422d0b0c0278a74136581 (diff) |
qlcnic: fix bandwidth check
Fix maximum and minmum bandwith value.
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.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h index e1894775e5aa..fad8e9a51a54 100644 --- a/drivers/net/qlcnic/qlcnic.h +++ b/drivers/net/qlcnic/qlcnic.h | |||
@@ -1074,8 +1074,8 @@ struct qlcnic_eswitch { | |||
1074 | /* Return codes for Error handling */ | 1074 | /* Return codes for Error handling */ |
1075 | #define QL_STATUS_INVALID_PARAM -1 | 1075 | #define QL_STATUS_INVALID_PARAM -1 |
1076 | 1076 | ||
1077 | #define MAX_BW 10000 | 1077 | #define MAX_BW 100 |
1078 | #define MIN_BW 100 | 1078 | #define MIN_BW 1 |
1079 | #define MAX_VLAN_ID 4095 | 1079 | #define MAX_VLAN_ID 4095 |
1080 | #define MIN_VLAN_ID 2 | 1080 | #define MIN_VLAN_ID 2 |
1081 | #define MAX_TX_QUEUES 1 | 1081 | #define MAX_TX_QUEUES 1 |
@@ -1083,8 +1083,7 @@ struct qlcnic_eswitch { | |||
1083 | #define DEFAULT_MAC_LEARN 1 | 1083 | #define DEFAULT_MAC_LEARN 1 |
1084 | 1084 | ||
1085 | #define IS_VALID_VLAN(vlan) (vlan >= MIN_VLAN_ID && vlan <= MAX_VLAN_ID) | 1085 | #define IS_VALID_VLAN(vlan) (vlan >= MIN_VLAN_ID && vlan <= MAX_VLAN_ID) |
1086 | #define IS_VALID_BW(bw) (bw >= MIN_BW && bw <= MAX_BW \ | 1086 | #define IS_VALID_BW(bw) (bw >= MIN_BW && bw <= MAX_BW) |
1087 | && (bw % 100) == 0) | ||
1088 | #define IS_VALID_TX_QUEUES(que) (que > 0 && que <= MAX_TX_QUEUES) | 1087 | #define IS_VALID_TX_QUEUES(que) (que > 0 && que <= MAX_TX_QUEUES) |
1089 | #define IS_VALID_RX_QUEUES(que) (que > 0 && que <= MAX_RX_QUEUES) | 1088 | #define IS_VALID_RX_QUEUES(que) (que > 0 && que <= MAX_RX_QUEUES) |
1090 | #define IS_VALID_MODE(mode) (mode == 0 || mode == 1) | 1089 | #define IS_VALID_MODE(mode) (mode == 0 || mode == 1) |