mirror of
https://github.com/torvalds/linux.git
synced 2024-12-14 15:13:52 +00:00
staging: ks7010: change type for rsn_enabled in wpa_status struct
Field rsn_enabled included in wpa_status struct is declared as unsigned int but it is only be set using 0 and 1 values and in conditional if code is just being used as a boolean. Change its type to be a boolean. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
acfb2f32b6
commit
d96f3a7cec
@ -2296,7 +2296,7 @@ static inline void hostif_sme_init(struct ks_wlan_private *priv)
|
||||
static inline void hostif_wpa_init(struct ks_wlan_private *priv)
|
||||
{
|
||||
memset(&priv->wpa, 0, sizeof(priv->wpa));
|
||||
priv->wpa.rsn_enabled = 0;
|
||||
priv->wpa.rsn_enabled = false;
|
||||
priv->wpa.mic_failure.failure = 0;
|
||||
priv->wpa.mic_failure.last_failure_time = 0;
|
||||
priv->wpa.mic_failure.stop = 0;
|
||||
|
@ -338,7 +338,7 @@ struct mic_failure {
|
||||
|
||||
struct wpa_status {
|
||||
int wpa_enabled;
|
||||
unsigned int rsn_enabled;
|
||||
bool rsn_enabled;
|
||||
int version;
|
||||
int pairwise_suite; /* unicast cipher */
|
||||
int group_suite; /* multicast cipher */
|
||||
|
@ -1372,14 +1372,14 @@ static int ks_wlan_set_auth_mode(struct net_device *dev,
|
||||
case IW_AUTH_WPA_VERSION_DISABLED:
|
||||
priv->wpa.version = value;
|
||||
if (priv->wpa.rsn_enabled)
|
||||
priv->wpa.rsn_enabled = 0;
|
||||
priv->wpa.rsn_enabled = false;
|
||||
priv->need_commit |= SME_RSN;
|
||||
break;
|
||||
case IW_AUTH_WPA_VERSION_WPA:
|
||||
case IW_AUTH_WPA_VERSION_WPA2:
|
||||
priv->wpa.version = value;
|
||||
if (!(priv->wpa.rsn_enabled))
|
||||
priv->wpa.rsn_enabled = 1;
|
||||
priv->wpa.rsn_enabled = true;
|
||||
priv->need_commit |= SME_RSN;
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user