linux/drivers/net/ethernet/qlogic
Michael Zhivich d63da85a42 qlogic: qlcnic: fix use of SPEED_UNKNOWN ethtool constant
qlcnic driver uses u16 to store SPEED_UKNOWN ethtool constant,
which is defined as -1, resulting in value truncation and
thus incorrect test results against SPEED_UNKNOWN.

For example, the following test will print "False":

    u16 speed = SPEED_UNKNOWN;

    if (speed == SPEED_UNKNOWN)
        printf("True");
    else
        printf("False");

Change storage of speed to use u32 to avoid this issue.

Signed-off-by: Michael Zhivich <mzhivich@akamai.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-08 16:30:43 -07:00
..
netxen net: netxen: fix a missing check and an uninitialized use 2018-12-21 09:01:47 -08:00
qed qed: Read device port count from the shmem 2019-02-21 10:51:08 -08:00
qede qede: Fix internal loopback failure with jumbo mtu configuration 2019-03-07 09:43:30 -08:00
qlcnic qlogic: qlcnic: fix use of SPEED_UNKNOWN ethtool constant 2019-04-08 16:30:43 -07:00
qlge net: qlge: fix a potential NULL pointer dereference 2019-03-11 16:16:22 -07:00
Kconfig qed*: Utilize FW 8.33.1.0 2018-01-02 13:59:16 -05:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qla3xxx.c net: qlogic: fix a potential NULL pointer dereference 2019-03-12 14:44:43 -07:00
qla3xxx.h