Revert "[wpa_supplicant] cumilative patch from commit 4b755c967"
Revert submission 26533062-Supplicant_merge_June24
Reason for revert: https://b.corp.google.com/issues/349780869
Reverted changes: /q/submissionid:26533062-Supplicant_merge_June24
Change-Id: I6c9b7a4323fa7edde47617da6c1e0d8f6e6d5101
diff --git a/src/ap/dfs.c b/src/ap/dfs.c
index af9dc16..5e4c810 100644
--- a/src/ap/dfs.c
+++ b/src/ap/dfs.c
@@ -14,7 +14,6 @@
#include "common/hw_features_common.h"
#include "common/wpa_ctrl.h"
#include "hostapd.h"
-#include "beacon.h"
#include "ap_drv_ops.h"
#include "drivers/driver.h"
#include "dfs.h"
@@ -973,7 +972,6 @@
struct csa_settings csa_settings;
u8 new_vht_oper_chwidth;
unsigned int i;
- unsigned int num_err = 0;
wpa_printf(MSG_DEBUG, "DFS will switch to a new channel %d", channel);
wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, DFS_EVENT_NEW_CHANNEL
@@ -1011,8 +1009,7 @@
oper_centr_freq_seg1_idx,
cmode->vht_capab,
&cmode->he_capab[ieee80211_mode],
- &cmode->eht_capab[ieee80211_mode],
- hostapd_get_punct_bitmap(iface->bss[0]));
+ &cmode->eht_capab[ieee80211_mode]);
if (err) {
wpa_printf(MSG_ERROR,
@@ -1024,10 +1021,10 @@
for (i = 0; i < iface->num_bss; i++) {
err = hostapd_switch_channel(iface->bss[i], &csa_settings);
if (err)
- num_err++;
+ break;
}
- if (num_err == iface->num_bss) {
+ if (err) {
wpa_printf(MSG_WARNING,
"DFS failed to schedule CSA (%d) - trying fallback",
err);
@@ -1144,23 +1141,14 @@
int cf1, int cf2)
{
wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, DFS_EVENT_CAC_COMPLETED
- "success=%d freq=%d ht_enabled=%d chan_offset=%d chan_width=%d cf1=%d cf2=%d radar_detected=%d",
- success, freq, ht_enabled, chan_offset, chan_width, cf1, cf2,
- iface->radar_detected);
+ "success=%d freq=%d ht_enabled=%d chan_offset=%d chan_width=%d cf1=%d cf2=%d",
+ success, freq, ht_enabled, chan_offset, chan_width, cf1, cf2);
if (success) {
/* Complete iface/ap configuration */
if (iface->drv_flags & WPA_DRIVER_FLAGS_DFS_OFFLOAD) {
- /* Complete AP configuration for the first bring up. If
- * a radar was detected in this channel, interface setup
- * will be handled in
- * 1. hostapd_event_ch_switch() if switching to a
- * non-DFS channel
- * 2. on next CAC complete event if switching to another
- * DFS channel.
- */
- if (iface->state != HAPD_IFACE_ENABLED &&
- !iface->radar_detected)
+ /* Complete AP configuration for the first bring up. */
+ if (iface->state != HAPD_IFACE_ENABLED)
hostapd_setup_interface_complete(iface, 0);
else
iface->cac_started = 0;
@@ -1205,7 +1193,6 @@
hostapd_dfs_update_background_chain(iface);
}
- iface->radar_detected = false;
return 0;
}
@@ -1449,8 +1436,6 @@
"freq=%d ht_enabled=%d chan_offset=%d chan_width=%d cf1=%d cf2=%d",
freq, ht_enabled, chan_offset, chan_width, cf1, cf2);
- iface->radar_detected = true;
-
/* Proceed only if DFS is not offloaded to the driver */
if (iface->drv_flags & WPA_DRIVER_FLAGS_DFS_OFFLOAD)
return 0;
@@ -1544,17 +1529,9 @@
iface->radar_background.cac_started = 1;
} else {
/* This is called when the driver indicates that an offloaded
- * DFS has started CAC. radar_detected might be set for previous
- * DFS channel. Clear it for this new CAC process. */
+ * DFS has started CAC. */
hostapd_set_state(iface, HAPD_IFACE_DFS);
iface->cac_started = 1;
-
- /* Clear radar_detected in case it is for the previous
- * frequency. Also remove disabled link's information in RNR
- * element from other links. */
- iface->radar_detected = false;
- if (iface->interfaces && iface->interfaces->count > 1)
- ieee802_11_set_beacons(iface);
}
/* TODO: How to check CAC time for ETSI weather channels? */
iface->dfs_cac_ms = 60000;