netdev: always register for single CQM threshold

If the extended feature for CQM levels was not supported no CQM
registration would happen, not even for a single level. This
caused IWD to completely lose the ability to roam since it would
only get notified when the kernel was disconnecting, around -90
dBm, not giving IWD enough time to roam.

Instead if the extended feature is not supported we can still
register for the event, just without multiple signal levels.
This commit is contained in:
James Prestwood 2021-02-09 16:04:47 -08:00 committed by Denis Kenzior
parent 0b5e7ab7bb
commit 6421b3c5c1
1 changed files with 4 additions and 3 deletions

View File

@ -4427,9 +4427,10 @@ static int netdev_cqm_rssi_update(struct netdev *netdev)
if (!wiphy_has_ext_feature(netdev->wiphy,
NL80211_EXT_FEATURE_CQM_RSSI_LIST))
return 0;
msg = netdev_build_cmd_cqm_rssi_update(netdev, netdev->rssi_levels,
msg = netdev_build_cmd_cqm_rssi_update(netdev, NULL, 0);
else
msg = netdev_build_cmd_cqm_rssi_update(netdev,
netdev->rssi_levels,
netdev->rssi_levels_num);
if (!msg)
return -EINVAL;