net/bnxt: check initialization before accessing stats
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Mon, 8 Jan 2018 20:24:31 +0000 (12:24 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jan 2018 17:47:49 +0000 (18:47 +0100)
commited2ced6fe92706bfcbc7e64f553955c3951aa223
tree46df56da91a805f4c71957e4670ea36477a96348
parentff947c6ce15fb9dff15626c119706a2c8db48c70
net/bnxt: check initialization before accessing stats

Maintain state of PMD initialization and check it before checking stats.
In certain cases, we might end up accessing stats before the required
HWRM commands are processed by FW.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt.h
drivers/net/bnxt/bnxt_ethdev.c
drivers/net/bnxt/bnxt_stats.c