diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index a2b14380b4..9542d87c17 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -913,6 +913,7 @@ enum dhcp_nego_status { * @vht_caps: VHT capabilities of current station * @reason_code: Disconnection reason code for current station * @rssi: RSSI of the current station reported from F/W + * @capability: Capability information of current station */ struct hdd_station_info { bool in_use; @@ -956,6 +957,7 @@ struct hdd_station_info { int8_t rssi; enum dhcp_phase dhcp_phase; enum dhcp_nego_status dhcp_nego_status; + uint16_t capability; }; /** diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index fd0da1733b..58604db138 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -1413,6 +1413,8 @@ static void hdd_fill_station_info(struct hdd_adapter *adapter, return; } + qdf_mem_copy(&stainfo->capability, &event->capability_info, + sizeof(uint16_t)); stainfo->freq = cds_chan_to_freq(event->chan_info.chan_id); stainfo->sta_type = event->staType; stainfo->dot11_mode = diff --git a/core/hdd/src/wlan_hdd_station_info.c b/core/hdd/src/wlan_hdd_station_info.c index 7b39cc2c7c..740c7a9077 100644 --- a/core/hdd/src/wlan_hdd_station_info.c +++ b/core/hdd/src/wlan_hdd_station_info.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -675,6 +675,11 @@ static uint32_t hdd_add_tx_bitrate_sap_get_len(void) return ((NLA_HDRLEN) + (sizeof(uint8_t) + NLA_HDRLEN)); } +static uint32_t hdd_add_sta_capability_get_len(void) +{ + return nla_total_size(sizeof(uint16_t)); +} + /** * hdd_add_tx_bitrate_sap - add vhs nss info attribute * @skb: pointer to response skb buffer @@ -717,7 +722,8 @@ fail: static uint32_t hdd_add_sta_info_sap_get_len(void) { return ((NLA_HDRLEN) + (sizeof(uint8_t) + NLA_HDRLEN) + - hdd_add_tx_bitrate_sap_get_len()); + hdd_add_tx_bitrate_sap_get_len() + + hdd_add_sta_capability_get_len()); } /** @@ -797,7 +803,11 @@ static int hdd_add_link_standard_info_sap(struct sk_buff *skb, int8_t rssi, hdd_err("Reason code put fail"); goto fail; } - + if (nla_put_u16(skb, NL80211_ATTR_STA_CAPABILITY, + stainfo->capability)) { + hdd_err("put fail"); + goto fail; + } nla_nest_end(skb, nla_attr); return 0; fail: diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index b910203056..62c9eaf0a4 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -1128,6 +1128,7 @@ typedef struct sSirSmeAssocInd { uint8_t ecsa_capable; tDot11fIEHTCaps HTCaps; tDot11fIEVHTCaps VHTCaps; + tSirMacCapabilityInfo capability_info; } tSirSmeAssocInd, *tpSirSmeAssocInd; /* / Definition for Association confirm */ diff --git a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c index 359f9d9792..8a76beaa96 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c +++ b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c @@ -756,6 +756,7 @@ lim_fill_assoc_ind_params(struct mac_context *mac_ctx, sme_assoc_ind->HTCaps = assoc_ind->ht_caps; if (assoc_ind->vht_caps.present) sme_assoc_ind->VHTCaps = assoc_ind->vht_caps; + sme_assoc_ind->capability_info = assoc_ind->capabilityInfo; } /** diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h index 3f04f0c813..eee84fe2f2 100644 --- a/core/sap/inc/sap_api.h +++ b/core/sap/inc/sap_api.h @@ -280,6 +280,7 @@ typedef struct sap_StationAssocReassocCompleteEvent_s { uint8_t ecsa_capable; tDot11fIEHTCaps ht_caps; tDot11fIEVHTCaps vht_caps; + tSirMacCapabilityInfo capability_info; } tSap_StationAssocReassocCompleteEvent; typedef struct sap_StationDisassocCompleteEvent_s { diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index 575ccbb872..22963794f9 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -1562,6 +1562,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->capability_info = + csr_roaminfo->capability_info; break; diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index 9079f20bb8..8a14c876bc 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -1173,6 +1173,7 @@ struct csr_roam_info { int rssi; int tx_rate; int rx_rate; + tSirMacCapabilityInfo capability_info; #ifdef WLAN_FEATURE_SAE struct sir_sae_info *sae_info; #endif @@ -1211,6 +1212,7 @@ typedef struct sSirSmeAssocIndToUpperLayerCnf { tDot11fIEHTCaps ht_caps; tDot11fIEVHTCaps vht_caps; + tSirMacCapabilityInfo capability_info; } tSirSmeAssocIndToUpperLayerCnf, *tpSirSmeAssocIndToUpperLayerCnf; typedef struct tagCsrSummaryStatsInfo { diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 71d13238a1..144cfdb233 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -9638,6 +9638,9 @@ void csr_roam_joined_state_msg_processor(struct mac_context *mac, void *pMsgBuf) roam_info->ht_caps = pUpperLayerAssocCnf->ht_caps; if (pUpperLayerAssocCnf->vht_caps.present) roam_info->vht_caps = pUpperLayerAssocCnf->vht_caps; + roam_info->capability_info = + pUpperLayerAssocCnf->capability_info; + if (CSR_IS_INFRA_AP(roam_info->u.pConnectedProfile)) { mac->roam.roamSession[sessionId].connectState = eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED; @@ -10584,6 +10587,7 @@ csr_roam_chk_lnk_assoc_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr) qdf_mem_copy(&roam_info_ptr->vht_caps, &pAssocInd->VHTCaps, sizeof(tDot11fIEVHTCaps)); + roam_info_ptr->capability_info = pAssocInd->capability_info; if (CSR_IS_INFRA_AP(roam_info_ptr->u.pConnectedProfile)) { if (session->pCurRoamProfile && @@ -15623,6 +15627,7 @@ QDF_STATUS csr_send_assoc_ind_to_upper_layer_cnf_msg(struct mac_context *mac, pMsg->ht_caps = pAssocInd->HTCaps; if (pAssocInd->VHTCaps.present) pMsg->vht_caps = pAssocInd->VHTCaps; + pMsg->capability_info = pAssocInd->capability_info; msgQ.type = eWNI_SME_UPPER_LAYER_ASSOC_CNF; msgQ.bodyptr = pMsg;