qcacld-3.0: Clear TDLS peers before vdev restart
As part of change in bandwidth in HT cap of beacon from AP. Driver triggers the vdev restart, but if there are any TDLS connections present then TDLS peers are not removed. This can lead to inconsistency between host and FW as FW deletes tdls peers as part of vdev restart. Remove TDLS peers before restarting vdev. Change-Id: Ibeab1e4bcda9229ed936ffe05be9ecdfeb260eef CRs-Fixed: 2380440
This commit is contained in:
parent
f8364e11b7
commit
33f270b416
@ -366,6 +366,7 @@ struct pe_session {
|
||||
uint32_t peerAIDBitmap[2];
|
||||
bool tdls_prohibited;
|
||||
bool tdls_chan_swit_prohibited;
|
||||
bool tdls_send_set_state_disable;
|
||||
#endif
|
||||
bool fWaitForProbeRsp;
|
||||
bool fIgnoreCapsChange;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@ -221,6 +221,8 @@ lim_process_probe_rsp_frame(struct mac_context *mac_ctx, uint8_t *rx_Packet_info
|
||||
* from AP, delete all TDLS peers before
|
||||
* leaving BSS and proceed for channel switch
|
||||
*/
|
||||
lim_update_tdls_set_state_for_fw(session_entry,
|
||||
false);
|
||||
lim_delete_tdls_peers(mac_ctx, session_entry);
|
||||
|
||||
lim_update_channel_switch(mac_ctx,
|
||||
|
@ -3163,6 +3163,12 @@ skip:
|
||||
}
|
||||
}
|
||||
|
||||
void lim_update_tdls_set_state_for_fw(struct pe_session *session_entry,
|
||||
bool value)
|
||||
{
|
||||
session_entry->tdls_send_set_state_disable = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* lim_delete_tdls_peers() - delete tdls peers
|
||||
*
|
||||
@ -3187,13 +3193,22 @@ QDF_STATUS lim_delete_tdls_peers(struct mac_context *mac_ctx,
|
||||
|
||||
if (lim_is_roam_synch_in_progress(session_entry))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
tgt_tdls_peers_deleted_notification(mac_ctx->psoc,
|
||||
session_entry->smeSessionId);
|
||||
/* In case of CSA, Only peers in lim and TDLS component
|
||||
* needs to be removed and set state disable command
|
||||
* should not be sent to fw as there is no way to enable
|
||||
* TDLS in FW after vdev restart.
|
||||
*/
|
||||
if (session_entry->tdls_send_set_state_disable) {
|
||||
tgt_tdls_peers_deleted_notification(mac_ctx->psoc,
|
||||
session_entry->
|
||||
smeSessionId);
|
||||
}
|
||||
|
||||
tgt_tdls_delete_all_peers_indication(mac_ctx->psoc,
|
||||
session_entry->smeSessionId);
|
||||
|
||||
/* reset the set_state_disable flag */
|
||||
session_entry->tdls_send_set_state_disable = true;
|
||||
pe_debug("Exit");
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -1898,11 +1898,12 @@ void lim_handle_csa_offload_msg(struct mac_context *mac_ctx,
|
||||
qdf_mem_free(csa_offload_ind);
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
* on receiving channel switch announcement from AP, delete all
|
||||
* TDLS peers before leaving BSS and proceed for channel switch
|
||||
*/
|
||||
|
||||
lim_update_tdls_set_state_for_fw(session_entry, false);
|
||||
lim_delete_tdls_peers(mac_ctx, session_entry);
|
||||
|
||||
lim_ch_switch = &session_entry->gLimChannelSwitch;
|
||||
|
@ -632,6 +632,7 @@ struct pe_session *pe_create_session(struct mac_context *mac,
|
||||
session_ptr->tdls_prohibited = false;
|
||||
session_ptr->tdls_chan_swit_prohibited = false;
|
||||
#endif
|
||||
lim_update_tdls_set_state_for_fw(session_ptr, true);
|
||||
session_ptr->fWaitForProbeRsp = 0;
|
||||
session_ptr->fIgnoreCapsChange = 0;
|
||||
session_ptr->ignore_assoc_disallowed = mac->ignore_assoc_disallowed;
|
||||
|
@ -607,6 +607,18 @@ QDF_STATUS lim_process_tdls_add_sta_rsp(struct mac_context *mac, void *msg, stru
|
||||
void lim_process_tdls_del_sta_rsp(struct mac_context *mac_ctx,
|
||||
struct scheduler_msg *lim_msg,
|
||||
struct pe_session *session_entry);
|
||||
|
||||
/**
|
||||
* lim_update_tdls_state_in_fw() - Update TDLS state in FW
|
||||
*
|
||||
* @session_entry - PE sessions
|
||||
* @value -value to be updated
|
||||
*
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void lim_update_tdls_set_state_for_fw(struct pe_session *session_entry,
|
||||
bool value);
|
||||
#else
|
||||
static inline QDF_STATUS lim_delete_tdls_peers(struct mac_context *mac_ctx,
|
||||
struct pe_session *session_entry)
|
||||
@ -617,6 +629,11 @@ static inline void lim_init_tdls_data(struct mac_context *mac,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static inline void lim_update_tdls_set_state_for_fw(struct pe_session
|
||||
*session_entry, bool value)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -4148,6 +4148,11 @@ void lim_update_sta_run_time_ht_switch_chnl_params(struct mac_context *mac,
|
||||
(ePhyChanBondState) pHTInfo->secondaryChannelOffset;
|
||||
pe_session->htRecommendedTxWidthSet =
|
||||
(uint8_t) pHTInfo->recommendedTxWidthSet;
|
||||
|
||||
/* Before restarting vdev, delete the tdls peers */
|
||||
lim_update_tdls_set_state_for_fw(pe_session, false);
|
||||
lim_delete_tdls_peers(mac, pe_session);
|
||||
|
||||
lim_ht_switch_chnl_req(pe_session);
|
||||
|
||||
/* In case of IBSS, if STA should update HT Info IE in its beacons. */
|
||||
|
@ -858,9 +858,11 @@ static void __sch_beacon_process_for_session(struct mac_context *mac_ctx,
|
||||
* delete all TDLS peers before leaving BSS and proceed
|
||||
* for channel switch
|
||||
*/
|
||||
if (LIM_IS_STA_ROLE(session))
|
||||
if (LIM_IS_STA_ROLE(session)) {
|
||||
lim_update_tdls_set_state_for_fw(session,
|
||||
false);
|
||||
lim_delete_tdls_peers(mac_ctx, session);
|
||||
|
||||
}
|
||||
lim_update_channel_switch(mac_ctx, bcn, session);
|
||||
} else if (session->gLimSpecMgmt.dot11hChanSwState ==
|
||||
eLIM_11H_CHANSW_RUNNING) {
|
||||
|
Loading…
Reference in New Issue
Block a user