mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 19:07:52 +00:00
rndis_wlan: simplify is_associated()
It is not necessary to define the variable ret to receive the return value of the get_bssid() method. Signed-off-by: zuoqilin <zuoqilin@yulong.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210423094940.1593-1-zuoqilin1@163.com
This commit is contained in:
parent
7b7362ba27
commit
ad4d74cd81
1 changed files with 1 additions and 4 deletions
|
@ -1036,14 +1036,11 @@ static bool is_associated(struct usbnet *usbdev)
|
||||||
{
|
{
|
||||||
struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev);
|
struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev);
|
||||||
u8 bssid[ETH_ALEN];
|
u8 bssid[ETH_ALEN];
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (!priv->radio_on)
|
if (!priv->radio_on)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
ret = get_bssid(usbdev, bssid);
|
return (get_bssid(usbdev, bssid) == 0 && !is_zero_ether_addr(bssid));
|
||||||
|
|
||||||
return (ret == 0 && !is_zero_ether_addr(bssid));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int disassociate(struct usbnet *usbdev, bool reset_ssid)
|
static int disassociate(struct usbnet *usbdev, bool reset_ssid)
|
||||||
|
|
Loading…
Reference in a new issue