mirror of https://gitee.com/openkylin/linux.git
rtlwifi: move IS_HARDWARE_TYPE_xxx checker to wifi.h
Use rtlpriv instead of rtlhal as argument, so driver and btcoex use the same definitions. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Yan-Hsuan Chuang <yhchuang@realtek.com> Cc: Birming Chiu <birming@realtek.com> Cc: Shaofu <shaofu@realtek.com> Cc: Steven Ting <steventing@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
e7c528615e
commit
58438d9ae1
|
@ -43,22 +43,6 @@
|
|||
#define RT_SDIO_INTERFACE 3
|
||||
#define DEV_BUS_TYPE RT_PCI_INTERFACE
|
||||
|
||||
/* IC type */
|
||||
#define RTL_HW_TYPE(adapter) (rtl_hal((struct rtl_priv *)adapter)->hw_type)
|
||||
|
||||
#define IS_NEW_GENERATION_IC(adapter) \
|
||||
(RTL_HW_TYPE(adapter) >= HARDWARE_TYPE_RTL8192EE)
|
||||
#define IS_HARDWARE_TYPE_8812(adapter) \
|
||||
(RTL_HW_TYPE(adapter) == HARDWARE_TYPE_RTL8812AE)
|
||||
#define IS_HARDWARE_TYPE_8821(adapter) \
|
||||
(RTL_HW_TYPE(adapter) == HARDWARE_TYPE_RTL8821AE)
|
||||
#define IS_HARDWARE_TYPE_8723A(adapter) \
|
||||
(RTL_HW_TYPE(adapter) == HARDWARE_TYPE_RTL8723AE)
|
||||
#define IS_HARDWARE_TYPE_8723B(adapter) \
|
||||
(RTL_HW_TYPE(adapter) == HARDWARE_TYPE_RTL8723BE)
|
||||
#define IS_HARDWARE_TYPE_8192E(adapter) \
|
||||
(RTL_HW_TYPE(adapter) == HARDWARE_TYPE_RTL8192EE)
|
||||
|
||||
#include "halbtc8192e2ant.h"
|
||||
#include "halbtc8723b1ant.h"
|
||||
#include "halbtc8723b2ant.h"
|
||||
|
|
|
@ -352,11 +352,10 @@ u32 rtl92c_get_txdma_status(struct ieee80211_hw *hw)
|
|||
void rtl92c_enable_interrupt(struct ieee80211_hw *hw)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
|
||||
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
|
||||
struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
|
||||
|
||||
if (IS_HARDWARE_TYPE_8192CE(rtlhal)) {
|
||||
if (IS_HARDWARE_TYPE_8192CE(rtlpriv)) {
|
||||
rtl_write_dword(rtlpriv, REG_HIMR, rtlpci->irq_mask[0] &
|
||||
0xFFFFFFFF);
|
||||
rtl_write_dword(rtlpriv, REG_HIMRE, rtlpci->irq_mask[1] &
|
||||
|
|
|
@ -314,35 +314,29 @@ enum hardware_type {
|
|||
HARDWARE_TYPE_RTL8192EE,
|
||||
HARDWARE_TYPE_RTL8821AE,
|
||||
HARDWARE_TYPE_RTL8812AE,
|
||||
HARDWARE_TYPE_RTL8822BE,
|
||||
|
||||
/* keep it last */
|
||||
HARDWARE_TYPE_NUM
|
||||
};
|
||||
|
||||
#define IS_HARDWARE_TYPE_8192SU(rtlhal) \
|
||||
(rtlhal->hw_type == HARDWARE_TYPE_RTL8192SU)
|
||||
#define IS_HARDWARE_TYPE_8192SE(rtlhal) \
|
||||
(rtlhal->hw_type == HARDWARE_TYPE_RTL8192SE)
|
||||
#define IS_HARDWARE_TYPE_8192CE(rtlhal) \
|
||||
(rtlhal->hw_type == HARDWARE_TYPE_RTL8192CE)
|
||||
#define IS_HARDWARE_TYPE_8192CU(rtlhal) \
|
||||
(rtlhal->hw_type == HARDWARE_TYPE_RTL8192CU)
|
||||
#define IS_HARDWARE_TYPE_8192DE(rtlhal) \
|
||||
(rtlhal->hw_type == HARDWARE_TYPE_RTL8192DE)
|
||||
#define IS_HARDWARE_TYPE_8192DU(rtlhal) \
|
||||
(rtlhal->hw_type == HARDWARE_TYPE_RTL8192DU)
|
||||
#define IS_HARDWARE_TYPE_8723E(rtlhal) \
|
||||
(rtlhal->hw_type == HARDWARE_TYPE_RTL8723E)
|
||||
#define IS_HARDWARE_TYPE_8723U(rtlhal) \
|
||||
(rtlhal->hw_type == HARDWARE_TYPE_RTL8723U)
|
||||
#define IS_HARDWARE_TYPE_8192S(rtlhal) \
|
||||
(IS_HARDWARE_TYPE_8192SE(rtlhal) || IS_HARDWARE_TYPE_8192SU(rtlhal))
|
||||
#define IS_HARDWARE_TYPE_8192C(rtlhal) \
|
||||
(IS_HARDWARE_TYPE_8192CE(rtlhal) || IS_HARDWARE_TYPE_8192CU(rtlhal))
|
||||
#define IS_HARDWARE_TYPE_8192D(rtlhal) \
|
||||
(IS_HARDWARE_TYPE_8192DE(rtlhal) || IS_HARDWARE_TYPE_8192DU(rtlhal))
|
||||
#define IS_HARDWARE_TYPE_8723(rtlhal) \
|
||||
(IS_HARDWARE_TYPE_8723E(rtlhal) || IS_HARDWARE_TYPE_8723U(rtlhal))
|
||||
#define RTL_HW_TYPE(rtlpriv) (rtl_hal((struct rtl_priv *)rtlpriv)->hw_type)
|
||||
#define IS_NEW_GENERATION_IC(rtlpriv) \
|
||||
(RTL_HW_TYPE(rtlpriv) >= HARDWARE_TYPE_RTL8192EE)
|
||||
#define IS_HARDWARE_TYPE_8192CE(rtlpriv) \
|
||||
(RTL_HW_TYPE(rtlpriv) == HARDWARE_TYPE_RTL8192CE)
|
||||
#define IS_HARDWARE_TYPE_8812(rtlpriv) \
|
||||
(RTL_HW_TYPE(rtlpriv) == HARDWARE_TYPE_RTL8812AE)
|
||||
#define IS_HARDWARE_TYPE_8821(rtlpriv) \
|
||||
(RTL_HW_TYPE(rtlpriv) == HARDWARE_TYPE_RTL8821AE)
|
||||
#define IS_HARDWARE_TYPE_8723A(rtlpriv) \
|
||||
(RTL_HW_TYPE(rtlpriv) == HARDWARE_TYPE_RTL8723AE)
|
||||
#define IS_HARDWARE_TYPE_8723B(rtlpriv) \
|
||||
(RTL_HW_TYPE(rtlpriv) == HARDWARE_TYPE_RTL8723BE)
|
||||
#define IS_HARDWARE_TYPE_8192E(rtlpriv) \
|
||||
(RTL_HW_TYPE(rtlpriv) == HARDWARE_TYPE_RTL8192EE)
|
||||
#define IS_HARDWARE_TYPE_8822B(rtlpriv) \
|
||||
(RTL_HW_TYPE(rtlpriv) == HARDWARE_TYPE_RTL8822BE)
|
||||
|
||||
#define RX_HAL_IS_CCK_RATE(rxmcs) \
|
||||
((rxmcs) == DESC_RATE1M || \
|
||||
|
|
Loading…
Reference in New Issue