Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

qlcnic: define valid vlan id range

4095 vlan id is reserved and should not be use.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Sony Chacko and committed by
David S. Miller
0184bbba 90d19005

+1 -1
+1 -1
drivers/net/qlcnic/qlcnic.h
··· 1134 1134 #define MAX_RX_QUEUES 4 1135 1135 #define DEFAULT_MAC_LEARN 1 1136 1136 1137 - #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) 1138 1138 #define IS_VALID_BW(bw) (bw >= MIN_BW && bw <= MAX_BW) 1139 1139 #define IS_VALID_TX_QUEUES(que) (que > 0 && que <= MAX_TX_QUEUES) 1140 1140 #define IS_VALID_RX_QUEUES(que) (que > 0 && que <= MAX_RX_QUEUES)