]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rtlwifi: btcoex: add macros to check chip type
authorYan-Hsuan Chuang <yhchuang@realtek.com>
Mon, 5 Jun 2017 15:29:51 +0000 (10:29 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 13 Jun 2017 07:02:26 +0000 (10:02 +0300)
For some external functions that have hardware dependency, we need to
know the type of the hardware before invoking them.

Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Ping-Ke Shih <pkshih@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>
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbt_precomp.h

index 39b9a3309cfd653f5fe0abbcaeb619b002b77dc2..2ac989a4b2bb0cb71b412fb17474b3b4176caa35 100644 (file)
 
 #include "halbtcoutsrc.h"
 
+/* Interface type */
+#define RT_PCI_INTERFACE       1
+#define RT_USB_INTERFACE       2
+#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"