qcacmn: Populate tx params tlv for mgmt and offchan tx WMI commands
Populate tx params tlv that includes information related to power,
chainmask, bandwidth mask, preamble type, frame type etc to the mgmt
and offchan tx WMI fixed param
Currently, we send the command with TX params valid set to zero always
and hence target does not look for the TX param TLV. This change
implements API to populate TX params TLV that facilitates configuration
of parameters per TX frame be it data or management frame
If the TX params valid is set to false, target decides the values
to use for each of the mentioned TX parameters
Change-Id: I90a1b5e1c9bf0a54a907876ed3629c2d627b3c98
CRs-Fixed: 2070454
diff --git a/wmi_unified_param.h b/wmi_unified_param.h
index 61490ae..02f8151 100644
--- a/wmi_unified_param.h
+++ b/wmi_unified_param.h
@@ -1285,6 +1285,63 @@
};
/**
+ * struct tx_send_params - TX parameters
+ * @pwr: Tx frame transmission power
+ * @mcs_mask: Modulation and coding index mask for transmission
+ * bit 0 -> CCK 1 Mbps rate is allowed
+ * bit 1 -> CCK 2 Mbps rate is allowed
+ * bit 2 -> CCK 5.5 Mbps rate is allowed
+ * bit 3 -> CCK 11 Mbps rate is allowed
+ * bit 4 -> OFDM BPSK modulation, 1/2 coding rate is allowed
+ * bit 5 -> OFDM BPSK modulation, 3/4 coding rate is allowed
+ * bit 6 -> OFDM QPSK modulation, 1/2 coding rate is allowed
+ * bit 7 -> OFDM QPSK modulation, 3/4 coding rate is allowed
+ * bit 8 -> OFDM 16-QAM modulation, 1/2 coding rate is allowed
+ * bit 9 -> OFDM 16-QAM modulation, 3/4 coding rate is allowed
+ * bit 10 -> OFDM 64-QAM modulation, 2/3 coding rate is allowed
+ * bit 11 -> OFDM 64-QAM modulation, 3/4 coding rate is allowed
+ * @nss_mask: Spatial streams permitted
+ * bit 0: if set, Nss = 1 (non-MIMO) is permitted
+ * bit 1: if set, Nss = 2 (2x2 MIMO) is permitted
+ * bit 2: if set, Nss = 3 (3x3 MIMO) is permitted
+ * bit 3: if set, Nss = 4 (4x4 MIMO) is permitted
+ * bit 4: if set, Nss = 5 (5x5 MIMO) is permitted
+ * bit 5: if set, Nss = 6 (6x6 MIMO) is permitted
+ * bit 6: if set, Nss = 7 (7x7 MIMO) is permitted
+ * bit 7: if set, Nss = 8 (8x8 MIMO) is permitted
+ * If no bits are set, target will choose what NSS type to use
+ * @retry_limit: Maximum number of retries before ACK
+ * @chain_mask: Chains to be used for transmission
+ * @bw_mask: Bandwidth to be used for transmission
+ * bit 0 -> 5MHz
+ * bit 1 -> 10MHz
+ * bit 2 -> 20MHz
+ * bit 3 -> 40MHz
+ * bit 4 -> 80MHz
+ * bit 5 -> 160MHz
+ * bit 6 -> 80_80MHz
+ * @preamble_type: Preamble types for transmission
+ * bit 0: if set, OFDM
+ * bit 1: if set, CCK
+ * bit 2: if set, HT
+ * bit 3: if set, VHT
+ * bit 4: if set, HE
+ * @frame_type: Data or Management frame
+ * Data:1 Mgmt:0
+ */
+struct tx_send_params {
+ uint32_t pwr:8,
+ mcs_mask:12,
+ nss_mask:8,
+ retry_limit:4;
+ uint32_t chain_mask:8,
+ bw_mask:7,
+ preamble_type:5,
+ frame_type:1,
+ reserved:11;
+};
+
+/**
* struct wmi_mgmt_params - wmi mgmt cmd paramters
* @tx_frame: management tx frame
* @frm_len: frame length
@@ -1294,6 +1351,8 @@
* @desc_id: descriptor id relyaed back by target
* @macaddr - macaddr of peer
* @qdf_ctx: qdf context for qdf_nbuf_map
+ * @tx_param: TX send parameters
+ * @tx_params_valid: Flag that indicates if TX params are valid
*/
struct wmi_mgmt_params {
void *tx_frame;
@@ -1304,6 +1363,8 @@
uint16_t desc_id;
uint8_t *macaddr;
void *qdf_ctx;
+ struct tx_send_params tx_param;
+ bool tx_params_valid;
};
/**
@@ -1316,6 +1377,8 @@
* @desc_id: descriptor id relyaed back by target
* @macaddr: macaddr of peer
* @qdf_ctx: qdf context for qdf_nbuf_map
+ * @tx_param: TX send parameters
+ * @tx_params_valid: Flag that indicates if TX params are valid
*/
struct wmi_offchan_data_tx_params {
void *tx_frame;
@@ -1326,6 +1389,8 @@
uint16_t desc_id;
uint8_t *macaddr;
void *qdf_ctx;
+ struct tx_send_params tx_param;
+ bool tx_params_valid;
};
/**