2
0

010-v6.9-wifi-rtl8xxxu-fix-mixed-declarations-and-code-warnin.patch 1.2 KB

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