qcacmn: Ensure nbuf count is less than no of segs

While preparing raw packets for transmission, the count
of nbuf belonging to one mpdu must be less than the
number of segments.This makes sure the frags array inside
seg_info does not go out of bounds.

Change-Id: I7fffba7f64da274aa73c558cfc63d90f4419a04d
This commit is contained in:
Debasis Das
2020-08-31 14:58:01 +05:30
committed by snandini
parent a24f3db18e
commit c1184913b7
4 changed files with 16 additions and 3 deletions

View File

@@ -714,6 +714,7 @@ static inline void dp_update_pdev_ingress_stats(struct dp_pdev *tgtobj,
DP_STATS_AGGR_PKT(tgtobj, srcobj, tx_i.inspect_pkts);
DP_STATS_AGGR_PKT(tgtobj, srcobj, tx_i.raw.raw_pkt);
DP_STATS_AGGR(tgtobj, srcobj, tx_i.raw.dma_map_error);
DP_STATS_AGGR(tgtobj, srcobj, tx_i.raw.num_frags_overflow_err);
DP_STATS_AGGR(tgtobj, srcobj, tx_i.sg.dropped_host.num);
DP_STATS_AGGR(tgtobj, srcobj, tx_i.sg.dropped_target);
DP_STATS_AGGR_PKT(tgtobj, srcobj, tx_i.sg.sg_pkt);