diff options
| author | gbian <gbian@codeaurora.org> | 2017-03-08 10:34:58 +0800 |
|---|---|---|
| committer | Sandeep Puligilla <spuligil@codeaurora.org> | 2017-03-13 02:28:59 -0700 |
| commit | af7e3b2fbbc689347e626613bd70bf819c59e829 (patch) | |
| tree | 8af606baab3358303829981349b67da1d4dd5528 | |
| parent | 960895ad7e04c315a2e048cec53a6173b2861188 (diff) | |
qcacld-2.0: Fix some issue for QCA_NL80211_VENDOR_SUBCMD_GET_STATION
Convert max phy rate unit to kbps and add short gi report
Change-Id: I5543cbaf57b1cb6a29f18f13ee38b790e4721dd3
CRs-Fixed: 2014007
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_cfg80211.h | 3 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 30 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_hostapd.c | 2 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c | 8 |
4 files changed, 34 insertions, 9 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_cfg80211.h b/CORE/HDD/inc/wlan_hdd_cfg80211.h index cf6d0c9d7d87..0776c6d29a66 100644 --- a/CORE/HDD/inc/wlan_hdd_cfg80211.h +++ b/CORE/HDD/inc/wlan_hdd_cfg80211.h @@ -2178,6 +2178,8 @@ enum qca_wlan_vendor_attr_get_station { * rx stbc for remote peer * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_CH_WIDTH: * ch widht for remote peer + * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_SGI_ENABLE: + * sgi enable for remote peer * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_AFTER_LAST: After last */ enum qca_wlan_vendor_attr_get_station_info { @@ -2204,6 +2206,7 @@ enum qca_wlan_vendor_attr_get_station_info { QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_TX_STBC, QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_RX_STBC, QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_CH_WIDTH, + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_SGI_ENABLE, /* keep last */ QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_AFTER_LAST, QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_MAX = diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 79c96524f6dc..79191ea0ff1a 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -12672,6 +12672,8 @@ static int wlan_hdd_cfg80211_sap_configuration_set(struct wiphy *wiphy, QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_RX_STBC #define REMOTE_CH_WIDTH\ QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_CH_WIDTH +#define REMOTE_SGI_ENABLE\ + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_SGI_ENABLE /** * hdd_get_peer_txrx_rate_cb() - get station's txrx rate callback @@ -12905,7 +12907,8 @@ static int hdd_get_station_remote(hdd_context_t *hdd_ctx, nl_buf_len += (sizeof(stainfo->ampdu) + NLA_HDRLEN) + (sizeof(stainfo->tx_stbc) + NLA_HDRLEN) + (sizeof(stainfo->rx_stbc) + NLA_HDRLEN) + - (sizeof(stainfo->ch_width) + NLA_HDRLEN); + (sizeof(stainfo->ch_width) + NLA_HDRLEN) + + (sizeof(stainfo->sgi_enable) + NLA_HDRLEN); hddLog(VOS_TRACE_LEVEL_INFO, FL("buflen %d hdrlen %d"), nl_buf_len, NLMSG_HDRLEN); @@ -12933,9 +12936,10 @@ static int hdd_get_station_remote(hdd_context_t *hdd_ctx, stainfo->ampdu, stainfo->tx_stbc, stainfo->rx_stbc); hddLog(VOS_TRACE_LEVEL_INFO, - FL("wmm %d chwidth %d"), + FL("wmm %d chwidth %d sgi %d"), stainfo->isQosEnabled, - stainfo->ch_width); + stainfo->ch_width, + stainfo->sgi_enable); } if (nla_put_u32(skb, REMOTE_MAX_PHY_RATE, stainfo->max_phy_rate) || @@ -12965,7 +12969,8 @@ static int hdd_get_station_remote(hdd_context_t *hdd_ctx, if (nla_put_u8(skb, REMOTE_AMPDU, stainfo->ampdu) || nla_put_u8(skb, REMOTE_TX_STBC, stainfo->tx_stbc) || nla_put_u8(skb, REMOTE_RX_STBC, stainfo->rx_stbc) || - nla_put_u8(skb, REMOTE_CH_WIDTH, stainfo->ch_width)) { + nla_put_u8(skb, REMOTE_CH_WIDTH, stainfo->ch_width) || + nla_put_u8(skb, REMOTE_SGI_ENABLE, stainfo->sgi_enable)) { hddLog(LOGE, FL("put fail")); goto fail; } @@ -13118,6 +13123,7 @@ hdd_cfg80211_get_station_cmd(struct wiphy *wiphy, #undef REMOTE_TX_STBC #undef REMOTE_RX_STBC #undef REMOTE_CH_WIDTH +#undef REMOTE_SGI_ENABLE static const struct nla_policy qca_wlan_vendor_attr[QCA_WLAN_VENDOR_ATTR_MAX+1] = { @@ -23842,7 +23848,9 @@ static void hdd_fill_bw_mcs(struct station_info *sinfo, bool vht) { if (vht) { + sinfo->txrate.nss = nss; sinfo->txrate.mcs = mcsidx; + sinfo->txrate.flags |= RATE_INFO_FLAGS_VHT_MCS; if (rate_flags & eHAL_TX_RATE_VHT80) sinfo->txrate.bw = RATE_INFO_BW_80; else if (rate_flags & eHAL_TX_RATE_VHT40) @@ -23877,7 +23885,9 @@ static void hdd_fill_bw_mcs(struct station_info *sinfo, bool vht) { if (vht) { + sinfo->txrate.nss = nss; sinfo->txrate.mcs = mcsidx; + sinfo->txrate.flags |= RATE_INFO_FLAGS_VHT_MCS; if (rate_flags & eHAL_TX_RATE_VHT80) sinfo->txrate.flags |= RATE_INFO_FLAGS_80_MHZ_WIDTH; else if (rate_flags & eHAL_TX_RATE_VHT40) @@ -23943,9 +23953,15 @@ static void hdd_fill_sinfo_rate_info(struct station_info *sinfo, sinfo->txrate.legacy = maxrate; } else { /* must be MCS */ - sinfo->txrate.nss = nss; - hdd_fill_bw_mcs_vht(sinfo, rate_flags, mcsidx, nss); - hdd_fill_bw_mcs(sinfo, rate_flags, mcsidx, nss, FALSE); + if (rate_flags & + (eHAL_TX_RATE_VHT80 | + eHAL_TX_RATE_VHT40 | + eHAL_TX_RATE_VHT20)) + hdd_fill_bw_mcs_vht(sinfo, rate_flags, mcsidx, nss); + + if (rate_flags & (eHAL_TX_RATE_HT20 | eHAL_TX_RATE_HT40)) + hdd_fill_bw_mcs(sinfo, rate_flags, mcsidx, nss, FALSE); + if (rate_flags & eHAL_TX_RATE_SGI) { if (!(sinfo->txrate.flags & RATE_INFO_FLAGS_VHT_MCS)) sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS; diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c index f47ad1550e62..44b082479187 100644 --- a/CORE/HDD/src/wlan_hdd_hostapd.c +++ b/CORE/HDD/src/wlan_hdd_hostapd.c @@ -1867,6 +1867,8 @@ static void hdd_fill_station_info(hdd_station_info_t *stainfo, stainfo->max_ext_idx, stainfo->max_mcs_idx, stainfo->rx_mcs_map); + /* expect max_phy_rate report in kbps */ + stainfo->max_phy_rate *= 100; hddLog(VOS_TRACE_LEVEL_INFO, FL("cap %d %d %d %d %d %d %d %d %d %x %d"), stainfo->ampdu, diff --git a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c index 320db4233407..7aa5464cf255 100644 --- a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c +++ b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c @@ -1644,7 +1644,10 @@ static void fill_mlm_assoc_ind_vht(tpSirAssocReq assocreq, assocind->rx_stbc = assocreq->VHTCaps.rxSTBC; /* ch width */ - assocind->ch_width = stads->vhtSupportedChannelWidthSet; + assocind->ch_width = stads->vhtSupportedChannelWidthSet ? + eHT_CHANNEL_WIDTH_80MHZ : + stads->htSupportedChannelWidthSet ? + eHT_CHANNEL_WIDTH_40MHZ : eHT_CHANNEL_WIDTH_20MHZ; /* mode */ assocind->mode = SIR_SME_PHY_MODE_VHT; @@ -1950,7 +1953,8 @@ void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession p pMlmAssocInd->rx_stbc = pAssocReq->HTCaps.rxSTBC; /* ch width */ - pMlmAssocInd->ch_width = pStaDs->htSupportedChannelWidthSet; + pMlmAssocInd->ch_width = pStaDs->htSupportedChannelWidthSet ? + eHT_CHANNEL_WIDTH_40MHZ: eHT_CHANNEL_WIDTH_20MHZ; /* mode */ pMlmAssocInd->mode = SIR_SME_PHY_MODE_HT; |
