qcacld-3.0: Fix for user triggered reassociation

Fix for user triggered reassoc broken due to vdev SM

Change-Id: I06e7392f6c27261e6b24496bceff6131eb72e67c
CRs-Fixed: 2460295
This commit is contained in:
Jayachandran Sreekumaran
2019-06-06 11:04:40 +05:30
committed by nshrivas
parent 5054fe306e
commit ecebb88664
3 changed files with 29 additions and 21 deletions

View File

@@ -58,7 +58,6 @@ static void lim_handle_sme_reaasoc_result(struct mac_context *, tSirResultCodes,
void lim_process_mlm_reassoc_req(struct mac_context *mac_ctx,
tLimMlmReassocReq *reassoc_req)
{
uint8_t channel, sec_ch_offset;
struct tLimPreAuthNode *auth_node;
tLimMlmReassocCnf reassoc_cnf;
struct pe_session *session;
@@ -129,25 +128,15 @@ void lim_process_mlm_reassoc_req(struct mac_context *mac_ctx,
MTRACE(mac_trace(mac_ctx, TRACE_CODE_MLM_STATE, session->peSessionId,
session->limMlmState));
/* Derive channel from BSS description and store it at CFG. */
channel = session->limReassocChannelId;
sec_ch_offset = session->reAssocHtSecondaryChannelOffset;
/* Apply previously set configuration at HW */
lim_apply_configuration(mac_ctx, session);
/* store the channel switch pe_session in the lim global var */
session->channelChangeReasonCode =
LIM_SWITCH_CHANNEL_REASSOC;
/* Switch channel to the new Operating channel for Reassoc */
lim_set_channel(mac_ctx, channel,
session->ch_center_freq_seg0,
session->ch_center_freq_seg1,
session->ch_width,
session->maxTxPower,
session->peSessionId, 0, 0);
/* store the channel switch reason code in the lim global var */
session->channelChangeReasonCode = LIM_SWITCH_CHANNEL_REASSOC;
mlme_set_chan_switch_in_progress(session->vdev, true);
wlan_vdev_mlme_sm_deliver_evt(session->vdev,
WLAN_VDEV_SM_EV_FW_VDEV_RESTART,
sizeof(struct pe_session), session);
return;
end:
reassoc_cnf.protStatusCode = eSIR_MAC_UNSPEC_FAILURE_STATUS;

View File

@@ -1095,10 +1095,14 @@ static QDF_STATUS lim_send_reassoc_req(struct pe_session *session,
if (QDF_IS_STATUS_ERROR(status))
return status;
return wlan_vdev_mlme_sm_deliver_evt(session->vdev,
WLAN_VDEV_SM_EV_START,
sizeof(*reassoc_req),
reassoc_req);
if (wlan_vdev_mlme_get_state(session->vdev) != WLAN_VDEV_S_UP) {
pe_err("Reassoc req in unexpected vdev SM state:%d",
wlan_vdev_mlme_get_state(session->vdev));
return QDF_STATUS_E_FAILURE;
}
lim_process_mlm_reassoc_req(session->mac_ctx, reassoc_req);
return QDF_STATUS_SUCCESS;
}
/**
@@ -1117,6 +1121,12 @@ static QDF_STATUS lim_send_ft_reassoc_req(struct pe_session *session,
if (QDF_IS_STATUS_ERROR(status))
return status;
if (wlan_vdev_mlme_get_state(session->vdev) == WLAN_VDEV_S_UP) {
pe_err("ft_reassoc req in unexpected vdev SM state:%d",
wlan_vdev_mlme_get_state(session->vdev));
return QDF_STATUS_E_FAILURE;
}
return wlan_vdev_mlme_sm_deliver_evt(session->vdev,
WLAN_VDEV_SM_EV_START,
sizeof(*reassoc_req),

View File

@@ -7835,6 +7835,15 @@ QDF_STATUS lim_sta_mlme_vdev_restart_send(struct vdev_mlme_obj *vdev_mlme,
case LIM_SWITCH_CHANNEL_HT_WIDTH:
lim_ht_switch_chnl_params(session);
break;
case LIM_SWITCH_CHANNEL_REASSOC:
lim_set_channel(session->mac_ctx,
session->limReassocChannelId,
session->ch_center_freq_seg0,
session->ch_center_freq_seg1,
session->ch_width,
session->maxTxPower,
session->peSessionId, 0, 0);
break;
default:
break;
}