3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 21:22:37 +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)
{
struct l_genl_msg *msg =
netdev_build_cmd_cqm_rssi_update(netdev,
netdev->rssi_levels,
netdev->rssi_levels_num);
struct l_genl_msg *msg;
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)
return -EINVAL;