mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
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: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220720160302.231516-4-ajay.kathat@microchip.com
This commit is contained in:
parent
f589b5d941
commit
33d4a577c7
1 changed files with 1 additions and 2 deletions
|
@ -1312,12 +1312,11 @@ static int dump_station(struct wiphy *wiphy, struct net_device *dev,
|
||||||
if (idx != 0)
|
if (idx != 0)
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
||||||
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL);
|
|
||||||
|
|
||||||
ret = wilc_get_rssi(vif, &sinfo->signal);
|
ret = wilc_get_rssi(vif, &sinfo->signal);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL);
|
||||||
memcpy(mac, vif->priv.associated_bss, ETH_ALEN);
|
memcpy(mac, vif->priv.associated_bss, ETH_ALEN);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue