Skip to content

Commit

Permalink
wcn36xx: Define INIT_HAL_MSG_V1()
Browse files Browse the repository at this point in the history
In order to pass 802.11ac VHT parameters from the SoC to wcn36xx we need to
use the V1 data structures associated with BSS and STA parameters.

The means of identifying a V1 data-structure is via the SMD version field.
This patch defines a INIT_HAL_MSG_V1() which operates the same way as
INIT_HAL_MSG() with the exception that it defines VERSION1 as opposed to
VERSION0.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200910150822.2179261-2-bryan.odonoghue@linaro.org
  • Loading branch information
Bryan O'Donoghue authored and Kalle Valo committed Sep 22, 2020
1 parent 52054eb commit f97fe43
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/net/wireless/ath/wcn36xx/smd.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,14 +466,20 @@ static void init_hal_msg(struct wcn36xx_hal_msg_header *hdr,
hdr->len = msg_size + sizeof(*hdr);
}

#define INIT_HAL_MSG(msg_body, type) \
#define __INIT_HAL_MSG(msg_body, type, version) \
do { \
memset(&msg_body, 0, sizeof(msg_body)); \
msg_body.header.msg_type = type; \
msg_body.header.msg_version = WCN36XX_HAL_MSG_VERSION0; \
msg_body.header.msg_version = version; \
msg_body.header.len = sizeof(msg_body); \
} while (0) \

#define INIT_HAL_MSG(msg_body, type) \
__INIT_HAL_MSG(msg_body, type, WCN36XX_HAL_MSG_VERSION0)

#define INIT_HAL_MSG_V1(msg_body, type) \
__INIT_HAL_MSG(msg_body, type, WCN36XX_HAL_MSG_VERSION1)

#define INIT_HAL_PTT_MSG(p_msg_body, ppt_msg_len) \
do { \
memset(p_msg_body, 0, sizeof(*p_msg_body) + ppt_msg_len); \
Expand Down

0 comments on commit f97fe43

Please sign in to comment.