qcacld-3.0: Fill the pmf info for TDLS peer
Fill the pfm info of the TDLS peer before sending the peer assoc command to FW. Change-Id: I4e336c345c0fb8f063157b3e3a780efa777f1a74 CRs-Fixed: 2535832
This commit is contained in:
@@ -307,6 +307,7 @@ static QDF_STATUS tdls_pe_update_peer(struct tdls_update_peer_request *req)
|
|||||||
&update_peer->vht_cap,
|
&update_peer->vht_cap,
|
||||||
sizeof(update_peer->vht_cap));
|
sizeof(update_peer->vht_cap));
|
||||||
addstareq->supported_rates_length = update_peer->supported_rates_len;
|
addstareq->supported_rates_length = update_peer->supported_rates_len;
|
||||||
|
addstareq->is_pmf = update_peer->is_pmf;
|
||||||
qdf_mem_copy(&addstareq->supported_rates,
|
qdf_mem_copy(&addstareq->supported_rates,
|
||||||
update_peer->supported_rates,
|
update_peer->supported_rates,
|
||||||
update_peer->supported_rates_len);
|
update_peer->supported_rates_len);
|
||||||
|
@@ -769,6 +769,7 @@ struct tdls_update_peer_params {
|
|||||||
uint8_t supported_oper_classes_len;
|
uint8_t supported_oper_classes_len;
|
||||||
uint8_t supported_oper_classes[WLAN_MAX_SUPP_OPER_CLASSES];
|
uint8_t supported_oper_classes[WLAN_MAX_SUPP_OPER_CLASSES];
|
||||||
bool is_qos_wmm_sta;
|
bool is_qos_wmm_sta;
|
||||||
|
bool is_pmf;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct tdls_update_peer_request {
|
struct tdls_update_peer_request {
|
||||||
@@ -1302,6 +1303,7 @@ struct tdls_add_sta_req {
|
|||||||
struct vhtcap vht_cap;
|
struct vhtcap vht_cap;
|
||||||
uint8_t uapsd_queues;
|
uint8_t uapsd_queues;
|
||||||
uint8_t max_sp;
|
uint8_t max_sp;
|
||||||
|
bool is_pmf;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -636,9 +636,7 @@ static bool is_mgmt_protected(uint32_t vdev_id,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LIM_IS_AP_ROLE(session)) {
|
sta_ds = dph_lookup_hash_entry(mac_ctx, (uint8_t *)peer_mac_addr, &aid,
|
||||||
sta_ds = dph_lookup_hash_entry(mac_ctx,
|
|
||||||
(uint8_t *)peer_mac_addr, &aid,
|
|
||||||
&session->dph.dphHashTable);
|
&session->dph.dphHashTable);
|
||||||
if (sta_ds) {
|
if (sta_ds) {
|
||||||
/* rmfenabled will be set at the time of addbss.
|
/* rmfenabled will be set at the time of addbss.
|
||||||
@@ -651,10 +649,6 @@ static bool is_mgmt_protected(uint32_t vdev_id,
|
|||||||
if (sta_ds->rmfEnabled && sta_ds->is_key_installed)
|
if (sta_ds->rmfEnabled && sta_ds->is_key_installed)
|
||||||
protected = true;
|
protected = true;
|
||||||
}
|
}
|
||||||
} else if (session->limRmfEnabled &&
|
|
||||||
session->is_key_installed) {
|
|
||||||
protected = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return protected;
|
return protected;
|
||||||
}
|
}
|
||||||
|
@@ -1591,21 +1591,17 @@ lim_drop_unprotected_action_frame(struct mac_context *mac, struct pe_session *pe
|
|||||||
tpDphHashNode sta;
|
tpDphHashNode sta;
|
||||||
bool rmfConnection = false;
|
bool rmfConnection = false;
|
||||||
|
|
||||||
if (LIM_IS_AP_ROLE(pe_session)) {
|
sta = dph_lookup_hash_entry(mac, pHdr->sa, &aid,
|
||||||
sta =
|
|
||||||
dph_lookup_hash_entry(mac, pHdr->sa, &aid,
|
|
||||||
&pe_session->dph.dphHashTable);
|
&pe_session->dph.dphHashTable);
|
||||||
if (sta)
|
if (sta && sta->rmfEnabled)
|
||||||
if (sta->rmfEnabled)
|
|
||||||
rmfConnection = true;
|
|
||||||
} else if (pe_session->limRmfEnabled)
|
|
||||||
rmfConnection = true;
|
rmfConnection = true;
|
||||||
|
|
||||||
if (rmfConnection && (pHdr->fc.wep == 0)) {
|
if (rmfConnection && (pHdr->fc.wep == 0)) {
|
||||||
pe_err("Dropping unprotected Action category: %d frame since RMF is enabled",
|
pe_err("Dropping unprotected Action category: %d frame since RMF is enabled",
|
||||||
category);
|
category);
|
||||||
return true;
|
return true;
|
||||||
} else
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1171,14 +1171,12 @@ void lim_process_mlm_set_keys_cnf(struct mac_context *mac, uint32_t *msg_buf)
|
|||||||
if (eSIR_SME_SUCCESS == pMlmSetKeysCnf->resultCode) {
|
if (eSIR_SME_SUCCESS == pMlmSetKeysCnf->resultCode) {
|
||||||
if (pMlmSetKeysCnf->key_len_nonzero)
|
if (pMlmSetKeysCnf->key_len_nonzero)
|
||||||
pe_session->is_key_installed = 1;
|
pe_session->is_key_installed = 1;
|
||||||
if (LIM_IS_AP_ROLE(pe_session)) {
|
|
||||||
sta_ds = dph_lookup_hash_entry(mac,
|
sta_ds = dph_lookup_hash_entry(mac,
|
||||||
pMlmSetKeysCnf->peer_macaddr.bytes,
|
pMlmSetKeysCnf->peer_macaddr.bytes,
|
||||||
&aid, &pe_session->dph.dphHashTable);
|
&aid, &pe_session->dph.dphHashTable);
|
||||||
if (sta_ds && pMlmSetKeysCnf->key_len_nonzero)
|
if (sta_ds && pMlmSetKeysCnf->key_len_nonzero)
|
||||||
sta_ds->is_key_installed = 1;
|
sta_ds->is_key_installed = 1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
pe_debug("is_key_installed = %d", pe_session->is_key_installed);
|
pe_debug("is_key_installed = %d", pe_session->is_key_installed);
|
||||||
|
|
||||||
lim_send_sme_set_context_rsp(mac,
|
lim_send_sme_set_context_rsp(mac,
|
||||||
|
@@ -2431,6 +2431,7 @@ static void lim_tdls_update_hash_node_info(struct mac_context *mac,
|
|||||||
} else if (add_sta_req->tdls_oper == TDLS_OPER_UPDATE) {
|
} else if (add_sta_req->tdls_oper == TDLS_OPER_UPDATE) {
|
||||||
lim_tdls_populate_dot11f_ht_caps(mac, NULL,
|
lim_tdls_populate_dot11f_ht_caps(mac, NULL,
|
||||||
add_sta_req, &htCap);
|
add_sta_req, &htCap);
|
||||||
|
sta->rmfEnabled = add_sta_req->is_pmf;
|
||||||
}
|
}
|
||||||
htCaps = &htCap;
|
htCaps = &htCap;
|
||||||
if (htCaps->present) {
|
if (htCaps->present) {
|
||||||
|
@@ -5293,8 +5293,6 @@ lim_set_protected_bit(struct mac_context *mac,
|
|||||||
uint16_t aid;
|
uint16_t aid;
|
||||||
tpDphHashNode sta;
|
tpDphHashNode sta;
|
||||||
|
|
||||||
if (LIM_IS_AP_ROLE(pe_session)) {
|
|
||||||
|
|
||||||
sta = dph_lookup_hash_entry(mac, peer, &aid,
|
sta = dph_lookup_hash_entry(mac, peer, &aid,
|
||||||
&pe_session->dph.dphHashTable);
|
&pe_session->dph.dphHashTable);
|
||||||
if (sta) {
|
if (sta) {
|
||||||
@@ -5308,10 +5306,6 @@ lim_set_protected_bit(struct mac_context *mac,
|
|||||||
if (sta->rmfEnabled && sta->is_key_installed)
|
if (sta->rmfEnabled && sta->is_key_installed)
|
||||||
pMacHdr->fc.wep = 1;
|
pMacHdr->fc.wep = 1;
|
||||||
}
|
}
|
||||||
} else if (pe_session->limRmfEnabled &&
|
|
||||||
pe_session->is_key_installed) {
|
|
||||||
pMacHdr->fc.wep = 1;
|
|
||||||
}
|
|
||||||
} /*** end lim_set_protected_bit() ***/
|
} /*** end lim_set_protected_bit() ***/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -4242,6 +4242,8 @@ static void wma_add_tdls_sta(tp_wma_handle wma, tpAddStaParams add_sta)
|
|||||||
|
|
||||||
WMA_LOGD("%s: changeSta, calling wma_send_peer_assoc",
|
WMA_LOGD("%s: changeSta, calling wma_send_peer_assoc",
|
||||||
__func__);
|
__func__);
|
||||||
|
if (add_sta->rmfEnabled)
|
||||||
|
wma_set_peer_pmf_status(wma, add_sta->staMac, true);
|
||||||
|
|
||||||
ret =
|
ret =
|
||||||
wma_send_peer_assoc(wma, add_sta->nwType, add_sta);
|
wma_send_peer_assoc(wma, add_sta->nwType, add_sta);
|
||||||
@@ -4445,6 +4447,7 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
|
|||||||
params->supportedRates.supportedMCSSet,
|
params->supportedRates.supportedMCSSet,
|
||||||
SIR_MAC_MAX_SUPPORTED_MCS_SET);
|
SIR_MAC_MAX_SUPPORTED_MCS_SET);
|
||||||
|
|
||||||
|
|
||||||
ret = wma_send_peer_assoc(wma,
|
ret = wma_send_peer_assoc(wma,
|
||||||
iface->nwType,
|
iface->nwType,
|
||||||
(tAddStaParams *) iface->addBssStaContext);
|
(tAddStaParams *) iface->addBssStaContext);
|
||||||
@@ -4455,8 +4458,10 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params->rmfEnabled)
|
if (params->rmfEnabled) {
|
||||||
wma_set_mgmt_frame_protection(wma);
|
wma_set_mgmt_frame_protection(wma);
|
||||||
|
wma_set_peer_pmf_status(wma, params->bssId, true);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the PTK in 11r mode because we already have it.
|
* Set the PTK in 11r mode because we already have it.
|
||||||
|
@@ -418,6 +418,10 @@ wlan_cfg80211_tdls_extract_params(struct tdls_update_peer_params *req_info,
|
|||||||
if (params->ht_capa || params->vht_capa ||
|
if (params->ht_capa || params->vht_capa ||
|
||||||
(params->sta_flags_set & BIT(NL80211_STA_FLAG_WME)))
|
(params->sta_flags_set & BIT(NL80211_STA_FLAG_WME)))
|
||||||
req_info->is_qos_wmm_sta = true;
|
req_info->is_qos_wmm_sta = true;
|
||||||
|
if (params->sta_flags_set & BIT(NL80211_STA_FLAG_MFP)) {
|
||||||
|
osif_debug("TDLS peer pmf capable");
|
||||||
|
req_info->is_pmf = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int wlan_cfg80211_tdls_update_peer(struct wlan_objmgr_vdev *vdev,
|
int wlan_cfg80211_tdls_update_peer(struct wlan_objmgr_vdev *vdev,
|
||||||
|
Reference in New Issue
Block a user