From: Quytelda Kahja Date: Thu, 29 Mar 2018 05:51:48 +0000 (-0700) Subject: staging: ks7010: Change mac_address_valid to a bool instead of int. X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=f40cd66b45b3fc2822e3abb254929c6e2820ab91;p=openwrt%2Fstaging%2Fblogic.git staging: ks7010: Change mac_address_valid to a bool instead of int. 'mac_address_valid' is only ever assigned 0 or 1, so it makes more sense to use a bool type for this variable. Signed-off-by: Quytelda Kahja Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 923f196213b6..676961cf4103 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -523,7 +523,7 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv) /* MAC address */ hostif_sme_enqueue(priv, SME_GET_MAC_ADDRESS); memcpy(priv->eth_addr, priv->rxp, ETH_ALEN); - priv->mac_address_valid = 1; + priv->mac_address_valid = true; dev->dev_addr[0] = priv->eth_addr[0]; dev->dev_addr[1] = priv->eth_addr[1]; dev->dev_addr[2] = priv->eth_addr[2]; @@ -638,7 +638,7 @@ void hostif_mib_set_confirm(struct ks_wlan_private *priv) hostif_sme_enqueue(priv, SME_MULTICAST_CONFIRM); break; case LOCAL_CURRENTADDRESS: - priv->mac_address_valid = 1; + priv->mac_address_valid = true; break; case DOT11_RSN_CONFIG_MULTICAST_CIPHER: hostif_sme_enqueue(priv, SME_RSN_MCAST_CONFIRM); diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h index f1f6c88adcca..846bb1041850 100644 --- a/drivers/staging/ks7010/ks_wlan.h +++ b/drivers/staging/ks7010/ks_wlan.h @@ -456,7 +456,7 @@ struct ks_wlan_private { unsigned char firmware_version[128 + 1]; int version_size; - int mac_address_valid; /* Mac Address Status */ + bool mac_address_valid; /* Mac Address Status */ int dev_state; diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c index 9693e8fe98b9..9078e13b0d4a 100644 --- a/drivers/staging/ks7010/ks_wlan_net.c +++ b/drivers/staging/ks7010/ks_wlan_net.c @@ -2752,7 +2752,7 @@ int ks_wlan_set_mac_address(struct net_device *dev, void *addr) memcpy(dev->dev_addr, mac_addr->sa_data, dev->addr_len); memcpy(priv->eth_addr, mac_addr->sa_data, ETH_ALEN); - priv->mac_address_valid = 0; + priv->mac_address_valid = false; hostif_sme_enqueue(priv, SME_MACADDRESS_SET_REQUEST); netdev_info(dev, "ks_wlan: MAC ADDRESS = %pM\n", priv->eth_addr); return 0; @@ -2875,7 +2875,7 @@ int ks_wlan_net_start(struct net_device *dev) /* int rc; */ priv = netdev_priv(dev); - priv->mac_address_valid = 0; + priv->mac_address_valid = false; priv->need_commit = 0; priv->device_open_status = 1;