1
0
Fork 0

brcmfmac: use actframe_abort to cancel ongoing action frame

The driver sends an action frame down and waits for dwell time to be
completed or aborted before sending out the next action frame.
Driver issues "scan abort" to cancel the current time slot, but this
doesn't have any effect because, we are not using scan engine for
sending action frame.
Fix is to use "actframe_abort" to cancels the current action frame.

Signed-off-by: Ryohei Kondo <ryohei.kondo@cypress.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1588770201-54361-3-git-send-email-wright.feng@cypress.com
alistair/sunxi64-5.8
Ryohei Kondo 2020-05-06 08:03:20 -05:00 committed by Kalle Valo
parent b46f1546a7
commit 30fb1b2729
1 changed files with 32 additions and 2 deletions

View File

@ -1267,6 +1267,30 @@ bool brcmf_p2p_scan_finding_common_channel(struct brcmf_cfg80211_info *cfg,
return true;
}
/**
* brcmf_p2p_abort_action_frame() - abort action frame.
*
* @cfg: common configuration struct.
*
*/
static s32 brcmf_p2p_abort_action_frame(struct brcmf_cfg80211_info *cfg)
{
struct brcmf_p2p_info *p2p = &cfg->p2p;
struct brcmf_cfg80211_vif *vif;
s32 err;
s32 int_val = 1;
brcmf_dbg(TRACE, "Enter\n");
vif = p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif;
err = brcmf_fil_bsscfg_data_set(vif->ifp, "actframe_abort", &int_val,
sizeof(s32));
if (err)
brcmf_err(" aborting action frame has failed (%d)\n", err);
return err;
}
/**
* brcmf_p2p_stop_wait_next_action_frame() - finish scan if af tx complete.
*
@ -1278,6 +1302,7 @@ brcmf_p2p_stop_wait_next_action_frame(struct brcmf_cfg80211_info *cfg)
{
struct brcmf_p2p_info *p2p = &cfg->p2p;
struct brcmf_if *ifp = p2p->bss_idx[P2PAPI_BSSCFG_PRIMARY].vif->ifp;
s32 err;
if (test_bit(BRCMF_P2P_STATUS_SENDING_ACT_FRAME, &p2p->status) &&
(test_bit(BRCMF_P2P_STATUS_ACTION_TX_COMPLETED, &p2p->status) ||
@ -1286,8 +1311,13 @@ brcmf_p2p_stop_wait_next_action_frame(struct brcmf_cfg80211_info *cfg)
/* if channel is not zero, "actfame" uses off channel scan.
* So abort scan for off channel completion.
*/
if (p2p->af_sent_channel)
brcmf_notify_escan_complete(cfg, ifp, true, true);
if (p2p->af_sent_channel) {
/* abort actframe using actframe_abort or abort scan */
err = brcmf_p2p_abort_action_frame(cfg);
if (err)
brcmf_notify_escan_complete(cfg, ifp, true,
true);
}
} else if (test_bit(BRCMF_P2P_STATUS_WAITING_NEXT_AF_LISTEN,
&p2p->status)) {
brcmf_dbg(TRACE, "*** Wake UP ** abort listen for next af frame\n");