qcacld-3.0: [11AX] Add support to configure 11ax rate
Add support for to configure 11ax rates using set_11ax_rate
iwpriv command.
Change-Id: I55ab5cc3b51f92ab5c2e347d3b17e392456b90b8
CRs-Fixed: 1073481
diff --git a/core/hdd/inc/qc_sap_ioctl.h b/core/hdd/inc/qc_sap_ioctl.h
index a7a7865..b5971e1 100644
--- a/core/hdd/inc/qc_sap_ioctl.h
+++ b/core/hdd/inc/qc_sap_ioctl.h
@@ -191,6 +191,9 @@
#define RC_2_RATE_IDX_11AC(_rc) ((_rc) & 0xf)
#define HT_RC_2_STREAMS_11AC(_rc) ((((_rc) & 0x30) >> 4) + 1)
+#define RC_2_RATE_IDX_11AX(_rc) ((_rc) & 0x1f)
+#define HT_RC_2_STREAMS_11AX(_rc) (((_rc) >> 5) & 0x7)
+
enum {
QCSAP_PARAM_MAX_ASSOC = 1,
QCSAP_PARAM_GET_WLAN_DBG,
@@ -252,6 +255,7 @@
QCASAP_PARAM_RX_STBC,
QCSAP_PARAM_CHAN_WIDTH,
QCSAP_PARAM_SET_TXRX_STATS,
+ QCASAP_SET_11AX_RATE,
};
int iw_get_channel_list(struct net_device *dev,
diff --git a/core/hdd/inc/wlan_hdd_wext.h b/core/hdd/inc/wlan_hdd_wext.h
index b949041..1d62e7a 100644
--- a/core/hdd/inc/wlan_hdd_wext.h
+++ b/core/hdd/inc/wlan_hdd_wext.h
@@ -36,6 +36,8 @@
#include <linux/timer.h>
#include "qdf_event.h"
+struct sap_Config;
+
/*
* order of parameters in addTs private ioctl
*/
@@ -384,6 +386,31 @@
int hdd_get_rx_stbc(hdd_adapter_t *adapter, int *value);
int hdd_set_rx_stbc(hdd_adapter_t *adapter, int value);
+/**
+ * hdd_assemble_rate_code() - assemble rate code to be sent to FW
+ * @preamble: rate preamble
+ * @nss: number of streams
+ * @rate: rate index
+ *
+ * Rate code assembling is different for targets which are 11ax capable.
+ * Check for the target support and assemble the rate code accordingly.
+ *
+ * Return: assembled rate code
+ */
+int hdd_assemble_rate_code(uint8_t preamble, uint8_t nss, uint8_t rate);
+
+/**
+ * hdd_set_11ax_rate() - set 11ax rate
+ * @adapter: adapter being modified
+ * @value: new 11ax rate code
+ * @sap_config: pointer to SAP config to check HW mode
+ * this will be NULL for call from STA persona
+ *
+ * Return: 0 on success, negative errno on failure
+ */
+int hdd_set_11ax_rate(hdd_adapter_t *adapter, int value,
+ struct sap_Config *sap_config);
+
void wlan_hdd_change_country_code_callback(void *pAdapter);
int hdd_set_band(struct net_device *dev, u8 ui_band);