qcacld-3.0: Cleanup sae auth timer for romaing scenarios

Host sends SAE auth retry frames if the response/ack for the previous
SAE auth is not received. In roam scenarios like roam abort, HO fail
host don't need to send SAE auth again.
Hence cleanup sae auth timer for roaming scenarios.

Change-Id: I617a61fdb4ce7b6afa66415ebc33a2ce23e3821b
CRs-Fixed: 2730888
This commit is contained in:
Abhishek Ambure 2020-07-13 22:43:45 +05:30 committed by snandini
parent 6760b0beb8
commit d4bf5ac73b
4 changed files with 18 additions and 2 deletions

View File

@ -1660,7 +1660,8 @@ bool lim_process_sae_preauth_frame(struct mac_context *mac, uint8_t *rx_pkt)
{
tpSirMacMgmtHdr dot11_hdr;
uint16_t auth_alg, frm_len;
uint8_t *frm_body;
uint8_t *frm_body, pdev_id;
struct wlan_objmgr_vdev *vdev;
dot11_hdr = WMA_GET_RX_MAC_HEADER(rx_pkt);
frm_body = WMA_GET_RX_MPDU_DATA(rx_pkt);
@ -1679,6 +1680,13 @@ bool lim_process_sae_preauth_frame(struct mac_context *mac, uint8_t *rx_pkt)
((dot11_hdr->seqControl.seqNumHi << 8) |
(dot11_hdr->seqControl.seqNumLo << 4) |
(dot11_hdr->seqControl.fragNum)), *(uint16_t *)(frm_body + 2));
pdev_id = wlan_objmgr_pdev_get_pdev_id(mac->pdev);
vdev = wlan_objmgr_get_vdev_by_macaddr_from_psoc(
mac->psoc, pdev_id, dot11_hdr->da, WLAN_LEGACY_SME_ID);
if (vdev) {
lim_sae_auth_cleanup_retry(mac, vdev->vdev_objmgr.vdev_id);
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
}
lim_send_sme_mgmt_frame_ind(mac, dot11_hdr->fc.subType,
(uint8_t *)dot11_hdr,

View File

@ -89,6 +89,7 @@ static void lim_process_sae_msg_sta(struct mac_context *mac,
if (tx_timer_running(&mac->lim.lim_timers.sae_auth_timer))
lim_deactivate_and_change_timer(mac,
eLIM_AUTH_SAE_TIMER);
lim_sae_auth_cleanup_retry(mac, session->vdev_id);
/* success */
if (sae_msg->sae_status == IEEE80211_STATUS_SUCCESS)
lim_restore_from_auth_state(mac,

View File

@ -5416,6 +5416,8 @@ lim_handle_sae_auth_retry(struct mac_context *mac_ctx, uint8_t vdev_id,
vdev_id);
return;
}
if (session->opmode != QDF_STA_MODE)
return;
if (session->limMlmState == eLIM_MLM_WT_SAE_AUTH_STATE)
wlan_mlme_get_sae_auth_retry_count(mac_ctx->psoc, &retry_count);
@ -5427,7 +5429,6 @@ lim_handle_sae_auth_retry(struct mac_context *mac_ctx, uint8_t vdev_id,
return;
}
sae_retry = mlme_get_sae_auth_retry(session->vdev);
if (!sae_retry) {
pe_err("sae retry pointer is NULL for vdev_id %d",

View File

@ -3307,6 +3307,7 @@ int wma_roam_auth_offload_event_handler(WMA_HANDLE handle, uint8_t *event,
wma_debug("Received Roam auth offload event for bss:%pM vdev_id:%d",
ap_bssid.bytes, vdev_id);
lim_sae_auth_cleanup_retry(mac_ctx, vdev_id);
status = wma->csr_roam_auth_event_handle_cb(mac_ctx, vdev_id, ap_bssid);
if (QDF_IS_STATUS_ERROR(status)) {
wma_err_rl("Trigger pre-auth failed");
@ -5898,6 +5899,7 @@ static void wma_invalid_roam_reason_handler(tp_wma_handle wma_handle,
} else if (notif == WMI_ROAM_NOTIF_ROAM_ABORT) {
wma_handle->interfaces[vdev_id].roaming_in_progress = false;
op_code = SIR_ROAMING_ABORT;
lim_sae_auth_cleanup_retry(wma_handle->mac_context, vdev_id);
} else {
wma_debug("Invalid notif %d", notif);
return;
@ -6064,6 +6066,8 @@ int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
wma_debug("mac addr to avoid %pM", bssid.bytes);
wma_handle_hw_mode_transition(wma_handle, param_buf);
wma_roam_ho_fail_handler(wma_handle, wmi_event->vdev_id, bssid);
lim_sae_auth_cleanup_retry(wma_handle->mac_context,
wmi_event->vdev_id);
break;
#endif
case WMI_ROAM_REASON_INVALID:
@ -6079,6 +6083,8 @@ int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
if (!roam_synch_data)
return -ENOMEM;
lim_sae_auth_cleanup_retry(wma_handle->mac_context,
wmi_event->vdev_id);
roam_synch_data->roamed_vdev_id = wmi_event->vdev_id;
wma_handle->csr_roam_synch_cb(wma_handle->mac_context,
roam_synch_data, NULL,