[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180329055152.13059-5-quytelda@tamalin.org>
Date: Wed, 28 Mar 2018 22:51:48 -0700
From: Quytelda Kahja <quytelda@...alin.org>
To: gregkh@...uxfoundation.org, wsa@...-dreams.de
Cc: driverdev-devel@...uxdriverproject.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org, Quytelda Kahja <quytelda@...alin.org>
Subject: [PATCH 5/9] 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 <quytelda@...alin.org>
---
drivers/staging/ks7010/ks_hostif.c | 4 ++--
drivers/staging/ks7010/ks_wlan.h | 2 +-
drivers/staging/ks7010/ks_wlan_net.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index a02b73e4e81f..79d21a64ffa2 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 41f89f930f50..df6192be8a3e 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -2767,7 +2767,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;
@@ -2890,7 +2890,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;
--
2.16.3
Powered by blists - more mailing lists