diff options
author | Sathya Perla <sathya.perla@broadcom.com> | 2017-10-26 11:51:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-28 00:02:45 +0900 |
commit | cd66358e52f74585f043ef63089727273b3421d3 (patch) | |
tree | 0d4ac98789de50ba22bfc2ba9ac0b615cabaa521 /drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h | |
parent | 5a84acbebb22f93dfc9ce1e5f0427c45c94acb33 (diff) |
bnxt_en: alloc tc_info{} struct only when tc flower is enabled
TC flower is not enabled on VFs and when there's no FW support.
Alloc the tc_info{} struct at init time only when TC flower is being
enabled.
Signed-off-by: Sathya Perla <sathya.perla@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h index 404f98dea0ab..97e09a880693 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h @@ -198,7 +198,7 @@ void bnxt_tc_flow_stats_work(struct bnxt *bp); static inline bool bnxt_tc_flower_enabled(struct bnxt *bp) { - return bp->tc_info.enabled; + return bp->tc_info && bp->tc_info->enabled; } #else /* CONFIG_BNXT_FLOWER_OFFLOAD */ |