summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYingying Tang <yintang@codeaurora.org>2016-09-29 17:19:38 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-11-18 16:47:21 -0800
commit3f6d6464e39a67d7af1c8d20427f3be21905d741 (patch)
tree5f79aa50f2fcd9ad708b1c5e71edb6d46775c21f
parent3707d2ef4c3f9be0a8c7ab57a332c47bab7cc101 (diff)
qcacld-3.0: Update radar timestamp in NOL list when receive a radar event
Propagate from qcacld-2.0 to qcacld-3.0 If a channel is already in NOL list and DFS period has been expired, the radar timestamp will not be updated when a radar event received. Update radar timestamp in sap_mark_dfs_channels() to resolve this issue. Change-Id: Ie9132f84bf5f35146e518b2a8a71998ddb2de901 CRs-Fixed: 1000945
-rw-r--r--core/sap/src/sap_fsm.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c
index 84640768137d..a57088a78a3a 100644
--- a/core/sap/src/sap_fsm.c
+++ b/core/sap/src/sap_fsm.c
@@ -1829,6 +1829,8 @@ static void sap_mark_dfs_channels(ptSapContext sapContext, uint8_t *channels,
uint8_t nRegDomainDfsChannels;
tHalHandle hHal;
tpAniSirGlobal pMac;
+ uint64_t time_elapsed_since_last_radar;
+ uint64_t time_when_radar_found;
hHal = CDS_GET_HAL_CB(sapContext->p_cds_gctx);
if (NULL == channels)
@@ -1858,13 +1860,20 @@ static void sap_mark_dfs_channels(ptSapContext sapContext, uint8_t *channels,
if (!(psapDfsChannelNolList[j].dfs_channel_number ==
channels[i]))
continue;
+
+ time_when_radar_found =
+ psapDfsChannelNolList[j].radar_found_timestamp;
+ time_elapsed_since_last_radar = time -
+ time_when_radar_found;
/*
* If channel is already in NOL, don't update it again.
* This is useful when marking bonding channels which
* are already unavailable.
*/
- if (psapDfsChannelNolList[j].radar_status_flag ==
- eSAP_DFS_CHANNEL_UNAVAILABLE) {
+ if ((psapDfsChannelNolList[j].radar_status_flag ==
+ eSAP_DFS_CHANNEL_UNAVAILABLE) &&
+ (time_elapsed_since_last_radar <
+ SAP_DFS_NON_OCCUPANCY_PERIOD)) {
QDF_TRACE(QDF_MODULE_ID_SAP,
QDF_TRACE_LEVEL_INFO_HIGH,
FL("Channel=%d already in NOL"),