mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
qcacld-3.0: Don't delete TWT session if teardown fails
When TWT teardown is received, driver sets the twt setup done flag to false and clears the TWT dialog id/state for the TWT session irrespective of the teardown status sent by firmware. This causes TWT session deletion even if ack is not received for TWT teardown frame or internal error due to which TWT teardown frame was not sent over air. Don't clear the TWT sesson if teardown failure due to internal error or no ack is received for TWT frame. Change-Id: I7d5cf423c3cd0d4be9bb2ff0b238a3fa069783cf CRs-Fixed: 2866195
This commit is contained in:
parent
604f083f03
commit
fe1d450190
2 changed files with 34 additions and 11 deletions
|
|
@ -1523,13 +1523,7 @@ hdd_twt_del_dialog_comp_cb(struct wlan_objmgr_psoc *psoc,
|
|||
}
|
||||
|
||||
wlan_cfg80211_vendor_event(twt_vendor_event, GFP_KERNEL);
|
||||
ucfg_mlme_set_twt_setup_done(
|
||||
adapter->hdd_ctx->psoc,
|
||||
(struct qdf_mac_addr *)params->peer_macaddr,
|
||||
params->dialog_id, false);
|
||||
mlme_init_twt_context(hdd_ctx->psoc,
|
||||
(struct qdf_mac_addr *)params->peer_macaddr,
|
||||
params->dialog_id);
|
||||
|
||||
hdd_exit();
|
||||
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -2108,6 +2108,24 @@ sme_process_twt_add_dialog_event(struct mac_context *mac,
|
|||
WLAN_TWT_SETUP_STATE_ACTIVE);
|
||||
}
|
||||
|
||||
static bool
|
||||
sme_is_twt_teardown_failed(enum WMI_HOST_DEL_TWT_STATUS teardown_status)
|
||||
{
|
||||
switch (teardown_status) {
|
||||
case WMI_HOST_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST:
|
||||
case WMI_HOST_DEL_TWT_STATUS_INVALID_PARAM:
|
||||
case WMI_HOST_DEL_TWT_STATUS_DIALOG_ID_BUSY:
|
||||
case WMI_HOST_DEL_TWT_STATUS_NO_RESOURCE:
|
||||
case WMI_HOST_DEL_TWT_STATUS_NO_ACK:
|
||||
case WMI_HOST_DEL_TWT_STATUS_UNKNOWN_ERROR:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* sme_process_twt_del_dialog_event() - Process twt del dialog event
|
||||
* response from firmware
|
||||
|
|
@ -2145,14 +2163,25 @@ sme_process_twt_del_dialog_event(struct mac_context *mac,
|
|||
mac->psoc, (struct qdf_mac_addr *)param->peer_macaddr,
|
||||
true);
|
||||
|
||||
ucfg_mlme_set_twt_session_state(
|
||||
mac->psoc, (struct qdf_mac_addr *)param->peer_macaddr,
|
||||
param->dialog_id, WLAN_TWT_SETUP_STATE_NOT_ESTABLISHED);
|
||||
|
||||
/* Reset the active TWT command to none */
|
||||
mlme_set_twt_command_in_progress(
|
||||
mac->psoc, (struct qdf_mac_addr *)param->peer_macaddr,
|
||||
param->dialog_id, WLAN_TWT_NONE);
|
||||
|
||||
if (sme_is_twt_teardown_failed(param->status))
|
||||
return;
|
||||
|
||||
ucfg_mlme_set_twt_setup_done(mac->psoc, (struct qdf_mac_addr *)
|
||||
param->peer_macaddr,
|
||||
param->dialog_id, false);
|
||||
|
||||
ucfg_mlme_set_twt_session_state(
|
||||
mac->psoc, (struct qdf_mac_addr *)param->peer_macaddr,
|
||||
param->dialog_id, WLAN_TWT_SETUP_STATE_NOT_ESTABLISHED);
|
||||
|
||||
mlme_init_twt_context(mac->psoc, (struct qdf_mac_addr *)
|
||||
param->peer_macaddr,
|
||||
param->dialog_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue