qcacmn: Handle NULL objects properly

handle qdf_nbuf_unshare failure cases and NULL peer
in pn_error handler properly.

Change-Id: I9d271bed512a7e84a16d2b6c5b34f13235fc54e9
CRs-Fixed: 2221457
Este commit está contenido en:
Tallapragada Kalyan
2018-04-04 11:34:55 +05:30
cometido por nshrivas
padre 659fecb9fc
commit bc62989ce4
Se han modificado 2 ficheros con 21 adiciones y 8 borrados

Ver fichero

@@ -191,6 +191,7 @@ QDF_STATUS dp_rx_buffers_replenish(struct dp_soc *dp_soc, uint32_t mac_id,
rxdma_ring_entry = hal_srng_src_get_next(dp_soc->hal_soc,
rxdma_srng);
qdf_assert_always(rxdma_ring_entry);
next = (*desc_list)->next;
@@ -385,6 +386,18 @@ dp_rx_intrabss_fwd(struct dp_soc *soc,
return false;
nbuf = qdf_nbuf_unshare(nbuf);
if (!nbuf) {
DP_STATS_INC_PKT(sa_peer,
rx.intra_bss.fail,
1,
len);
/* return true even though the pkt is
* not forwarded. Basically skb_unshare
* failed and we want to continue with
* next nbuf.
*/
return true;
}
}
if (!dp_tx_send(sa_peer->vdev, nbuf)) {