use bt_coex_mode_set to deterministically signify the DHCP start / Stop

In the current infrastructure , “setPowerSave false” is known for DHCP
start and “setPowerSave true” for DHCP stop. Thus, the BT Coex will give
preference to Wi-Fi during this period of DHCP start – stop.
This setPowerSave false / true interface is not only triggered on DHCP
start / stop but this is also a public API which can be triggered by the
applications when they want the Wi-Fi system to go in to
WIFI_MODE_FULL_HIGH_PERF. Thus , the “setpowersave false“ will be
triggered but not the corresponding “true” . As a result , the BT Coex
module shall assume that the DHCP is still in progress and keeps giving
preference to Wi-Fi.
and WifiNative.setBluetoothCoexistenceMode() is invoked only when DHCP
start & stop, hence we can use bt_coex_mode_set to deterministically
signify the DHCP start / Stop and send DHCP start / stop indication to FW

Change-Id: If5cca595aec22b7a10af4b127a5f75118d1ddc26
Signed-off-by: liubin7 <liubin7@motorola.com>
Reviewed-on: https://gerrit.mot.com/1464100
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
This commit is contained in:
liubin7 2019-11-30 10:36:54 +08:00 • committed by panyq6
commit 2d15eaf507

View file

@ -2621,8 +2621,10 @@ static int __wlan_hdd_cfg80211_set_power_mgmt(struct wiphy *wiphy,
if (hdd_adapter_is_connected_sta(adapter)) {
hdd_debug("vdev mode %d enable dhcp protection",
adapter->device_mode);
allow_power_save ? hdd_stop_dhcp_ind(adapter) :
hdd_start_dhcp_ind(adapter);
if ( hdd_ctx->bt_coex_mode_set ) {
allow_power_save ? hdd_stop_dhcp_ind(adapter) :
hdd_start_dhcp_ind(adapter);
}
} else {
hdd_debug("vdev mod %d disconnected ignore dhcp protection",
adapter->device_mode);