iwlwifi: adjust to make d3.c compile

struct iwl_mvm_wep_key_cmd ends in a variable sized array but later
is included in another struct followed by the actual
struct iwl_mvm_wep_key in d3.c.  Make the array[0] instead of []
to avoid the warning about it being a GNU-extension.
Also include string.h explicitly for memset_after().

MFC after:	3 days
Reviewed by:	cc
Differential Revision: https://reviews.freebsd.org/D43647
This commit is contained in:
Bjoern A. Zeeb 2024-01-29 14:23:01 +00:00
parent 2f029bf911
commit e1d31d0685
2 changed files with 7 additions and 0 deletions

View file

@ -477,7 +477,11 @@ struct iwl_mvm_wep_key_cmd {
u8 decryption_type;
u8 flags;
u8 reserved;
#if defined(__linux__)
struct iwl_mvm_wep_key wep_key[];
#elif defined(__FreeBSD__)
struct iwl_mvm_wep_key wep_key[0];
#endif
} __packed; /* SEC_CURR_WEP_KEY_CMD_API_S_VER_2 */
/**

View file

@ -7,6 +7,9 @@
#include <linux/etherdevice.h>
#include <linux/ip.h>
#include <linux/fs.h>
#if defined(__FreeBSD__)
#include <linux/string.h>
#endif
#include <net/cfg80211.h>
#include <net/ipv6.h>
#include <net/tcp.h>