qcacmn: Drop pkts with same source MAC addr as BSS peer

Drop packets received with source mac address which match
BSS-peer MAC address

Change-Id: Ia89bdef8c747856e6eb0ade5946f2109aa6ee106
CRs-Fixed: 2003187
This commit is contained in:
Tallapragada Kalyan 2017-02-06 16:34:42 +05:30 • committed by qcabuildsw
commit 3549b43aab
2 changed files with 22 additions and 0 deletions

View file

@ -352,6 +352,16 @@ done:
continue;
}
if (qdf_unlikely(peer->bss_peer)) {
QDF_TRACE(QDF_MODULE_ID_DP,
QDF_TRACE_LEVEL_INFO,
FL("received pkt with same src MAC"));
/* Drop & free packet */
qdf_nbuf_free(nbuf);
/* Statistics */
continue;
}
/*
* HW structures call this L3 header padding --
* even though this is actually the offset from

View file

@ -335,6 +335,17 @@ dp_rx_null_q_desc_handle(struct dp_soc *soc, void *ring_desc,
qdf_nbuf_data(nbuf), 128, false);
#endif /* NAPIER_EMULATION */
if (qdf_unlikely(peer->bss_peer)) {
QDF_TRACE(QDF_MODULE_ID_DP,
QDF_TRACE_LEVEL_INFO,
FL("received pkt with same src MAC"));
/* Drop & free packet */
qdf_nbuf_free(nbuf);
/* Statistics */
goto fail;
}
pdev0 = soc->pdev_list[0];/* Hard code 0th elem */
if (pdev0) {
@ -354,6 +365,7 @@ dp_rx_null_q_desc_handle(struct dp_soc *soc, void *ring_desc,
FL("INVALID pdev %p"), pdev0);
}
fail:
dp_rx_add_to_free_desc_list(head, tail, rx_desc);
return rx_bufs_used;