349-0004-brcmfmac-fix-p2p-scan-abort-null-pointer-exception.patch 1.3 KB

1234567891011121314151617181920212223242526272829
  1. From: Hante Meuleman <hante.meuleman@broadcom.com>
  2. Date: Mon, 11 Apr 2016 11:35:24 +0200
  3. Subject: [PATCH] brcmfmac: fix p2p scan abort null pointer exception
  4. When p2p connection setup is performed without having ever done an
  5. escan a null pointer exception can occur. This is because the ifp
  6. to abort scanning is taken from escan struct while it was never
  7. initialized. Fix this by using the primary ifp for scan abort. The
  8. abort should still be performed and all scan related commands are
  9. performed on primary ifp.
  10. Reviewed-by: Arend Van Spriel <arend@broadcom.com>
  11. Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
  12. Signed-off-by: Hante Meuleman <hante.meuleman@broadcom.com>
  13. Signed-off-by: Arend van Spriel <arend@broadcom.com>
  14. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  15. ---
  16. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
  17. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
  18. @@ -1266,7 +1266,7 @@ static void
  19. brcmf_p2p_stop_wait_next_action_frame(struct brcmf_cfg80211_info *cfg)
  20. {
  21. struct brcmf_p2p_info *p2p = &cfg->p2p;
  22. - struct brcmf_if *ifp = cfg->escan_info.ifp;
  23. + struct brcmf_if *ifp = p2p->bss_idx[P2PAPI_BSSCFG_PRIMARY].vif->ifp;
  24. if (test_bit(BRCMF_P2P_STATUS_SENDING_ACT_FRAME, &p2p->status) &&
  25. (test_bit(BRCMF_P2P_STATUS_ACTION_TX_COMPLETED, &p2p->status) ||