Browse Source

qcacld-3.0: Initialize timer for SAP + SAP concurrency

In current scenario, hdd_medium_assess_init timer is initialized
only when there is single SAP. For SAP + SAP concurrency
hdd_medium_access_state() returns false as there is ongoing
timer running. So, assertion occurs as timer is
not initialized when AP stopped.

Remove hdd_medium_access_state() check as hdd_hostapd_sap_event_cb()
is called every time when SAP is started.

Change-Id: I12e8871fb606d180eabc63c8841017d7240ac829
CRs-Fixed: 3376337
Aravind Kishore Sukla 2 years ago
parent
commit
3533a74627

+ 1 - 2
core/hdd/src/wlan_hdd_hostapd.c

@@ -1984,8 +1984,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(struct sap_event *sap_event,
 			      ap_ctx->operating_chan_freq,
 			      sap_config->ch_params.ch_width);
 
-		if (hdd_medium_access_state() == true)
-			hdd_medium_assess_init();
+		hdd_medium_assess_init();
 
 		sap_config->ch_params = ap_ctx->sap_context->ch_params;
 		sap_config->sec_ch_freq = ap_ctx->sap_context->sec_ch_freq;

+ 1 - 8
core/hdd/src/wlan_hdd_medium_assess.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -780,10 +780,3 @@ void hdd_medium_assess_deinit(void)
 		qdf_mc_timer_destroy(&hdd_medium_assess_timer);
 	}
 }
-
-bool hdd_medium_access_state(void)
-{
-	if (!timer_enable)
-		return true;
-	return false;
-}

+ 1 - 12
core/hdd/src/wlan_hdd_medium_assess.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -117,13 +117,6 @@ void hdd_medium_assess_init(void);
  */
 void hdd_medium_assess_deinit(void);
 
-/**
- * hdd_medium_access_state() - medium assess timer state
- *
- * Return: true if timer not initialized else false
- */
-
-bool hdd_medium_access_state(void);
 /**
  * hdd_medium_assess_stop_timer() - medium assess reset and stop timer
  * @pdev_id: pdev id
@@ -144,10 +137,6 @@ void hdd_medium_assess_ssr_enable_flag(void);
 #define FEATURE_MEDIUM_ASSESS_VENDOR_EVENTS
 static inline void hdd_medium_assess_init(void) {}
 static inline void hdd_medium_assess_deinit(void) {}
-static inline bool hdd_medium_access_state(void)
-{
-	return false;
-}
 static inline void hdd_medium_assess_stop_timer(uint8_t pdev_id,
 						struct hdd_context *hdd_ctx) {}
 static inline void hdd_medium_assess_ssr_enable_flag(void) {}