staging: rtl8723au: Remove unnecessary typecasts of struct wlan_bssid_ex objects
authorJes Sorensen <Jes.Sorensen@redhat.com>
Sat, 26 Apr 2014 16:55:09 +0000 (18:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Apr 2014 17:16:15 +0000 (10:16 -0700)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_ap.c
drivers/staging/rtl8723au/core/rtw_mlme.c
drivers/staging/rtl8723au/core/rtw_wlan_util.c

index 77ee182f3e4f8a334e54fd453e1f89a5cfd89fc8..7459825c2abef1886f34f1006f52d1db633329ec 100644 (file)
@@ -361,7 +361,7 @@ void add_RATid23a(struct rtw_adapter *padapter, struct sta_info *psta, u8 rssi_l
        unsigned int tx_ra_bitmap = 0;
        struct ht_priv *psta_ht = NULL;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-       struct wlan_bssid_ex *pcur_network = (struct wlan_bssid_ex *)&pmlmepriv->cur_network.network;
+       struct wlan_bssid_ex *pcur_network = &pmlmepriv->cur_network.network;
 
        if (psta)
                psta_ht = &psta->htpriv;
@@ -459,7 +459,7 @@ static void update_bmc_sta(struct rtw_adapter *padapter)
        int i, supportRateNum = 0;
        unsigned int tx_ra_bitmap = 0;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-       struct wlan_bssid_ex *pcur_network = (struct wlan_bssid_ex *)&pmlmepriv->cur_network.network;
+       struct wlan_bssid_ex *pcur_network = &pmlmepriv->cur_network.network;
        struct sta_info *psta = rtw_get_bcmc_stainfo23a(padapter);
 
        if (psta)
@@ -652,7 +652,7 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
        struct registry_priv *pregpriv = &padapter->registrypriv;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
        struct security_priv* psecuritypriv = &padapter->securitypriv;
-       struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)&pmlmepriv->cur_network.network;
+       struct wlan_bssid_ex *pnetwork = &pmlmepriv->cur_network.network;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct wlan_bssid_ex *pnetwork_mlmeext = &pmlmeinfo->network;
@@ -766,7 +766,7 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
        update_wireless_mode23a(padapter);
 
        /* udpate capability after cur_wireless_mode updated */
-       update_capinfo23a(padapter, rtw_get_capability23a((struct wlan_bssid_ex *)pnetwork));
+       update_capinfo23a(padapter, rtw_get_capability23a(pnetwork));
 
        /* let pnetwork_mlmeext == pnetwork_mlme. */
        memcpy(pnetwork_mlmeext, pnetwork, pnetwork->Length);
@@ -1047,7 +1047,7 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf,
                HT_info_handler23a(padapter, (struct ndis_802_11_var_ies *)pHT_info_ie);
        }
 
-       pbss_network->Length = get_wlan_bssid_ex_sz((struct wlan_bssid_ex  *)pbss_network);
+       pbss_network->Length = get_wlan_bssid_ex_sz(pbss_network);
 
        /* issue beacon to start bss network */
        start_bss_network(padapter, (u8*)pbss_network);
index 97f1706fd3cba9d5a9cf6afc26423db19bdd4651..b205d0f2e8f4505a4e0630e826c5c5e2e73e579b 100644 (file)
@@ -2249,7 +2249,7 @@ void rtw_update_registrypriv_dev_network23a(struct rtw_adapter* adapter)
        pdev_network->IELength = sz;
 
        pdev_network->Length =
-               get_wlan_bssid_ex_sz((struct wlan_bssid_ex *)pdev_network);
+               get_wlan_bssid_ex_sz(pdev_network);
 
        /* notes: translate IELength & Length after assign the
           Length to cmdsz in createbss_cmd(); */
index f2d77123cbc065195eccaf6188e0a251109d68c7..a971c3d67a69dc183349f05a1ed35fbb8788b9c0 100644 (file)
@@ -1007,7 +1007,7 @@ int rtw_check_bcn_info23a(struct rtw_adapter *Adapter,
        }
 
        /* check encryption info */
-       val16 = rtw_get_capability23a((struct wlan_bssid_ex *)bssid);
+       val16 = rtw_get_capability23a(bssid);
 
        if (val16 & BIT(4))
                bssid->Privacy = 1;
@@ -1141,7 +1141,7 @@ unsigned int is_ap_in_tkip23a(struct rtw_adapter *padapter)
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct wlan_bssid_ex *cur_network = &pmlmeinfo->network;
 
-       if (rtw_get_capability23a((struct wlan_bssid_ex *)cur_network) & WLAN_CAPABILITY_PRIVACY) {
+       if (rtw_get_capability23a(cur_network) & WLAN_CAPABILITY_PRIVACY) {
                for (i = sizeof(struct ndis_802_11_fixed_ies); i < pmlmeinfo->network.IELength;) {
                        pIE = (struct ndis_802_11_var_ies *)(pmlmeinfo->network.IEs + i);
 
@@ -1172,7 +1172,7 @@ unsigned int should_forbid_n_rate23a(struct rtw_adapter * padapter)
        struct mlme_priv        *pmlmepriv = &padapter->mlmepriv;
        struct wlan_bssid_ex  *cur_network = &pmlmepriv->cur_network.network;
 
-       if (rtw_get_capability23a((struct wlan_bssid_ex *)cur_network) & WLAN_CAPABILITY_PRIVACY) {
+       if (rtw_get_capability23a(cur_network) & WLAN_CAPABILITY_PRIVACY) {
                for (i = sizeof(struct ndis_802_11_fixed_ies); i < cur_network->IELength;) {
                        pIE = (struct ndis_802_11_var_ies *)(cur_network->IEs + i);
 
@@ -1207,7 +1207,7 @@ unsigned int is_ap_in_wep23a(struct rtw_adapter *padapter)
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct wlan_bssid_ex *cur_network = &pmlmeinfo->network;
 
-       if (rtw_get_capability23a((struct wlan_bssid_ex *)cur_network) & WLAN_CAPABILITY_PRIVACY) {
+       if (rtw_get_capability23a(cur_network) & WLAN_CAPABILITY_PRIVACY) {
                for (i = sizeof(struct ndis_802_11_fixed_ies); i < pmlmeinfo->network.IELength;) {
                        pIE = (struct ndis_802_11_var_ies *)(pmlmeinfo->network.IEs + i);