ACS: More consistent checking of the best channel pointer
It looks like best might be NULL in some cases, so check for this
explicitly before trying to dereference it for a debug print.
Fixes: 733de85680
("ACS: Fix not selecting the best channel in the segment")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
5d54bf6fb6
commit
348c047afd
1 changed files with 1 additions and 1 deletions
|
@ -963,7 +963,7 @@ acs_find_ideal_chan_mode(struct hostapd_iface *iface,
|
|||
* crowded primary channel if one was found in the segment */
|
||||
if (iface->current_mode &&
|
||||
iface->current_mode->mode == HOSTAPD_MODE_IEEE80211A &&
|
||||
chan != best) {
|
||||
best && chan != best) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"ACS: promoting channel %d over %d (less interference %Lg/%Lg)",
|
||||
best->chan, chan->chan,
|
||||
|
|
Loading…
Reference in a new issue