Skip to content

Commit

Permalink
wifi: mwifiex: Replace one-element array with flexible-array member i…
Browse files Browse the repository at this point in the history
…n struct mwifiex_ie_types_rxba_sync

One-element and zero-length arrays are deprecated. So, replace
one-element array in struct mwifiex_ie_types_rxba_sync with
flexible-array member, and refactor the rest of the code, accordingly.

This results in no differences in binary output.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://lore.kernel.org/r/79c801c69c8beece2f80502c60166036d3c047cc.1692931954.git.gustavoars@kernel.org
  • Loading branch information
GustavoARSilva authored and Kalle Valo committed Sep 4, 2023
1 parent eec679e commit c784724
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ void mwifiex_11n_rxba_sync_event(struct mwifiex_private *priv,

mwifiex_dbg_dump(priv->adapter, EVT_D, "RXBA_SYNC event:",
event_buf, len);
while (tlv_buf_left >= sizeof(*tlv_rxba)) {
while (tlv_buf_left > sizeof(*tlv_rxba)) {
tlv_type = le16_to_cpu(tlv_rxba->header.type);
tlv_len = le16_to_cpu(tlv_rxba->header.len);
if (tlv_type != TLV_TYPE_RXBA_SYNC) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/marvell/mwifiex/fw.h
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ struct mwifiex_ie_types_rxba_sync {
u8 reserved;
__le16 seq_num;
__le16 bitmap_len;
u8 bitmap[1];
u8 bitmap[];
} __packed;

struct chan_band_param_set {
Expand Down

0 comments on commit c784724

Please sign in to comment.