aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaoran Wang <b50027@freescale.com>2015-11-25 16:48:11 +0800
committerHaoran Wang <b50027@freescale.com>2015-11-25 17:07:12 +0800
commitd2e13a34b89abd3e4be4ccca4aa7364d8d83473d (patch)
tree78f4ae4025c83636a56ade25137b697a5bd125fc
parent4c3ec9a69fdfa5eb6d1040edda6240704a65d33e (diff)
downloadfreescale-d2e13a34b89abd3e4be4ccca4aa7364d8d83473d.tar.gz
MA-7253 bcmdhd: avoid null interface before update tx status
Avoid to access the null interface before update tx status. This patch workaround to fix the panic when the p2p connection disconnect in the p2p stress test. The interface will be released during the disconnect process. Signed-off-by: Haoran Wang <b50027@freescale.com>
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_linux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c
index 37a786aaff8..26c37103ac7 100644
--- a/drivers/net/wireless/bcmdhd/dhd_linux.c
+++ b/drivers/net/wireless/bcmdhd/dhd_linux.c
@@ -2147,6 +2147,9 @@ dhd_txcomplete(dhd_pub_t *dhdp, void *txp, bool success)
#ifdef PROP_TXSTATUS
if (dhdp->wlfc_state && (dhdp->proptxstatus_mode != WLFC_FCMODE_NONE)) {
dhd_if_t *ifp = dhd->iflist[DHD_PKTTAG_IF(PKTTAG(txp))];
+ /* if the interface is released somewhere just return */
+ if (ifp == NULL)
+ return;
uint datalen = PKTLEN(dhd->pub.osh, txp);
if (success) {