From 2a22561d0c3f40740de63dafce73d235226fe1be Mon Sep 17 00:00:00 2001 From: Krishna Kumaar Natarajan Date: Thu, 29 Sep 2016 14:20:54 -0700 Subject: [PATCH] qcacmn: [11AX] Add changes for 11ax peer association Add changes for peer association by adding support to include HE capabilities and HE operation information in vdev start and peer assoc WMI commands. Change-Id: I50c0241f872219e08ee2d231c907309ee5adceef CRs-Fixed: 1073481 --- .../inc/wlan_objmgr_psoc_service_ready_api.h | 4 ++-- wmi/inc/wmi_unified_param.h | 13 ++++++----- wmi/src/wmi_unified_tlv.c | 22 ++++++++++--------- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_service_ready_api.h b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_service_ready_api.h index 28012c4b038f..c9d381301c7c 100644 --- a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_service_ready_api.h +++ b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_service_ready_api.h @@ -141,12 +141,12 @@ struct wlan_psoc_host_hal_reg_capabilities_ext { /** * struct wlan_psoc_host_ppe_threshold - PPE threshold * @numss_m1: NSS - 1 - * @ru_count: Max RU count + * @ru_bit_mask: RU bit mask indicating the supported RU's * @ppet16_ppet8_ru3_ru0: ppet8 and ppet16 for max num ss */ struct wlan_psoc_host_ppe_threshold { uint32_t numss_m1; - uint32_t ru_count; + uint32_t ru_bit_mask; uint32_t ppet16_ppet8_ru3_ru0[PSOC_HOST_MAX_NUM_SS]; }; diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 840f6100ce28..728bde28cfe7 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -647,6 +647,7 @@ struct vdev_start_params { uint32_t preferred_tx_streams; uint32_t cac_duration_ms; uint32_t regdomain; + uint32_t he_ops; #ifndef CONFIG_MCL uint8_t oper_mode; int32_t dfs_pri_multiplier; @@ -975,14 +976,14 @@ typedef struct { #define WMI_HOST_MAX_NUM_SS 8 #define WMI_HOST_MAX_HECAP_PHY_SIZE 3 /** - * struct wmi_host_ppe_threshold -PPE threshold - * @numss_m1: NSS - 1 - * @ru_count: Max RU count - * @ppet16_ppet8_ru3_ru0: ppet8 and ppet16 for max num ss + * struct wmi_host_ppe_threshold -PPE threshold + * @numss_m1: NSS - 1 + * @ru_bit_mask: RU bit mask indicating the supported RU's + * @ppet16_ppet8_ru3_ru0: ppet8 and ppet16 for max num ss */ struct wmi_host_ppe_threshold { uint32_t numss_m1; - uint32_t ru_count; + uint32_t ru_bit_mask; uint32_t ppet16_ppet8_ru3_ru0[WMI_HOST_MAX_NUM_SS]; }; @@ -7074,7 +7075,7 @@ struct encrypt_decrypt_req_params { uint8_t *data; }; -/* +/** * HW mode config type replicated from FW header * @WMI_HOST_HW_MODE_SINGLE: Only one PHY is active. * @WMI_HOST_HW_MODE_DBS: Both PHYs are active in different bands, diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 3178c3e8b249..0220b9deb6e5 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -357,6 +357,7 @@ static QDF_STATUS send_vdev_start_cmd_tlv(wmi_unified_t wmi_handle, cmd->preferred_tx_streams = req->preferred_tx_streams; cmd->cac_duration_ms = req->cac_duration_ms; cmd->regdomain = req->regdomain; + cmd->he_ops = req->he_ops; buf_ptr = (uint8_t *) (((uintptr_t) cmd) + sizeof(*cmd) + sizeof(wmi_channel)); @@ -366,13 +367,13 @@ static QDF_STATUS send_vdev_start_cmd_tlv(wmi_unified_t wmi_handle, WMI_LOGA("%s: vdev_id %d freq %d chanmode %d ch_info: 0x%x is_dfs %d " "beacon interval %d dtim %d center_chan %d center_freq2 %d " "reg_info_1: 0x%x reg_info_2: 0x%x, req->max_txpow: 0x%x " - "Tx SS %d, Rx SS %d, cac %d, regd %d", + "Tx SS %d, Rx SS %d, cac %d, regd %d, HE ops: %d", __func__, req->vdev_id, chan->mhz, req->chan_mode, chan->info, req->is_dfs, req->beacon_intval, cmd->dtim_period, chan->band_center_freq1, chan->band_center_freq2, chan->reg_info_1, chan->reg_info_2, req->max_txpow, req->preferred_tx_streams, req->preferred_rx_streams, - req->cac_duration_ms, req->regdomain); + req->cac_duration_ms, req->regdomain, req->he_ops); if (req->is_restart) ret = wmi_unified_cmd_send(wmi_handle, buf, len, @@ -1880,6 +1881,15 @@ static QDF_STATUS send_peer_assoc_cmd_tlv(wmi_unified_t wmi_handle, cmd->peer_vht_caps = param->peer_vht_caps; cmd->peer_phymode = param->peer_phymode; + /* Update 11ax capabilities */ + cmd->peer_he_cap_info = param->peer_he_cap_macinfo; + cmd->peer_he_ops = param->peer_he_ops; + cmd->peer_he_mcs = param->peer_he_mcs; + qdf_mem_copy(&cmd->peer_he_cap_phy, ¶m->peer_he_cap_phyinfo, + sizeof(param->peer_he_cap_phyinfo)); + qdf_mem_copy(&cmd->peer_ppet, ¶m->peer_ppet, + sizeof(param->peer_ppet)); + /* Update peer legacy rate information */ buf_ptr += sizeof(*cmd); WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, @@ -1911,14 +1921,6 @@ static QDF_STATUS send_peer_assoc_cmd_tlv(wmi_unified_t wmi_handle, mcs->tx_max_rate = param->tx_max_rate; mcs->tx_mcs_set = param->tx_mcs_set; } - /* Update 11ax capabilities */ - cmd->peer_he_cap_info = param->peer_he_cap_macinfo; - cmd->peer_he_ops = param->peer_he_ops; - cmd->peer_he_mcs = param->peer_he_mcs; - qdf_mem_copy(&cmd->peer_he_cap_phy, ¶m->peer_he_cap_phyinfo, - sizeof(param->peer_he_cap_phyinfo)); - qdf_mem_copy(&cmd->peer_ppet, ¶m->peer_ppet, - sizeof(param->peer_ppet)); WMI_LOGD("%s: vdev_id %d associd %d peer_flags %x rate_caps %x " "peer_caps %x listen_intval %d ht_caps %x max_mpdu %d "