qcacld-3.0: Cache supported mode of connected STA for SAP

Currently in case of SAP, supported mode of station received
in assoc request is not getting cached.

Add support to cache the supported mode of station received
in assoc request request in sta_info.

Change-Id: I9820ae2d65fc529a1ab16424f6732fd273da3ae0
CRs-fixed: 2419957
This commit is contained in:
Ashish Kumar Dhanotiya 2019-03-20 18:48:49 +05:30 • committed by nshrivas
commit 6025c701f7
11 changed files with 36 additions and 3 deletions

View file

@ -891,6 +891,8 @@ enum dhcp_nego_status {
* @reason_code: Disconnection reason code for current station
* @rssi: RSSI of the current station reported from F/W
* @capability: Capability information of current station
* @support_mode: Max supported mode of a station currently
* connected to sap
*/
struct hdd_station_info {
bool in_use;
@ -935,6 +937,7 @@ struct hdd_station_info {
enum dhcp_phase dhcp_phase;
enum dhcp_nego_status dhcp_nego_status;
uint16_t capability;
uint8_t support_mode;
};
/**

View file

@ -93,6 +93,13 @@
#define ACS_SCAN_EXPIRY_TIMEOUT_S 4
/* Defines the BIT position of HT caps is support mode field of stainfo */
#define HDD_HT_CAPS_PRESENT 0
/* Defines the BIT position of VHT caps is support mode field of stainfo */
#define HDD_VHT_CAPS_PRESENT 1
/* Defines the BIT position of HE caps is support mode field of stainfo */
#define HDD_HE_CAPS_PRESENT 2
/*
* 11B, 11G Rate table include Basic rate and Extended rate
* The IDX field is the rate index
@ -1481,11 +1488,17 @@ static void hdd_fill_station_info(struct hdd_adapter *adapter,
if (event->vht_caps.present) {
stainfo->vht_present = true;
hdd_copy_vht_caps(&stainfo->vht_caps, &event->vht_caps);
stainfo->support_mode |=
(stainfo->vht_present << HDD_VHT_CAPS_PRESENT);
}
if (event->ht_caps.present) {
stainfo->ht_present = true;
hdd_copy_ht_caps(&stainfo->ht_caps, &event->ht_caps);
stainfo->support_mode |=
(stainfo->ht_present << HDD_HT_CAPS_PRESENT);
}
stainfo->support_mode |=
(event->he_caps_present << HDD_HE_CAPS_PRESENT);
/* Initialize DHCP info */
stainfo->dhcp_phase = DHCP_PHASE_ACK;

View file

@ -946,7 +946,8 @@ static int hdd_get_cached_station_remote(struct hdd_context *hdd_ctx,
(sizeof(stainfo->dot11_mode) + NLA_HDRLEN) +
(sizeof(stainfo->ch_width) + NLA_HDRLEN) +
(sizeof(stainfo->tx_rate) + NLA_HDRLEN) +
(sizeof(stainfo->rx_rate) + NLA_HDRLEN);
(sizeof(stainfo->rx_rate) + NLA_HDRLEN) +
(sizeof(stainfo->support_mode) + NLA_HDRLEN);
skb = cfg80211_vendor_cmd_alloc_reply_skb(hdd_ctx->wiphy, nl_buf_len);
if (!skb) {
@ -970,8 +971,7 @@ static int hdd_get_cached_station_remote(struct hdd_context *hdd_ctx,
channel_width = hdd_decode_ch_width(stainfo->ch_width);
if (nla_put_u32(skb, REMOTE_SUPPORTED_MODE,
hdd_convert_dot11mode(
stainfo->mode)) ||
stainfo->support_mode) ||
nla_put_u8(skb, REMOTE_CH_WIDTH, channel_width)) {
hdd_err("remote ch put fail");
goto fail;
@ -984,6 +984,10 @@ static int hdd_get_cached_station_remote(struct hdd_context *hdd_ctx,
hdd_err("rx rate put fail");
goto fail;
}
if (nla_put_u32(skb, WLAN802_11_MODE, stainfo->dot11_mode)) {
hdd_err("dot11 mode put fail");
goto fail;
}
qdf_mem_zero(stainfo, sizeof(*stainfo));

View file

@ -1082,6 +1082,7 @@ struct assoc_ind {
uint8_t ecsa_capable;
tDot11fIEHTCaps HTCaps;
tDot11fIEVHTCaps VHTCaps;
bool he_caps_present;
tSirMacCapabilityInfo capability_info;
bool is_sae_authenticated;
const uint8_t *owe_ie;

View file

@ -2735,6 +2735,7 @@ void lim_send_mlm_assoc_ind(struct mac_context *mac_ctx,
sizeof(tDot11fIEVHTCaps));
lim_fill_assoc_ind_vht_info(mac_ctx, session_entry, assoc_req,
assoc_ind, sta_ds);
assoc_ind->he_caps_present = assoc_req->he_cap.present;
assoc_ind->is_sae_authenticated =
assoc_req->is_sae_authenticated;
lim_post_sme_message(mac_ctx, LIM_MLM_ASSOC_IND,

View file

@ -756,6 +756,7 @@ lim_fill_assoc_ind_params(struct mac_context *mac_ctx,
if (assoc_ind->vht_caps.present)
sme_assoc_ind->VHTCaps = assoc_ind->vht_caps;
sme_assoc_ind->capability_info = assoc_ind->capabilityInfo;
sme_assoc_ind->he_caps_present = assoc_ind->he_caps_present;
sme_assoc_ind->is_sae_authenticated = assoc_ind->is_sae_authenticated;
}

View file

@ -230,6 +230,7 @@ typedef struct sLimMlmAssocInd {
tDot11fIEHTCaps ht_caps;
tDot11fIEVHTCaps vht_caps;
bool he_caps_present;
bool is_sae_authenticated;
} tLimMlmAssocInd, *tpLimMlmAssocInd;

View file

@ -284,6 +284,7 @@ typedef struct sap_StationAssocReassocCompleteEvent_s {
tDot11fIEHTCaps ht_caps;
tDot11fIEVHTCaps vht_caps;
tSirMacCapabilityInfo capability_info;
bool he_caps_present;
} tSap_StationAssocReassocCompleteEvent;
typedef struct sap_StationDisassocCompleteEvent_s {

View file

@ -1675,6 +1675,8 @@ QDF_STATUS sap_signal_hdd_event(struct sap_context *sap_ctx,
reassoc_complete->ht_caps = csr_roaminfo->ht_caps;
if (csr_roaminfo->vht_caps.present)
reassoc_complete->vht_caps = csr_roaminfo->vht_caps;
reassoc_complete->he_caps_present =
csr_roaminfo->he_caps_present;
reassoc_complete->capability_info =
csr_roaminfo->capability_info;

View file

@ -1151,6 +1151,7 @@ struct csr_roam_info {
#endif
tDot11fIEHTCaps ht_caps;
tDot11fIEVHTCaps vht_caps;
bool he_caps_present;
tDot11fIEhs20vendor_ie hs20vendor_ie;
tDot11fIEVHTOperation vht_operation;
tDot11fIEHTInfo ht_operation;
@ -1219,6 +1220,7 @@ typedef struct sSirSmeAssocIndToUpperLayerCnf {
tDot11fIEHTCaps ht_caps;
tDot11fIEVHTCaps vht_caps;
tSirMacCapabilityInfo capability_info;
bool he_caps_present;
} tSirSmeAssocIndToUpperLayerCnf, *tpSirSmeAssocIndToUpperLayerCnf;
typedef struct tagCsrSummaryStatsInfo {

View file

@ -9760,6 +9760,8 @@ void csr_roam_joined_state_msg_processor(struct mac_context *mac, void *pMsgBuf)
roam_info->vht_caps = pUpperLayerAssocCnf->vht_caps;
roam_info->capability_info =
pUpperLayerAssocCnf->capability_info;
roam_info->he_caps_present =
pUpperLayerAssocCnf->he_caps_present;
if (CSR_IS_INFRA_AP(roam_info->u.pConnectedProfile)) {
if (pUpperLayerAssocCnf->ies_len > 0) {
@ -10876,6 +10878,7 @@ csr_send_assoc_ind_to_upper_layer_cnf_msg(struct mac_context *mac,
if (ind->VHTCaps.present)
cnf->vht_caps = ind->VHTCaps;
cnf->capability_info = ind->capability_info;
cnf->he_caps_present = ind->he_caps_present;
if (ind->assocReqPtr) {
if (ind->assocReqLength < MAX_ASSOC_REQ_IE_LEN) {
cnf->ies = qdf_mem_malloc(ind->assocReqLength);
@ -10966,6 +10969,7 @@ csr_roam_chk_lnk_assoc_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr)
&pAssocInd->VHTCaps,
sizeof(tDot11fIEVHTCaps));
roam_info->capability_info = pAssocInd->capability_info;
roam_info->he_caps_present = pAssocInd->he_caps_present;
if (CSR_IS_INFRA_AP(roam_info->u.pConnectedProfile)) {
if (session->pCurRoamProfile &&