Thanks, these variables are unused. The new patch has been submitted with these variables removed. Best regards Kaidong On Mon, Nov 6, 2023 at 10:15 AM Jouni Malinen <j@xxxxx> wrote: > > On Fri, Sep 22, 2023 at 05:51:13PM +0000, Kaidong Wang wrote: > > The max transmit power of Standard Power (SP) Access Points (AP) in the > > 6 GHz band is limited by effective isotropic radiated power (EIRP), > > while the max transmit power of Low Power Indoor (LPI) APs in the 6 GHz > > band is limited by power spectral density (PSD). Therefore the max > > transmit power of LPI APs grows as the channel width increases. However, > > the roaming algorithm takes signal level as a constant value regardless > > of the channel width. > > > > Adjust the RSSI, SNR and throughput estimate based on max transmit power > > config in roaming algorithm. > > > diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c > > @@ -1989,11 +1989,19 @@ int wpa_supplicant_need_to_roam_within_ess(struct wpa_supplicant *wpa_s, > > - int cur_snr = 0; > > + int cur_snr = 0, sel_snr = 0; > > int ret = 0; > > + int rssi_bump = 0, noise_bump = 0; > > Hmm.. rssi_bump and noise_bump are completely unused in this function > and sel_snr is only assigned.. Is this missing something? > > > + /* > > + * Adjust the SNR of BSSes based on the channel width. > > + */ > > + cur_level += wpas_channel_width_rssi_bump(cur_ies, cur_ie_len, > > + current_bss->max_cw); > > + cur_snr = wpas_adjust_snr_by_chanwidth(cur_ies, cur_ie_len, > > + current_bss->max_cw, cur_snr); > > + > > + sel_est = selected->est_throughput; > > + sel_level = selected->level + > > + wpas_channel_width_rssi_bump(sel_ies, sel_ie_len, > > + selected->max_cw); > > + sel_snr = wpas_adjust_snr_by_chanwidth(sel_ies, sel_ie_len, > > + selected->max_cw, selected->snr); > > That sel_snr is not used for anything and that function has no > side-effects either, so it is not clear what this is trying to achieve. > > -- > Jouni Malinen PGP id EFC895FA _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap