Commit 33d4a577 authored by Ajay Singh's avatar Ajay Singh Committed by Kalle Valo

wifi: wilc1000: set station_info flag only when signal value is valid

Set station_info->filled to indicate signal level only when its value is
received successfully using wilc_get_rssi().
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220720160302.231516-4-ajay.kathat@microchip.com
parent f589b5d9
......@@ -1312,12 +1312,11 @@ static int dump_station(struct wiphy *wiphy, struct net_device *dev,
if (idx != 0)
return -ENOENT;
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL);
ret = wilc_get_rssi(vif, &sinfo->signal);
if (ret)
return ret;
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL);
memcpy(mac, vif->priv.associated_bss, ETH_ALEN);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment