Commit d5e27e8b authored by Roger H. Newell's avatar Roger H. Newell Committed by Greg Kroah-Hartman

staging: wilc1000: Removed braces from single block statements

This patch corrects warnings generated by checkpatch.pl by
removing braces from single block statements.
Signed-ff-by: default avatarRoger H. Newell <newell.roger@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 702962f3
...@@ -558,11 +558,11 @@ static void CfgConnectResult(enum conn_event enuConnDisconnEvent, ...@@ -558,11 +558,11 @@ static void CfgConnectResult(enum conn_event enuConnDisconnEvent,
if (!pstrWFIDrv->p2p_connect) if (!pstrWFIDrv->p2p_connect)
wlan_channel = INVALID_CHANNEL; wlan_channel = INVALID_CHANNEL;
if ((pstrWFIDrv->IFC_UP) && (dev == wl->vif[1]->ndev)) { if ((pstrWFIDrv->IFC_UP) && (dev == wl->vif[1]->ndev))
pstrDisconnectNotifInfo->reason = 3; pstrDisconnectNotifInfo->reason = 3;
} else if ((!pstrWFIDrv->IFC_UP) && (dev == wl->vif[1]->ndev)) { else if ((!pstrWFIDrv->IFC_UP) && (dev == wl->vif[1]->ndev))
pstrDisconnectNotifInfo->reason = 1; pstrDisconnectNotifInfo->reason = 1;
}
cfg80211_disconnected(dev, pstrDisconnectNotifInfo->reason, pstrDisconnectNotifInfo->ie, cfg80211_disconnected(dev, pstrDisconnectNotifInfo->reason, pstrDisconnectNotifInfo->ie,
pstrDisconnectNotifInfo->ie_len, false, pstrDisconnectNotifInfo->ie_len, false,
GFP_KERNEL); GFP_KERNEL);
...@@ -739,18 +739,15 @@ static int connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -739,18 +739,15 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
wilc_add_wep_key_bss_sta(vif, sme->key, sme->key_len, wilc_add_wep_key_bss_sta(vif, sme->key, sme->key_len,
sme->key_idx); sme->key_idx);
} else if (sme->crypto.wpa_versions & NL80211_WPA_VERSION_2) { } else if (sme->crypto.wpa_versions & NL80211_WPA_VERSION_2) {
if (sme->crypto.cipher_group == WLAN_CIPHER_SUITE_TKIP) { if (sme->crypto.cipher_group == WLAN_CIPHER_SUITE_TKIP)
u8security = ENCRYPT_ENABLED | WPA2 | TKIP; u8security = ENCRYPT_ENABLED | WPA2 | TKIP;
} else { else
u8security = ENCRYPT_ENABLED | WPA2 | AES; u8security = ENCRYPT_ENABLED | WPA2 | AES;
}
} else if (sme->crypto.wpa_versions & NL80211_WPA_VERSION_1) { } else if (sme->crypto.wpa_versions & NL80211_WPA_VERSION_1) {
if (sme->crypto.cipher_group == WLAN_CIPHER_SUITE_TKIP) { if (sme->crypto.cipher_group == WLAN_CIPHER_SUITE_TKIP)
u8security = ENCRYPT_ENABLED | WPA | TKIP; u8security = ENCRYPT_ENABLED | WPA | TKIP;
} else { else
u8security = ENCRYPT_ENABLED | WPA | AES; u8security = ENCRYPT_ENABLED | WPA | AES;
}
} else { } else {
s32Error = -ENOTSUPP; s32Error = -ENOTSUPP;
netdev_err(dev, "Not supported cipher\n"); netdev_err(dev, "Not supported cipher\n");
...@@ -762,13 +759,12 @@ static int connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -762,13 +759,12 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
if ((sme->crypto.wpa_versions & NL80211_WPA_VERSION_1) if ((sme->crypto.wpa_versions & NL80211_WPA_VERSION_1)
|| (sme->crypto.wpa_versions & NL80211_WPA_VERSION_2)) { || (sme->crypto.wpa_versions & NL80211_WPA_VERSION_2)) {
for (i = 0; i < sme->crypto.n_ciphers_pairwise; i++) { for (i = 0; i < sme->crypto.n_ciphers_pairwise; i++) {
if (sme->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_TKIP) { if (sme->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_TKIP)
u8security = u8security | TKIP; u8security = u8security | TKIP;
} else { else
u8security = u8security | AES; u8security = u8security | AES;
} }
} }
}
switch (sme->auth_type) { switch (sme->auth_type) {
case NL80211_AUTHTYPE_OPEN_SYSTEM: case NL80211_AUTHTYPE_OPEN_SYSTEM:
...@@ -1355,9 +1351,8 @@ static void WILC_WFI_CfgParseRxAction(u8 *buf, u32 len) ...@@ -1355,9 +1351,8 @@ static void WILC_WFI_CfgParseRxAction(u8 *buf, u32 len)
u8 channel_list_attr_index = 0; u8 channel_list_attr_index = 0;
while (index < len) { while (index < len) {
if (buf[index] == GO_INTENT_ATTR_ID) { if (buf[index] == GO_INTENT_ATTR_ID)
buf[index + 3] = (buf[index + 3] & 0x01) | (0x00 << 1); buf[index + 3] = (buf[index + 3] & 0x01) | (0x00 << 1);
}
if (buf[index] == CHANLIST_ATTR_ID) if (buf[index] == CHANLIST_ATTR_ID)
channel_list_attr_index = index; channel_list_attr_index = index;
...@@ -1369,9 +1364,8 @@ static void WILC_WFI_CfgParseRxAction(u8 *buf, u32 len) ...@@ -1369,9 +1364,8 @@ static void WILC_WFI_CfgParseRxAction(u8 *buf, u32 len)
if (channel_list_attr_index) { if (channel_list_attr_index) {
for (i = channel_list_attr_index + 3; i < ((channel_list_attr_index + 3) + buf[channel_list_attr_index + 1]); i++) { for (i = channel_list_attr_index + 3; i < ((channel_list_attr_index + 3) + buf[channel_list_attr_index + 1]); i++) {
if (buf[i] == 0x51) { if (buf[i] == 0x51) {
for (j = i + 2; j < ((i + 2) + buf[i + 1]); j++) { for (j = i + 2; j < ((i + 2) + buf[i + 1]); j++)
buf[j] = wlan_channel; buf[j] = wlan_channel;
}
break; break;
} }
} }
...@@ -1409,9 +1403,8 @@ static void WILC_WFI_CfgParseTxAction(u8 *buf, u32 len, bool bOperChan, u8 iftyp ...@@ -1409,9 +1403,8 @@ static void WILC_WFI_CfgParseTxAction(u8 *buf, u32 len, bool bOperChan, u8 iftyp
if (channel_list_attr_index) { if (channel_list_attr_index) {
for (i = channel_list_attr_index + 3; i < ((channel_list_attr_index + 3) + buf[channel_list_attr_index + 1]); i++) { for (i = channel_list_attr_index + 3; i < ((channel_list_attr_index + 3) + buf[channel_list_attr_index + 1]); i++) {
if (buf[i] == 0x51) { if (buf[i] == 0x51) {
for (j = i + 2; j < ((i + 2) + buf[i + 1]); j++) { for (j = i + 2; j < ((i + 2) + buf[i + 1]); j++)
buf[j] = wlan_channel; buf[j] = wlan_channel;
}
break; break;
} }
} }
......
...@@ -253,10 +253,9 @@ static int wilc_wlan_cfg_set_bin(u8 *frame, u32 offset, u16 id, u8 *b, u32 size) ...@@ -253,10 +253,9 @@ static int wilc_wlan_cfg_set_bin(u8 *frame, u32 offset, u16 id, u8 *b, u32 size)
if ((b != NULL) && (size != 0)) { if ((b != NULL) && (size != 0)) {
memcpy(&buf[4], b, size); memcpy(&buf[4], b, size);
for (i = 0; i < size; i++) { for (i = 0; i < size; i++)
checksum += buf[i + 4]; checksum += buf[i + 4];
} }
}
buf[size + 4] = checksum; buf[size + 4] = checksum;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment