diff options
author | Shiji Yang <yangshiji66@outlook.com> | 2024-02-23 16:34:32 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2024-02-28 14:37:59 +0300 |
commit | a7e178259c5bc900da762b33d3a20b7ee1206f07 (patch) | |
tree | af8930a36c175783c6111b3bbd7ce3f1bc4dea19 /drivers/net/wireless | |
parent | 5a391813e7ef5f12a55e3266a6832732916c7c10 (diff) | |
download | linux-a7e178259c5bc900da762b33d3a20b7ee1206f07.tar.xz |
wifi: rtl8xxxu: fix mixed declarations in rtl8xxxu_set_aifs()
Moving struct ieee80211_sta *sta variable definition to the front
of the code to fix the ISO C90 forbids mixed declarations and code
warning.
Fixes: 43532c050f8e ("wifi: rtl8xxxu: support multiple interfaces in set_aifs()")
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/TYAP286MB03157A408E0D69F2F6FBD88ABC552@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c index efddbe402f0d..4a49f8f9d80f 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c @@ -4919,11 +4919,11 @@ static void rtl8xxxu_set_aifs(struct rtl8xxxu_priv *priv, u8 slot_time) int i; for (i = 0; i < ARRAY_SIZE(priv->vifs); i++) { + struct ieee80211_sta *sta; + if (!priv->vifs[i]) continue; - struct ieee80211_sta *sta; - rcu_read_lock(); sta = ieee80211_find_sta(priv->vifs[i], priv->vifs[i]->bss_conf.bssid); if (sta) |