qcacld-3.0: Update user PS config after STA connection

For the user power save enable/disable request, host doesn't send power
config to FW if STA is not in connected state. Host remembers users power
save config in MAC context's "usr_cfg_ps_enable" member. So use this
"usr_cfg_ps_enable" to send power save config to FW after STA associates
to AP.
Problem scenario:
1) User brings STA interface up and sends power save enable to host.
2) As kernel expects power save config command success even in the STA is
   in disconnected state, host doesn't send power save config to FW and
   returns success to kernel.
3) If user doesn't send power save enable command to host after STA
   connects to AP. STA remains in full power mode.
Fix:
1) Use "usr_cfg_ps_enable" to send power save config to FW after STA
   connects to AP.

Change-Id: I412567e2bb40a7b2d9566106e50a422f173a86d1
CRs-Fixed: 2767543
This commit is contained in:
Abhishek Ambure
2020-09-05 18:02:40 +05:30
committed by snandini
parent d0fef5e891
commit 23ec077ed4
2 changed files with 30 additions and 2 deletions

View File

@@ -527,6 +527,34 @@ out:
}
/**
* hdd_send_ps_config_to_fw() - Check user pwr save config set/reset PS
* @adapter: pointer to hdd adapter
*
* This function checks the power save configuration saved in MAC context
* and sends power save config to FW.
*
* Return: None
*/
static void hdd_send_ps_config_to_fw(struct hdd_adapter *adapter)
{
struct mac_context *mac_ctx;
struct hdd_context *hdd_ctx;
if (hdd_validate_adapter(adapter))
return;
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
mac_ctx = MAC_CONTEXT(hdd_ctx->mac_handle);
if (mac_ctx->usr_cfg_ps_enable)
sme_ps_enable_disable(hdd_ctx->mac_handle, adapter->vdev_id,
SME_PS_ENABLE);
else
sme_ps_enable_disable(hdd_ctx->mac_handle, adapter->vdev_id,
SME_PS_DISABLE);
}
/**
* __hdd_ipv6_notifier_work_queue() - IPv6 notification work function
* @adapter: adapter whose IP address changed
@@ -556,6 +584,7 @@ static void __hdd_ipv6_notifier_work_queue(struct hdd_adapter *adapter)
hdd_enable_ns_offload(adapter, pmo_ipv6_change_notify);
hdd_send_ps_config_to_fw(adapter);
exit:
hdd_exit();
}
@@ -920,6 +949,7 @@ static void __hdd_ipv4_notifier_work_queue(struct hdd_adapter *adapter)
if (ifa && hdd_ctx->is_fils_roaming_supported)
sme_send_hlp_ie_info(hdd_ctx->mac_handle, adapter->vdev_id,
roam_profile, ifa->ifa_local);
hdd_send_ps_config_to_fw(adapter);
exit:
hdd_exit();
}

View File

@@ -391,8 +391,6 @@ QDF_STATUS sme_ps_enable_disable(mac_handle_t mac_handle, uint32_t session_id,
* In non associated state driver wont handle the power save
* But kernel expects return status success even
* in the disconnected state.
* TODO: If driver to remember the ps state to further use
* after connection.
*/
if (!csr_is_conn_state_connected_infra(mac_ctx, session_id))
status = QDF_STATUS_SUCCESS;