git: e1d31d0685f0 - main - iwlwifi: adjust to make d3.c compile
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 03 Feb 2024 13:49:20 UTC
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e1d31d0685f0b430f385023b7de49f47be6c7de0 commit e1d31d0685f0b430f385023b7de49f47be6c7de0 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2024-01-29 14:23:01 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2024-02-03 13:47:34 +0000 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 --- sys/contrib/dev/iwlwifi/fw/api/sta.h | 4 ++++ sys/contrib/dev/iwlwifi/mvm/d3.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/sys/contrib/dev/iwlwifi/fw/api/sta.h b/sys/contrib/dev/iwlwifi/fw/api/sta.h index d62fed543276..18f9470db301 100644 --- a/sys/contrib/dev/iwlwifi/fw/api/sta.h +++ b/sys/contrib/dev/iwlwifi/fw/api/sta.h @@ -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 */ /** diff --git a/sys/contrib/dev/iwlwifi/mvm/d3.c b/sys/contrib/dev/iwlwifi/mvm/d3.c index f6488b4bbe68..17d74a771d13 100644 --- a/sys/contrib/dev/iwlwifi/mvm/d3.c +++ b/sys/contrib/dev/iwlwifi/mvm/d3.c @@ -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>