From 520179558a83335be07357ae9d2969b1736ca63d Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Sat, 26 Apr 2014 18:55:09 +0200 Subject: [PATCH] staging: rtl8723au: Remove unnecessary typecasts of struct wlan_bssid_ex objects Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/core/rtw_ap.c | 10 +++++----- drivers/staging/rtl8723au/core/rtw_mlme.c | 2 +- drivers/staging/rtl8723au/core/rtw_wlan_util.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c index 77ee182f3e4f..7459825c2abe 100644 --- a/drivers/staging/rtl8723au/core/rtw_ap.c +++ b/drivers/staging/rtl8723au/core/rtw_ap.c @@ -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); diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c b/drivers/staging/rtl8723au/core/rtw_mlme.c index 97f1706fd3cb..b205d0f2e8f4 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme.c @@ -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(); */ diff --git a/drivers/staging/rtl8723au/core/rtw_wlan_util.c b/drivers/staging/rtl8723au/core/rtw_wlan_util.c index f2d77123cbc0..a971c3d67a69 100644 --- a/drivers/staging/rtl8723au/core/rtw_wlan_util.c +++ b/drivers/staging/rtl8723au/core/rtw_wlan_util.c @@ -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); -- 2.39.5