3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-26 18:59:22 +01:00

netdev: Check EXT_FEATURE_CQM_RSSI_LIST before sending CMD_SET_CQM

This commit is contained in:
Marcel Holtmann 2019-08-28 08:35:50 +02:00
parent 5661e886d8
commit 2dc785982d

View File

@ -3790,13 +3790,16 @@ done:
static int netdev_cqm_rssi_update(struct netdev *netdev) static int netdev_cqm_rssi_update(struct netdev *netdev)
{ {
struct l_genl_msg *msg = struct l_genl_msg *msg;
netdev_build_cmd_cqm_rssi_update(netdev,
netdev->rssi_levels,
netdev->rssi_levels_num);
l_debug(""); l_debug("");
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,
netdev->rssi_levels_num);
if (!msg) if (!msg)
return -EINVAL; return -EINVAL;