]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: rtl8723au: Use rtl8723au_set_media_status() to replace _InitNetworkType()
authorJes Sorensen <Jes.Sorensen@redhat.com>
Thu, 17 Jul 2014 20:59:47 +0000 (22:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jul 2014 00:54:08 +0000 (17:54 -0700)
Reduce yet another duplicate implementation of set_media_status()

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

index 8a7e644525e29ce2d8951e500b28b84ef529ad0b..d8f9f27e09ac45a91daf5f393aa126505fd2c9ba 100644 (file)
@@ -338,17 +338,6 @@ static void _InitQueuePriority(struct rtw_adapter *Adapter)
        _InitNormalChipQueuePriority(Adapter);
 }
 
-static void _InitNetworkType(struct rtw_adapter *Adapter)
-{
-       u32 value32;
-
-       value32 = rtl8723au_read32(Adapter, REG_CR);
-
-       /*  TODO: use the other function to set network type */
-       value32 = (value32 & ~MASK_NETTYPE) | _NETTYPE(NT_LINK_AP);
-       rtl8723au_write32(Adapter, REG_CR, value32);
-}
-
 static void _InitTransferPageSize(struct rtw_adapter *Adapter)
 {
        /*  Tx page size is always 128. */
@@ -756,7 +745,7 @@ static int rtl8723au_hal_init(struct rtw_adapter *Adapter)
 
        _InitInterrupt(Adapter);
        hw_var_set_macaddr(Adapter, Adapter->eeprompriv.mac_addr);
-       _InitNetworkType(Adapter);/* set msr */
+       rtl8723a_set_media_status(Adapter, MSR_INFRA);
        _InitWMACSetting(Adapter);
        _InitAdaptiveCtrl(Adapter);
        _InitEDCA(Adapter);
index b5d7123f7873a2824a3aae7e063693e770d0d517..8d19b2833f0371949a476bca82e5ab9750b9824d 100644 (file)
@@ -1323,14 +1323,6 @@ Current IOREG MAP
 #define ENSWBCN                                BIT(8)
 #define ENSEC                          BIT(9)
 
-/*  Network type */
-#define _NETTYPE(x)                    (((x) & 0x3) << 16)
-#define MASK_NETTYPE                   0x30000
-#define NT_NO_LINK                     0x0
-#define NT_LINK_AD_HOC                 0x1
-#define NT_LINK_AP                     0x2
-#define NT_AS_AP                       0x3
-
 #define _LBMODE(x)                     (((x) & 0xF) << 24)
 #define MASK_LBMODE                    0xF000000
 #define LOOPBACK_NORMAL                        0x0