diff options
| author | Ganesh Kondabattini <ganeshk@codeaurora.org> | 2017-02-08 17:51:07 +0530 |
|---|---|---|
| committer | Prakash Dhavali <pdhavali@codeaurora.org> | 2017-03-09 21:08:46 -0800 |
| commit | 2f05ceeb29cb2b3f993147b87ae7dcae4388f42f (patch) | |
| tree | fdc62c18b2703702a0e45c97a0244c921dbc7e26 | |
| parent | 3c5a9a3814902cc6e7bfefad66bca608f6b70fd2 (diff) | |
qcacld-3.0: Indicate roc expire event to supplicant
qcacld-2.0 to qcacld-3.0 propagation
When extending the RoC for off channel tx, the cookie of of the RoC
is changed to action cookie so that RoC request and off channel tx
mapped to same tx frame. Indicate roc expire event to the supplicant
for the RoC request before updating the RoC cookie with action cookie.
Change-Id: I66896dd1e98d83b92d4f1e60c7057acd80743929
CRs-Fixed: 2002054
| -rw-r--r-- | core/hdd/src/wlan_hdd_p2p.c | 50 |
1 files changed, 45 insertions, 5 deletions
diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c index 3ae2b8b69488..9199932972aa 100644 --- a/core/hdd/src/wlan_hdd_p2p.c +++ b/core/hdd/src/wlan_hdd_p2p.c @@ -1145,13 +1145,53 @@ __wlan_hdd_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy, */ mutex_lock(&cfgState->remain_on_chan_ctx_lock); pRemainChanCtx = cfgState->remain_on_chan_ctx; - if ((cfgState->remain_on_chan_ctx == NULL) || - (cfgState->remain_on_chan_ctx->cookie != cookie)) { + + if (pRemainChanCtx) { + hdd_notice("action_cookie = %08llx, roc cookie = %08llx, cookie = %08llx", + cfgState->action_cookie, pRemainChanCtx->cookie, + cookie); + + if (pRemainChanCtx->cookie == cookie) { + /* request to cancel on-going roc */ + if (cfgState->buf) { + /* Tx frame pending */ + if (cfgState->action_cookie != cookie) { + hdd_debug("Cookie matched with RoC cookie but not with tx cookie, indicate expired event for roc"); + /* RoC was extended to accomodate the tx frame */ + if (REMAIN_ON_CHANNEL_REQUEST == + pRemainChanCtx-> + rem_on_chan_request) { + cfg80211_remain_on_channel_expired( + pRemainChanCtx->dev-> + ieee80211_ptr, + pRemainChanCtx->cookie, + &pRemainChanCtx->chan, + GFP_KERNEL); + } + pRemainChanCtx->rem_on_chan_request = + OFF_CHANNEL_ACTION_TX; + pRemainChanCtx->cookie = + cfgState->action_cookie; + return 0; + } + } + } else if (cfgState->buf && cfgState->action_cookie == + cookie) { + mutex_unlock(&cfgState->remain_on_chan_ctx_lock); + hdd_debug("Cookie not matched with RoC cookie but matched with tx cookie, cleanup action frame"); + /*free the buf and return 0*/ + hdd_cleanup_actionframe(pHddCtx, pAdapter); + return 0; + } else { + mutex_unlock(&cfgState->remain_on_chan_ctx_lock); + hdd_debug("No matching cookie"); + return -EINVAL; + } + } else { mutex_unlock(&cfgState->remain_on_chan_ctx_lock); - hdd_err("No Remain on channel pending with specified cookie value"); - return -EINVAL; + hdd_debug("RoC context is NULL, return success"); + return 0; } - if (NULL != cfgState->remain_on_chan_ctx) { if (qdf_mc_timer_stop(&cfgState->remain_on_chan_ctx-> hdd_remain_on_chan_timer) |
