qcacld-3.0: Fix deadlock when SAP interface down during pre_cac failure
While pre cac is in progress and if the SAP is stopped from UI, It may lead to dead-lock due to rtnl lock. This is because, stopping SAP will trigger the stop_ap first and then hostapd_stop. Stop_ap will schedule a work to handle pre_cac failure (Thread1). hostapd_stop will be triggered in parallel (Thread2). This will result in a below dead-lock scenario. Thread1: Waiting to acquire rtnl_lock to unregister pre_cac adapter. Thread2: Acquired the rtnl_lock and waiting for Thread1 to complete To resolve this dead-lock, unregister pre_cac_adapter during hostapd_stop without requesting for rtnl_lock. Change-Id: I222df9ee0d75b16f79c28b7cdd86369c340a15c2 CRs-Fixed: 2832256
此提交包含在:
@@ -67,6 +67,8 @@ extern "C" {
|
||||
#define SAP_DEFAULT_5GHZ_CHANNEL (40)
|
||||
#define SAP_CHANNEL_NOT_SELECTED (0)
|
||||
|
||||
#define SAP_PRE_CAC_IFNAME "precac"
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* reasonCode taken from 802.11 standard.
|
||||
* ------------------------------------------------------------------------*/
|
||||
@@ -832,6 +834,7 @@ QDF_STATUS wlan_sap_update_next_channel(struct sap_context *sap_ctx,
|
||||
uint8_t channel,
|
||||
enum phy_ch_width chan_bw);
|
||||
|
||||
#ifdef FEATURE_SAP_COND_CHAN_SWITCH
|
||||
/**
|
||||
* wlan_sap_set_pre_cac_status() - Set the pre cac status
|
||||
* @sap_ctx: SAP context
|
||||
@@ -855,6 +858,20 @@ QDF_STATUS wlan_sap_set_pre_cac_status(struct sap_context *sap_ctx,
|
||||
*/
|
||||
QDF_STATUS wlan_sap_set_chan_before_pre_cac(struct sap_context *sap_ctx,
|
||||
uint8_t chan_before_pre_cac);
|
||||
#else
|
||||
static inline QDF_STATUS
|
||||
wlan_sap_set_pre_cac_status(struct sap_context *sap_ctx, bool status)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
wlan_sap_set_chan_before_pre_cac(struct sap_context *sap_ctx,
|
||||
uint8_t chan_before_pre_cac)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wlan_sap_set_pre_cac_complete_status() - Sets pre cac complete status
|
||||
|
新增問題並參考
封鎖使用者