e1de784b09fa728625f38c6900a4366009a3cf73
[openwrt/staging/ansuel.git] /
1 From a7e178259c5bc900da762b33d3a20b7ee1206f07 Mon Sep 17 00:00:00 2001
2 From: Shiji Yang <yangshiji66@outlook.com>
3 Date: Fri, 23 Feb 2024 21:34:32 +0800
4 Subject: [PATCH] wifi: rtl8xxxu: fix mixed declarations in rtl8xxxu_set_aifs()
5
6 Moving struct ieee80211_sta *sta variable definition to the front
7 of the code to fix the ISO C90 forbids mixed declarations and code
8 warning.
9
10 Fixes: 43532c050f8e ("wifi: rtl8xxxu: support multiple interfaces in set_aifs()")
11 Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
12 Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
13 Signed-off-by: Kalle Valo <kvalo@kernel.org>
14 Link: https://msgid.link/TYAP286MB03157A408E0D69F2F6FBD88ABC552@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM
15 ---
16 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
19 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
20 +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
21 @@ -4919,11 +4919,11 @@ static void rtl8xxxu_set_aifs(struct rtl
22 int i;
23
24 for (i = 0; i < ARRAY_SIZE(priv->vifs); i++) {
25 + struct ieee80211_sta *sta;
26 +
27 if (!priv->vifs[i])
28 continue;
29
30 - struct ieee80211_sta *sta;
31 -
32 rcu_read_lock();
33 sta = ieee80211_find_sta(priv->vifs[i], priv->vifs[i]->bss_conf.bssid);
34 if (sta)