mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
qcacld-3.0: Avoid TDLS entry with MAC same as existing non-TDLS peer
In lim_tdls_setup_add_sta() even if a pStaDs is already present and is a non TDLS peer, the driver proceed assuming it as TDLS peer and update its type and states. Now when driver tries to delete this non TDLS peer, as its states and type are modified it fails to properly clean up the peer. Fix it by allowing only TDLS entry to be updated. Also ignore if a entry is already present and the operation is TDLS add. Change-Id: I65fc73d65cdf768fd5b8afd050ca7314fd55c9ff CRs-Fixed: 2200498
This commit is contained in:
parent
b103562c27
commit
3ed00d11ba
1 changed files with 13 additions and 0 deletions
|
|
@ -2560,6 +2560,19 @@ static tSirRetStatus lim_tdls_setup_add_sta(tpAniSirGlobal pMac,
|
|||
|
||||
pStaDs = dph_lookup_hash_entry(pMac, pAddStaReq->peermac.bytes, &aid,
|
||||
&psessionEntry->dph.dphHashTable);
|
||||
|
||||
if (pStaDs && pAddStaReq->tdlsAddOper == TDLS_OPER_ADD) {
|
||||
pe_err("TDLS entry for peer: "MAC_ADDRESS_STR " already exist, cannot add new entry",
|
||||
MAC_ADDR_ARRAY(pAddStaReq->peermac.bytes));
|
||||
return eSIR_FAILURE;
|
||||
}
|
||||
|
||||
if (pStaDs && pStaDs->staType != STA_ENTRY_TDLS_PEER) {
|
||||
pe_err("Non TDLS entry for peer: "MAC_ADDRESS_STR " already exist",
|
||||
MAC_ADDR_ARRAY(pAddStaReq->peermac.bytes));
|
||||
return eSIR_FAILURE;
|
||||
}
|
||||
|
||||
if (NULL == pStaDs) {
|
||||
aid = lim_assign_peer_idx(pMac, psessionEntry);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue