diff options
author | Jannik Becher <becher.jannik@gmail.com> | 2016-12-20 20:59:47 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-03 18:51:17 +0300 |
commit | 78a9bc730401e5416fefdf168c9f54dd63635c94 (patch) | |
tree | f6be70784df29b0398f6ed448691ac17be9167c0 /drivers | |
parent | 502c80744fcac6b16f28699469c70db499fe2f69 (diff) | |
download | linux-78a9bc730401e5416fefdf168c9f54dd63635c94.tar.xz |
staging: rtl8712: changed u32 to __le32
Fixed sparse warnings.
Deleted cpu_to_le32() for enum. I'm not sure why it was there.
Signed-off-by: Jannik Becher <becher.jannik@gmail.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_event.h | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_mlme.c | 15 | ||||
-rw-r--r-- | drivers/staging/rtl8712/wlan_bssdef.h | 2 |
3 files changed, 9 insertions, 10 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_event.h b/drivers/staging/rtl8712/rtl871x_event.h index 697c8d735150..5db8620980e5 100644 --- a/drivers/staging/rtl8712/rtl871x_event.h +++ b/drivers/staging/rtl8712/rtl871x_event.h @@ -66,7 +66,7 @@ struct joinbss_event { struct stassoc_event { unsigned char macaddr[6]; unsigned char rsvd[2]; - int cam_id; + __le32 cam_id; }; struct stadel_event { diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c index 35cbdc71cad4..fd8d96df02a6 100644 --- a/drivers/staging/rtl8712/rtl871x_mlme.c +++ b/drivers/staging/rtl8712/rtl871x_mlme.c @@ -257,10 +257,10 @@ int r8712_is_same_ibss(struct _adapter *adapter, struct wlan_network *pnetwork) struct security_priv *psecuritypriv = &adapter->securitypriv; if ((psecuritypriv->PrivacyAlgrthm != _NO_PRIVACY_) && - (pnetwork->network.Privacy == 0)) + (pnetwork->network.Privacy == cpu_to_le32(0))) ret = false; else if ((psecuritypriv->PrivacyAlgrthm == _NO_PRIVACY_) && - (pnetwork->network.Privacy == 1)) + (pnetwork->network.Privacy == cpu_to_le32(1))) ret = false; else ret = true; @@ -933,7 +933,7 @@ void r8712_stassoc_event_callback(struct _adapter *adapter, u8 *pbuf) return; /* to do : init sta_info variable */ psta->qos_option = 0; - psta->mac_id = le32_to_cpu((uint)pstassoc->cam_id); + psta->mac_id = le32_to_cpu(pstassoc->cam_id); /* psta->aid = (uint)pstassoc->cam_id; */ if (adapter->securitypriv.AuthAlgrthm == 2) @@ -1637,14 +1637,14 @@ void r8712_update_registrypriv_dev_network(struct _adapter *adapter) pdev_network->Rssi = 0; switch (pregistrypriv->wireless_mode) { case WIRELESS_11B: - pdev_network->NetworkTypeInUse = cpu_to_le32(Ndis802_11DS); + pdev_network->NetworkTypeInUse = Ndis802_11DS; break; case WIRELESS_11G: case WIRELESS_11BG: - pdev_network->NetworkTypeInUse = cpu_to_le32(Ndis802_11OFDM24); + pdev_network->NetworkTypeInUse = Ndis802_11OFDM24; break; case WIRELESS_11A: - pdev_network->NetworkTypeInUse = cpu_to_le32(Ndis802_11OFDM5); + pdev_network->NetworkTypeInUse = Ndis802_11OFDM5; break; default: /* TODO */ @@ -1654,8 +1654,7 @@ void r8712_update_registrypriv_dev_network(struct _adapter *adapter) pregistrypriv->channel); if (cur_network->network.InfrastructureMode == Ndis802_11IBSS) pdev_network->Configuration.ATIMWindow = cpu_to_le32(3); - pdev_network->InfrastructureMode = cpu_to_le32( - cur_network->network.InfrastructureMode); + pdev_network->InfrastructureMode = cur_network->network.InfrastructureMode; /* 1. Supported rates * 2. IE */ diff --git a/drivers/staging/rtl8712/wlan_bssdef.h b/drivers/staging/rtl8712/wlan_bssdef.h index 86a88b493a43..c0654ae4d70d 100644 --- a/drivers/staging/rtl8712/wlan_bssdef.h +++ b/drivers/staging/rtl8712/wlan_bssdef.h @@ -83,7 +83,7 @@ struct wlan_bssid_ex { unsigned char MacAddress[6]; u8 Reserved[2]; struct ndis_802_11_ssid Ssid; - u32 Privacy; + __le32 Privacy; s32 Rssi; enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse; struct NDIS_802_11_CONFIGURATION Configuration; |