From: Jes Sorensen Date: Wed, 9 Apr 2014 21:20:19 +0000 (+0200) Subject: staging: rtl8723au: Eliminate HW_VAR_MAC_ADDR usage X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3c5660e7573eecc6423322a27e851185a4f8e58c;p=openwrt%2Fstaging%2Fblogic.git staging: rtl8723au: Eliminate HW_VAR_MAC_ADDR usage .... and rip out a couple of unnecessary layers of function calls Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/hal/hal_com.c b/drivers/staging/rtl8723au/hal/hal_com.c index 5f20117e4e4f..29f42068d3b9 100644 --- a/drivers/staging/rtl8723au/hal/hal_com.c +++ b/drivers/staging/rtl8723au/hal/hal_com.c @@ -344,12 +344,6 @@ bool Hal_MappingOutPipe23a(struct rtw_adapter *pAdapter, u8 NumOutPipe) return result; } -void hal_init_macaddr23a(struct rtw_adapter *adapter) -{ - rtw_hal_set_hwreg23a(adapter, HW_VAR_MAC_ADDR, - adapter->eeprompriv.mac_addr); -} - /* * C2H event format: * Field TRIGGER CONTENT CMD_SEQ CMD_LEN CMD_ID diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index b66ab21d0073..0eccf5304c67 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -2996,7 +2996,7 @@ void hw_var_set_opmode(struct rtw_adapter *padapter, u8 mode) rtw_write8(padapter, MSR, val8); } -static void hw_var_set_macaddr(struct rtw_adapter *padapter, u8 *val) +void hw_var_set_macaddr(struct rtw_adapter *padapter, u8 *val) { u8 idx = 0; u32 reg_macid; @@ -3135,10 +3135,6 @@ void SetHwReg8723A(struct rtw_adapter *padapter, u8 variable, u8 *val) u32 *val32 = (u32 *)val; switch (variable) { - case HW_VAR_MAC_ADDR: - hw_var_set_macaddr(padapter, val); - break; - case HW_VAR_BSSID: hw_var_set_bssid(padapter, val); break; diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c b/drivers/staging/rtl8723au/hal/usb_halinit.c index e206829d50fa..eae95ec38516 100644 --- a/drivers/staging/rtl8723au/hal/usb_halinit.c +++ b/drivers/staging/rtl8723au/hal/usb_halinit.c @@ -779,7 +779,7 @@ static u32 rtl8723au_hal_init(struct rtw_adapter *Adapter) _InitDriverInfoSize(Adapter, DRVINFO_SZ); _InitInterrupt(Adapter); - hal_init_macaddr23a(Adapter);/* set mac_address */ + hw_var_set_macaddr(Adapter, Adapter->eeprompriv.mac_addr); _InitNetworkType(Adapter);/* set msr */ _InitWMACSetting(Adapter); _InitAdaptiveCtrl(Adapter); diff --git a/drivers/staging/rtl8723au/include/hal_com.h b/drivers/staging/rtl8723au/include/hal_com.h index 8e94d2e3ecef..b62ca2d4b5b4 100644 --- a/drivers/staging/rtl8723au/include/hal_com.h +++ b/drivers/staging/rtl8723au/include/hal_com.h @@ -165,8 +165,6 @@ void HalSetBrateCfg23a(struct rtw_adapter *padapter, u8 *mBratesOS); bool Hal_MappingOutPipe23a(struct rtw_adapter *pAdapter, u8 NumOutPipe); -void hal_init_macaddr23a(struct rtw_adapter *adapter); - void c2h_evt_clear23a(struct rtw_adapter *adapter); s32 c2h_evt_read23a(struct rtw_adapter *adapter, u8 *buf); diff --git a/drivers/staging/rtl8723au/include/hal_intf.h b/drivers/staging/rtl8723au/include/hal_intf.h index 7e6cb41a8355..8334ab084047 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_MAC_ADDR, HW_VAR_BSSID, HW_VAR_INIT_RTS_RATE, HW_VAR_TXPAUSE, @@ -380,5 +379,6 @@ c2h_id_filter rtw_hal_c2h_id_filter_ccx23a(struct rtw_adapter *adapter); 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); #endif /* __HAL_INTF_H__ */