mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-23 22:42:37 +01:00
netdev: fix potential command ID overwrite setting CQM threshold
With the introduction of affinities the CQM threshold can be toggled by a DBus call. There was no check if there was already a pending call which would cause the command ID to be overwritten and lose any potential to cancel it, e.g. if netdev went down.
This commit is contained in:
parent
154a29be05
commit
163c2ebd37
@ -3715,6 +3715,9 @@ static int netdev_cqm_rssi_update(struct netdev *netdev)
|
|||||||
|
|
||||||
l_debug("");
|
l_debug("");
|
||||||
|
|
||||||
|
if (netdev->set_cqm_cmd_id)
|
||||||
|
return -EBUSY;
|
||||||
|
|
||||||
if (!wiphy_has_ext_feature(netdev->wiphy,
|
if (!wiphy_has_ext_feature(netdev->wiphy,
|
||||||
NL80211_EXT_FEATURE_CQM_RSSI_LIST))
|
NL80211_EXT_FEATURE_CQM_RSSI_LIST))
|
||||||
msg = netdev_build_cmd_cqm_rssi_update(netdev, NULL, 0);
|
msg = netdev_build_cmd_cqm_rssi_update(netdev, NULL, 0);
|
||||||
@ -3752,9 +3755,7 @@ static int netdev_set_signal_thresholds(struct netdev *netdev, int threshold,
|
|||||||
netdev->low_signal_threshold = threshold;
|
netdev->low_signal_threshold = threshold;
|
||||||
netdev->low_signal_threshold_5ghz = threshold_5ghz;
|
netdev->low_signal_threshold_5ghz = threshold_5ghz;
|
||||||
|
|
||||||
netdev_cqm_rssi_update(netdev);
|
return netdev_cqm_rssi_update(netdev);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int netdev_lower_signal_threshold(struct netdev *netdev)
|
int netdev_lower_signal_threshold(struct netdev *netdev)
|
||||||
|
Loading…
Reference in New Issue
Block a user