mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 22:23:14 -04:00
qcacld-3.0: Don't set the hw_mode to SMM if connection is in progress
Currently, hdd_vdev_destroy checks if any vdev is actively using DBS while cleaning up the vdev. It stops the timer and sends set hw_mode command to firmware to set the hw_mode to SMM if no vdev is using DBS. This causes delay in p2p interface down in below scenario, 1. Bring up both sta and p2p vdevs. 2. Initiate connection on sta to an AP which has both 2GHz and 5GHz candidates. hw_mode would be set to DBS as one of the candidate is 2GHz. 3. Connection would be attempted first on 5GHz candidate if the 5GHz candidate score is good. 4. If p2p interface is disabled while sta connection is happening, it stops the opportunistic timer and sets the hw_mode to SMM. But the command would be waiting in serialization queue as connect command is active currently. This is a blocking call and userspace thread would be stuck till connection completion/ connection timeout(5 seconds) happens. The above wait results delay in p2p down which in turn results delay in wifi turn-on(as p2p down+set random mac+p2p up happens as part of wifi turn on) and turn-off. Don't set the hw_mode to SMM in this case as the sta connection is in progress. Change-Id: If286fe9bd9906eba71686cf1d50880aa065cc100 CRs-Fixed: 2926272
This commit is contained in:
parent
be562937f9
commit
590802cbec
3 changed files with 10 additions and 8 deletions
|
|
@ -2895,13 +2895,7 @@ static int hdd_softap_unpack_ie(mac_handle_t mac_handle,
|
|||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_is_any_sta_connecting() - check if any sta is connecting
|
||||
* @hdd_ctx: hdd context
|
||||
*
|
||||
* Return: true if any sta is connecting
|
||||
*/
|
||||
static bool hdd_is_any_sta_connecting(struct hdd_context *hdd_ctx)
|
||||
bool hdd_is_any_sta_connecting(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
struct hdd_adapter *adapter = NULL, *next_adapter = NULL;
|
||||
struct hdd_station_ctx *sta_ctx;
|
||||
|
|
|
|||
|
|
@ -327,4 +327,11 @@ enum qca_wlan_802_11_mode hdd_convert_dot11mode_from_phymode(int phymode);
|
|||
*/
|
||||
void hdd_stop_sap_due_to_invalid_channel(struct work_struct *work);
|
||||
|
||||
/**
|
||||
* hdd_is_any_sta_connecting() - check if any sta is connecting
|
||||
* @hdd_ctx: hdd context
|
||||
*
|
||||
* Return: true if any sta is connecting
|
||||
*/
|
||||
bool hdd_is_any_sta_connecting(struct hdd_context *hdd_ctx);
|
||||
#endif /* end #if !defined(WLAN_HDD_HOSTAPD_H) */
|
||||
|
|
|
|||
|
|
@ -5499,7 +5499,8 @@ int hdd_vdev_destroy(struct hdd_adapter *adapter)
|
|||
policy_mgr_mode_specific_connection_count(hdd_ctx->psoc,
|
||||
policy_mgr_convert_device_mode_to_qdf_type(
|
||||
adapter->device_mode), NULL) == 1) ||
|
||||
!policy_mgr_get_connection_count(hdd_ctx->psoc))
|
||||
(!policy_mgr_get_connection_count(hdd_ctx->psoc) &&
|
||||
!hdd_is_any_sta_connecting(hdd_ctx)))
|
||||
policy_mgr_check_and_stop_opportunistic_timer(hdd_ctx->psoc,
|
||||
adapter->vdev_id);
|
||||
/* Check and wait for hw mode response */
|
||||
|
|
|
|||
Loading…
Reference in a new issue