TDLS: Do not transit peer to LINK_IDLE state on a failure in tdls mgmt
Supplicant ensures to issue a DISABLE_LINK on any failure in the
transaction / transfer of tdls management frames.
Also, transitioning to the LINK_IDLE state for the peer shall also
results in failure to decrement the connected peer counts
as this is done only when the peer is in CONNECTED state.
Hence , there is no need to transit the peer to LINK_IDLE state,
rather return just a failure to the supplicant on a failed
transaction.
CRs-fixed: 579582
Change-Id: Id65ad44766b9a31eaa5deab15ff72c5726bd4edc
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 76a770c..af3a636 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -8239,7 +8239,7 @@
"%s: " MAC_ADDRESS_STR
" TDLS Max peer already connected. action %d declined.",
__func__, MAC_ADDR_ARRAY(peer), action_code);
- goto error;
+ return -EINVAL;
}
else
{
@@ -8334,7 +8334,7 @@
"%s: sme_SendTdlsMgmtFrame failed!", __func__);
pAdapter->mgmtTxCompletionStatus = FALSE;
wlan_hdd_tdls_check_bmps(pAdapter);
- goto error;
+ return -EINVAL;
}
rc = wait_for_completion_interruptible_timeout(&pAdapter->tdls_mgmt_comp,
@@ -8347,7 +8347,7 @@
__func__, rc, pAdapter->mgmtTxCompletionStatus);
pAdapter->mgmtTxCompletionStatus = FALSE;
wlan_hdd_tdls_check_bmps(pAdapter);
- goto error;
+ return -EINVAL;
}
if (max_sta_failed)
@@ -8366,16 +8366,6 @@
}
return 0;
-error:
- /* max_sta_failed ; we didn't set to CONNECTING for this case,
- because we already know that this transaction will be failed,
- but we weren't sure if supplicant call DISABLE_LINK or not. So,
- to be safe, do not change the state mahine.
- */
- if(max_sta_failed == 0 &&
- (WLAN_IS_TDLS_SETUP_ACTION(action_code)))
- wlan_hdd_tdls_set_link_status(pAdapter, peerMac, eTDLS_LINK_IDLE);
- return -EPERM;
}
static int wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev,