mirror of https://gitee.com/openkylin/linux.git
Staging: rtl8187se: fix styling issues in r8180_wx.c
This is a patch to the r8180_wx.c which fixes various whitespace issues, brace issues, casting/declaration syntax issues, and increases clarity in multi-line return statement. Signed-off-by: Dan LaManna <dan.lamanna@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
41ad3d5fde
commit
4f4112b2cf
|
@ -517,7 +517,8 @@ static int r8180_wx_set_enc(struct net_device *dev,
|
||||||
|
|
||||||
down(&priv->wx_sem);
|
down(&priv->wx_sem);
|
||||||
|
|
||||||
if (priv->hw_wep) ret = r8180_wx_set_key(dev, info, wrqu, key);
|
if (priv->hw_wep)
|
||||||
|
ret = r8180_wx_set_key(dev, info, wrqu, key);
|
||||||
else {
|
else {
|
||||||
DMESG("Setting SW wep key");
|
DMESG("Setting SW wep key");
|
||||||
ret = ieee80211_wx_set_encode(priv->ieee80211, info, wrqu, key);
|
ret = ieee80211_wx_set_encode(priv->ieee80211, info, wrqu, key);
|
||||||
|
@ -1073,8 +1074,7 @@ static int r8180_wx_set_forcerate(struct net_device *dev,
|
||||||
printk("==============>%s(): forcerate is %d\n", __func__, forcerate);
|
printk("==============>%s(): forcerate is %d\n", __func__, forcerate);
|
||||||
if ((forcerate == 2) || (forcerate == 4) || (forcerate == 11) || (forcerate == 22) || (forcerate == 12) ||
|
if ((forcerate == 2) || (forcerate == 4) || (forcerate == 11) || (forcerate == 22) || (forcerate == 12) ||
|
||||||
(forcerate == 18) || (forcerate == 24) || (forcerate == 36) || (forcerate == 48) || (forcerate == 72) ||
|
(forcerate == 18) || (forcerate == 24) || (forcerate == 36) || (forcerate == 48) || (forcerate == 72) ||
|
||||||
(forcerate == 96) || (forcerate == 108))
|
(forcerate == 96) || (forcerate == 108)) {
|
||||||
{
|
|
||||||
priv->ForcedDataRate = 1;
|
priv->ForcedDataRate = 1;
|
||||||
priv->ieee80211->rate = forcerate * 5;
|
priv->ieee80211->rate = forcerate * 5;
|
||||||
} else if (forcerate == 0) {
|
} else if (forcerate == 0) {
|
||||||
|
@ -1344,14 +1344,27 @@ static inline int is_same_network(struct ieee80211_network *src,
|
||||||
* We treat all <hidden> with the same BSSID and channel
|
* We treat all <hidden> with the same BSSID and channel
|
||||||
* as one network
|
* as one network
|
||||||
*/
|
*/
|
||||||
return (((src->ssid_len == dst->ssid_len) || (ieee->iw_mode == IW_MODE_INFRA)) && /* YJ,mod, 080819,for hidden ap */
|
if (src->channel != dst->channel)
|
||||||
(src->channel == dst->channel) &&
|
return 0;
|
||||||
!memcmp(src->bssid, dst->bssid, ETH_ALEN) &&
|
|
||||||
(!memcmp(src->ssid, dst->ssid, src->ssid_len) || (ieee->iw_mode == IW_MODE_INFRA)) && /* YJ,mod, 080819,for hidden ap */
|
if (memcmp(src->bssid, dst->bssid, ETH_ALEN) != 0)
|
||||||
((src->capability & WLAN_CAPABILITY_IBSS) ==
|
return 0;
|
||||||
(dst->capability & WLAN_CAPABILITY_IBSS)) &&
|
|
||||||
((src->capability & WLAN_CAPABILITY_BSS) ==
|
if (ieee->iw_mode != IW_MODE_INFRA) {
|
||||||
(dst->capability & WLAN_CAPABILITY_BSS)));
|
if (src->ssid_len != dst->ssid_len)
|
||||||
|
return 0;
|
||||||
|
if (memcmp(src->ssid, dst->ssid, src->ssid_len) != 0)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((src->capability & WLAN_CAPABILITY_IBSS) !=
|
||||||
|
(dst->capability & WLAN_CAPABILITY_IBSS))
|
||||||
|
return 0;
|
||||||
|
if ((src->capability & WLAN_CAPABILITY_BSS) !=
|
||||||
|
(dst->capability & WLAN_CAPABILITY_BSS))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* WB modified to show signal to GUI on 18-01-2008 */
|
/* WB modified to show signal to GUI on 18-01-2008 */
|
||||||
|
|
Loading…
Reference in New Issue