bnxt_en: Don't proceed in .ndo_set_rx_mode() when device is not in open state.
authorMichael Chan <michael.chan@broadcom.com>
Sat, 14 Sep 2019 04:01:38 +0000 (00:01 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Sep 2019 14:44:27 +0000 (16:44 +0200)
commit268d0895f1b9690755d91b6ced60c9d8d17a7567
tree81af20a67cfc88cfeace602d855cc7a16376caf8
parent8f7baad7f03543451af27f5380fc816b008aa1f2
bnxt_en: Don't proceed in .ndo_set_rx_mode() when device is not in open state.

Check the BNXT_STATE_OPEN flag instead of netif_running() in
bnxt_set_rx_mode().  If the driver is going through any reset, such
as firmware reset or even TX timeout, it may not be ready to set the RX
mode and may crash.  The new rx mode settings will be picked up when
the device is opened again later.

Fixes: 230d1f0de754 ("bnxt_en: Handle firmware reset.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c