qcacld-3.0: TDLS: remove legacy core functions
Clear up the tdls legacy functions which handle add/delete tdls peer, tdls mgmt frame process and tdls_oper callback. Change-Id: I8ba344ce5593df44bd15527e2ff68e872b6d23b8 CRs-Fixed: 2105075
Этот коммит содержится в:
@@ -494,66 +494,27 @@ void wlan_hdd_tdls_exit(struct hdd_adapter *pAdapter);
|
||||
|
||||
void wlan_hdd_tdls_extract_sa(struct sk_buff *skb, uint8_t *mac);
|
||||
|
||||
int wlan_hdd_tdls_set_sta_id(struct hdd_adapter *pAdapter, const uint8_t *mac,
|
||||
uint8_t staId);
|
||||
|
||||
hddTdlsPeer_t *wlan_hdd_tdls_find_peer(struct hdd_adapter *pAdapter,
|
||||
const uint8_t *mac);
|
||||
|
||||
hddTdlsPeer_t *wlan_hdd_tdls_find_all_peer(struct hdd_context *hdd_ctx,
|
||||
const uint8_t *mac);
|
||||
|
||||
int wlan_hdd_tdls_get_link_establish_params(struct hdd_adapter *pAdapter,
|
||||
const uint8_t *mac,
|
||||
tCsrTdlsLinkEstablishParams *
|
||||
tdlsLinkEstablishParams);
|
||||
hddTdlsPeer_t *wlan_hdd_tdls_get_peer(struct hdd_adapter *pAdapter,
|
||||
const uint8_t *mac);
|
||||
|
||||
int wlan_hdd_tdls_set_cap(struct hdd_adapter *pAdapter, const uint8_t *mac,
|
||||
enum tdls_cap_type cap);
|
||||
|
||||
void wlan_hdd_tdls_set_peer_link_status(hddTdlsPeer_t *curr_peer,
|
||||
enum tdls_link_status status,
|
||||
enum tdls_link_reason reason);
|
||||
void wlan_hdd_tdls_set_link_status(struct hdd_adapter *pAdapter,
|
||||
const uint8_t *mac,
|
||||
enum tdls_link_status linkStatus,
|
||||
enum tdls_link_reason reason);
|
||||
|
||||
int wlan_hdd_tdls_recv_discovery_resp(struct hdd_adapter *pAdapter,
|
||||
const uint8_t *mac);
|
||||
|
||||
int wlan_hdd_tdls_set_peer_caps(struct hdd_adapter *pAdapter,
|
||||
const uint8_t *mac,
|
||||
tCsrStaParams *StaParams,
|
||||
bool isBufSta, bool isOffChannelSupported,
|
||||
bool is_qos_wmm_sta);
|
||||
|
||||
int wlan_hdd_tdls_set_rssi(struct hdd_adapter *pAdapter, const uint8_t *mac,
|
||||
int8_t rxRssi);
|
||||
|
||||
int wlan_hdd_tdls_set_responder(struct hdd_adapter *pAdapter,
|
||||
const uint8_t *mac,
|
||||
uint8_t responder);
|
||||
|
||||
int wlan_hdd_tdls_set_signature(struct hdd_adapter *pAdapter,
|
||||
const uint8_t *mac,
|
||||
uint8_t uSignature);
|
||||
|
||||
int wlan_hdd_tdls_set_params(struct net_device *dev,
|
||||
tdls_config_params_t *config);
|
||||
|
||||
int wlan_hdd_tdls_reset_peer(struct hdd_adapter *pAdapter, const uint8_t *mac);
|
||||
|
||||
uint16_t wlan_hdd_tdls_connected_peers(struct hdd_adapter *pAdapter);
|
||||
|
||||
int wlan_hdd_tdls_get_all_peers(struct hdd_adapter *pAdapter, char *buf,
|
||||
int buflen);
|
||||
|
||||
void wlan_hdd_tdls_mgmt_completion_callback(struct hdd_adapter *pAdapter,
|
||||
uint32_t statusCode);
|
||||
|
||||
void wlan_hdd_tdls_increment_peer_count(struct hdd_adapter *pAdapter);
|
||||
|
||||
void wlan_hdd_tdls_decrement_peer_count(struct hdd_adapter *pAdapter);
|
||||
@@ -601,10 +562,6 @@ void wlan_hdd_tdls_get_wifi_hal_state(hddTdlsPeer_t *curr_peer,
|
||||
int wlan_hdd_set_callback(hddTdlsPeer_t *curr_peer,
|
||||
cfg80211_exttdls_callback callback);
|
||||
|
||||
int wlan_hdd_tdls_add_station(struct wiphy *wiphy,
|
||||
struct net_device *dev, const uint8_t *mac,
|
||||
bool update, tCsrStaParams *StaParams);
|
||||
|
||||
int wlan_hdd_cfg80211_exttdls_enable(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev,
|
||||
const void *data,
|
||||
|
@@ -3818,9 +3818,7 @@ hdd_roam_tdls_status_update_handler(struct hdd_adapter *pAdapter,
|
||||
{
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
tdlsCtx_t *pHddTdlsCtx;
|
||||
tSmeTdlsPeerStateParams smeTdlsPeerStateParams;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
uint8_t staIdx;
|
||||
hddTdlsPeer_t *curr_peer;
|
||||
uint32_t reason;
|
||||
|
||||
@@ -3847,267 +3845,6 @@ hdd_roam_tdls_status_update_handler(struct hdd_adapter *pAdapter,
|
||||
MAC_ADDR_ARRAY(pRoamInfo->peerMac.bytes));
|
||||
|
||||
switch (roamResult) {
|
||||
case eCSR_ROAM_RESULT_ADD_TDLS_PEER:
|
||||
{
|
||||
if (eSIR_SME_SUCCESS != pRoamInfo->statusCode) {
|
||||
hdd_err("Add Sta failed. status code: %d",
|
||||
pRoamInfo->statusCode);
|
||||
pAdapter->tdlsAddStaStatus = QDF_STATUS_E_FAILURE;
|
||||
} else {
|
||||
/*
|
||||
* Check if there is available index for this new TDLS
|
||||
* STA.
|
||||
*/
|
||||
for (staIdx = 0;
|
||||
staIdx < hdd_ctx->max_num_tdls_sta;
|
||||
staIdx++) {
|
||||
if (0 ==
|
||||
hdd_ctx->tdlsConnInfo[staIdx].
|
||||
staId) {
|
||||
hdd_ctx->tdlsConnInfo[staIdx].
|
||||
sessionId =
|
||||
pRoamInfo->sessionId;
|
||||
hdd_ctx->tdlsConnInfo[staIdx].
|
||||
staId = pRoamInfo->staId;
|
||||
|
||||
hdd_debug("TDLS: STA IDX at %d is %d "
|
||||
"of mac "
|
||||
MAC_ADDRESS_STR,
|
||||
staIdx,
|
||||
hdd_ctx->
|
||||
tdlsConnInfo[staIdx].
|
||||
staId,
|
||||
MAC_ADDR_ARRAY
|
||||
(pRoamInfo->peerMac.bytes));
|
||||
|
||||
qdf_copy_macaddr(&hdd_ctx->
|
||||
tdlsConnInfo
|
||||
[staIdx].
|
||||
peerMac,
|
||||
&pRoamInfo->
|
||||
peerMac);
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (staIdx < hdd_ctx->max_num_tdls_sta) {
|
||||
if (-1 ==
|
||||
wlan_hdd_tdls_set_sta_id(pAdapter,
|
||||
pRoamInfo->
|
||||
peerMac.bytes,
|
||||
pRoamInfo->
|
||||
staId)) {
|
||||
hdd_err("wlan_hdd_tdls_set_sta_id() failed");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
(WLAN_HDD_GET_CTX(pAdapter))->
|
||||
sta_to_adapter[pRoamInfo->staId] =
|
||||
pAdapter;
|
||||
/*
|
||||
* store the ucast signature,
|
||||
* if required for further reference.
|
||||
*/
|
||||
|
||||
wlan_hdd_tdls_set_signature(pAdapter,
|
||||
pRoamInfo->
|
||||
peerMac.bytes,
|
||||
pRoamInfo->
|
||||
ucastSig);
|
||||
} else {
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
hdd_debug("no available slot in conn_info. staId: %d cannot be stored",
|
||||
pRoamInfo->staId);
|
||||
}
|
||||
pAdapter->tdlsAddStaStatus = status;
|
||||
}
|
||||
complete(&pAdapter->tdls_add_station_comp);
|
||||
break;
|
||||
}
|
||||
case eCSR_ROAM_RESULT_UPDATE_TDLS_PEER:
|
||||
{
|
||||
if (eSIR_SME_SUCCESS != pRoamInfo->statusCode) {
|
||||
hdd_err("Add Sta failed. status code: %d",
|
||||
pRoamInfo->statusCode);
|
||||
pAdapter->tdlsAddStaStatus = QDF_STATUS_E_FAILURE;
|
||||
} else {
|
||||
pAdapter->tdlsAddStaStatus = QDF_STATUS_SUCCESS;
|
||||
}
|
||||
complete(&pAdapter->tdls_add_station_comp);
|
||||
break;
|
||||
}
|
||||
case eCSR_ROAM_RESULT_LINK_ESTABLISH_REQ_RSP:
|
||||
{
|
||||
if (eSIR_SME_SUCCESS != pRoamInfo->statusCode) {
|
||||
hdd_err("Link Establish Request failed. status: %d",
|
||||
pRoamInfo->statusCode);
|
||||
}
|
||||
complete(&pAdapter->tdls_link_establish_req_comp);
|
||||
break;
|
||||
}
|
||||
case eCSR_ROAM_RESULT_DELETE_TDLS_PEER:
|
||||
{
|
||||
for (staIdx = 0; staIdx < hdd_ctx->max_num_tdls_sta;
|
||||
staIdx++) {
|
||||
if ((hdd_ctx->tdlsConnInfo[staIdx].sessionId ==
|
||||
pRoamInfo->sessionId)
|
||||
&& pRoamInfo->staId ==
|
||||
hdd_ctx->tdlsConnInfo[staIdx].staId) {
|
||||
hdd_debug("HDD: del STA IDX = %x",
|
||||
pRoamInfo->staId);
|
||||
mutex_lock(&hdd_ctx->tdls_lock);
|
||||
curr_peer =
|
||||
wlan_hdd_tdls_find_peer(pAdapter,
|
||||
pRoamInfo->
|
||||
peerMac.bytes);
|
||||
if (NULL != curr_peer) {
|
||||
hdd_debug("Current status for peer " MAC_ADDRESS_STR " is %d",
|
||||
MAC_ADDR_ARRAY(pRoamInfo->peerMac.bytes),
|
||||
curr_peer->link_status);
|
||||
if (TDLS_IS_CONNECTED(curr_peer)) {
|
||||
mutex_unlock(&hdd_ctx->tdls_lock);
|
||||
hdd_roam_deregister_tdlssta
|
||||
(pAdapter,
|
||||
pRoamInfo->staId);
|
||||
wlan_hdd_tdls_decrement_peer_count
|
||||
(pAdapter);
|
||||
} else if (eTDLS_LINK_CONNECTING ==
|
||||
curr_peer->link_status) {
|
||||
mutex_unlock(&hdd_ctx->tdls_lock);
|
||||
hdd_roam_deregister_tdlssta
|
||||
(pAdapter,
|
||||
pRoamInfo->staId);
|
||||
} else
|
||||
mutex_unlock(&hdd_ctx->tdls_lock);
|
||||
} else
|
||||
mutex_unlock(&hdd_ctx->tdls_lock);
|
||||
|
||||
mutex_lock(&hdd_ctx->tdls_lock);
|
||||
wlan_hdd_tdls_reset_peer(pAdapter,
|
||||
pRoamInfo->
|
||||
peerMac.bytes);
|
||||
mutex_unlock(&hdd_ctx->tdls_lock);
|
||||
|
||||
hdd_ctx->tdlsConnInfo[staIdx].staId = 0;
|
||||
hdd_ctx->tdlsConnInfo[staIdx].
|
||||
sessionId = 255;
|
||||
qdf_mem_zero(&hdd_ctx->
|
||||
tdlsConnInfo[staIdx].
|
||||
peerMac,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
complete(&pAdapter->tdls_del_station_comp);
|
||||
}
|
||||
break;
|
||||
case eCSR_ROAM_RESULT_TEARDOWN_TDLS_PEER_IND:
|
||||
{
|
||||
hdd_debug("Sending teardown to supplicant with reason code %u",
|
||||
pRoamInfo->reasonCode);
|
||||
|
||||
mutex_lock(&hdd_ctx->tdls_lock);
|
||||
curr_peer =
|
||||
wlan_hdd_tdls_find_peer(pAdapter,
|
||||
pRoamInfo->peerMac.bytes);
|
||||
|
||||
if (!curr_peer) {
|
||||
mutex_unlock(&hdd_ctx->tdls_lock);
|
||||
hdd_debug("peer doesn't exists");
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
break;
|
||||
}
|
||||
|
||||
wlan_hdd_tdls_indicate_teardown(pAdapter, curr_peer,
|
||||
pRoamInfo->reasonCode);
|
||||
hdd_send_wlan_tdls_teardown_event(eTDLS_TEARDOWN_BSS_DISCONNECT,
|
||||
curr_peer->peerMac);
|
||||
mutex_unlock(&hdd_ctx->tdls_lock);
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
break;
|
||||
}
|
||||
case eCSR_ROAM_RESULT_DELETE_ALL_TDLS_PEER_IND:
|
||||
{
|
||||
/* 0 staIdx is assigned to AP we dont want to touch that */
|
||||
for (staIdx = 0; staIdx < hdd_ctx->max_num_tdls_sta;
|
||||
staIdx++) {
|
||||
if ((hdd_ctx->tdlsConnInfo[staIdx].sessionId ==
|
||||
pRoamInfo->sessionId)
|
||||
&& hdd_ctx->tdlsConnInfo[staIdx].staId) {
|
||||
hdd_debug("hdd_tdlsStatusUpdate: staIdx %d "
|
||||
MAC_ADDRESS_STR,
|
||||
hdd_ctx->tdlsConnInfo[staIdx].
|
||||
staId,
|
||||
MAC_ADDR_ARRAY(hdd_ctx->
|
||||
tdlsConnInfo
|
||||
[staIdx].
|
||||
peerMac.
|
||||
bytes));
|
||||
mutex_lock(&hdd_ctx->tdls_lock);
|
||||
wlan_hdd_tdls_reset_peer(pAdapter,
|
||||
hdd_ctx->
|
||||
tdlsConnInfo
|
||||
[staIdx].
|
||||
peerMac.bytes);
|
||||
mutex_unlock(&hdd_ctx->tdls_lock);
|
||||
hdd_roam_deregister_tdlssta(pAdapter,
|
||||
hdd_ctx->
|
||||
tdlsConnInfo
|
||||
[staIdx].
|
||||
staId);
|
||||
qdf_mem_zero(&smeTdlsPeerStateParams,
|
||||
sizeof
|
||||
(smeTdlsPeerStateParams));
|
||||
smeTdlsPeerStateParams.vdevId =
|
||||
hdd_ctx->tdlsConnInfo[staIdx].
|
||||
sessionId;
|
||||
qdf_mem_copy(&smeTdlsPeerStateParams.
|
||||
peerMacAddr,
|
||||
&hdd_ctx->
|
||||
tdlsConnInfo[staIdx].
|
||||
peerMac.bytes,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
smeTdlsPeerStateParams.peerState =
|
||||
eSME_TDLS_PEER_STATE_TEARDOWN;
|
||||
|
||||
hdd_debug("calling sme_update_tdls_peer_state for staIdx %d "
|
||||
MAC_ADDRESS_STR,
|
||||
hdd_ctx->tdlsConnInfo[staIdx].
|
||||
staId,
|
||||
MAC_ADDR_ARRAY(hdd_ctx->
|
||||
tdlsConnInfo
|
||||
[staIdx].
|
||||
peerMac.
|
||||
bytes));
|
||||
status =
|
||||
sme_update_tdls_peer_state(
|
||||
hdd_ctx->hHal,
|
||||
&smeTdlsPeerStateParams);
|
||||
if (QDF_STATUS_SUCCESS != status) {
|
||||
hdd_err("sme_update_tdls_peer_state failed for "
|
||||
MAC_ADDRESS_STR,
|
||||
MAC_ADDR_ARRAY
|
||||
(hdd_ctx->
|
||||
tdlsConnInfo[staIdx].
|
||||
peerMac.bytes));
|
||||
}
|
||||
wlan_hdd_tdls_decrement_peer_count
|
||||
(pAdapter);
|
||||
|
||||
qdf_mem_zero(&hdd_ctx->
|
||||
tdlsConnInfo[staIdx].
|
||||
peerMac,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
hdd_ctx->tdlsConnInfo[staIdx].staId = 0;
|
||||
hdd_ctx->tdlsConnInfo[staIdx].
|
||||
sessionId = 255;
|
||||
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case eCSR_ROAM_RESULT_TDLS_SHOULD_DISCOVER:
|
||||
{
|
||||
/* ignore TDLS_SHOULD_DISCOVER if any concurrency detected */
|
||||
@@ -5127,10 +4864,6 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId,
|
||||
roamStatus,
|
||||
roamResult);
|
||||
break;
|
||||
case eCSR_ROAM_RESULT_MGMT_TX_COMPLETE_IND:
|
||||
wlan_hdd_tdls_mgmt_completion_callback(pAdapter,
|
||||
pRoamInfo->reasonCode);
|
||||
break;
|
||||
#endif
|
||||
#ifdef WLAN_FEATURE_11W
|
||||
case eCSR_ROAM_UNPROT_MGMT_FRAME_IND:
|
||||
|
@@ -12915,8 +12915,6 @@ void wlan_hdd_cfg80211_update_wiphy_caps(struct wiphy *wiphy)
|
||||
}
|
||||
|
||||
/* This function registers for all frame which supplicant is interested in */
|
||||
#if defined(CONVERGED_P2P_ENABLE) || defined(CONVERGED_TDLS_ENABLE)
|
||||
|
||||
int wlan_hdd_cfg80211_register_frames(struct hdd_adapter *pAdapter)
|
||||
{
|
||||
tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
|
||||
@@ -13024,67 +13022,6 @@ dereg_gas_initial_req:
|
||||
ret_status:
|
||||
return qdf_status_to_os_return(status);
|
||||
}
|
||||
#else
|
||||
int wlan_hdd_cfg80211_register_frames(struct hdd_adapter *pAdapter)
|
||||
{
|
||||
tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
|
||||
/* Register for all P2P action, public action etc frames */
|
||||
uint16_t type = (SIR_MAC_MGMT_FRAME << 2) | (SIR_MAC_MGMT_ACTION << 4);
|
||||
|
||||
ENTER();
|
||||
|
||||
/* Register frame indication call back */
|
||||
sme_register_mgmt_frame_ind_callback(hHal, hdd_indicate_mgmt_frame);
|
||||
|
||||
/* Register for p2p ack indication */
|
||||
sme_register_p2p_ack_ind_callback(hHal, hdd_send_action_cnf_cb);
|
||||
|
||||
/* Right now we are registering these frame when driver is getting
|
||||
* initialized. Once we will move to 2.6.37 kernel, in which we have
|
||||
* frame register ops, we will move this code as a part of that
|
||||
*/
|
||||
|
||||
/* GAS Initial Request */
|
||||
sme_register_mgmt_frame(hHal, SME_SESSION_ID_ANY, type,
|
||||
(uint8_t *) GAS_INITIAL_REQ,
|
||||
GAS_INITIAL_REQ_SIZE);
|
||||
|
||||
/* GAS Initial Response */
|
||||
sme_register_mgmt_frame(hHal, SME_SESSION_ID_ANY, type,
|
||||
(uint8_t *) GAS_INITIAL_RSP,
|
||||
GAS_INITIAL_RSP_SIZE);
|
||||
|
||||
/* GAS Comeback Request */
|
||||
sme_register_mgmt_frame(hHal, SME_SESSION_ID_ANY, type,
|
||||
(uint8_t *) GAS_COMEBACK_REQ,
|
||||
GAS_COMEBACK_REQ_SIZE);
|
||||
|
||||
/* GAS Comeback Response */
|
||||
sme_register_mgmt_frame(hHal, SME_SESSION_ID_ANY, type,
|
||||
(uint8_t *) GAS_COMEBACK_RSP,
|
||||
GAS_COMEBACK_RSP_SIZE);
|
||||
|
||||
/* P2P Public Action */
|
||||
sme_register_mgmt_frame(hHal, SME_SESSION_ID_ANY, type,
|
||||
(uint8_t *) P2P_PUBLIC_ACTION_FRAME,
|
||||
P2P_PUBLIC_ACTION_FRAME_SIZE);
|
||||
|
||||
/* P2P Action */
|
||||
sme_register_mgmt_frame(hHal, SME_SESSION_ID_ANY, type,
|
||||
(uint8_t *) P2P_ACTION_FRAME,
|
||||
P2P_ACTION_FRAME_SIZE);
|
||||
|
||||
/* WNM BSS Transition Request frame */
|
||||
sme_register_mgmt_frame(hHal, SME_SESSION_ID_ANY, type,
|
||||
(uint8_t *) WNM_BSS_ACTION_FRAME,
|
||||
WNM_BSS_ACTION_FRAME_SIZE);
|
||||
|
||||
/* WNM-Notification */
|
||||
sme_register_mgmt_frame(hHal, pAdapter->sessionId, type,
|
||||
(uint8_t *) WNM_NOTIFICATION_FRAME,
|
||||
WNM_NOTIFICATION_FRAME_SIZE);
|
||||
}
|
||||
#endif
|
||||
|
||||
void wlan_hdd_cfg80211_deregister_frames(struct hdd_adapter *pAdapter)
|
||||
{
|
||||
@@ -13692,20 +13629,6 @@ static int wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
|
||||
}
|
||||
#endif /* KERNEL_VERSION(4, 12, 0) */
|
||||
|
||||
#if defined(FEATURE_WLAN_TDLS) && !defined(CONVERGED_TDLS_ENABLE)
|
||||
static bool wlan_hdd_is_duplicate_channel(uint8_t *arr,
|
||||
int index, uint8_t match)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < index; i++) {
|
||||
if (arr[i] == match)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* __wlan_hdd_change_station() - change station
|
||||
* @wiphy: Pointer to the wiphy structure
|
||||
@@ -13732,12 +13655,6 @@ static int __wlan_hdd_change_station(struct wiphy *wiphy,
|
||||
struct hdd_context *hdd_ctx;
|
||||
struct hdd_station_ctx *pHddStaCtx;
|
||||
struct qdf_mac_addr STAMacAddress;
|
||||
#if defined(FEATURE_WLAN_TDLS) && !defined(CONVERGED_TDLS_ENABLE)
|
||||
tCsrStaParams StaParams = { 0 };
|
||||
uint8_t isBufSta = 0;
|
||||
uint8_t isOffChannelSupported = 0;
|
||||
bool is_qos_wmm_sta = false;
|
||||
#endif
|
||||
int ret;
|
||||
|
||||
ENTER();
|
||||
@@ -13781,202 +13698,9 @@ static int __wlan_hdd_change_station(struct wiphy *wiphy,
|
||||
} else if ((pAdapter->device_mode == QDF_STA_MODE) ||
|
||||
(pAdapter->device_mode == QDF_P2P_CLIENT_MODE)) {
|
||||
if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) {
|
||||
#if defined(FEATURE_WLAN_TDLS) && defined(CONVERGED_TDLS_ENABLE)
|
||||
#if defined(FEATURE_WLAN_TDLS)
|
||||
ret = wlan_cfg80211_tdls_update_peer(hdd_ctx->hdd_pdev,
|
||||
dev, mac, params);
|
||||
#else
|
||||
|
||||
if (cds_is_sub_20_mhz_enabled()) {
|
||||
hdd_err("TDLS not allowed with sub 20 MHz");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
StaParams.capability = params->capability;
|
||||
StaParams.uapsd_queues = params->uapsd_queues;
|
||||
StaParams.max_sp = params->max_sp;
|
||||
|
||||
/* Convert (first channel , number of channels) tuple to
|
||||
* the total list of channels. This goes with the assumption
|
||||
* that if the first channel is < 14, then the next channels
|
||||
* are an incremental of 1 else an incremental of 4 till the number
|
||||
* of channels.
|
||||
*/
|
||||
hdd_debug("params->supported_channels_len: %d", params->supported_channels_len);
|
||||
if (0 != params->supported_channels_len) {
|
||||
int i = 0, j = 0, k = 0, no_of_channels = 0;
|
||||
int num_unique_channels;
|
||||
int next;
|
||||
|
||||
for (i = 0;
|
||||
i < params->supported_channels_len
|
||||
&& j < SIR_MAC_MAX_SUPP_CHANNELS; i += 2) {
|
||||
int wifi_chan_index;
|
||||
|
||||
if (!wlan_hdd_is_duplicate_channel
|
||||
(StaParams.supported_channels, j,
|
||||
params->supported_channels[i])) {
|
||||
StaParams.
|
||||
supported_channels[j] =
|
||||
params->
|
||||
supported_channels[i];
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
wifi_chan_index =
|
||||
((StaParams.supported_channels[j] <=
|
||||
HDD_CHANNEL_14) ? 1 : 4);
|
||||
no_of_channels =
|
||||
params->supported_channels[i + 1];
|
||||
|
||||
hdd_debug("i: %d, j: %d, k: %d, StaParams.supported_channels[%d]: %d, wifi_chan_index: %d, no_of_channels: %d", i, j, k, j,
|
||||
StaParams.
|
||||
supported_channels[j],
|
||||
wifi_chan_index,
|
||||
no_of_channels);
|
||||
for (k = 1; k <= no_of_channels &&
|
||||
j < SIR_MAC_MAX_SUPP_CHANNELS - 1;
|
||||
k++) {
|
||||
next =
|
||||
StaParams.
|
||||
supported_channels[j] +
|
||||
wifi_chan_index;
|
||||
if (!wlan_hdd_is_duplicate_channel(StaParams.supported_channels, j + 1, next)) {
|
||||
StaParams.
|
||||
supported_channels[j
|
||||
+
|
||||
1]
|
||||
= next;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
hdd_debug("i: %d, j: %d, k: %d, StaParams.supported_channels[%d]: %d", i, j, k,
|
||||
j + 1,
|
||||
StaParams.
|
||||
supported_channels[j +
|
||||
1]);
|
||||
j += 1;
|
||||
}
|
||||
}
|
||||
num_unique_channels = j + 1;
|
||||
hdd_debug("Unique Channel List");
|
||||
for (i = 0; i < num_unique_channels; i++) {
|
||||
hdd_debug("StaParams.supported_channels[%d]: %d,", i,
|
||||
StaParams.
|
||||
supported_channels[i]);
|
||||
}
|
||||
if (MAX_CHANNEL < num_unique_channels)
|
||||
num_unique_channels = MAX_CHANNEL;
|
||||
StaParams.supported_channels_len =
|
||||
num_unique_channels;
|
||||
hdd_debug("After removing duplcates StaParams.supported_channels_len: %d",
|
||||
StaParams.supported_channels_len);
|
||||
}
|
||||
if (params->supported_oper_classes_len >
|
||||
CDS_MAX_SUPP_OPER_CLASSES) {
|
||||
hdd_debug("rcvd oper classes:%d, rst to max %d",
|
||||
params->supported_oper_classes_len,
|
||||
CDS_MAX_SUPP_OPER_CLASSES);
|
||||
params->supported_oper_classes_len =
|
||||
CDS_MAX_SUPP_OPER_CLASSES;
|
||||
}
|
||||
qdf_mem_copy(StaParams.supported_oper_classes,
|
||||
params->supported_oper_classes,
|
||||
params->supported_oper_classes_len);
|
||||
StaParams.supported_oper_classes_len =
|
||||
params->supported_oper_classes_len;
|
||||
|
||||
if (params->ext_capab_len >
|
||||
sizeof(StaParams.extn_capability)) {
|
||||
hdd_debug("received extn capabilities:%d, resetting it to max supported",
|
||||
params->ext_capab_len);
|
||||
params->ext_capab_len =
|
||||
sizeof(StaParams.extn_capability);
|
||||
}
|
||||
if (0 != params->ext_capab_len)
|
||||
qdf_mem_copy(StaParams.extn_capability,
|
||||
params->ext_capab,
|
||||
params->ext_capab_len);
|
||||
|
||||
if (NULL != params->ht_capa) {
|
||||
StaParams.htcap_present = 1;
|
||||
qdf_mem_copy(&StaParams.HTCap, params->ht_capa,
|
||||
sizeof(tSirHTCap));
|
||||
}
|
||||
|
||||
StaParams.supported_rates_len =
|
||||
params->supported_rates_len;
|
||||
|
||||
/* Note : The Maximum sizeof supported_rates sent by the Supplicant is 32.
|
||||
* The supported_rates array , for all the structures propogating till Add Sta
|
||||
* to the firmware has to be modified , if the supplicant (ieee80211) is
|
||||
* modified to send more rates.
|
||||
*/
|
||||
|
||||
/* To avoid Data Currption , set to max length to SIR_MAC_MAX_SUPP_RATES
|
||||
*/
|
||||
if (StaParams.supported_rates_len >
|
||||
SIR_MAC_MAX_SUPP_RATES)
|
||||
StaParams.supported_rates_len =
|
||||
SIR_MAC_MAX_SUPP_RATES;
|
||||
|
||||
if (0 != StaParams.supported_rates_len) {
|
||||
int i = 0;
|
||||
|
||||
qdf_mem_copy(StaParams.supported_rates,
|
||||
params->supported_rates,
|
||||
StaParams.supported_rates_len);
|
||||
hdd_debug("Supported Rates with Length %d",
|
||||
StaParams.supported_rates_len);
|
||||
for (i = 0; i < StaParams.supported_rates_len;
|
||||
i++)
|
||||
hdd_debug("[%d]: %0x", i,
|
||||
StaParams.supported_rates[i]);
|
||||
}
|
||||
|
||||
if (NULL != params->vht_capa) {
|
||||
StaParams.vhtcap_present = 1;
|
||||
qdf_mem_copy(&StaParams.VHTCap,
|
||||
params->vht_capa,
|
||||
sizeof(tSirVHTCap));
|
||||
}
|
||||
|
||||
if (0 != params->ext_capab_len) {
|
||||
/*Define A Macro : TODO Sunil */
|
||||
if ((1 << 4) & StaParams.extn_capability[3])
|
||||
isBufSta = 1;
|
||||
|
||||
/* TDLS Channel Switching Support */
|
||||
if ((1 << 6) & StaParams.extn_capability[3])
|
||||
isOffChannelSupported = 1;
|
||||
}
|
||||
|
||||
if (hdd_ctx->config->fEnableTDLSWmmMode &&
|
||||
(params->ht_capa || params->vht_capa ||
|
||||
(params->sta_flags_set & BIT(NL80211_STA_FLAG_WME))))
|
||||
is_qos_wmm_sta = true;
|
||||
|
||||
hdd_debug("%s: TDLS Peer is QOS capable"
|
||||
" is_qos_wmm_sta= %d HTcapPresent = %d",
|
||||
__func__, is_qos_wmm_sta,
|
||||
StaParams.htcap_present);
|
||||
|
||||
status = wlan_hdd_tdls_set_peer_caps(pAdapter, mac,
|
||||
&StaParams,
|
||||
isBufSta,
|
||||
isOffChannelSupported,
|
||||
is_qos_wmm_sta);
|
||||
if (QDF_STATUS_SUCCESS != status) {
|
||||
hdd_err("wlan_hdd_tdls_set_peer_caps failed!");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
status =
|
||||
wlan_hdd_tdls_add_station(wiphy, dev, mac, 1,
|
||||
&StaParams);
|
||||
if (QDF_STATUS_SUCCESS != status) {
|
||||
hdd_err("wlan_hdd_tdls_add_station failed!");
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -17261,11 +16985,9 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy,
|
||||
{
|
||||
struct hdd_adapter *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
int status;
|
||||
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
|
||||
struct hdd_station_ctx *pHddStaCtx =
|
||||
WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
uint8_t staIdx;
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
||||
@@ -17340,23 +17062,7 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy,
|
||||
wlan_hdd_cleanup_remain_on_channel_ctx(pAdapter);
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
/* First clean up the tdls peers if any */
|
||||
for (staIdx = 0; staIdx < hdd_ctx->max_num_tdls_sta; staIdx++) {
|
||||
if ((hdd_ctx->tdlsConnInfo[staIdx].sessionId ==
|
||||
pAdapter->sessionId)
|
||||
&& (hdd_ctx->tdlsConnInfo[staIdx].staId)) {
|
||||
uint8_t *mac;
|
||||
mac =
|
||||
hdd_ctx->tdlsConnInfo[staIdx].peerMac.bytes;
|
||||
hdd_debug("call sme_delete_tdls_peer_sta staId %d sessionId %d "
|
||||
MAC_ADDRESS_STR,
|
||||
hdd_ctx->tdlsConnInfo[staIdx].staId,
|
||||
pAdapter->sessionId,
|
||||
MAC_ADDR_ARRAY(mac));
|
||||
sme_delete_tdls_peer_sta(WLAN_HDD_GET_HAL_CTX
|
||||
(pAdapter),
|
||||
pAdapter->sessionId, mac);
|
||||
}
|
||||
}
|
||||
/* TDLS-TODO */
|
||||
hdd_notify_sta_disconnect(pAdapter->sessionId,
|
||||
true, pAdapter->hdd_vdev);
|
||||
#endif
|
||||
@@ -18312,15 +18018,9 @@ static int __wlan_hdd_cfg80211_add_station(struct wiphy *wiphy,
|
||||
MAC_ADDR_ARRAY(mac));
|
||||
|
||||
if (mask & BIT(NL80211_STA_FLAG_TDLS_PEER)) {
|
||||
if (set & BIT(NL80211_STA_FLAG_TDLS_PEER)) {
|
||||
#if defined(CONVERGED_TDLS_ENABLE)
|
||||
if (set & BIT(NL80211_STA_FLAG_TDLS_PEER))
|
||||
status = wlan_cfg80211_tdls_add_peer(hdd_ctx->hdd_pdev,
|
||||
dev, mac);
|
||||
#else
|
||||
status =
|
||||
wlan_hdd_tdls_add_station(wiphy, dev, mac, 0, NULL);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
EXIT();
|
||||
|
@@ -36,9 +36,7 @@
|
||||
|
||||
#include <wlan_cfg80211_scan.h>
|
||||
#include <wlan_cfg80211.h>
|
||||
#ifdef CONVERGED_TDLS_ENABLE
|
||||
#include <wlan_cfg80211_tdls.h>
|
||||
#endif
|
||||
|
||||
struct hdd_context;
|
||||
|
||||
@@ -494,62 +492,6 @@ uint8_t hdd_get_sap_operating_band(struct hdd_context *hdd_ctx);
|
||||
*/
|
||||
int wlan_hdd_try_disconnect(struct hdd_adapter *adapter);
|
||||
|
||||
#ifndef CONVERGED_TDLS_ENABLE
|
||||
static inline void
|
||||
hdd_notify_sta_connect(uint8_t session_id,
|
||||
bool tdls_chan_swit_prohibited,
|
||||
bool tdls_prohibited,
|
||||
struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
}
|
||||
|
||||
static inline
|
||||
void hdd_notify_sta_disconnect(uint8_t session_id,
|
||||
bool lfr_roam,
|
||||
struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static inline
|
||||
int wlan_cfg80211_tdls_configure_mode(struct wlan_objmgr_vdev *vdev,
|
||||
uint32_t trigger_mode)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline
|
||||
void hdd_notify_teardown_tdls_links(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static inline
|
||||
void ucfg_tdls_update_rx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
|
||||
struct qdf_mac_addr *mac_addr)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static inline
|
||||
void ucfg_tdls_update_tx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
|
||||
struct qdf_mac_addr *mac_addr)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static inline
|
||||
int wlan_cfg80211_tdls_mgmt(struct wlan_objmgr_pdev *pdev,
|
||||
struct net_device *dev, const uint8_t *peer,
|
||||
uint8_t action_code, uint8_t dialog_token,
|
||||
uint16_t status_code, uint32_t peer_capability,
|
||||
const uint8_t *buf, size_t len)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* hdd_update_cca_info_cb() - stores congestion value in station context
|
||||
* @context : HDD context
|
||||
|
@@ -12022,7 +12022,6 @@ static int hdd_update_scan_config(struct hdd_context *hdd_ctx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONVERGED_TDLS_ENABLE
|
||||
static int hdd_update_tdls_config(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc = hdd_ctx->hdd_psoc;
|
||||
@@ -12089,15 +12088,6 @@ static int hdd_update_tdls_config(struct hdd_context *hdd_ctx)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
static int hdd_update_tdls_config(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
hdd_ctx->tdls_umac_comp_active = false;
|
||||
/* disable napier specific tdls data path */
|
||||
hdd_ctx->tdls_nap_active = false;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int hdd_update_components_config(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
|
@@ -56,9 +56,7 @@ static void hdd_init_vdev_os_priv(struct hdd_adapter *adapter,
|
||||
{
|
||||
/* Initialize the vdev OS private structure*/
|
||||
os_priv->wdev = adapter->dev->ieee80211_ptr;
|
||||
#ifdef CONVERGED_TDLS_ENABLE
|
||||
wlan_cfg80211_tdls_priv_init(os_priv);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void hdd_init_psoc_qdf_ctx(struct wlan_objmgr_psoc *psoc)
|
||||
@@ -222,9 +220,8 @@ int hdd_objmgr_destroy_vdev(struct hdd_adapter *adapter)
|
||||
|
||||
osif_priv = wlan_vdev_get_ospriv(vdev);
|
||||
wlan_vdev_reset_ospriv(vdev);
|
||||
#ifdef CONVERGED_TDLS_ENABLE
|
||||
wlan_cfg80211_tdls_priv_deinit(osif_priv);
|
||||
#endif
|
||||
|
||||
qdf_mem_free(osif_priv);
|
||||
|
||||
if (hdd_objmgr_remove_peer_object(vdev,
|
||||
|
@@ -2775,26 +2775,6 @@ void __hdd_indicate_mgmt_frame(struct hdd_adapter *pAdapter,
|
||||
hdd_send_action_cnf(pAdapter, true);
|
||||
}
|
||||
}
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
else if (pbFrames
|
||||
[WLAN_HDD_PUBLIC_ACTION_FRAME_OFFSET + 1] ==
|
||||
WLAN_HDD_PUBLIC_ACTION_TDLS_DISC_RESP) {
|
||||
u8 *mac = &pbFrames
|
||||
[WLAN_HDD_80211_PEER_ADDR_OFFSET];
|
||||
|
||||
hdd_debug("[TDLS] TDLS Discovery Response,"
|
||||
MAC_ADDRESS_STR " RSSI[%d] <--- OTA",
|
||||
MAC_ADDR_ARRAY(mac), rxRssi);
|
||||
|
||||
wlan_hdd_tdls_set_rssi(pAdapter, mac, rxRssi);
|
||||
wlan_hdd_tdls_recv_discovery_resp(pAdapter,
|
||||
mac);
|
||||
cds_tdls_tx_rx_mgmt_event(SIR_MAC_ACTION_TDLS,
|
||||
SIR_MAC_ACTION_RX, SIR_MAC_MGMT_ACTION,
|
||||
WLAN_HDD_PUBLIC_ACTION_TDLS_DISC_RESP,
|
||||
&pbFrames[WLAN_HDD_80211_PEER_ADDR_OFFSET]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (pbFrames[WLAN_HDD_PUBLIC_ACTION_FRAME_OFFSET] ==
|
||||
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@@ -457,9 +457,7 @@ typedef struct sSirSmeRsp {
|
||||
uint8_t sessionId; /* To support BT-AMP */
|
||||
uint16_t transactionId; /* To support BT-AMP */
|
||||
tSirResultCodes statusCode;
|
||||
#ifdef CONVERGED_TDLS_ENABLE
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
#endif
|
||||
} tSirSmeRsp, *tpSirSmeRsp;
|
||||
|
||||
/* / Definition for indicating all modules ready on STA */
|
||||
@@ -3505,9 +3503,7 @@ typedef struct sSirTdlsAddStaRsp {
|
||||
uint8_t ucastSig;
|
||||
uint8_t bcastSig;
|
||||
eTdlsAddOper tdlsAddOper;
|
||||
#ifdef CONVERGED_TDLS_ENABLE
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
#endif
|
||||
} tSirTdlsAddStaRsp;
|
||||
|
||||
/* TDLS Request struct SME-->PE */
|
||||
@@ -3559,9 +3555,7 @@ typedef struct sSirTdlsDelStaRsp {
|
||||
tSirResultCodes statusCode;
|
||||
struct qdf_mac_addr peermac;
|
||||
uint16_t staId;
|
||||
#ifdef CONVERGED_TDLS_ENABLE
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
#endif
|
||||
} tSirTdlsDelStaRsp, *tpSirTdlsDelStaRsp;
|
||||
/* TDLS Delete Indication struct PE-->SME */
|
||||
typedef struct sSirTdlsDelStaInd {
|
||||
@@ -3582,9 +3576,7 @@ typedef struct sSirMgmtTxCompletionInd {
|
||||
uint16_t length;
|
||||
uint8_t sessionId; /* Session ID */
|
||||
uint32_t txCompleteStatus;
|
||||
#ifdef CONVERGED_TDLS_ENABLE
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
#endif
|
||||
} tSirMgmtTxCompletionInd, *tpSirMgmtTxCompletionInd;
|
||||
|
||||
typedef struct sSirTdlsEventnotify {
|
||||
|
@@ -2105,25 +2105,7 @@ void lim_process_action_frame(tpAniSirGlobal mac_ctx,
|
||||
WMA_GET_RX_RSSI_NORMALIZED(
|
||||
rx_pkt_info));
|
||||
break;
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
#ifndef CONVERGED_TDLS_ENABLE
|
||||
case SIR_MAC_TDLS_DIS_RSP:
|
||||
mac_hdr = NULL;
|
||||
frame_len = 0;
|
||||
rssi = 0;
|
||||
|
||||
mac_hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info);
|
||||
frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info);
|
||||
rssi = WMA_GET_RX_RSSI_NORMALIZED(rx_pkt_info);
|
||||
pe_debug("Public Action TDLS Discovery RSP");
|
||||
lim_send_sme_mgmt_frame_ind(mac_ctx,
|
||||
mac_hdr->fc.subType, (uint8_t *) mac_hdr,
|
||||
frame_len + sizeof(tSirMacMgmtHdr),
|
||||
session->smeSessionId,
|
||||
WMA_GET_RX_CH(rx_pkt_info), session, rssi);
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
case SIR_MAC_ACTION_EXT_CHANNEL_SWITCH_ID:
|
||||
lim_process_ext_channel_switch_action_frame(mac_ctx,
|
||||
rx_pkt_info, session);
|
||||
|
@@ -1269,7 +1269,6 @@ static void lim_process_messages(tpAniSirGlobal mac_ctx,
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
tSirTdlsInd *tdls_ind = NULL;
|
||||
tpDphHashNode sta_ds = NULL;
|
||||
tTdlsLinkEstablishParams *tdls_link_params = NULL;
|
||||
#endif
|
||||
tSirMbMsgP2p *p2p_msg = NULL;
|
||||
tSirSetActiveModeSetBncFilterReq *bcn_filter_req = NULL;
|
||||
@@ -1779,29 +1778,6 @@ static void lim_process_messages(tpAniSirGlobal mac_ctx,
|
||||
qdf_mem_free((void *)(msg->bodyptr));
|
||||
msg->bodyptr = NULL;
|
||||
break;
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
case WMA_SET_TDLS_LINK_ESTABLISH_REQ_RSP:
|
||||
tdls_link_params = (tTdlsLinkEstablishParams *) msg->bodyptr;
|
||||
session_entry = pe_find_session_by_sta_id(mac_ctx,
|
||||
tdls_link_params->staIdx, &session_id);
|
||||
if (session_entry == NULL) {
|
||||
pe_err("session %u does not exist", session_id);
|
||||
/* Still send the eWNI_SME_TDLS_LINK_ESTABLISH_RSP
|
||||
* message to SME with session id as zero and status
|
||||
* as FAILURE so, that message queued in SME queue
|
||||
* can be freed to prevent the SME cmd buffer leak
|
||||
*/
|
||||
lim_send_sme_tdls_link_establish_req_rsp(mac_ctx, 0,
|
||||
NULL, NULL, eSIR_FAILURE);
|
||||
} else {
|
||||
lim_send_sme_tdls_link_establish_req_rsp(mac_ctx,
|
||||
session_entry->smeSessionId, NULL, NULL,
|
||||
tdls_link_params->status);
|
||||
}
|
||||
qdf_mem_free((void *)(msg->bodyptr));
|
||||
msg->bodyptr = NULL;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case WMA_RX_CHN_STATUS_EVENT:
|
||||
lim_process_rx_channel_status_event(mac_ctx, msg->bodyptr);
|
||||
|
@@ -5059,9 +5059,6 @@ bool lim_process_sme_req_messages(tpAniSirGlobal pMac,
|
||||
case eWNI_SME_TDLS_DEL_STA_REQ:
|
||||
lim_process_sme_tdls_del_sta_req(pMac, pMsgBuf);
|
||||
break;
|
||||
case eWNI_SME_TDLS_LINK_ESTABLISH_REQ:
|
||||
lim_process_sme_tdls_link_establish_req(pMac, pMsgBuf);
|
||||
break;
|
||||
#endif
|
||||
case eWNI_SME_RESET_AP_CAPS_CHANGED:
|
||||
__lim_process_sme_reset_ap_caps_change(pMac, pMsgBuf);
|
||||
|
@@ -79,10 +79,7 @@
|
||||
#include "cds_regdomain.h"
|
||||
#include "cds_utils.h"
|
||||
#include "wlan_reg_services_api.h"
|
||||
|
||||
#ifdef CONVERGED_TDLS_ENABLE
|
||||
#include "wlan_tdls_tgt_api.h"
|
||||
#endif
|
||||
|
||||
/* define NO_PAD_TDLS_MIN_8023_SIZE to NOT padding: See CR#447630
|
||||
There was IOT issue with cisco 1252 open mode, where it pads
|
||||
@@ -2677,18 +2674,11 @@ static QDF_STATUS lim_send_sme_tdls_add_sta_rsp(tpAniSirGlobal pMac,
|
||||
|
||||
addStaRsp->length = sizeof(tSirTdlsAddStaRsp);
|
||||
addStaRsp->messageType = eWNI_SME_TDLS_ADD_STA_RSP;
|
||||
#ifdef CONVERGED_TDLS_ENABLE
|
||||
addStaRsp->psoc = pMac->psoc;
|
||||
mmhMsg.bodyptr = addStaRsp;
|
||||
mmhMsg.callback = tgt_tdls_add_peer_rsp;
|
||||
|
||||
return scheduler_post_msg(QDF_MODULE_ID_TARGET_IF, &mmhMsg);
|
||||
#else
|
||||
mmhMsg.bodyptr = addStaRsp;
|
||||
mmhMsg.bodyval = 0;
|
||||
lim_sys_process_mmh_msg_api(pMac, &mmhMsg, ePROT);
|
||||
#endif
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2737,7 +2727,6 @@ add_sta_error:
|
||||
return status;
|
||||
}
|
||||
|
||||
#ifdef CONVERGED_TDLS_ENABLE
|
||||
/**
|
||||
* lim_send_tdls_comp_mgmt_rsp() - Send Response to upper layers
|
||||
* @mac_ctx: Pointer to Global MAC structure
|
||||
@@ -2786,7 +2775,6 @@ lim_send_tdls_comp_mgmt_rsp(tpAniSirGlobal mac_ctx, uint16_t msg_type,
|
||||
scheduler_post_msg(QDF_MODULE_ID_TARGET_IF, &msg);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* lim_process_sme_tdls_mgmt_send_req() - send out tdls management frames
|
||||
@@ -2908,51 +2896,13 @@ tSirRetStatus lim_process_sme_tdls_mgmt_send_req(tpAniSirGlobal mac_ctx,
|
||||
}
|
||||
|
||||
lim_tdls_send_mgmt_error:
|
||||
#ifdef CONVERGED_TDLS_ENABLE
|
||||
lim_send_tdls_comp_mgmt_rsp(mac_ctx, eWNI_SME_TDLS_SEND_MGMT_RSP,
|
||||
result_code, send_req->sessionId,
|
||||
send_req->transactionId);
|
||||
#else
|
||||
lim_send_sme_rsp(mac_ctx, eWNI_SME_TDLS_SEND_MGMT_RSP,
|
||||
result_code, send_req->sessionId,
|
||||
send_req->transactionId);
|
||||
#endif
|
||||
|
||||
return eSIR_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* Send Response to Link Establish Request to SME
|
||||
*/
|
||||
void lim_send_sme_tdls_link_establish_req_rsp(tpAniSirGlobal pMac,
|
||||
uint8_t sessionId,
|
||||
struct qdf_mac_addr *peermac,
|
||||
tDphHashNode *pStaDs, uint8_t status)
|
||||
{
|
||||
struct scheduler_msg mmhMsg = { 0 };
|
||||
|
||||
tSirTdlsLinkEstablishReqRsp *pTdlsLinkEstablishReqRsp = NULL;
|
||||
|
||||
pTdlsLinkEstablishReqRsp =
|
||||
qdf_mem_malloc(sizeof(tSirTdlsLinkEstablishReqRsp));
|
||||
if (NULL == pTdlsLinkEstablishReqRsp) {
|
||||
pe_err("Failed to allocate memory");
|
||||
return;
|
||||
}
|
||||
pe_debug("Send Resp to TDL Link Establish Req to SME");
|
||||
pTdlsLinkEstablishReqRsp->statusCode = status;
|
||||
if (peermac)
|
||||
qdf_copy_macaddr(&pTdlsLinkEstablishReqRsp->peermac, peermac);
|
||||
|
||||
pTdlsLinkEstablishReqRsp->sessionId = sessionId;
|
||||
mmhMsg.type = eWNI_SME_TDLS_LINK_ESTABLISH_RSP;
|
||||
mmhMsg.bodyptr = pTdlsLinkEstablishReqRsp;
|
||||
mmhMsg.bodyval = 0;
|
||||
lim_sys_process_mmh_msg_api(pMac, &mmhMsg, ePROT);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Once link is teardown, send Del Peer Ind to SME
|
||||
*/
|
||||
@@ -2982,19 +2932,10 @@ static QDF_STATUS lim_send_sme_tdls_del_sta_rsp(tpAniSirGlobal pMac,
|
||||
|
||||
pDelSta->length = sizeof(tSirTdlsDelStaRsp);
|
||||
pDelSta->messageType = eWNI_SME_TDLS_DEL_STA_RSP;
|
||||
#ifdef CONVERGED_TDLS_ENABLE
|
||||
pDelSta->psoc = pMac->psoc;
|
||||
mmhMsg.bodyptr = pDelSta;
|
||||
mmhMsg.callback = tgt_tdls_del_peer_rsp;
|
||||
return scheduler_post_msg(QDF_MODULE_ID_TARGET_IF, &mmhMsg);
|
||||
#else
|
||||
mmhMsg.bodyptr = pDelSta;
|
||||
|
||||
mmhMsg.bodyval = 0;
|
||||
#endif
|
||||
lim_sys_process_mmh_msg_api(pMac, &mmhMsg, ePROT);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3122,163 +3063,6 @@ lim_tdls_del_sta_error:
|
||||
return eSIR_SUCCESS;
|
||||
}
|
||||
|
||||
/* Intersects the two input arrays and outputs an array */
|
||||
/* For now the array length of uint8_t suffices */
|
||||
static void lim_tdls_get_intersection(uint8_t *input_array1,
|
||||
uint8_t input1_length,
|
||||
uint8_t *input_array2,
|
||||
uint8_t input2_length,
|
||||
uint8_t *output_array,
|
||||
uint8_t *output_length)
|
||||
{
|
||||
uint8_t i, j, k = 0, flag = 0;
|
||||
for (i = 0; i < input1_length; i++) {
|
||||
flag = 0;
|
||||
for (j = 0; j < input2_length; j++) {
|
||||
if (input_array1[i] == input_array2[j]) {
|
||||
flag = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (flag == 1) {
|
||||
output_array[k] = input_array1[i];
|
||||
k++;
|
||||
}
|
||||
}
|
||||
*output_length = k;
|
||||
}
|
||||
|
||||
/**
|
||||
* lim_process_sme_tdls_link_establish_req() - process tdls link establishment
|
||||
* request
|
||||
*
|
||||
* @mac_ctx - global MAC context
|
||||
* @msg_buf - message buffer from SME
|
||||
*
|
||||
* Process Link Establishment Request from SME
|
||||
*
|
||||
* Return: eSIR_SUCCESS on success, failure code otherwise.
|
||||
*/
|
||||
tSirRetStatus lim_process_sme_tdls_link_establish_req(tpAniSirGlobal mac_ctx,
|
||||
uint32_t *msg_buf)
|
||||
{
|
||||
/* get all discovery request parameters */
|
||||
tSirTdlsLinkEstablishReq *tdls_req =
|
||||
(tSirTdlsLinkEstablishReq *) msg_buf;
|
||||
tpPESession session_entry;
|
||||
uint8_t session_id;
|
||||
tpTdlsLinkEstablishParams tdls_req_params;
|
||||
struct scheduler_msg msg = {0};
|
||||
uint16_t peer_idx = 0;
|
||||
tpDphHashNode stads = NULL;
|
||||
uint32_t self_num_chan = WNI_CFG_VALID_CHANNEL_LIST_LEN;
|
||||
uint8_t self_supp_chan[WNI_CFG_VALID_CHANNEL_LIST_LEN];
|
||||
|
||||
pe_debug("Process TDLS Link Establishment Request from SME");
|
||||
|
||||
session_entry = pe_find_session_by_bssid(mac_ctx, tdls_req->bssid.bytes,
|
||||
&session_id);
|
||||
if (NULL == session_entry) {
|
||||
pe_err("PE Session does not exist for sme session_id: %d",
|
||||
tdls_req->sessionId);
|
||||
lim_send_sme_tdls_link_establish_req_rsp(mac_ctx,
|
||||
tdls_req->sessionId, &tdls_req->peermac, NULL,
|
||||
eSIR_FAILURE);
|
||||
return eSIR_FAILURE;
|
||||
}
|
||||
|
||||
/* check if we are in proper state to work as TDLS client */
|
||||
if (!LIM_IS_STA_ROLE(session_entry)) {
|
||||
pe_err("TDLS Link Establish Request received in wrong system Role: %d",
|
||||
GET_LIM_SYSTEM_ROLE(session_entry));
|
||||
goto lim_tdls_link_establish_error;
|
||||
}
|
||||
|
||||
/*
|
||||
* if we are still good, go ahead and check if we are in proper state to
|
||||
* do TDLS discovery req/rsp/....frames.
|
||||
*/
|
||||
if ((session_entry->limSmeState != eLIM_SME_ASSOCIATED_STATE) &&
|
||||
(session_entry->limSmeState != eLIM_SME_LINK_EST_STATE)) {
|
||||
pe_err("TDLS Link Establish Request received in invalid LIMsme state: %d",
|
||||
session_entry->limSmeState);
|
||||
goto lim_tdls_link_establish_error;
|
||||
}
|
||||
|
||||
stads = dph_lookup_hash_entry(mac_ctx, tdls_req->peermac.bytes,
|
||||
&peer_idx,
|
||||
&session_entry->dph.dphHashTable);
|
||||
if (NULL == stads) {
|
||||
pe_err("stads is NULL");
|
||||
goto lim_tdls_link_establish_error;
|
||||
}
|
||||
tdls_req_params = qdf_mem_malloc(sizeof(tTdlsLinkEstablishParams));
|
||||
if (NULL == tdls_req_params) {
|
||||
pe_err("Unable to allocate memory TDLS Link Establish Request");
|
||||
return eSIR_MEM_ALLOC_FAILED;
|
||||
}
|
||||
|
||||
tdls_req_params->staIdx = stads->staIndex;
|
||||
tdls_req_params->isResponder = tdls_req->isResponder;
|
||||
tdls_req_params->uapsdQueues = tdls_req->uapsdQueues;
|
||||
tdls_req_params->maxSp = tdls_req->maxSp;
|
||||
tdls_req_params->isBufsta = tdls_req->isBufSta;
|
||||
tdls_req_params->isOffChannelSupported =
|
||||
tdls_req->isOffChannelSupported;
|
||||
|
||||
if (0 == tdls_req->supportedChannelsLen)
|
||||
goto send_tdls_establish_request;
|
||||
|
||||
if (wlan_cfg_get_str(mac_ctx, WNI_CFG_VALID_CHANNEL_LIST,
|
||||
self_supp_chan,
|
||||
&self_num_chan) != eSIR_SUCCESS) {
|
||||
/**
|
||||
* Could not get Valid channel list from CFG.
|
||||
* Log error.
|
||||
*/
|
||||
pe_warn("could not retrieve Valid channel list");
|
||||
}
|
||||
|
||||
if (self_num_chan > WNI_CFG_VALID_CHANNEL_LIST_LEN) {
|
||||
pe_warn("Channel List more than Valid Channel list");
|
||||
self_num_chan = WNI_CFG_VALID_CHANNEL_LIST_LEN;
|
||||
}
|
||||
|
||||
if (tdls_req->supportedChannelsLen > SIR_MAC_MAX_SUPP_CHANNELS) {
|
||||
pe_warn("Channel List is more than the supported Channel list");
|
||||
tdls_req->supportedChannelsLen = SIR_MAC_MAX_SUPP_CHANNELS;
|
||||
}
|
||||
|
||||
lim_tdls_get_intersection(self_supp_chan, self_num_chan,
|
||||
tdls_req->supportedChannels, tdls_req->supportedChannelsLen,
|
||||
tdls_req_params->validChannels,
|
||||
&tdls_req_params->validChannelsLen);
|
||||
|
||||
send_tdls_establish_request:
|
||||
qdf_mem_copy(tdls_req_params->validOperClasses,
|
||||
tdls_req->supportedOperClasses,
|
||||
tdls_req->supportedOperClassesLen);
|
||||
tdls_req_params->validOperClassesLen =
|
||||
tdls_req->supportedOperClassesLen;
|
||||
|
||||
msg.type = WMA_SET_TDLS_LINK_ESTABLISH_REQ;
|
||||
msg.reserved = 0;
|
||||
msg.bodyptr = tdls_req_params;
|
||||
msg.bodyval = 0;
|
||||
if (eSIR_SUCCESS != wma_post_ctrl_msg(mac_ctx, &msg)) {
|
||||
pe_err("halPostMsgApi failed");
|
||||
goto lim_tdls_link_establish_error;
|
||||
}
|
||||
return eSIR_SUCCESS;
|
||||
|
||||
lim_tdls_link_establish_error:
|
||||
lim_send_sme_tdls_link_establish_req_rsp(mac_ctx,
|
||||
session_entry->smeSessionId, &tdls_req->peermac, NULL,
|
||||
eSIR_FAILURE);
|
||||
|
||||
return eSIR_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* lim_check_aid_and_delete_peer() - Funtion to check aid and delete peer
|
||||
* @p_mac: pointer to mac context
|
||||
@@ -3341,53 +3125,6 @@ skip:
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef CONVERGED_TDLS_ENABLE
|
||||
/**
|
||||
* lim_delete_tdls_peers() - delete tdls peers
|
||||
*
|
||||
* @mac_ctx - global MAC context
|
||||
* @session_entry - PE session entry
|
||||
*
|
||||
* Delete all the TDLS peer connected before leaving the BSS
|
||||
*
|
||||
* Return: eSIR_SUCCESS on success, error code otherwise
|
||||
*/
|
||||
tSirRetStatus lim_delete_tdls_peers(tpAniSirGlobal mac_ctx,
|
||||
tpPESession session_entry)
|
||||
{
|
||||
cds_msg_t msg;
|
||||
struct sir_tdls_notify_set_state_disable *tdls_state_disable;
|
||||
|
||||
pe_debug("Enter");
|
||||
|
||||
if (NULL == session_entry) {
|
||||
pe_err("NULL session_entry");
|
||||
return eSIR_FAILURE;
|
||||
}
|
||||
|
||||
lim_check_aid_and_delete_peer(mac_ctx, session_entry);
|
||||
if (lim_is_roam_synch_in_progress(session_entry))
|
||||
return eSIR_SUCCESS;
|
||||
|
||||
if (mac_ctx->lim.sme_msg_callback) {
|
||||
tdls_state_disable = qdf_mem_malloc(
|
||||
sizeof(*tdls_state_disable));
|
||||
if (NULL == tdls_state_disable) {
|
||||
pe_err("memory allocation failed");
|
||||
return eSIR_FAILURE;
|
||||
}
|
||||
tdls_state_disable->session_id = session_entry->smeSessionId;
|
||||
msg.type = eWNI_SME_TDLS_NOTIFY_SET_STATE_DISABLE;
|
||||
msg.bodyptr = tdls_state_disable;
|
||||
msg.bodyval = 0;
|
||||
mac_ctx->lim.sme_msg_callback(mac_ctx, &msg);
|
||||
}
|
||||
|
||||
lim_send_sme_tdls_delete_all_peer_ind(mac_ctx, session_entry);
|
||||
pe_debug("Exit");
|
||||
return eSIR_SUCCESS;
|
||||
}
|
||||
#else
|
||||
/**
|
||||
* lim_delete_tdls_peers() - delete tdls peers
|
||||
*
|
||||
@@ -3419,7 +3156,6 @@ tSirRetStatus lim_delete_tdls_peers(tpAniSirGlobal mac_ctx,
|
||||
pe_debug("Exit");
|
||||
return eSIR_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* lim_process_sme_del_all_tdls_peers(): process delete tdls peers
|
||||
|
@@ -62,9 +62,7 @@
|
||||
#include "wlan_reg_services_api.h"
|
||||
#include "wlan_utility.h"
|
||||
|
||||
#ifdef CONVERGED_TDLS_ENABLE
|
||||
#include "wlan_tdls_tgt_api.h"
|
||||
#endif
|
||||
#include "lim_process_fils.h"
|
||||
|
||||
static void lim_handle_join_rsp_status(tpAniSirGlobal mac_ctx,
|
||||
@@ -1215,86 +1213,20 @@ void
|
||||
lim_send_sme_tdls_del_sta_ind(tpAniSirGlobal pMac, tpDphHashNode pStaDs,
|
||||
tpPESession psessionEntry, uint16_t reasonCode)
|
||||
{
|
||||
struct scheduler_msg mmhMsg = {0};
|
||||
tSirTdlsDelStaInd *pSirTdlsDelStaInd;
|
||||
struct tdls_event_info info;
|
||||
|
||||
pSirTdlsDelStaInd = qdf_mem_malloc(sizeof(tSirTdlsDelStaInd));
|
||||
if (NULL == pSirTdlsDelStaInd) {
|
||||
pe_err("AllocateMemory failed for eWNI_SME_TDLS_DEL_STA_IND");
|
||||
return;
|
||||
}
|
||||
pe_debug("Delete TDLS Peer "MAC_ADDRESS_STR "with reason code: %d",
|
||||
MAC_ADDR_ARRAY(pStaDs->staAddr), reasonCode);
|
||||
/* messageType */
|
||||
pSirTdlsDelStaInd->messageType = eWNI_SME_TDLS_DEL_STA_IND;
|
||||
pSirTdlsDelStaInd->length = sizeof(tSirTdlsDelStaInd);
|
||||
info.vdev_id = psessionEntry->smeSessionId;
|
||||
qdf_mem_copy(info.peermac.bytes, pStaDs->staAddr, QDF_MAC_ADDR_SIZE);
|
||||
info.message_type = TDLS_PEER_DISCONNECTED;
|
||||
info.peer_reason = TDLS_DISCONNECTED_PEER_DELETE;
|
||||
|
||||
/* sessionId */
|
||||
pSirTdlsDelStaInd->sessionId = psessionEntry->smeSessionId;
|
||||
tgt_tdls_event_handler(pMac->psoc, &info);
|
||||
|
||||
/* peerMacAddr */
|
||||
qdf_mem_copy(pSirTdlsDelStaInd->peermac.bytes, pStaDs->staAddr,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
|
||||
/* staId */
|
||||
lim_copy_u16((uint8_t *) (&pSirTdlsDelStaInd->staId),
|
||||
(uint16_t) pStaDs->staIndex);
|
||||
|
||||
/* reasonCode */
|
||||
lim_copy_u16((uint8_t *) (&pSirTdlsDelStaInd->reasonCode), reasonCode);
|
||||
|
||||
mmhMsg.type = eWNI_SME_TDLS_DEL_STA_IND;
|
||||
mmhMsg.bodyptr = pSirTdlsDelStaInd;
|
||||
mmhMsg.bodyval = 0;
|
||||
|
||||
lim_sys_process_mmh_msg_api(pMac, &mmhMsg, ePROT);
|
||||
return;
|
||||
} /*** end lim_send_sme_tdls_del_sta_ind() ***/
|
||||
|
||||
/**
|
||||
* lim_send_sme_tdls_delete_all_peer_ind()
|
||||
*
|
||||
***FUNCTION:
|
||||
* This function is called to send the eWNI_SME_TDLS_DEL_ALL_PEER_IND
|
||||
* message to SME.
|
||||
*
|
||||
***LOGIC:
|
||||
*
|
||||
***ASSUMPTIONS:
|
||||
*
|
||||
***NOTE:
|
||||
* NA
|
||||
*
|
||||
* @param pMac - Pointer to global MAC structure
|
||||
* @param psessionEntry - Pointer to the session entry
|
||||
* @return None
|
||||
*/
|
||||
void
|
||||
lim_send_sme_tdls_delete_all_peer_ind(tpAniSirGlobal pMac, tpPESession psessionEntry)
|
||||
{
|
||||
struct scheduler_msg mmhMsg = {0};
|
||||
tSirTdlsDelAllPeerInd *pSirTdlsDelAllPeerInd;
|
||||
|
||||
pSirTdlsDelAllPeerInd = qdf_mem_malloc(sizeof(tSirTdlsDelAllPeerInd));
|
||||
if (NULL == pSirTdlsDelAllPeerInd) {
|
||||
pe_err("AllocateMemory failed for eWNI_SME_TDLS_DEL_ALL_PEER_IND");
|
||||
return;
|
||||
}
|
||||
/* messageType */
|
||||
pSirTdlsDelAllPeerInd->messageType = eWNI_SME_TDLS_DEL_ALL_PEER_IND;
|
||||
pSirTdlsDelAllPeerInd->length = sizeof(tSirTdlsDelAllPeerInd);
|
||||
|
||||
/* sessionId */
|
||||
pSirTdlsDelAllPeerInd->sessionId = psessionEntry->smeSessionId;
|
||||
|
||||
mmhMsg.type = eWNI_SME_TDLS_DEL_ALL_PEER_IND;
|
||||
mmhMsg.bodyptr = pSirTdlsDelAllPeerInd;
|
||||
mmhMsg.bodyval = 0;
|
||||
|
||||
lim_sys_process_mmh_msg_api(pMac, &mmhMsg, ePROT);
|
||||
return;
|
||||
} /*** end lim_send_sme_tdls_delete_all_peer_ind() ***/
|
||||
|
||||
/**
|
||||
* lim_send_sme_mgmt_tx_completion()
|
||||
*
|
||||
@@ -1342,15 +1274,10 @@ lim_send_sme_mgmt_tx_completion(tpAniSirGlobal pMac,
|
||||
mmhMsg.bodyptr = pSirMgmtTxCompletionInd;
|
||||
mmhMsg.bodyval = 0;
|
||||
|
||||
#ifdef CONVERGED_TDLS_ENABLE
|
||||
pSirMgmtTxCompletionInd->psoc = pMac->psoc;
|
||||
mmhMsg.callback = tgt_tdls_send_mgmt_tx_completion;
|
||||
scheduler_post_msg(QDF_MODULE_ID_TARGET_IF, &mmhMsg);
|
||||
return;
|
||||
#else
|
||||
lim_sys_process_mmh_msg_api(pMac, &mmhMsg, ePROT);
|
||||
return;
|
||||
#endif
|
||||
} /*** end lim_send_sme_tdls_delete_all_peer_ind() ***/
|
||||
|
||||
void lim_send_sme_tdls_event_notify(tpAniSirGlobal pMac, uint16_t msgType,
|
||||
|
@@ -102,9 +102,6 @@ void lim_send_sme_ibss_peer_ind(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
|
||||
void lim_send_sme_max_assoc_exceeded_ntf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
|
||||
uint8_t smesessionId);
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
void lim_send_sme_tdls_link_establish_req_rsp(tpAniSirGlobal pMac, uint8_t sessionId,
|
||||
struct qdf_mac_addr *peermac,
|
||||
tDphHashNode *pStaDs, uint8_t status);
|
||||
void lim_send_sme_tdls_event_notify(tpAniSirGlobal pMac, uint16_t msgType,
|
||||
void *events);
|
||||
#endif
|
||||
|
@@ -554,12 +554,8 @@ tSirRetStatus lim_process_sme_tdls_mgmt_send_req(tpAniSirGlobal pMac,
|
||||
uint32_t *pMsgBuf);
|
||||
tSirRetStatus lim_process_sme_tdls_add_sta_req(tpAniSirGlobal pMac,
|
||||
uint32_t *pMsgBuf);
|
||||
tSirRetStatus lim_process_sme_tdls_link_establish_req(tpAniSirGlobal pMac,
|
||||
uint32_t *pMsgBuf);
|
||||
tSirRetStatus lim_process_sme_tdls_del_sta_req(tpAniSirGlobal pMac,
|
||||
uint32_t *pMsgBuf);
|
||||
void lim_send_sme_tdls_delete_all_peer_ind(tpAniSirGlobal pMac,
|
||||
tpPESession psessionEntry);
|
||||
void lim_send_sme_mgmt_tx_completion(
|
||||
tpAniSirGlobal pMac,
|
||||
uint32_t sme_session_id,
|
||||
|
@@ -679,23 +679,6 @@ QDF_STATUS sme_update_roam_scan_offload_enabled(tHalHandle hHal,
|
||||
bool nRoamScanOffloadEnabled);
|
||||
bool sme_is_feature_supported_by_fw(enum cap_bitmap feature);
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
QDF_STATUS sme_send_tdls_link_establish_params(tHalHandle hHal,
|
||||
uint8_t sessionId,
|
||||
const tSirMacAddr peerMac,
|
||||
tCsrTdlsLinkEstablishParams *
|
||||
tdlsLinkEstablishParams);
|
||||
QDF_STATUS sme_send_tdls_mgmt_frame(tHalHandle hHal, uint8_t sessionId,
|
||||
const tSirMacAddr peerMac, uint8_t frame_type,
|
||||
uint8_t dialog, uint16_t status,
|
||||
uint32_t peerCapability, uint8_t *buf,
|
||||
uint8_t len, uint8_t responder);
|
||||
QDF_STATUS sme_change_tdls_peer_sta(tHalHandle hHal, uint8_t sessionId,
|
||||
const tSirMacAddr peerMac,
|
||||
tCsrStaParams *pstaParams);
|
||||
QDF_STATUS sme_add_tdls_peer_sta(tHalHandle hHal, uint8_t sessionId,
|
||||
const tSirMacAddr peerMac);
|
||||
QDF_STATUS sme_delete_tdls_peer_sta(tHalHandle hHal, uint8_t sessionId,
|
||||
const tSirMacAddr peerMac);
|
||||
void sme_set_tdls_power_save_prohibited(tHalHandle hHal, uint32_t sessionId,
|
||||
bool val);
|
||||
QDF_STATUS sme_send_tdls_chan_switch_req(
|
||||
@@ -1531,8 +1514,6 @@ QDF_STATUS sme_fast_reassoc(tHalHandle hal, tCsrRoamProfile *profile,
|
||||
QDF_STATUS sme_congestion_register_callback(tHalHandle hal,
|
||||
void (*congestion_cb)(void *, uint32_t congestion, uint32_t vdev_id));
|
||||
|
||||
QDF_STATUS sme_delete_all_tdls_peers(tHalHandle hal, uint8_t session_id);
|
||||
|
||||
/**
|
||||
* sme_rso_cmd_status_cb() - Set RSO cmd status callback
|
||||
* @hal: HAL Handle
|
||||
|
@@ -245,20 +245,6 @@ QDF_STATUS csr_process_del_sta_session_rsp(tpAniSirGlobal pMac, uint8_t *pMsg);
|
||||
|
||||
bool csr_roamGetConcurrencyConnectStatusForBmps(tpAniSirGlobal pMac);
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
QDF_STATUS csr_tdls_send_mgmt_req(tHalHandle hHal, uint8_t sessionId,
|
||||
tCsrTdlsSendMgmt * tdlsSendMgmt);
|
||||
QDF_STATUS csr_tdls_send_link_establish_params(tHalHandle hHal,
|
||||
uint8_t sessionId, const tSirMacAddr peerMac,
|
||||
tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
|
||||
QDF_STATUS csr_tdls_add_peer_sta(tHalHandle hHal, uint8_t sessionId,
|
||||
const tSirMacAddr peerMac);
|
||||
QDF_STATUS csr_tdls_change_peer_sta(tHalHandle hHal, uint8_t sessionId,
|
||||
const tSirMacAddr peerMac,
|
||||
tCsrStaParams *pstaParams);
|
||||
QDF_STATUS csr_tdls_del_peer_sta(tHalHandle hHal, uint8_t sessionId,
|
||||
const tSirMacAddr peerMac);
|
||||
QDF_STATUS csr_tdls_process_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand);
|
||||
QDF_STATUS csr_tdls_process_link_establish(tpAniSirGlobal pMac, tSmeCmd *cmd);
|
||||
QDF_STATUS tdls_msg_processor(tpAniSirGlobal pMac, uint16_t msg_type,
|
||||
void *pMsgBuf);
|
||||
#endif /* FEATURE_WLAN_TDLS */
|
||||
|
@@ -553,14 +553,6 @@ QDF_STATUS sme_ser_handle_active_cmd(struct wlan_serialization_command *cmd)
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
#endif
|
||||
break;
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
case eSmeCommandTdlsSendMgmt:
|
||||
case eSmeCommandTdlsAddPeer:
|
||||
case eSmeCommandTdlsDelPeer:
|
||||
case eSmeCommandTdlsLinkEstablish:
|
||||
status = csr_tdls_process_cmd(mac_ctx, sme_cmd);
|
||||
break;
|
||||
#endif
|
||||
case e_sme_command_set_hw_mode:
|
||||
csr_process_set_hw_mode(mac_ctx, sme_cmd);
|
||||
break;
|
||||
@@ -9017,181 +9009,12 @@ bool sme_is_feature_supported_by_fw(enum cap_bitmap feature)
|
||||
}
|
||||
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
/* ---------------------------------------------------------------------------
|
||||
\fn sme_set_tdls_power_save_prohibited
|
||||
\API to set/reset the is_tdls_power_save_prohibited.
|
||||
|
||||
/*
|
||||
* sme_send_tdls_link_establish_params() -
|
||||
* API to send TDLS Peer Link Establishment Parameters.
|
||||
*
|
||||
* peerMac - peer's Mac Adress.
|
||||
* tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
|
||||
* Return QDF_STATUS_SUCCES
|
||||
*/
|
||||
QDF_STATUS sme_send_tdls_link_establish_params(tHalHandle hHal,
|
||||
uint8_t sessionId,
|
||||
const tSirMacAddr peerMac,
|
||||
tCsrTdlsLinkEstablishParams *
|
||||
tdlsLinkEstablishParams)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
|
||||
|
||||
MTRACE(qdf_trace(QDF_MODULE_ID_SME,
|
||||
TRACE_CODE_SME_RX_HDD_TDLS_LINK_ESTABLISH_PARAM,
|
||||
sessionId,
|
||||
tdlsLinkEstablishParams->isOffChannelSupported));
|
||||
status = sme_acquire_global_lock(&pMac->sme);
|
||||
|
||||
if (QDF_IS_STATUS_SUCCESS(status)) {
|
||||
status = csr_tdls_send_link_establish_params(hHal, sessionId,
|
||||
peerMac, tdlsLinkEstablishParams);
|
||||
sme_release_global_lock(&pMac->sme);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
/*
|
||||
* sme_send_tdls_mgmt_frame() -
|
||||
* API to send TDLS management frames.
|
||||
*
|
||||
* peerMac - peer's Mac Adress.
|
||||
* frame_type - Type of TDLS mgmt frame to be sent.
|
||||
* dialog - dialog token used in the frame.
|
||||
* status - status to be incuded in the frame.
|
||||
* peerCapability - peer cpabilities
|
||||
* buf - additional IEs to be included
|
||||
* len - lenght of additional Ies
|
||||
* responder - Tdls request type
|
||||
* Return QDF_STATUS_SUCCES
|
||||
*/
|
||||
QDF_STATUS sme_send_tdls_mgmt_frame(tHalHandle hHal, uint8_t sessionId,
|
||||
const tSirMacAddr peerMac,
|
||||
uint8_t frame_type,
|
||||
uint8_t dialog, uint16_t statusCode,
|
||||
uint32_t peerCapability, uint8_t *buf,
|
||||
uint8_t len, uint8_t responder)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
tCsrTdlsSendMgmt sendTdlsReq = { {0} };
|
||||
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
|
||||
|
||||
MTRACE(qdf_trace(QDF_MODULE_ID_SME,
|
||||
TRACE_CODE_SME_RX_HDD_TDLS_SEND_MGMT_FRAME,
|
||||
sessionId, statusCode));
|
||||
status = sme_acquire_global_lock(&pMac->sme);
|
||||
if (QDF_IS_STATUS_SUCCESS(status)) {
|
||||
qdf_mem_copy(sendTdlsReq.peerMac, peerMac, sizeof(tSirMacAddr));
|
||||
sendTdlsReq.frameType = frame_type;
|
||||
sendTdlsReq.buf = buf;
|
||||
sendTdlsReq.len = len;
|
||||
sendTdlsReq.dialog = dialog;
|
||||
sendTdlsReq.statusCode = statusCode;
|
||||
sendTdlsReq.responder = responder;
|
||||
sendTdlsReq.peerCapability = peerCapability;
|
||||
|
||||
status = csr_tdls_send_mgmt_req(hHal, sessionId, &sendTdlsReq);
|
||||
|
||||
sme_release_global_lock(&pMac->sme);
|
||||
}
|
||||
|
||||
return status;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* sme_change_tdls_peer_sta() -
|
||||
* API to Update TDLS peer sta parameters.
|
||||
*
|
||||
* peerMac - peer's Mac Adress.
|
||||
* staParams - Peer Station Parameters
|
||||
* Return QDF_STATUS_SUCCES
|
||||
*/
|
||||
QDF_STATUS sme_change_tdls_peer_sta(tHalHandle hHal, uint8_t sessionId,
|
||||
const tSirMacAddr peerMac,
|
||||
tCsrStaParams *pstaParams)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
|
||||
|
||||
if (NULL == pstaParams) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s :pstaParams is NULL", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
MTRACE(qdf_trace(QDF_MODULE_ID_SME,
|
||||
TRACE_CODE_SME_RX_HDD_TDLS_CHANGE_PEER_STA,
|
||||
sessionId, pstaParams->capability));
|
||||
status = sme_acquire_global_lock(&pMac->sme);
|
||||
if (QDF_IS_STATUS_SUCCESS(status)) {
|
||||
status = csr_tdls_change_peer_sta(hHal, sessionId, peerMac,
|
||||
pstaParams);
|
||||
|
||||
sme_release_global_lock(&pMac->sme);
|
||||
}
|
||||
|
||||
return status;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* sme_add_tdls_peer_sta() -
|
||||
* API to Add TDLS peer sta entry.
|
||||
*
|
||||
* peerMac - peer's Mac Adress.
|
||||
* Return QDF_STATUS_SUCCES
|
||||
*/
|
||||
QDF_STATUS sme_add_tdls_peer_sta(tHalHandle hHal, uint8_t sessionId,
|
||||
const tSirMacAddr peerMac)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
|
||||
|
||||
MTRACE(qdf_trace(QDF_MODULE_ID_SME,
|
||||
TRACE_CODE_SME_RX_HDD_TDLS_ADD_PEER_STA,
|
||||
sessionId, 0));
|
||||
status = sme_acquire_global_lock(&pMac->sme);
|
||||
if (QDF_IS_STATUS_SUCCESS(status)) {
|
||||
status = csr_tdls_add_peer_sta(hHal, sessionId, peerMac);
|
||||
|
||||
sme_release_global_lock(&pMac->sme);
|
||||
}
|
||||
|
||||
return status;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* sme_delete_tdls_peer_sta() -
|
||||
* API to Delete TDLS peer sta entry.
|
||||
*
|
||||
* peerMac - peer's Mac Adress.
|
||||
* Return QDF_STATUS_SUCCES
|
||||
*/
|
||||
QDF_STATUS sme_delete_tdls_peer_sta(tHalHandle hHal, uint8_t sessionId,
|
||||
const tSirMacAddr peerMac)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
|
||||
|
||||
MTRACE(qdf_trace(QDF_MODULE_ID_SME,
|
||||
TRACE_CODE_SME_RX_HDD_TDLS_DEL_PEER_STA,
|
||||
sessionId, 0));
|
||||
status = sme_acquire_global_lock(&pMac->sme);
|
||||
if (QDF_IS_STATUS_SUCCESS(status)) {
|
||||
status = csr_tdls_del_peer_sta(hHal, sessionId, peerMac);
|
||||
|
||||
sme_release_global_lock(&pMac->sme);
|
||||
}
|
||||
|
||||
return status;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* sme_set_tdls_power_save_prohibited() -
|
||||
* API to set/reset the is_tdls_power_save_prohibited.
|
||||
*
|
||||
* Return void
|
||||
*/
|
||||
\- return void
|
||||
-------------------------------------------------------------------------*/
|
||||
void sme_set_tdls_power_save_prohibited(tHalHandle hHal, uint32_t sessionId,
|
||||
bool val)
|
||||
{
|
||||
@@ -16152,46 +15975,6 @@ QDF_STATUS sme_fast_reassoc(tHalHandle hal, tCsrRoamProfile *profile,
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* sme_delete_all_tdls_peers(): send request to delete tdls peers
|
||||
* @hal: handler for HAL
|
||||
* @session_id: session id
|
||||
*
|
||||
* This function sends request to lim to delete tdls peers
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS sme_delete_all_tdls_peers(tHalHandle hal, uint8_t session_id)
|
||||
{
|
||||
struct sir_del_all_tdls_peers *msg;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
tpAniSirGlobal p_mac = PMAC_STRUCT(hal);
|
||||
struct csr_roam_session *session = CSR_GET_SESSION(p_mac, session_id);
|
||||
|
||||
msg = qdf_mem_malloc(sizeof(*msg));
|
||||
if (NULL == msg) {
|
||||
sme_err("memory alloc failed");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
qdf_mem_zero(msg, sizeof(*msg));
|
||||
|
||||
msg->msg_type = eWNI_SME_DEL_ALL_TDLS_PEERS;
|
||||
msg->msg_len = (uint16_t) sizeof(*msg);
|
||||
|
||||
qdf_mem_copy(msg->bssid.bytes, session->connectedProfile.bssid.bytes,
|
||||
sizeof(struct qdf_mac_addr));
|
||||
|
||||
status = umac_send_mb_message_to_mac(msg);
|
||||
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
sme_err("cds_send_mb_message_to_mac Failed");
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/* ARP DEBUG STATS */
|
||||
|
||||
/**
|
||||
|
@@ -58,6 +58,7 @@
|
||||
#include <wlan_logging_sock_svc.h>
|
||||
#include "wlan_objmgr_psoc_obj.h"
|
||||
#include <wlan_scan_ucfg_api.h>
|
||||
#include <wlan_tdls_tgt_api.h>
|
||||
|
||||
#define MAX_PWR_FCC_CHAN_12 8
|
||||
#define MAX_PWR_FCC_CHAN_13 2
|
||||
@@ -20531,9 +20532,8 @@ static QDF_STATUS csr_process_roam_sync_callback(tpAniSirGlobal mac_ctx,
|
||||
csr_scan_save_roam_offload_ap_to_scan_cache(mac_ctx, roam_synch_data,
|
||||
bss_desc);
|
||||
roam_info->sessionId = session_id;
|
||||
csr_roam_call_callback(mac_ctx, roam_synch_data->roamedVdevId,
|
||||
roam_info, 0, eCSR_ROAM_TDLS_STATUS_UPDATE,
|
||||
eCSR_ROAM_RESULT_DELETE_ALL_TDLS_PEER_IND);
|
||||
tgt_tdls_peers_deleted_notification(mac_ctx->psoc, session_id);
|
||||
|
||||
qdf_mem_copy(&roam_info->bssid.bytes, &bss_desc->bssId,
|
||||
sizeof(struct qdf_mac_addr));
|
||||
csr_roam_save_connected_infomation(mac_ctx, session_id,
|
||||
|
@@ -42,627 +42,6 @@
|
||||
#include "host_diag_core_event.h"
|
||||
#include "csr_internal.h"
|
||||
|
||||
/*
|
||||
* common routine to remove TDLS cmd from SME command list..
|
||||
* commands are removed after getting reponse from PE.
|
||||
*/
|
||||
static QDF_STATUS csr_tdls_remove_sme_cmd(tpAniSirGlobal pMac,
|
||||
eSmeCommandType cmdType, uint8_t session_id)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
tListElem *pEntry;
|
||||
tSmeCmd *pCommand;
|
||||
|
||||
pEntry = csr_nonscan_active_ll_peek_head(pMac, LL_ACCESS_LOCK);
|
||||
if (pEntry) {
|
||||
pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link);
|
||||
if (cmdType == pCommand->command) {
|
||||
if (csr_nonscan_active_ll_remove_entry(pMac,
|
||||
pEntry, LL_ACCESS_LOCK)) {
|
||||
qdf_mem_zero(&pCommand->u.tdlsCmd,
|
||||
sizeof(tTdlsCmd));
|
||||
csr_release_command(pMac, pCommand);
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* csr_tdls_send_mgmt_req() - to send a TDLS frame to PE through SME
|
||||
* @hHal: HAL context
|
||||
* @sessionId: SME session id
|
||||
* @tdlsSendMgmt: tdls mgmt pointer
|
||||
*
|
||||
* TDLS request API, called from HDD to send a TDLS frame in SME/CSR and
|
||||
* send message to PE to trigger TDLS discovery procedure.
|
||||
*/
|
||||
QDF_STATUS csr_tdls_send_mgmt_req(tHalHandle hHal, uint8_t sessionId,
|
||||
tCsrTdlsSendMgmt *tdlsSendMgmt)
|
||||
{
|
||||
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
|
||||
tSmeCmd *tdlsSendMgmtCmd;
|
||||
tTdlsSendMgmtCmdInfo *tdlsSendMgmtCmdInfo;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
|
||||
/* If connected and in Infra. Only then allow this */
|
||||
if (!CSR_IS_SESSION_VALID(pMac, sessionId) ||
|
||||
!csr_is_conn_state_connected_infra(pMac, sessionId) ||
|
||||
(NULL == tdlsSendMgmt))
|
||||
return status;
|
||||
tdlsSendMgmtCmd = csr_get_command_buffer(pMac);
|
||||
if (!tdlsSendMgmtCmd)
|
||||
return status;
|
||||
tdlsSendMgmtCmdInfo = &tdlsSendMgmtCmd->u.tdlsCmd.u.tdlsSendMgmtCmdInfo;
|
||||
tdlsSendMgmtCmd->sessionId = sessionId;
|
||||
tdlsSendMgmtCmdInfo->frameType = tdlsSendMgmt->frameType;
|
||||
tdlsSendMgmtCmdInfo->dialog = tdlsSendMgmt->dialog;
|
||||
tdlsSendMgmtCmdInfo->statusCode = tdlsSendMgmt->statusCode;
|
||||
tdlsSendMgmtCmdInfo->responder = tdlsSendMgmt->responder;
|
||||
tdlsSendMgmtCmdInfo->peerCapability = tdlsSendMgmt->peerCapability;
|
||||
qdf_mem_copy(tdlsSendMgmtCmdInfo->peerMac, tdlsSendMgmt->peerMac,
|
||||
sizeof(tSirMacAddr));
|
||||
|
||||
if ((0 != tdlsSendMgmt->len) && (NULL != tdlsSendMgmt->buf)) {
|
||||
tdlsSendMgmtCmdInfo->buf = qdf_mem_malloc(tdlsSendMgmt->len);
|
||||
if (NULL == tdlsSendMgmtCmdInfo->buf) {
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
sme_err("Alloc Failed");
|
||||
return status;
|
||||
}
|
||||
qdf_mem_copy(tdlsSendMgmtCmdInfo->buf, tdlsSendMgmt->buf,
|
||||
tdlsSendMgmt->len);
|
||||
tdlsSendMgmtCmdInfo->len = tdlsSendMgmt->len;
|
||||
} else {
|
||||
tdlsSendMgmtCmdInfo->buf = NULL;
|
||||
tdlsSendMgmtCmdInfo->len = 0;
|
||||
}
|
||||
|
||||
tdlsSendMgmtCmd->command = eSmeCommandTdlsSendMgmt;
|
||||
tdlsSendMgmtCmd->u.tdlsCmd.size = sizeof(tTdlsSendMgmtCmdInfo);
|
||||
csr_queue_sme_command(pMac, tdlsSendMgmtCmd, false);
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/*
|
||||
* TDLS request API, called from HDD to add a TDLS peer
|
||||
*/
|
||||
QDF_STATUS csr_tdls_change_peer_sta(tHalHandle hHal, uint8_t sessionId,
|
||||
const tSirMacAddr peerMac,
|
||||
tCsrStaParams *pstaParams)
|
||||
{
|
||||
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
|
||||
tSmeCmd *tdlsAddStaCmd;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
|
||||
/* If connected and in Infra. Only then allow this */
|
||||
if (CSR_IS_SESSION_VALID(pMac, sessionId) &&
|
||||
csr_is_conn_state_connected_infra(pMac, sessionId) &&
|
||||
(NULL != peerMac) && (NULL != pstaParams)) {
|
||||
|
||||
tdlsAddStaCmd = csr_get_command_buffer(pMac);
|
||||
|
||||
if (tdlsAddStaCmd) {
|
||||
tTdlsAddStaCmdInfo *tdlsAddStaCmdInfo =
|
||||
&tdlsAddStaCmd->u.tdlsCmd.u.tdlsAddStaCmdInfo;
|
||||
|
||||
tdlsAddStaCmdInfo->tdlsAddOper = TDLS_OPER_UPDATE;
|
||||
|
||||
tdlsAddStaCmd->sessionId = sessionId;
|
||||
|
||||
qdf_mem_copy(tdlsAddStaCmdInfo->peermac.bytes,
|
||||
peerMac, QDF_MAC_ADDR_SIZE);
|
||||
tdlsAddStaCmdInfo->capability = pstaParams->capability;
|
||||
tdlsAddStaCmdInfo->uapsdQueues =
|
||||
pstaParams->uapsd_queues;
|
||||
tdlsAddStaCmdInfo->maxSp = pstaParams->max_sp;
|
||||
qdf_mem_copy(tdlsAddStaCmdInfo->extnCapability,
|
||||
pstaParams->extn_capability,
|
||||
sizeof(pstaParams->extn_capability));
|
||||
|
||||
tdlsAddStaCmdInfo->htcap_present =
|
||||
pstaParams->htcap_present;
|
||||
if (pstaParams->htcap_present)
|
||||
qdf_mem_copy(&tdlsAddStaCmdInfo->HTCap,
|
||||
&pstaParams->HTCap,
|
||||
sizeof(pstaParams->HTCap));
|
||||
else
|
||||
qdf_mem_set(&tdlsAddStaCmdInfo->HTCap,
|
||||
sizeof(pstaParams->HTCap), 0);
|
||||
|
||||
tdlsAddStaCmdInfo->vhtcap_present =
|
||||
pstaParams->vhtcap_present;
|
||||
if (pstaParams->vhtcap_present)
|
||||
qdf_mem_copy(&tdlsAddStaCmdInfo->VHTCap,
|
||||
&pstaParams->VHTCap,
|
||||
sizeof(pstaParams->VHTCap));
|
||||
else
|
||||
qdf_mem_set(&tdlsAddStaCmdInfo->VHTCap,
|
||||
sizeof(pstaParams->VHTCap), 0);
|
||||
|
||||
tdlsAddStaCmdInfo->supportedRatesLen =
|
||||
pstaParams->supported_rates_len;
|
||||
|
||||
if (0 != pstaParams->supported_rates_len)
|
||||
qdf_mem_copy(&tdlsAddStaCmdInfo->supportedRates,
|
||||
pstaParams->supported_rates,
|
||||
pstaParams->supported_rates_len);
|
||||
|
||||
tdlsAddStaCmd->command = eSmeCommandTdlsAddPeer;
|
||||
tdlsAddStaCmd->u.tdlsCmd.size =
|
||||
sizeof(tTdlsAddStaCmdInfo);
|
||||
csr_queue_sme_command(pMac, tdlsAddStaCmd, false);
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/*
|
||||
* TDLS request API, called from HDD to Send Link Establishment Parameters
|
||||
*/
|
||||
QDF_STATUS csr_tdls_send_link_establish_params(tHalHandle hHal,
|
||||
uint8_t sessionId,
|
||||
const tSirMacAddr peerMac,
|
||||
tCsrTdlsLinkEstablishParams *
|
||||
tdlsLinkEstablishParams)
|
||||
{
|
||||
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
|
||||
tSmeCmd *tdlsLinkEstablishCmd;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
/* If connected and in Infra. Only then allow this */
|
||||
if (CSR_IS_SESSION_VALID(pMac, sessionId) &&
|
||||
csr_is_conn_state_connected_infra(pMac, sessionId) &&
|
||||
(NULL != peerMac)) {
|
||||
tdlsLinkEstablishCmd = csr_get_command_buffer(pMac);
|
||||
|
||||
if (tdlsLinkEstablishCmd) {
|
||||
tTdlsLinkEstablishCmdInfo *tdlsLinkEstablishCmdInfo =
|
||||
&tdlsLinkEstablishCmd->u.tdlsCmd.u.
|
||||
tdlsLinkEstablishCmdInfo;
|
||||
|
||||
tdlsLinkEstablishCmd->sessionId = sessionId;
|
||||
|
||||
qdf_mem_copy(tdlsLinkEstablishCmdInfo->peermac.bytes,
|
||||
peerMac, QDF_MAC_ADDR_SIZE);
|
||||
tdlsLinkEstablishCmdInfo->isBufSta =
|
||||
tdlsLinkEstablishParams->isBufSta;
|
||||
tdlsLinkEstablishCmdInfo->isResponder =
|
||||
tdlsLinkEstablishParams->isResponder;
|
||||
tdlsLinkEstablishCmdInfo->maxSp =
|
||||
tdlsLinkEstablishParams->maxSp;
|
||||
tdlsLinkEstablishCmdInfo->uapsdQueues =
|
||||
tdlsLinkEstablishParams->uapsdQueues;
|
||||
tdlsLinkEstablishCmdInfo->isOffChannelSupported =
|
||||
tdlsLinkEstablishParams->isOffChannelSupported;
|
||||
qdf_mem_copy(tdlsLinkEstablishCmdInfo->
|
||||
supportedChannels,
|
||||
tdlsLinkEstablishParams->supportedChannels,
|
||||
tdlsLinkEstablishParams->
|
||||
supportedChannelsLen);
|
||||
tdlsLinkEstablishCmdInfo->supportedChannelsLen =
|
||||
tdlsLinkEstablishParams->supportedChannelsLen;
|
||||
qdf_mem_copy(tdlsLinkEstablishCmdInfo->
|
||||
supportedOperClasses,
|
||||
tdlsLinkEstablishParams->
|
||||
supportedOperClasses,
|
||||
tdlsLinkEstablishParams->
|
||||
supportedOperClassesLen);
|
||||
tdlsLinkEstablishCmdInfo->supportedOperClassesLen =
|
||||
tdlsLinkEstablishParams->supportedOperClassesLen;
|
||||
tdlsLinkEstablishCmdInfo->isResponder =
|
||||
tdlsLinkEstablishParams->isResponder;
|
||||
tdlsLinkEstablishCmdInfo->maxSp =
|
||||
tdlsLinkEstablishParams->maxSp;
|
||||
tdlsLinkEstablishCmdInfo->uapsdQueues =
|
||||
tdlsLinkEstablishParams->uapsdQueues;
|
||||
tdlsLinkEstablishCmd->command =
|
||||
eSmeCommandTdlsLinkEstablish;
|
||||
tdlsLinkEstablishCmd->u.tdlsCmd.size =
|
||||
sizeof(tTdlsLinkEstablishCmdInfo);
|
||||
csr_queue_sme_command(pMac, tdlsLinkEstablishCmd,
|
||||
false);
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/*
|
||||
* TDLS request API, called from HDD to add a TDLS peer
|
||||
*/
|
||||
QDF_STATUS csr_tdls_add_peer_sta(tHalHandle hHal, uint8_t sessionId,
|
||||
const tSirMacAddr peerMac)
|
||||
{
|
||||
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
|
||||
tSmeCmd *tdlsAddStaCmd;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
|
||||
/* If connected and in Infra. Only then allow this */
|
||||
if (CSR_IS_SESSION_VALID(pMac, sessionId) &&
|
||||
csr_is_conn_state_connected_infra(pMac, sessionId) &&
|
||||
(NULL != peerMac)) {
|
||||
tdlsAddStaCmd = csr_get_command_buffer(pMac);
|
||||
|
||||
if (tdlsAddStaCmd) {
|
||||
tTdlsAddStaCmdInfo *tdlsAddStaCmdInfo =
|
||||
&tdlsAddStaCmd->u.tdlsCmd.u.tdlsAddStaCmdInfo;
|
||||
|
||||
tdlsAddStaCmd->sessionId = sessionId;
|
||||
tdlsAddStaCmdInfo->tdlsAddOper = TDLS_OPER_ADD;
|
||||
|
||||
qdf_mem_copy(tdlsAddStaCmdInfo->peermac.bytes,
|
||||
peerMac, QDF_MAC_ADDR_SIZE);
|
||||
|
||||
tdlsAddStaCmd->command = eSmeCommandTdlsAddPeer;
|
||||
tdlsAddStaCmd->u.tdlsCmd.size =
|
||||
sizeof(tTdlsAddStaCmdInfo);
|
||||
csr_queue_sme_command(pMac, tdlsAddStaCmd, false);
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/*
|
||||
* TDLS request API, called from HDD to delete a TDLS peer
|
||||
*/
|
||||
QDF_STATUS csr_tdls_del_peer_sta(tHalHandle hHal, uint8_t sessionId,
|
||||
const tSirMacAddr peerMac)
|
||||
{
|
||||
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
|
||||
tSmeCmd *tdlsDelStaCmd;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
|
||||
/* If connected and in Infra. Only then allow this */
|
||||
if (CSR_IS_SESSION_VALID(pMac, sessionId) &&
|
||||
csr_is_conn_state_connected_infra(pMac, sessionId) &&
|
||||
(NULL != peerMac)) {
|
||||
tdlsDelStaCmd = csr_get_command_buffer(pMac);
|
||||
|
||||
if (tdlsDelStaCmd) {
|
||||
tTdlsDelStaCmdInfo *tdlsDelStaCmdInfo =
|
||||
&tdlsDelStaCmd->u.tdlsCmd.u.tdlsDelStaCmdInfo;
|
||||
|
||||
tdlsDelStaCmd->sessionId = sessionId;
|
||||
|
||||
qdf_mem_copy(tdlsDelStaCmdInfo->peermac.bytes,
|
||||
peerMac, QDF_MAC_ADDR_SIZE);
|
||||
|
||||
tdlsDelStaCmd->command = eSmeCommandTdlsDelPeer;
|
||||
tdlsDelStaCmd->u.tdlsCmd.size =
|
||||
sizeof(tTdlsDelStaCmdInfo);
|
||||
csr_queue_sme_command(pMac, tdlsDelStaCmd, false);
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/*
|
||||
* TDLS messages sent to PE .
|
||||
*/
|
||||
static QDF_STATUS tdls_send_message(tpAniSirGlobal pMac, uint16_t msg_type,
|
||||
void *msg_data, uint32_t msg_size)
|
||||
{
|
||||
|
||||
tSirMbMsg *pMsg = (tSirMbMsg *) msg_data;
|
||||
|
||||
pMsg->type = msg_type;
|
||||
pMsg->msgLen = (uint16_t) (msg_size);
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
|
||||
("sending msg = %d"), pMsg->type);
|
||||
if (umac_send_mb_message_to_mac(pMsg) != QDF_STATUS_SUCCESS) {
|
||||
sme_err("Cannot send message");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static QDF_STATUS csr_tdls_process_send_mgmt(tpAniSirGlobal pMac, tSmeCmd *cmd)
|
||||
{
|
||||
tTdlsSendMgmtCmdInfo *tdlsSendMgmtCmdInfo =
|
||||
&cmd->u.tdlsCmd.u.tdlsSendMgmtCmdInfo;
|
||||
tSirTdlsSendMgmtReq *tdlsSendMgmtReq = NULL;
|
||||
struct csr_roam_session *pSession = CSR_GET_SESSION(pMac,
|
||||
cmd->sessionId);
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (NULL == pSession) {
|
||||
sme_err("pSession is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
if (NULL == pSession->pConnectBssDesc) {
|
||||
sme_err("BSS Description is not present");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
tdlsSendMgmtReq =
|
||||
qdf_mem_malloc(sizeof(tSirTdlsSendMgmtReq) +
|
||||
tdlsSendMgmtCmdInfo->len);
|
||||
if (NULL == tdlsSendMgmtReq)
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
else
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
sme_err("alloc failed");
|
||||
return status;
|
||||
}
|
||||
tdlsSendMgmtReq->sessionId = cmd->sessionId;
|
||||
/* Using dialog as transactionId. This can be used to match
|
||||
* response with request
|
||||
*/
|
||||
tdlsSendMgmtReq->transactionId = tdlsSendMgmtCmdInfo->dialog;
|
||||
tdlsSendMgmtReq->reqType = tdlsSendMgmtCmdInfo->frameType;
|
||||
tdlsSendMgmtReq->dialog = tdlsSendMgmtCmdInfo->dialog;
|
||||
tdlsSendMgmtReq->statusCode = tdlsSendMgmtCmdInfo->statusCode;
|
||||
tdlsSendMgmtReq->responder = tdlsSendMgmtCmdInfo->responder;
|
||||
tdlsSendMgmtReq->peerCapability = tdlsSendMgmtCmdInfo->peerCapability;
|
||||
|
||||
qdf_mem_copy(tdlsSendMgmtReq->bssid.bytes,
|
||||
pSession->pConnectBssDesc->bssId, QDF_MAC_ADDR_SIZE);
|
||||
|
||||
qdf_mem_copy(tdlsSendMgmtReq->peer_mac.bytes,
|
||||
tdlsSendMgmtCmdInfo->peerMac, QDF_MAC_ADDR_SIZE);
|
||||
|
||||
if (tdlsSendMgmtCmdInfo->len && tdlsSendMgmtCmdInfo->buf) {
|
||||
qdf_mem_copy(tdlsSendMgmtReq->addIe, tdlsSendMgmtCmdInfo->buf,
|
||||
tdlsSendMgmtCmdInfo->len);
|
||||
|
||||
}
|
||||
/* Send the request to PE. */
|
||||
sme_debug("sending TDLS Mgmt Frame req to PE");
|
||||
status = tdls_send_message(pMac, eWNI_SME_TDLS_SEND_MGMT_REQ,
|
||||
(void *)tdlsSendMgmtReq,
|
||||
sizeof(tSirTdlsSendMgmtReq) +
|
||||
tdlsSendMgmtCmdInfo->len);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
sme_err("Failed to send request to MAC");
|
||||
|
||||
if (tdlsSendMgmtCmdInfo->len && tdlsSendMgmtCmdInfo->buf) {
|
||||
/* Done with the buf. Free it. */
|
||||
qdf_mem_free(tdlsSendMgmtCmdInfo->buf);
|
||||
tdlsSendMgmtCmdInfo->buf = NULL;
|
||||
tdlsSendMgmtCmdInfo->len = 0;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static QDF_STATUS csr_tdls_process_add_sta(tpAniSirGlobal pMac, tSmeCmd *cmd)
|
||||
{
|
||||
tTdlsAddStaCmdInfo *tdlsAddStaCmdInfo =
|
||||
&cmd->u.tdlsCmd.u.tdlsAddStaCmdInfo;
|
||||
tSirTdlsAddStaReq *tdlsAddStaReq = NULL;
|
||||
struct csr_roam_session *pSession = CSR_GET_SESSION(pMac,
|
||||
cmd->sessionId);
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (NULL == pSession) {
|
||||
sme_err("pSession is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (NULL == pSession->pConnectBssDesc) {
|
||||
sme_err("BSS description is not present");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
tdlsAddStaReq = qdf_mem_malloc(sizeof(tSirTdlsAddStaReq));
|
||||
if (NULL == tdlsAddStaReq)
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
else
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
sme_err("alloc failed");
|
||||
return status;
|
||||
}
|
||||
tdlsAddStaReq->sessionId = cmd->sessionId;
|
||||
tdlsAddStaReq->tdlsAddOper = tdlsAddStaCmdInfo->tdlsAddOper;
|
||||
/* Using dialog as transactionId. This can be used to match
|
||||
* response with request
|
||||
*/
|
||||
tdlsAddStaReq->transactionId = 0;
|
||||
|
||||
qdf_mem_copy(tdlsAddStaReq->bssid.bytes,
|
||||
pSession->pConnectBssDesc->bssId, QDF_MAC_ADDR_SIZE);
|
||||
|
||||
qdf_copy_macaddr(&tdlsAddStaReq->peermac,
|
||||
&tdlsAddStaCmdInfo->peermac);
|
||||
|
||||
tdlsAddStaReq->capability = tdlsAddStaCmdInfo->capability;
|
||||
tdlsAddStaReq->uapsd_queues = tdlsAddStaCmdInfo->uapsdQueues;
|
||||
tdlsAddStaReq->max_sp = tdlsAddStaCmdInfo->maxSp;
|
||||
|
||||
qdf_mem_copy(tdlsAddStaReq->extn_capability,
|
||||
tdlsAddStaCmdInfo->extnCapability, SIR_MAC_MAX_EXTN_CAP);
|
||||
tdlsAddStaReq->htcap_present = tdlsAddStaCmdInfo->htcap_present;
|
||||
qdf_mem_copy(&tdlsAddStaReq->htCap,
|
||||
&tdlsAddStaCmdInfo->HTCap,
|
||||
sizeof(tdlsAddStaCmdInfo->HTCap));
|
||||
tdlsAddStaReq->vhtcap_present = tdlsAddStaCmdInfo->vhtcap_present;
|
||||
qdf_mem_copy(&tdlsAddStaReq->vhtCap,
|
||||
&tdlsAddStaCmdInfo->VHTCap,
|
||||
sizeof(tdlsAddStaCmdInfo->VHTCap));
|
||||
tdlsAddStaReq->supported_rates_length =
|
||||
tdlsAddStaCmdInfo->supportedRatesLen;
|
||||
qdf_mem_copy(&tdlsAddStaReq->supported_rates,
|
||||
tdlsAddStaCmdInfo->supportedRates,
|
||||
tdlsAddStaCmdInfo->supportedRatesLen);
|
||||
|
||||
sme_debug("sending TDLS Add Sta req to PE");
|
||||
status = tdls_send_message(pMac, eWNI_SME_TDLS_ADD_STA_REQ,
|
||||
(void *)tdlsAddStaReq,
|
||||
sizeof(tSirTdlsAddStaReq));
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
sme_err("Failed to send request to MAC");
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static QDF_STATUS csr_tdls_process_del_sta(tpAniSirGlobal pMac,
|
||||
tSmeCmd *cmd)
|
||||
{
|
||||
tTdlsDelStaCmdInfo *tdlsDelStaCmdInfo =
|
||||
&cmd->u.tdlsCmd.u.tdlsDelStaCmdInfo;
|
||||
tSirTdlsDelStaReq *tdlsDelStaReq = NULL;
|
||||
struct csr_roam_session *pSession = CSR_GET_SESSION(pMac,
|
||||
cmd->sessionId);
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (NULL == pSession) {
|
||||
sme_err("pSession is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (NULL == pSession->pConnectBssDesc) {
|
||||
sme_err("BSS description is not present");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
tdlsDelStaReq = qdf_mem_malloc(sizeof(tSirTdlsDelStaReq));
|
||||
if (NULL == tdlsDelStaReq)
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
else
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
sme_err("alloc failed");
|
||||
return status;
|
||||
}
|
||||
tdlsDelStaReq->sessionId = cmd->sessionId;
|
||||
/* Using dialog as transactionId. This can be used to match
|
||||
* response with request
|
||||
*/
|
||||
tdlsDelStaReq->transactionId = 0;
|
||||
|
||||
qdf_mem_copy(tdlsDelStaReq->bssid.bytes,
|
||||
pSession->pConnectBssDesc->bssId, QDF_MAC_ADDR_SIZE);
|
||||
|
||||
qdf_copy_macaddr(&tdlsDelStaReq->peermac,
|
||||
&tdlsDelStaCmdInfo->peermac);
|
||||
|
||||
sme_debug("sending TDLS Del Sta " MAC_ADDRESS_STR " req to PE",
|
||||
MAC_ADDR_ARRAY(tdlsDelStaCmdInfo->peermac.bytes));
|
||||
status = tdls_send_message(pMac, eWNI_SME_TDLS_DEL_STA_REQ,
|
||||
(void *)tdlsDelStaReq,
|
||||
sizeof(tSirTdlsDelStaReq));
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
sme_err("Failed to send request to MAC");
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/*
|
||||
* commands received from CSR
|
||||
*/
|
||||
QDF_STATUS csr_tdls_process_cmd(tpAniSirGlobal pMac, tSmeCmd *cmd)
|
||||
{
|
||||
eSmeCommandType cmdType = cmd->command;
|
||||
bool status = true;
|
||||
|
||||
switch (cmdType) {
|
||||
case eSmeCommandTdlsSendMgmt:
|
||||
{
|
||||
status = csr_tdls_process_send_mgmt(pMac, cmd);
|
||||
if (QDF_IS_STATUS_SUCCESS(status))
|
||||
status = false;
|
||||
}
|
||||
break;
|
||||
case eSmeCommandTdlsAddPeer:
|
||||
{
|
||||
status = csr_tdls_process_add_sta(pMac, cmd);
|
||||
if (QDF_IS_STATUS_SUCCESS(status))
|
||||
status = false;
|
||||
}
|
||||
break;
|
||||
case eSmeCommandTdlsDelPeer:
|
||||
{
|
||||
status = csr_tdls_process_del_sta(pMac, cmd);
|
||||
if (QDF_IS_STATUS_SUCCESS(status))
|
||||
status = false;
|
||||
}
|
||||
break;
|
||||
case eSmeCommandTdlsLinkEstablish:
|
||||
{
|
||||
status = csr_tdls_process_link_establish(pMac, cmd);
|
||||
if (QDF_IS_STATUS_SUCCESS(status))
|
||||
status = false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* TODO: Add defualt handling */
|
||||
break;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS csr_tdls_process_link_establish(tpAniSirGlobal pMac, tSmeCmd *cmd)
|
||||
{
|
||||
tTdlsLinkEstablishCmdInfo *tdlsLinkEstablishCmdInfo =
|
||||
&cmd->u.tdlsCmd.u.tdlsLinkEstablishCmdInfo;
|
||||
tSirTdlsLinkEstablishReq *tdlsLinkEstablishReq = NULL;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
struct csr_roam_session *pSession = CSR_GET_SESSION(pMac,
|
||||
cmd->sessionId);
|
||||
|
||||
if (NULL == pSession) {
|
||||
sme_err("pSession is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
tdlsLinkEstablishReq = qdf_mem_malloc(sizeof(tSirTdlsLinkEstablishReq));
|
||||
|
||||
if (tdlsLinkEstablishReq == NULL) {
|
||||
sme_err("alloc failed");
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
tdlsLinkEstablishReq->sessionId = cmd->sessionId;
|
||||
/* Using dialog as transactionId. This can be used to match
|
||||
* response with request
|
||||
*/
|
||||
tdlsLinkEstablishReq->transactionId = 0;
|
||||
qdf_copy_macaddr(&tdlsLinkEstablishReq->peermac,
|
||||
&tdlsLinkEstablishCmdInfo->peermac);
|
||||
qdf_mem_copy(tdlsLinkEstablishReq->bssid.bytes,
|
||||
pSession->pConnectBssDesc->bssId, QDF_MAC_ADDR_SIZE);
|
||||
qdf_mem_copy(tdlsLinkEstablishReq->supportedChannels,
|
||||
tdlsLinkEstablishCmdInfo->supportedChannels,
|
||||
tdlsLinkEstablishCmdInfo->supportedChannelsLen);
|
||||
tdlsLinkEstablishReq->supportedChannelsLen =
|
||||
tdlsLinkEstablishCmdInfo->supportedChannelsLen;
|
||||
qdf_mem_copy(tdlsLinkEstablishReq->supportedOperClasses,
|
||||
tdlsLinkEstablishCmdInfo->supportedOperClasses,
|
||||
tdlsLinkEstablishCmdInfo->supportedOperClassesLen);
|
||||
tdlsLinkEstablishReq->supportedOperClassesLen =
|
||||
tdlsLinkEstablishCmdInfo->supportedOperClassesLen;
|
||||
tdlsLinkEstablishReq->isBufSta = tdlsLinkEstablishCmdInfo->isBufSta;
|
||||
tdlsLinkEstablishReq->isResponder =
|
||||
tdlsLinkEstablishCmdInfo->isResponder;
|
||||
tdlsLinkEstablishReq->uapsdQueues =
|
||||
tdlsLinkEstablishCmdInfo->uapsdQueues;
|
||||
tdlsLinkEstablishReq->maxSp = tdlsLinkEstablishCmdInfo->maxSp;
|
||||
|
||||
sme_debug("sending TDLS Link Establish Request to PE");
|
||||
status = tdls_send_message(pMac, eWNI_SME_TDLS_LINK_ESTABLISH_REQ,
|
||||
(void *)tdlsLinkEstablishReq,
|
||||
sizeof(tSirTdlsLinkEstablishReq));
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
sme_err("Failed to send request to MAC");
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/*
|
||||
* TDLS Message processor, will be called after TDLS message recieved from
|
||||
* PE
|
||||
@@ -671,17 +50,6 @@ QDF_STATUS tdls_msg_processor(tpAniSirGlobal pMac, uint16_t msgType,
|
||||
void *pMsgBuf)
|
||||
{
|
||||
tCsrRoamInfo *roamInfo;
|
||||
eCsrRoamResult roamResult;
|
||||
tSirSmeRsp *sme_rsp = pMsgBuf;
|
||||
tSirTdlsAddStaRsp *addStaRsp = (tSirTdlsAddStaRsp *) pMsgBuf;
|
||||
tSirTdlsDelStaRsp *delStaRsp = (tSirTdlsDelStaRsp *) pMsgBuf;
|
||||
tpSirTdlsDelStaInd pSirTdlsDelStaInd = (tpSirTdlsDelStaInd) pMsgBuf;
|
||||
tpSirTdlsDelAllPeerInd pSirTdlsDelAllPeerInd =
|
||||
(tpSirTdlsDelAllPeerInd) pMsgBuf;
|
||||
tpSirMgmtTxCompletionInd tdls_tx_comp_ind =
|
||||
(tpSirMgmtTxCompletionInd) pMsgBuf;
|
||||
tSirTdlsLinkEstablishReqRsp *linkEstablishReqRsp =
|
||||
(tSirTdlsLinkEstablishReqRsp *) pMsgBuf;
|
||||
tSirTdlsEventnotify *tevent = (tSirTdlsEventnotify *) pMsgBuf;
|
||||
|
||||
roamInfo = qdf_mem_malloc(sizeof(*roamInfo));
|
||||
@@ -690,107 +58,6 @@ QDF_STATUS tdls_msg_processor(tpAniSirGlobal pMac, uint16_t msgType,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
switch (msgType) {
|
||||
case eWNI_SME_TDLS_SEND_MGMT_RSP:
|
||||
{
|
||||
tSirSmeRsp *msg = (tSirSmeRsp *) pMsgBuf;
|
||||
tCsrRoamInfo roam_info = {0};
|
||||
|
||||
/* remove pending eSmeCommandTdlsDiscovery command */
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
|
||||
FL("sme_rsp->sessionId[%d] eSmeCommandTdlsSendMgmt"),
|
||||
sme_rsp->sessionId);
|
||||
csr_tdls_remove_sme_cmd(pMac, eSmeCommandTdlsSendMgmt,
|
||||
sme_rsp->sessionId);
|
||||
|
||||
if (eSIR_SME_SUCCESS != msg->statusCode) {
|
||||
/* Tx failed, so there wont be any ack confirmation*/
|
||||
/* Indicate ack failure to upper layer */
|
||||
roamInfo->reasonCode = 0;
|
||||
csr_roam_call_callback(pMac, msg->sessionId,
|
||||
&roam_info, 0,
|
||||
eCSR_ROAM_RESULT_MGMT_TX_COMPLETE_IND,
|
||||
0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case eWNI_SME_TDLS_ADD_STA_RSP:
|
||||
qdf_copy_macaddr(&roamInfo->peerMac, &addStaRsp->peermac);
|
||||
roamInfo->staId = addStaRsp->staId;
|
||||
roamInfo->ucastSig = addStaRsp->ucastSig;
|
||||
roamInfo->bcastSig = addStaRsp->bcastSig;
|
||||
roamInfo->statusCode = addStaRsp->statusCode;
|
||||
/*
|
||||
* register peer with TL, we have to go through HDD as
|
||||
* this is the only way to register any STA with TL.
|
||||
*/
|
||||
if (addStaRsp->tdlsAddOper == TDLS_OPER_ADD)
|
||||
roamResult = eCSR_ROAM_RESULT_ADD_TDLS_PEER;
|
||||
else /* addStaRsp->tdlsAddOper must be TDLS_OPER_UPDATE */
|
||||
roamResult = eCSR_ROAM_RESULT_UPDATE_TDLS_PEER;
|
||||
csr_roam_call_callback(pMac, addStaRsp->sessionId,
|
||||
roamInfo, 0, eCSR_ROAM_TDLS_STATUS_UPDATE,
|
||||
roamResult);
|
||||
|
||||
/* remove pending eSmeCommandTdlsDiscovery command */
|
||||
csr_tdls_remove_sme_cmd(pMac, eSmeCommandTdlsAddPeer,
|
||||
addStaRsp->sessionId);
|
||||
break;
|
||||
case eWNI_SME_TDLS_DEL_STA_RSP:
|
||||
qdf_copy_macaddr(&roamInfo->peerMac, &delStaRsp->peermac);
|
||||
roamInfo->staId = delStaRsp->staId;
|
||||
roamInfo->statusCode = delStaRsp->statusCode;
|
||||
/*
|
||||
* register peer with TL, we have to go through HDD as
|
||||
* this is the only way to register any STA with TL.
|
||||
*/
|
||||
csr_roam_call_callback(pMac, delStaRsp->sessionId,
|
||||
roamInfo, 0,
|
||||
eCSR_ROAM_TDLS_STATUS_UPDATE,
|
||||
eCSR_ROAM_RESULT_DELETE_TDLS_PEER);
|
||||
|
||||
csr_tdls_remove_sme_cmd(pMac, eSmeCommandTdlsDelPeer,
|
||||
delStaRsp->sessionId);
|
||||
break;
|
||||
case eWNI_SME_TDLS_DEL_STA_IND:
|
||||
qdf_copy_macaddr(&roamInfo->peerMac,
|
||||
&pSirTdlsDelStaInd->peermac);
|
||||
roamInfo->staId = pSirTdlsDelStaInd->staId;
|
||||
roamInfo->reasonCode = pSirTdlsDelStaInd->reasonCode;
|
||||
|
||||
/* Sending the TEARDOWN indication to HDD. */
|
||||
csr_roam_call_callback(pMac,
|
||||
pSirTdlsDelStaInd->sessionId, roamInfo,
|
||||
0, eCSR_ROAM_TDLS_STATUS_UPDATE,
|
||||
eCSR_ROAM_RESULT_TEARDOWN_TDLS_PEER_IND);
|
||||
break;
|
||||
case eWNI_SME_TDLS_DEL_ALL_PEER_IND:
|
||||
/* Sending the TEARDOWN indication to HDD. */
|
||||
csr_roam_call_callback(pMac,
|
||||
pSirTdlsDelAllPeerInd->sessionId,
|
||||
roamInfo, 0,
|
||||
eCSR_ROAM_TDLS_STATUS_UPDATE,
|
||||
eCSR_ROAM_RESULT_DELETE_ALL_TDLS_PEER_IND);
|
||||
break;
|
||||
case eWNI_SME_MGMT_FRM_TX_COMPLETION_IND:
|
||||
roamInfo->reasonCode =
|
||||
tdls_tx_comp_ind->txCompleteStatus;
|
||||
|
||||
csr_roam_call_callback(pMac,
|
||||
tdls_tx_comp_ind->sessionId,
|
||||
roamInfo, 0,
|
||||
eCSR_ROAM_RESULT_MGMT_TX_COMPLETE_IND,
|
||||
0);
|
||||
break;
|
||||
case eWNI_SME_TDLS_LINK_ESTABLISH_RSP:
|
||||
csr_roam_call_callback(pMac,
|
||||
linkEstablishReqRsp->sessionId,
|
||||
roamInfo, 0,
|
||||
eCSR_ROAM_TDLS_STATUS_UPDATE,
|
||||
eCSR_ROAM_RESULT_LINK_ESTABLISH_REQ_RSP);
|
||||
/* remove pending eSmeCommandTdlsLinkEstablish command */
|
||||
csr_tdls_remove_sme_cmd(pMac, eSmeCommandTdlsLinkEstablish,
|
||||
linkEstablishReqRsp->sessionId);
|
||||
break;
|
||||
case eWNI_SME_TDLS_SHOULD_DISCOVER:
|
||||
qdf_copy_macaddr(&roamInfo->peerMac, &tevent->peermac);
|
||||
roamInfo->reasonCode = tevent->peer_reason;
|
||||
|
@@ -2695,13 +2695,6 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc,
|
||||
wma_handle->ptrn_match_enable_all_vdev =
|
||||
(cds_cfg->wow_enable & 0x02) ? true : false;
|
||||
|
||||
#if defined(FEATURE_WLAN_TDLS) && !defined(CONVERGED_TDLS_ENABLE)
|
||||
wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
||||
WMI_TDLS_PEER_EVENTID,
|
||||
wma_tdls_event_handler,
|
||||
WMA_RX_SERIALIZER_CTX);
|
||||
#endif /* FEATURE_WLAN_TDLS */
|
||||
|
||||
/* register for install key completion event */
|
||||
wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
||||
WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
|
||||
|
Ссылка в новой задаче
Block a user