summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshish Kumar Dhanotiya <adhanoti@codeaurora.org>2020-09-22 01:05:43 +0530
committerIsaac Chiou <isaacchiou@google.com>2020-09-23 05:56:19 +0000
commit995dccf12bf5723c11e1844e125fd183251acfa9 (patch)
treefaee399dd5c467d8d747a2f54427cc688c422987
parente71dddf14ba09cb4e53d9deb34a2f0bb681e486a (diff)
downloadqcacld-995dccf12bf5723c11e1844e125fd183251acfa9.tar.gz
Currently in driver does not update the rate flags correctly in wma as rate flags should include all the subsets of the lower rartesets, which is not thye case today and driver only updates the higher rate flag. Because of which it leads to invalid computation of txrate at the kernel. Bug: 166722837 Change-Id: I5529532b3d41b68693b5b4b8952ee0f1414354db CRs-Fixed: 2776370
-rw-r--r--core/wma/inc/wma_internal.h8
-rw-r--r--core/wma/src/wma_data.c32
2 files changed, 30 insertions, 10 deletions
diff --git a/core/wma/inc/wma_internal.h b/core/wma/inc/wma_internal.h
index 3ae6430337..3553dcb751 100644
--- a/core/wma/inc/wma_internal.h
+++ b/core/wma/inc/wma_internal.h
@@ -799,6 +799,14 @@ void wma_set_resume_dtim(tp_wma_handle wma);
void wma_set_bss_rate_flags(struct wma_txrx_node *iface,
tpAddBssParams add_bss);
+/**
+ * wma_get_vht_rate_flags() - Return the VHT rate flags corresponding to the BW
+ * @ch_width: BW for which rate flags is required
+ *
+ * Return: Rate flags corresponding to ch_width
+ */
+tTxrateinfoflags wma_get_vht_rate_flags(enum phy_ch_width ch_width);
+
int32_t wmi_unified_send_txbf(tp_wma_handle wma, tpAddStaParams params);
/**
diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c
index 20d4038ccb..3fdefdd9c9 100644
--- a/core/wma/src/wma_data.c
+++ b/core/wma/src/wma_data.c
@@ -737,6 +737,27 @@ ht_vht_done:
return ret;
}
+tTxrateinfoflags wma_get_vht_rate_flags(enum phy_ch_width ch_width)
+{
+ tTxrateinfoflags rate_flags = 0;
+
+ if (ch_width == CH_WIDTH_80P80MHZ)
+ rate_flags |= eHAL_TX_RATE_VHT80 | eHAL_TX_RATE_VHT40 |
+ eHAL_TX_RATE_VHT20;
+ if (ch_width == CH_WIDTH_160MHZ)
+ rate_flags |= eHAL_TX_RATE_VHT80 | eHAL_TX_RATE_VHT40 |
+ eHAL_TX_RATE_VHT20;
+ if (ch_width == CH_WIDTH_80MHZ)
+ rate_flags |= eHAL_TX_RATE_VHT80 | eHAL_TX_RATE_VHT40 |
+ eHAL_TX_RATE_VHT20;
+ else if (ch_width)
+ rate_flags |= eHAL_TX_RATE_VHT40 | eHAL_TX_RATE_VHT20;
+ else
+ rate_flags |= eHAL_TX_RATE_VHT20;
+
+ return rate_flags;
+}
+
/**
* wma_set_bss_rate_flags() - set rate flags based on BSS capability
* @iface: txrx_node ctx
@@ -750,16 +771,7 @@ void wma_set_bss_rate_flags(struct wma_txrx_node *iface,
iface->rate_flags = 0;
if (add_bss->vhtCapable) {
- if (add_bss->ch_width == CH_WIDTH_80P80MHZ)
- iface->rate_flags |= eHAL_TX_RATE_VHT80;
- if (add_bss->ch_width == CH_WIDTH_160MHZ)
- iface->rate_flags |= eHAL_TX_RATE_VHT80;
- if (add_bss->ch_width == CH_WIDTH_80MHZ)
- iface->rate_flags |= eHAL_TX_RATE_VHT80;
- else if (add_bss->ch_width)
- iface->rate_flags |= eHAL_TX_RATE_VHT40;
- else
- iface->rate_flags |= eHAL_TX_RATE_VHT20;
+ iface->rate_flags = wma_get_vht_rate_flags(add_bss->ch_width);
}
/* avoid to conflict with htCapable flag */
else if (add_bss->htCapable) {