qcacld-3.0: Handle timer initialization gracefullly
Currently hdd_medium_assess_init() and hdd_medium_assess_deinit() are not paired with event the events eSAP_START_BSS_EVENT and eSAP_STOP_BSS_EVENT respectively. Hence multiple call traces can be seen for eSAP_STOP_BSS_EVENT if eSAP_START_BSS_EVENT is not invoked from __wlan_hdd_cfg80211_start_ap or SSR sequence. To address this issue invoke hdd_medium_assess_init() for eSAP_START_BSS_EVENT only from hdd_hostapd_sap_event_cb if timer is not initialized already. Change-Id: I361e371c8b59a226fe6cae97c6f66bec46eeeb0f CRs-Fixed: 3349485
This commit is contained in:

committed by
Madan Koyyalamudi

父節點
4893c56a68
當前提交
d10945a7b3
@@ -2048,6 +2048,9 @@ 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();
|
||||
|
||||
sap_config->ch_params = ap_ctx->sap_context->ch_params;
|
||||
sap_config->sec_ch_freq = ap_ctx->sap_context->sec_ch_freq;
|
||||
|
||||
@@ -7896,7 +7899,6 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
|
||||
}
|
||||
}
|
||||
|
||||
hdd_medium_assess_init();
|
||||
goto success;
|
||||
|
||||
err_start_bss:
|
||||
|
@@ -16465,9 +16465,6 @@ void wlan_hdd_start_sap(struct hdd_adapter *ap_adapter, bool reinit)
|
||||
}
|
||||
hdd_info("SAP Start Success");
|
||||
|
||||
if (reinit)
|
||||
hdd_medium_assess_init();
|
||||
|
||||
wlansap_reset_sap_config_add_ie(sap_config, eUPDATE_IE_ALL);
|
||||
set_bit(SOFTAP_BSS_STARTED, &ap_adapter->event_flags);
|
||||
if (hostapd_state->bss_state == BSS_START) {
|
||||
|
@@ -778,3 +778,10 @@ 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;
|
||||
}
|
||||
|
@@ -117,6 +117,13 @@ 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
|
||||
@@ -137,6 +144,10 @@ 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) {}
|
||||
|
Reference in New Issue
Block a user