staging: ks7010: Change mac_address_valid to a bool instead of int.
authorQuytelda Kahja <quytelda@tamalin.org>
Thu, 29 Mar 2018 05:51:48 +0000 (22:51 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Mar 2018 09:50:39 +0000 (11:50 +0200)
'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 <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_hostif.c
drivers/staging/ks7010/ks_wlan.h
drivers/staging/ks7010/ks_wlan_net.c

index 923f196213b65efed9a4da14205a495727d9c77b..676961cf4103104100256f3e354029c748c3d7e3 100644 (file)
@@ -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);
index f1f6c88adccaf73dc53d7de546ad259d6d792f1e..846bb1041850b96d37ae0937add426609a021256 100644 (file)
@@ -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;
 
index 9693e8fe98b9d37340c8ba7894e7cd7cae1f201d..9078e13b0d4af5fc32e3d862d2b7104fd69977d1 100644 (file)
@@ -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;