From: Jes Sorensen Date: Thu, 17 Jul 2014 20:59:45 +0000 (+0200) Subject: staging: rtl8723au: Eliminate Set_MSR() wrapper call X-Git-Tag: v3.17-rc1~123^2~590 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ee225f0f19b88909b53c8d612e7195379b0553e7;p=karo-tx-linux.git staging: rtl8723au: Eliminate Set_MSR() wrapper call Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c index ab9a66ecb217..1ee8747b129f 100644 --- a/drivers/staging/rtl8723au/core/rtw_ap.c +++ b/drivers/staging/rtl8723au/core/rtw_ap.c @@ -688,7 +688,7 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf) } /* set MSR to AP_Mode */ - Set_MSR23a(padapter, _HW_STATE_AP_); + rtl8723a_set_media_status(padapter, _HW_STATE_AP_); /* Set BSSID REG */ hw_var_set_bssid(padapter, pnetwork->MacAddress); diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index 3655ee5e8347..44f3cd930cd1 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -4102,7 +4102,7 @@ static void rtw_site_survey(struct rtw_adapter *padapter) /* val8 = 0; */ /* config MSR */ - Set_MSR23a(padapter, (pmlmeinfo->state & 0x3)); + rtl8723a_set_media_status(padapter, pmlmeinfo->state & 0x3); /* restore RX GAIN */ rtl8723a_set_initial_gain(padapter, 0xff); @@ -4339,7 +4339,7 @@ static void start_create_ibss(struct rtw_adapter* padapter) /* set msr to WIFI_FW_ADHOC_STATE */ pmlmeinfo->state = WIFI_FW_ADHOC_STATE; - Set_MSR23a(padapter, (pmlmeinfo->state & 0x3)); + rtl8723a_set_media_status(padapter, pmlmeinfo->state & 0x3); /* issue beacon */ if (send_beacon23a(padapter) == _FAIL) @@ -4387,7 +4387,7 @@ static void start_clnt_join(struct rtw_adapter* padapter) /* switch channel */ set_channel_bwmode23a(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); - Set_MSR23a(padapter, WIFI_FW_STATION_STATE); + rtl8723a_set_media_status(padapter, WIFI_FW_STATION_STATE); val8 = (pmlmeinfo->auth_algo == dot11AuthAlgrthm_8021X) ? 0xcc: 0xcf; @@ -4405,7 +4405,7 @@ static void start_clnt_join(struct rtw_adapter* padapter) msecs_to_jiffies((REAUTH_TO * REAUTH_LIMIT) + (REASSOC_TO*REASSOC_LIMIT) + beacon_timeout)); pmlmeinfo->state = WIFI_FW_AUTH_NULL | WIFI_FW_STATION_STATE; } else if (caps & WLAN_CAPABILITY_IBSS) { /* adhoc client */ - Set_MSR23a(padapter, WIFI_FW_ADHOC_STATE); + rtl8723a_set_media_status(padapter, WIFI_FW_ADHOC_STATE); rtl8723a_set_sec_cfg(padapter, 0xcf); @@ -5185,7 +5185,7 @@ void mlmeext_sta_del_event_callback23a(struct rtw_adapter *padapter) pmlmeinfo->state = WIFI_FW_NULL_STATE; /* set MSR to no link state -> infra. mode */ - Set_MSR23a(padapter, _HW_STATE_STATION_); + rtl8723a_set_media_status(padapter, _HW_STATE_STATION_); del_timer_sync(&pmlmeext->link_timer); } @@ -5584,8 +5584,8 @@ int join_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) del_timer_sync(&pmlmeext->link_timer); /* set MSR to nolink -> infra. mode */ - /* Set_MSR23a(padapter, _HW_STATE_NOLINK_); */ - Set_MSR23a(padapter, _HW_STATE_STATION_); + /* rtl8723a_set_media_status(padapter, _HW_STATE_NOLINK_); */ + rtl8723a_set_media_status(padapter, _HW_STATE_STATION_); hw_var_set_mlme_disconnect(padapter); } @@ -5704,7 +5704,7 @@ int disconnect_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) rtl8723a_set_bcn_func(padapter, 0); /* Stop BCN */ /* set MSR to no link state -> infra. mode */ - Set_MSR23a(padapter, _HW_STATE_STATION_); + rtl8723a_set_media_status(padapter, _HW_STATE_STATION_); pmlmeinfo->state = WIFI_FW_NULL_STATE; @@ -5865,7 +5865,7 @@ int sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) rtl8723a_set_initial_gain(padapter, initialgain); /* set MSR to no link state */ - Set_MSR23a(padapter, _HW_STATE_NOLINK_); + rtl8723a_set_media_status(padapter, _HW_STATE_NOLINK_); rtl8723a_mlme_sitesurvey(padapter, 1); diff --git a/drivers/staging/rtl8723au/core/rtw_sreset.c b/drivers/staging/rtl8723au/core/rtw_sreset.c index c152aefb59ea..9a79e11f7ffc 100644 --- a/drivers/staging/rtl8723au/core/rtw_sreset.c +++ b/drivers/staging/rtl8723au/core/rtw_sreset.c @@ -103,7 +103,7 @@ static void sreset_restore_network_station(struct rtw_adapter *padapter) hw_var_set_bssid(padapter, pmlmeinfo->network.MacAddress); hw_var_set_mlme_join(padapter, 0); - Set_MSR23a(padapter, (pmlmeinfo->state & 0x3)); + rtl8723a_set_media_status(padapter, pmlmeinfo->state & 0x3); mlmeext_joinbss_event_callback23a(padapter, 1); /* restore Sequence No. */ diff --git a/drivers/staging/rtl8723au/core/rtw_wlan_util.c b/drivers/staging/rtl8723au/core/rtw_wlan_util.c index 25dae51fa979..59cf5f14b658 100644 --- a/drivers/staging/rtl8723au/core/rtw_wlan_util.c +++ b/drivers/staging/rtl8723au/core/rtw_wlan_util.c @@ -293,11 +293,6 @@ void Update23aTblForSoftAP(u8 *bssrateset, u32 bssratelen) } } -void Set_MSR23a(struct rtw_adapter *padapter, u8 type) -{ - rtl8723a_set_media_status(padapter, type); -} - inline u8 rtw_get_oper_ch23a(struct rtw_adapter *adapter) { return adapter_to_dvobj(adapter)->oper_channel; diff --git a/drivers/staging/rtl8723au/include/rtw_mlme_ext.h b/drivers/staging/rtl8723au/include/rtw_mlme_ext.h index 7fd249f573b5..87803e096d00 100644 --- a/drivers/staging/rtl8723au/include/rtw_mlme_ext.h +++ b/drivers/staging/rtl8723au/include/rtw_mlme_ext.h @@ -471,8 +471,6 @@ void get_rate_set23a(struct rtw_adapter *padapter, unsigned char *pbssrate, void UpdateBrateTbl23a(struct rtw_adapter *padapter,u8 *mBratesOS); void Update23aTblForSoftAP(u8 *bssrateset, u32 bssratelen); -void Set_MSR23a(struct rtw_adapter *padapter, u8 type); - u8 rtw_get_oper_ch23a(struct rtw_adapter *adapter); void rtw_set_oper_ch23a(struct rtw_adapter *adapter, u8 ch); u8 rtw_get_oper_bw23a(struct rtw_adapter *adapter);