staging: rtl8723au: Eliminate HW_VAR_MAC_ADDR usage
authorJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 9 Apr 2014 21:20:19 +0000 (23:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Apr 2014 15:28:59 +0000 (08:28 -0700)
.... and rip out a couple of unnecessary layers of function calls

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/hal/hal_com.c
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
drivers/staging/rtl8723au/hal/usb_halinit.c
drivers/staging/rtl8723au/include/hal_com.h
drivers/staging/rtl8723au/include/hal_intf.h

index 5f20117e4e4f8342d4d16fc736b5da94c00d2421..29f42068d3b90681701a73ad3eeab0bd655611c2 100644 (file)
@@ -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
index b66ab21d00734a0eb4544ea17e32bc3fe43ef755..0eccf5304c6779c6a62ccfe51419769126da1bce 100644 (file)
@@ -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;
index e206829d50fa370ff4eb773ad3cdc1ff5284c4b7..eae95ec38516eabdfb47462a3ae6a7bd250cf6f7 100644 (file)
@@ -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);
index 8e94d2e3ecef02cc16fadd00a2d909363c399cbb..b62ca2d4b5b4daae98fd31865719f167be90a5d4 100644 (file)
@@ -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);
 
index 7e6cb41a8355ae1c6c10d12c5c21ba1455d2c633..8334ab0840470c12fe2eeb0f581f48667e0a5884 100644 (file)
@@ -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__ */