hostapd/src/drivers
Benjamin Berg dbdf7ef679 Use for_each_link() in most cases
This was done using the below semantic patch. There are a few more
places that were missed due to variable declarations or additional
checks in the for loop.

@@
iterator name for_each_link;
identifier max_links =~ "MAX_NUM_MLD_LINKS|MAX_NUM_MLO_LINKS";
expression links;
expression further_tests;
identifier i;
statement stmt;
@@
-for (i = 0; i < max_links; i++)
+for_each_link(links, i)
 {
(
-  if (!(links & BIT(i)))
-    continue;
   ...
|
-  if (!(links & BIT(i)) || further_tests)
+  if (further_tests)
     continue;
   ...
|
-  if (further_tests || !(links & BIT(i)))
+  if (further_tests)
     continue;
   ...
|
-  if (links & BIT(i))
     stmt
|
-  if (further_tests && (links & BIT(i)))
+  if (further_tests)
     stmt
|
-  if ((links & BIT(i)) && further_tests)
+  if (further_tests)
     stmt
)
 }

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
2024-03-02 11:11:12 +02:00
..
android_drv.h Remove obsolete license notifications 2013-12-24 22:59:52 +02:00
driver.h nl80211: Explicitly differentiate between 5 GHz and 6 GHz modes 2024-03-02 10:53:19 +02:00
driver_atheros.c Use ether_addr_equal() to compare whether two MAC addresses are equal 2024-01-13 23:47:21 +02:00
driver_bsd.c AP MLD: Handle new STA event when using SME offload to the driver 2023-07-21 19:57:25 +03:00
driver_common.c Update the driver_flags2 to string conversion 2023-11-06 15:14:32 +02:00
driver_hostap.c AP MLD: Provide Link ID when requesting current seqnum for a group key 2023-06-15 17:43:17 +03:00
driver_hostap.h hostap: Remove unused driver enum values with "master" in them 2021-10-11 20:33:50 +03:00
driver_macsec_linux.c AP/driver: Add link ID to send EAPOL callbacks 2023-06-12 16:26:56 +03:00
driver_macsec_qca.c AP/driver: Add link ID to send EAPOL callbacks 2023-06-12 16:26:56 +03:00
driver_ndis.c Use ether_addr_equal() to compare whether two MAC addresses are equal 2024-01-13 23:47:21 +02:00
driver_ndis.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
driver_ndis_.c Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
driver_nl80211.c Use for_each_link() in most cases 2024-03-02 11:11:12 +02:00
driver_nl80211.h nl80211: Increase the hard scan timeout for initial attempt 2024-01-26 12:26:36 +02:00
driver_nl80211_android.c Drop support for libnl 1.1 2020-01-02 18:05:38 +02:00
driver_nl80211_capa.c nl80211: Explicitly differentiate between 5 GHz and 6 GHz modes 2024-03-02 10:53:19 +02:00
driver_nl80211_event.c Use for_each_link() in most cases 2024-03-02 11:11:12 +02:00
driver_nl80211_monitor.c nl80211: Use monitor interface for sending no-encrypt test frames 2020-01-04 20:23:05 +02:00
driver_nl80211_scan.c nl80211: Increase the hard scan timeout for initial attempt 2024-01-26 12:26:36 +02:00
driver_none.c driver: Remove unused send_ether() driver op 2020-01-05 18:32:10 +02:00
driver_openbsd.c Replace WPA_ALG_PMK with KEY_FLAG_PMK 2020-03-06 21:44:31 +02:00
driver_privsep.c privsep: Mask out control port capability flag 2020-03-01 21:31:07 +02:00
driver_roboswitch.c Use ether_addr_equal() to compare whether two MAC addresses are equal 2024-01-13 23:47:21 +02:00
driver_wext.c Use ether_addr_equal() to compare whether two MAC addresses are equal 2024-01-13 23:47:21 +02:00
driver_wext.h driver: Move set_key() parameters into a struct 2020-01-09 00:48:57 +02:00
driver_wired.c AP/driver: Add link ID to send EAPOL callbacks 2023-06-12 16:26:56 +03:00
driver_wired_common.c wired: Mark some common helper functions static 2016-11-30 20:08:39 +02:00
driver_wired_common.h wired: Mark some common helper functions static 2016-11-30 20:08:39 +02:00
drivers.c macsec_linux: Add a driver for macsec on Linux kernels 2016-11-30 20:08:36 +02:00
drivers.mak nl80211: Add ACS support for Broadcom device 2021-02-27 12:14:09 +02:00
drivers.mk nl80211: Add ACS support for Broadcom device 2021-02-27 12:14:09 +02:00
linux_defines.h nl80211: Move definitions into separate header files 2014-10-26 17:03:24 +02:00
linux_ioctl.c hostapd: Check the bridge if ioctl SIOCBRADDIF fails 2023-12-16 18:16:05 +02:00
linux_ioctl.h nl80211: Generic Linux master interface support for hostapd 2015-07-16 12:33:29 +03:00
linux_wext.h wext: Fix musl build error 2014-12-14 18:05:32 +02:00
Makefile Add CONFIG_CODE_COVERAGE=y option for gcov 2013-11-24 19:16:12 +02:00
ndis_events.c src/drivers: Fix typos 2022-03-04 12:04:51 +02:00
netlink.c Move default action from after switch to within 2022-10-14 16:08:20 +03:00
netlink.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
nl80211_copy.h Sync with wireless-next.git include/uapi/linux/nl80211.h 2023-10-28 18:41:37 +03:00
priv_netlink.h netlink: Fix RTM_SETLINK padding at the end of the message 2014-10-12 19:27:16 +03:00
rfkill.c rfkill: Fix a memory leak 2016-02-16 00:14:47 +02:00
rfkill.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00