summaryrefslogtreecommitdiff
path: root/drivers/staging/wfx/hif_api_mib.h
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2020-04-06 13:17:56 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-13 14:32:39 +0200
commitbe4692e5e04a063119de9a74471504ab7ec39d1a (patch)
treed66bd320114e835a35957d7eb3f3dc5698b28dc2 /drivers/staging/wfx/hif_api_mib.h
parent9a46a0a93b7b885888c59c98ea0d6d3ff5a8081e (diff)
staging: wfx: send just necessary bytes
Size of hif_mib_template_frame must be sufficient to contains bytes declared by frame_length and cannot exceed 700bytes. Change the API to reflect that. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200406111756.154086-12-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/hif_api_mib.h')
-rw-r--r--drivers/staging/wfx/hif_api_mib.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h
index 0490157b4f3b..9f30cf503ad5 100644
--- a/drivers/staging/wfx/hif_api_mib.h
+++ b/drivers/staging/wfx/hif_api_mib.h
@@ -270,12 +270,14 @@ enum hif_tmplt {
HIF_TMPLT_NA = 0x7
};
+#define HIF_API_MAX_TEMPLATE_FRAME_SIZE 700
+
struct hif_mib_template_frame {
u8 frame_type;
u8 init_rate:7;
u8 mode:1;
__le16 frame_length;
- u8 frame[700];
+ u8 frame[];
} __packed;
struct hif_mib_beacon_wake_up_period {