diff options
author | Robin Peng <robinpeng@google.com> | 2022-01-11 11:43:54 +0800 |
---|---|---|
committer | Robin Peng <robinpeng@google.com> | 2022-01-11 11:43:54 +0800 |
commit | 5fb2f69e756e55708aa2de429aac5f57edd9b26d (patch) | |
tree | d8c5f6e0f33dc890503a53ecaee8e478dbfea5a6 | |
parent | d32608ae42f6e8bad6f8691c9a67e1f15aee176e (diff) | |
parent | 97d33a7517b9f8c882dd75c5a6ab4668a536ea52 (diff) | |
download | bcm4389-5fb2f69e756e55708aa2de429aac5f57edd9b26d.tar.gz |
Merge android12-gs-pixel-5.10-sc-v2 into android13-gs-pixel-5.10
Bug: 211546634
Signed-off-by: Robin Peng <robinpeng@google.com>
Change-Id: I9043e767529f33dc9114db08427d6268a71f10d6
-rw-r--r-- | wl_cfgp2p.c | 25 | ||||
-rw-r--r-- | wl_cfgp2p.h | 3 |
2 files changed, 27 insertions, 1 deletions
diff --git a/wl_cfgp2p.c b/wl_cfgp2p.c index 9fae4f9..8c5c3bc 100644 --- a/wl_cfgp2p.c +++ b/wl_cfgp2p.c @@ -1782,6 +1782,23 @@ wl_actframe_fillup_v2(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev, return err; } +s32 +wl_cfg80211_abort_action_frame(struct bcm_cfg80211 *cfg, struct net_device *dev, s32 bssidx) +{ + s32 ret = BCME_OK; + + ret = wldev_iovar_setint_bsscfg(dev, "actframe_abort", 1, bssidx); + if (ret < 0) { + if (ret == BCME_UNSUPPORTED) { + WL_ERR(("actframe_abort unsupported. ret:%d\n", ret)); + wl_cfgscan_cancel_scan(cfg); + } else { + WL_ERR(("actframe_abort failed. ret:%d\n", ret)); + } + } + return ret; +} + /* Send an action frame immediately without doing channel synchronization. * * This function does not wait for a completion event before returning. @@ -1864,7 +1881,13 @@ wl_cfgp2p_tx_action_frame(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev, timeout = wait_for_completion_timeout(&cfg->send_af_done, msecs_to_jiffies(af_params->dwell_time + WL_AF_TX_EXTRA_TIME_MAX)); - if (timeout >= 0 && wl_get_p2p_status(cfg, ACTION_TX_COMPLETED)) { + if (timeout == 0) { + CFGP2P_DBG(("action frame dwell timeout completed\n")); + /* Call actframe_abort to cleanup FW state, when + * dwell timeout occurs. + */ + ret = wl_cfg80211_abort_action_frame(cfg, dev, bssidx); + } else if (timeout > 0 && wl_get_p2p_status(cfg, ACTION_TX_COMPLETED)) { CFGP2P_DBG(("tx action frame operation is completed\n")); ret = BCME_OK; } else if (ETHER_ISBCAST(&cfg->afx_hdl->tx_dst_addr)) { diff --git a/wl_cfgp2p.h b/wl_cfgp2p.h index 3440659..9f218eb 100644 --- a/wl_cfgp2p.h +++ b/wl_cfgp2p.h @@ -420,6 +420,9 @@ wl_cfgp2p_need_wait_actfrmae(struct bcm_cfg80211 *cfg, void *frame, u32 frame_le extern int wl_cfgp2p_is_p2p_specific_scan(struct cfg80211_scan_request *request); +extern s32 +wl_cfg80211_abort_action_frame(struct bcm_cfg80211 *cfg, struct net_device *dev, s32 bssidx); + /* WiFi Direct */ #define SOCIAL_CHAN_1 1 #define SOCIAL_CHAN_2 6 |