diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index 4952804d9d2a..f11b3873c2a9 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -4918,6 +4918,20 @@ void lim_update_sta_run_time_ht_switch_chnl_params(tpAniSirGlobal pMac, return; } + /* + * Do not try to switch channel if RoC is in progress. RoC code path + * uses pMac->lim.gpLimRemainOnChanReq to notify the upper layers that + * the device has started listening on the channel requested as part of + * RoC, if we set pMac->lim.gpLimRemainOnChanReq to NULL as we do below + * then the upper layers will think that the channel change is not + * successful and the RoC from the upper layer perspective will never + * end... + */ + if (pMac->lim.gpLimRemainOnChanReq) { + lim_log(pMac, LOGE, FL("RoC is in progress")); + return; + } + if (psessionEntry->htSecondaryChannelOffset != (uint8_t) pHTInfo->secondaryChannelOffset || psessionEntry->htRecommendedTxWidthSet !=