diff mbox series

[v5,1/2] wcn36xx: Add VHT fields to parameter data structures

Message ID 20200910150450.2178784-2-bryan.odonoghue@linaro.org
State New
Headers show
Series wcn36xx: Extend V1 data-structures | expand

Commit Message

Bryan O'Donoghue Sept. 10, 2020, 3:04 p.m. UTC
In order to pass VHT parameters to wcn3680 we need to use a super-set of
the V1 data-structures with additional VHT parameters tacked on.

This patch adds the additional fields to the STA and BSS parameter
structures.

Since neither wcn3620 nor wcn3660 support VHT the size of the passed
message is fixed to the previous message length. Subsequent changes will
differentiate between wcn3620/wcn3660 and wcn3680 which does use the larger
message size.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

---
 drivers/net/wireless/ath/wcn36xx/hal.h | 14 +++++++++++++-
 drivers/net/wireless/ath/wcn36xx/smd.c |  2 ++
 2 files changed, 15 insertions(+), 1 deletion(-)

-- 
2.27.0


_______________________________________________
wcn36xx mailing list
wcn36xx@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/wcn36xx

Comments

Kalle Valo Sept. 21, 2020, 1:13 p.m. UTC | #1
Bryan O'Donoghue <bryan.odonoghue@linaro.org> wrote:

> In order to pass VHT parameters to wcn3680 we need to use a super-set of

> the V1 data-structures with additional VHT parameters tacked on.

> 

> This patch adds the additional fields to the STA and BSS parameter

> structures.

> 

> Since neither wcn3620 nor wcn3660 support VHT the size of the passed

> message is fixed to the previous message length. Subsequent changes will

> differentiate between wcn3620/wcn3660 and wcn3680 which does use the larger

> message size.

> 

> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


2 patches applied to ath-next branch of ath.git, thanks.

96d6617d64ee wcn36xx: Add VHT fields to parameter data structures
617e7cf80c92 wcn36xx: Use V1 data structure to store supported rates

-- 
https://patchwork.kernel.org/patch/11768987/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Kalle Valo Sept. 21, 2020, 1:13 p.m. UTC | #2
Bryan O'Donoghue <bryan.odonoghue@linaro.org> wrote:

> In order to pass VHT parameters to wcn3680 we need to use a super-set of

> the V1 data-structures with additional VHT parameters tacked on.

> 

> This patch adds the additional fields to the STA and BSS parameter

> structures.

> 

> Since neither wcn3620 nor wcn3660 support VHT the size of the passed

> message is fixed to the previous message length. Subsequent changes will

> differentiate between wcn3620/wcn3660 and wcn3680 which does use the larger

> message size.

> 

> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


2 patches applied to ath-next branch of ath.git, thanks.

96d6617d64ee wcn36xx: Add VHT fields to parameter data structures
617e7cf80c92 wcn36xx: Use V1 data structure to store supported rates

-- 
https://patchwork.kernel.org/patch/11768987/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
wcn36xx mailing list
wcn36xx@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/wcn36xx
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/wcn36xx/hal.h b/drivers/net/wireless/ath/wcn36xx/hal.h
index 573799274a02..3cceeaf0136f 100644
--- a/drivers/net/wireless/ath/wcn36xx/hal.h
+++ b/drivers/net/wireless/ath/wcn36xx/hal.h
@@ -1592,9 +1592,15 @@  struct wcn36xx_hal_config_sta_params_v1 {
 	u8 reserved:4;
 
 	/* These rates are the intersection of peer and self capabilities. */
-	struct wcn36xx_hal_supported_rates supported_rates;
+	struct wcn36xx_hal_supported_rates_v1 supported_rates;
+
+	u8 vht_capable;
+	u8 vht_tx_channel_width_set;
+
 } __packed;
 
+#define WCN36XX_DIFF_STA_PARAMS_V1_NOVHT 10
+
 struct wcn36xx_hal_config_sta_req_msg_v1 {
 	struct wcn36xx_hal_msg_header header;
 	struct wcn36xx_hal_config_sta_params_v1 sta_params;
@@ -2015,8 +2021,14 @@  struct wcn36xx_hal_config_bss_params_v1 {
 	 *  "STA context"
 	 */
 	struct wcn36xx_hal_config_sta_params_v1 sta;
+
+	u8 vht_capable;
+	u8 vht_tx_channel_width_set;
+
 } __packed;
 
+#define WCN36XX_DIFF_BSS_PARAMS_V1_NOVHT (WCN36XX_DIFF_STA_PARAMS_V1_NOVHT + 2)
+
 struct wcn36xx_hal_config_bss_req_msg_v1 {
 	struct wcn36xx_hal_msg_header header;
 	struct wcn36xx_hal_config_bss_params_v1 bss_params;
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index 4c30036e2e56..55aaaeb78b14 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -1223,6 +1223,7 @@  static int wcn36xx_smd_config_sta_v1(struct wcn36xx *wcn,
 	struct wcn36xx_hal_config_sta_params_v1 *sta = &msg_body.sta_params;
 
 	INIT_HAL_MSG(msg_body, WCN36XX_HAL_CONFIG_STA_REQ);
+	msg_body.header.len -= WCN36XX_DIFF_STA_PARAMS_V1_NOVHT;
 
 	wcn36xx_smd_convert_sta_to_v1(wcn, &orig->sta_params,
 				      &msg_body.sta_params);
@@ -1294,6 +1295,7 @@  static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn,
 		return -ENOMEM;
 
 	INIT_HAL_MSG((*msg_body), WCN36XX_HAL_CONFIG_BSS_REQ);
+	msg_body->header.len -= WCN36XX_DIFF_BSS_PARAMS_V1_NOVHT;
 
 	bss = &msg_body->bss_params;
 	sta = &bss->sta;