From 791f5a48f63dfdb92d6f237672d47d1ed8258d63 Mon Sep 17 00:00:00 2001 From: Rin Cat Date: Sun, 2 Aug 2020 07:16:03 -0400 Subject: [PATCH] Fix: ISO C90 forbids mixing declarations and code --- os_dep/linux/ioctl_cfg80211.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index a1741c0..ad80602 100755 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -7792,6 +7792,9 @@ static void cfg80211_rtw_update_mgmt_frame_register(struct wiphy *wiphy, _adapter *adapter; struct rtw_wdev_priv *pwdev_priv; +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) + u32 rtw_mask; +#endif if (ndev == NULL) goto exit; @@ -7810,7 +7813,7 @@ static void cfg80211_rtw_update_mgmt_frame_register(struct wiphy *wiphy, #endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) - u32 rtw_mask = BIT(IEEE80211_STYPE_AUTH >> 4); + rtw_mask = BIT(IEEE80211_STYPE_AUTH >> 4); if ((upd->interface_stypes & rtw_mask) == (pwdev_priv->mgmt_mask & rtw_mask)) return;