From: Jes Sorensen Date: Wed, 9 Apr 2014 21:20:20 +0000 (+0200) Subject: staging: rtl8723au: Eliminate HW_VAR_BSSID usage X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=38dd10b59b726e05cce1abc797cd7f2ead1bc681;p=linux-beck.git staging: rtl8723au: Eliminate HW_VAR_BSSID usage 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 95311bd8fe76..5b89c206928e 100644 --- a/drivers/staging/rtl8723au/core/rtw_ap.c +++ b/drivers/staging/rtl8723au/core/rtw_ap.c @@ -695,7 +695,7 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf) Set_MSR23a(padapter, _HW_STATE_AP_); /* Set BSSID REG */ - rtw_hal_set_hwreg23a(padapter, HW_VAR_BSSID, pnetwork->MacAddress); + hw_var_set_bssid(padapter, pnetwork->MacAddress); /* Set EDCA param reg */ acparm = 0x002F3217; /* VO */ diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index 36b8a732824a..87e4df63b283 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -8008,7 +8008,7 @@ void start_create_ibss23a(struct rtw_adapter* padapter) } else { - rtw_hal_set_hwreg23a(padapter, HW_VAR_BSSID, padapter->registrypriv.dev_network.MacAddress); + hw_var_set_bssid(padapter, padapter->registrypriv.dev_network.MacAddress); join_type = 0; rtw_hal_set_hwreg23a(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); @@ -8698,7 +8698,7 @@ void mlmeext_joinbss_event_callback23a(struct rtw_adapter *padapter, int join_re { join_type = 1; rtw_hal_set_hwreg23a(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); - rtw_hal_set_hwreg23a(padapter, HW_VAR_BSSID, null_addr); + hw_var_set_bssid(padapter, null_addr); /* restore to initial setting. */ update_tx_basic_rate23a(padapter, padapter->registrypriv.wireless_mode); @@ -8833,7 +8833,7 @@ void mlmeext_sta_del_event_callback23a(struct rtw_adapter *padapter) /* set_opmode_cmd(padapter, infra_client_with_mlme); */ hw_var_set_mlme_disconnect(padapter); - rtw_hal_set_hwreg23a(padapter, HW_VAR_BSSID, null_addr); + hw_var_set_bssid(padapter, null_addr); /* restore to initial setting. */ update_tx_basic_rate23a(padapter, padapter->registrypriv.wireless_mode); @@ -9386,8 +9386,7 @@ u8 join_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) /* rtw_hal_set_hwreg23a(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain)); */ - rtw_hal_set_hwreg23a(padapter, HW_VAR_BSSID, - pmlmeinfo->network.MacAddress); + hw_var_set_bssid(padapter, pmlmeinfo->network.MacAddress); join_type = 0; rtw_hal_set_hwreg23a(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); @@ -9417,7 +9416,7 @@ u8 disconnect_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf) /* pmlmeinfo->state = WIFI_FW_NULL_STATE; */ hw_var_set_mlme_disconnect(padapter); - rtw_hal_set_hwreg23a(padapter, HW_VAR_BSSID, null_addr); + hw_var_set_bssid(padapter, null_addr); /* restore to initial setting. */ update_tx_basic_rate23a(padapter, padapter->registrypriv.wireless_mode); diff --git a/drivers/staging/rtl8723au/core/rtw_sreset.c b/drivers/staging/rtl8723au/core/rtw_sreset.c index 4f7459203390..625760d2a67b 100644 --- a/drivers/staging/rtl8723au/core/rtw_sreset.c +++ b/drivers/staging/rtl8723au/core/rtw_sreset.c @@ -142,7 +142,7 @@ static void sreset_restore_network_station(struct rtw_adapter *padapter) /* disable dynamic functions, such as high power, DIG */ /* Switch_DM_Func23a(padapter, DYNAMIC_FUNC_DISABLE, false); */ - rtw_hal_set_hwreg23a(padapter, HW_VAR_BSSID, pmlmeinfo->network.MacAddress); + hw_var_set_bssid(padapter, pmlmeinfo->network.MacAddress); { u8 join_type = 0; diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index 0eccf5304c67..0c1eaed9d44a 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -3007,7 +3007,7 @@ void hw_var_set_macaddr(struct rtw_adapter *padapter, u8 *val) rtw_write8(padapter, (reg_macid + idx), val[idx]); } -static void hw_var_set_bssid(struct rtw_adapter *padapter, u8 *val) +void hw_var_set_bssid(struct rtw_adapter *padapter, u8 *val) { u8 idx = 0; u32 reg_bssid; @@ -3135,10 +3135,6 @@ void SetHwReg8723A(struct rtw_adapter *padapter, u8 variable, u8 *val) u32 *val32 = (u32 *)val; switch (variable) { - case HW_VAR_BSSID: - hw_var_set_bssid(padapter, val); - break; - case HW_VAR_TXPAUSE: rtl8723a_set_tx_pause(padapter, *val); break; diff --git a/drivers/staging/rtl8723au/include/hal_intf.h b/drivers/staging/rtl8723au/include/hal_intf.h index 8334ab084047..eb011360cc0e 100644 --- a/drivers/staging/rtl8723au/include/hal_intf.h +++ b/drivers/staging/rtl8723au/include/hal_intf.h @@ -36,7 +36,6 @@ enum _CHIP_TYPE { }; enum HW_VARIABLES { - HW_VAR_BSSID, HW_VAR_INIT_RTS_RATE, HW_VAR_TXPAUSE, HW_VAR_BCN_FUNC, @@ -380,5 +379,6 @@ void hw_var_set_correct_tsf(struct rtw_adapter *padapter); void hw_var_set_mlme_disconnect(struct rtw_adapter *padapter); void hw_var_set_opmode(struct rtw_adapter *padapter, u8 mode); void hw_var_set_macaddr(struct rtw_adapter *padapter, u8 *val); +void hw_var_set_bssid(struct rtw_adapter *padapter, u8 *val); #endif /* __HAL_INTF_H__ */