Makefile 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708
  1. EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
  2. EXTRA_CFLAGS += -O1
  3. #EXTRA_CFLAGS += -O3
  4. #EXTRA_CFLAGS += -Wall
  5. #EXTRA_CFLAGS += -Wextra
  6. #EXTRA_CFLAGS += -Werror
  7. #EXTRA_CFLAGS += -pedantic
  8. #EXTRA_CFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
  9. EXTRA_CFLAGS += -Wno-unused-variable
  10. EXTRA_CFLAGS += -Wno-unused-value
  11. EXTRA_CFLAGS += -Wno-unused-label
  12. EXTRA_CFLAGS += -Wno-unused-parameter
  13. EXTRA_CFLAGS += -Wno-unused-function
  14. EXTRA_CFLAGS += -Wno-unused
  15. #EXTRA_CFLAGS += -Wno-uninitialized
  16. EXTRA_CFLAGS += -Wno-error=date-time # Fix compile error on gcc 4.9 and later
  17. EXTRA_CFLAGS += -I$(src)/include
  18. EXTRA_CFLAGS += -I$(src)/hal/phydm
  19. EXTRA_LDFLAGS += --strip-debug
  20. CONFIG_AUTOCFG_CP = n
  21. ########################## WIFI IC ############################
  22. CONFIG_MULTIDRV = n
  23. CONFIG_RTL8188E = n
  24. CONFIG_RTL8812A = n
  25. CONFIG_RTL8821A = n
  26. CONFIG_RTL8192E = n
  27. CONFIG_RTL8723B = n
  28. CONFIG_RTL8814A = n
  29. CONFIG_RTL8723C = y
  30. CONFIG_RTL8188F = n
  31. ######################### Interface ###########################
  32. CONFIG_USB_HCI = n
  33. CONFIG_PCI_HCI = n
  34. CONFIG_SDIO_HCI = y
  35. CONFIG_GSPI_HCI = n
  36. ########################## Features ###########################
  37. CONFIG_MP_INCLUDED = y
  38. CONFIG_POWER_SAVING = n # power saving seems broken
  39. CONFIG_USB_AUTOSUSPEND = n
  40. CONFIG_HW_PWRP_DETECTION = n
  41. CONFIG_WIFI_TEST = n
  42. CONFIG_BT_COEXIST = y
  43. CONFIG_INTEL_WIDI = n
  44. CONFIG_WAPI_SUPPORT = n
  45. CONFIG_EFUSE_CONFIG_FILE = n
  46. CONFIG_EXT_CLK = n
  47. CONFIG_TRAFFIC_PROTECT = y
  48. CONFIG_LOAD_PHY_PARA_FROM_FILE = y
  49. CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY = n
  50. CONFIG_CALIBRATE_TX_POWER_TO_MAX = n
  51. CONFIG_RTW_ADAPTIVITY_EN = disable
  52. CONFIG_RTW_ADAPTIVITY_MODE = normal
  53. CONFIG_SIGNAL_SCALE_MAPPING = n
  54. CONFIG_80211W = y
  55. CONFIG_REDUCE_TX_CPU_LOADING = n
  56. CONFIG_BR_EXT = y
  57. CONFIG_ANTENNA_DIVERSITY = n
  58. CONFIG_TDLS = n
  59. CONFIG_WIFI_MONITOR = n
  60. ######################## Wake On Lan ##########################
  61. CONFIG_WOWLAN = n
  62. CONFIG_GPIO_WAKEUP = y
  63. CONFIG_WAKEUP_GPIO_IDX = default
  64. CONFIG_HIGH_ACTIVE = n
  65. CONFIG_PNO_SUPPORT = n
  66. CONFIG_PNO_SET_DEBUG = n
  67. CONFIG_AP_WOWLAN = n
  68. ######### Notify SDIO Host Keep Power During Syspend ##########
  69. CONFIG_RTW_SDIO_PM_KEEP_POWER = n
  70. ###################### Platform Related #######################
  71. CONFIG_PLATFORM_I386_PC = y
  72. CONFIG_PLATFORM_ANDROID_X86 = n
  73. CONFIG_PLATFORM_ANDROID_INTEL_X86 = n
  74. CONFIG_PLATFORM_JB_X86 = n
  75. CONFIG_PLATFORM_ARM_S3C2K4 = n
  76. CONFIG_PLATFORM_ARM_PXA2XX = n
  77. CONFIG_PLATFORM_ARM_S3C6K4 = n
  78. CONFIG_PLATFORM_MIPS_RMI = n
  79. CONFIG_PLATFORM_RTD2880B = n
  80. CONFIG_PLATFORM_MIPS_AR9132 = n
  81. CONFIG_PLATFORM_RTK_DMP = n
  82. CONFIG_PLATFORM_MIPS_PLM = n
  83. CONFIG_PLATFORM_MSTAR389 = n
  84. CONFIG_PLATFORM_MT53XX = n
  85. CONFIG_PLATFORM_ARM_MX51_241H = n
  86. CONFIG_PLATFORM_FS_MX61 = n
  87. CONFIG_PLATFORM_ACTIONS_ATJ227X = n
  88. CONFIG_PLATFORM_TEGRA3_CARDHU = n
  89. CONFIG_PLATFORM_TEGRA4_DALMORE = n
  90. CONFIG_PLATFORM_ARM_TCC8900 = n
  91. CONFIG_PLATFORM_ARM_TCC8920 = n
  92. CONFIG_PLATFORM_ARM_TCC8920_JB42 = n
  93. CONFIG_PLATFORM_ARM_RK2818 = n
  94. CONFIG_PLATFORM_ARM_RK3066 = n
  95. CONFIG_PLATFORM_ARM_RK3188 = n
  96. CONFIG_PLATFORM_ARM_URBETTER = n
  97. CONFIG_PLATFORM_ARM_TI_PANDA = n
  98. CONFIG_PLATFORM_MIPS_JZ4760 = n
  99. CONFIG_PLATFORM_DMP_PHILIPS = n
  100. CONFIG_PLATFORM_MSTAR_TITANIA12 = n
  101. CONFIG_PLATFORM_MSTAR = n
  102. CONFIG_PLATFORM_SZEBOOK = n
  103. CONFIG_PLATFORM_ARM_SUNxI = n
  104. CONFIG_PLATFORM_ARM_SUN6I = n
  105. CONFIG_PLATFORM_ARM_SUN7I = n
  106. CONFIG_PLATFORM_ARM_SUN8I_W3P1 = n
  107. CONFIG_PLATFORM_ARM_SUN8I_W5P1 = n
  108. CONFIG_PLATFORM_ACTIONS_ATM702X = n
  109. CONFIG_PLATFORM_ACTIONS_ATV5201 = n
  110. CONFIG_PLATFORM_ACTIONS_ATM705X = n
  111. CONFIG_PLATFORM_ARM_SUN50IW1P1 = n
  112. CONFIG_PLATFORM_ARM_RTD299X = n
  113. CONFIG_PLATFORM_ARM_SPREADTRUM_6820 = n
  114. CONFIG_PLATFORM_ARM_SPREADTRUM_8810 = n
  115. CONFIG_PLATFORM_ARM_WMT = n
  116. CONFIG_PLATFORM_TI_DM365 = n
  117. CONFIG_PLATFORM_MOZART = n
  118. CONFIG_PLATFORM_RTK119X = n
  119. CONFIG_PLATFORM_NOVATEK_NT72668 = n
  120. CONFIG_PLATFORM_HISILICON = n
  121. ###############################################################
  122. CONFIG_DRVEXT_MODULE = n
  123. export TopDIR ?= $(shell pwd)
  124. ########### COMMON #################################
  125. ifeq ($(CONFIG_GSPI_HCI), y)
  126. HCI_NAME = gspi
  127. endif
  128. ifeq ($(CONFIG_SDIO_HCI), y)
  129. HCI_NAME = sdio
  130. endif
  131. ifeq ($(CONFIG_USB_HCI), y)
  132. HCI_NAME = usb
  133. endif
  134. ifeq ($(CONFIG_PCI_HCI), y)
  135. HCI_NAME = pci
  136. endif
  137. _OS_INTFS_FILES := os_dep/osdep_service.o \
  138. os_dep/linux/os_intfs.o \
  139. os_dep/linux/$(HCI_NAME)_intf.o \
  140. os_dep/linux/$(HCI_NAME)_ops_linux.o \
  141. os_dep/linux/ioctl_linux.o \
  142. os_dep/linux/xmit_linux.o \
  143. os_dep/linux/mlme_linux.o \
  144. os_dep/linux/recv_linux.o \
  145. os_dep/linux/ioctl_cfg80211.o \
  146. os_dep/linux/rtw_cfgvendor.o \
  147. os_dep/linux/wifi_regd.o \
  148. os_dep/linux/rtw_android.o \
  149. os_dep/linux/rtw_proc.o
  150. ifeq ($(CONFIG_MP_INCLUDED), y)
  151. _OS_INTFS_FILES += os_dep/linux/ioctl_mp.o
  152. endif
  153. ifeq ($(CONFIG_SDIO_HCI), y)
  154. _OS_INTFS_FILES += os_dep/linux/custom_gpio_linux.o
  155. _OS_INTFS_FILES += os_dep/linux/$(HCI_NAME)_ops_linux.o
  156. endif
  157. ifeq ($(CONFIG_GSPI_HCI), y)
  158. _OS_INTFS_FILES += os_dep/linux/custom_gpio_linux.o
  159. _OS_INTFS_FILES += os_dep/linux/$(HCI_NAME)_ops_linux.o
  160. endif
  161. _HAL_INTFS_FILES := hal/hal_intf.o \
  162. hal/hal_com.o \
  163. hal/hal_com_phycfg.o \
  164. hal/hal_phy.o \
  165. hal/hal_dm.o \
  166. hal/hal_btcoex.o \
  167. hal/hal_mp.o \
  168. hal/hal_hci/hal_$(HCI_NAME).o \
  169. hal/led/hal_$(HCI_NAME)_led.o
  170. _OUTSRC_FILES := hal/phydm/phydm_debug.o \
  171. hal/phydm/phydm_antdiv.o\
  172. hal/phydm/phydm_antdect.o\
  173. hal/phydm/phydm_interface.o\
  174. hal/phydm/phydm_hwconfig.o\
  175. hal/phydm/phydm.o\
  176. hal/phydm/halphyrf_ce.o\
  177. hal/phydm/phydm_edcaturbocheck.o\
  178. hal/phydm/phydm_dig.o\
  179. hal/phydm/phydm_pathdiv.o\
  180. hal/phydm/phydm_rainfo.o\
  181. hal/phydm/phydm_dynamicbbpowersaving.o\
  182. hal/phydm/phydm_powertracking_ce.o\
  183. hal/phydm/phydm_dynamictxpower.o\
  184. hal/phydm/phydm_adaptivity.o\
  185. hal/phydm/phydm_cfotracking.o\
  186. hal/phydm/phydm_noisemonitor.o\
  187. hal/phydm/phydm_acs.o\
  188. hal/phydm/phydm_beamforming.o\
  189. hal/phydm/txbf/halcomtxbf.o\
  190. hal/phydm/txbf/haltxbfinterface.o
  191. EXTRA_CFLAGS += -I$(src)/platform
  192. _PLATFORM_FILES := platform/platform_ops.o
  193. ifeq ($(CONFIG_BT_COEXIST), y)
  194. EXTRA_CFLAGS += -I$(src)/hal/btc
  195. _OUTSRC_FILES += hal/btc/HalBtc8192e1Ant.o \
  196. hal/btc/HalBtc8192e2Ant.o \
  197. hal/btc/HalBtc8723b1Ant.o \
  198. hal/btc/HalBtc8723b2Ant.o \
  199. hal/btc/HalBtc8812a1Ant.o \
  200. hal/btc/HalBtc8812a2Ant.o \
  201. hal/btc/HalBtc8821a1Ant.o \
  202. hal/btc/HalBtc8821a2Ant.o \
  203. hal/btc/HalBtc8821aCsr2Ant.o \
  204. hal/btc/HalBtc8703b1Ant.o
  205. endif
  206. ########### HAL_RTL8188E #################################
  207. ifeq ($(CONFIG_RTL8188E), y)
  208. RTL871X = rtl8188e
  209. ifeq ($(CONFIG_SDIO_HCI), y)
  210. MODULE_NAME = 8189es
  211. endif
  212. ifeq ($(CONFIG_GSPI_HCI), y)
  213. MODULE_NAME = 8189es
  214. endif
  215. ifeq ($(CONFIG_USB_HCI), y)
  216. MODULE_NAME = 8188eu
  217. endif
  218. ifeq ($(CONFIG_PCI_HCI), y)
  219. MODULE_NAME = 8188ee
  220. endif
  221. EXTRA_CFLAGS += -DCONFIG_RTL8188E
  222. _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
  223. hal/$(RTL871X)/Hal8188EPwrSeq.o\
  224. hal/$(RTL871X)/$(RTL871X)_xmit.o\
  225. hal/$(RTL871X)/$(RTL871X)_sreset.o
  226. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  227. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  228. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  229. hal/$(RTL871X)/$(RTL871X)_dm.o \
  230. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  231. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  232. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  233. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  234. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  235. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  236. ifeq ($(CONFIG_SDIO_HCI), y)
  237. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  238. else
  239. ifeq ($(CONFIG_GSPI_HCI), y)
  240. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  241. else
  242. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  243. endif
  244. endif
  245. ifeq ($(CONFIG_USB_HCI), y)
  246. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8188E_USB.o
  247. endif
  248. ifeq ($(CONFIG_PCI_HCI), y)
  249. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8188E_PCIE.o
  250. endif
  251. ifeq ($(CONFIG_SDIO_HCI), y)
  252. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8188E_SDIO.o
  253. endif
  254. #hal/OUTSRC/$(RTL871X)/Hal8188EFWImg_CE.o
  255. _OUTSRC_FILES += hal/phydm/$(RTL871X)/halhwimg8188e_mac.o\
  256. hal/phydm/$(RTL871X)/halhwimg8188e_bb.o\
  257. hal/phydm/$(RTL871X)/halhwimg8188e_rf.o\
  258. hal/phydm/$(RTL871X)/halhwimg8188e_t_fw.o\
  259. hal/phydm/$(RTL871X)/halhwimg8188e_s_fw.o\
  260. hal/phydm/$(RTL871X)/halphyrf_8188e_ce.o\
  261. hal/phydm/$(RTL871X)/phydm_regconfig8188e.o\
  262. hal/phydm/$(RTL871X)/hal8188erateadaptive.o\
  263. hal/phydm/$(RTL871X)/phydm_rtl8188e.o
  264. endif
  265. ########### HAL_RTL8192E #################################
  266. ifeq ($(CONFIG_RTL8192E), y)
  267. RTL871X = rtl8192e
  268. ifeq ($(CONFIG_SDIO_HCI), y)
  269. MODULE_NAME = 8192es
  270. endif
  271. ifeq ($(CONFIG_USB_HCI), y)
  272. MODULE_NAME = 8192eu
  273. endif
  274. ifeq ($(CONFIG_PCI_HCI), y)
  275. MODULE_NAME = 8192ee
  276. endif
  277. EXTRA_CFLAGS += -DCONFIG_RTL8192E
  278. _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
  279. hal/$(RTL871X)/Hal8192EPwrSeq.o\
  280. hal/$(RTL871X)/$(RTL871X)_xmit.o\
  281. hal/$(RTL871X)/$(RTL871X)_sreset.o
  282. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  283. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  284. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  285. hal/$(RTL871X)/$(RTL871X)_dm.o \
  286. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  287. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  288. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  289. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  290. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  291. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  292. ifeq ($(CONFIG_SDIO_HCI), y)
  293. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  294. else
  295. ifeq ($(CONFIG_GSPI_HCI), y)
  296. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  297. else
  298. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  299. endif
  300. endif
  301. ifeq ($(CONFIG_USB_HCI), y)
  302. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8192E_USB.o
  303. endif
  304. ifeq ($(CONFIG_PCI_HCI), y)
  305. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8192E_PCIE.o
  306. endif
  307. #hal/OUTSRC/$(RTL871X)/HalHWImg8188E_FW.o
  308. _OUTSRC_FILES += hal/phydm/$(RTL871X)/halhwimg8192e_mac.o\
  309. hal/phydm/$(RTL871X)/halhwimg8192e_bb.o\
  310. hal/phydm/$(RTL871X)/halhwimg8192e_rf.o\
  311. hal/phydm/$(RTL871X)/halhwimg8192e_fw.o\
  312. hal/phydm/$(RTL871X)/halphyrf_8192e_ce.o\
  313. hal/phydm/$(RTL871X)/phydm_regconfig8192e.o\
  314. hal/phydm/$(RTL871X)/phydm_rtl8192e.o
  315. endif
  316. ########### HAL_RTL8812A_RTL8821A #################################
  317. ifneq ($(CONFIG_RTL8812A)_$(CONFIG_RTL8821A), n_n)
  318. RTL871X = rtl8812a
  319. ifeq ($(CONFIG_USB_HCI), y)
  320. MODULE_NAME = 8812au
  321. endif
  322. ifeq ($(CONFIG_PCI_HCI), y)
  323. MODULE_NAME = 8812ae
  324. endif
  325. ifeq ($(CONFIG_SDIO_HCI), y)
  326. MODULE_NAME = 8812as
  327. endif
  328. _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
  329. hal/$(RTL871X)/Hal8812PwrSeq.o \
  330. hal/$(RTL871X)/Hal8821APwrSeq.o\
  331. hal/$(RTL871X)/$(RTL871X)_xmit.o\
  332. hal/$(RTL871X)/$(RTL871X)_sreset.o
  333. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  334. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  335. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  336. hal/$(RTL871X)/$(RTL871X)_dm.o \
  337. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  338. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  339. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  340. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  341. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  342. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  343. ifeq ($(CONFIG_SDIO_HCI), y)
  344. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  345. else
  346. ifeq ($(CONFIG_GSPI_HCI), y)
  347. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  348. else
  349. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  350. endif
  351. endif
  352. ifeq ($(CONFIG_RTL8812A), y)
  353. ifeq ($(CONFIG_USB_HCI), y)
  354. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8812A_USB.o
  355. endif
  356. ifeq ($(CONFIG_PCI_HCI), y)
  357. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8812A_PCIE.o
  358. endif
  359. endif
  360. ifeq ($(CONFIG_RTL8821A), y)
  361. ifeq ($(CONFIG_USB_HCI), y)
  362. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8821A_USB.o
  363. endif
  364. ifeq ($(CONFIG_PCI_HCI), y)
  365. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8821A_PCIE.o
  366. endif
  367. endif
  368. ifeq ($(CONFIG_RTL8812A), y)
  369. EXTRA_CFLAGS += -DCONFIG_RTL8812A
  370. _OUTSRC_FILES += hal/phydm/$(RTL871X)/halhwimg8812a_fw.o\
  371. hal/phydm/$(RTL871X)/halhwimg8812a_mac.o\
  372. hal/phydm/$(RTL871X)/halhwimg8812a_bb.o\
  373. hal/phydm/$(RTL871X)/halhwimg8812a_rf.o\
  374. hal/phydm/$(RTL871X)/halphyrf_8812a_ce.o\
  375. hal/phydm/$(RTL871X)/phydm_regconfig8812a.o\
  376. hal/phydm/$(RTL871X)/phydm_rtl8812a.o\
  377. hal/phydm/txbf/haltxbfjaguar.o
  378. endif
  379. ifeq ($(CONFIG_RTL8821A), y)
  380. ifeq ($(CONFIG_RTL8812A), n)
  381. RTL871X = rtl8821a
  382. ifeq ($(CONFIG_USB_HCI), y)
  383. MODULE_NAME := 8821au
  384. endif
  385. ifeq ($(CONFIG_PCI_HCI), y)
  386. MODULE_NAME := 8821ae
  387. endif
  388. ifeq ($(CONFIG_SDIO_HCI), y)
  389. MODULE_NAME := 8821as
  390. endif
  391. endif
  392. EXTRA_CFLAGS += -DCONFIG_RTL8821A
  393. _OUTSRC_FILES += hal/phydm/rtl8821a/halhwimg8821a_fw.o\
  394. hal/phydm/rtl8821a/halhwimg8821a_mac.o\
  395. hal/phydm/rtl8821a/halhwimg8821a_bb.o\
  396. hal/phydm/rtl8821a/halhwimg8821a_rf.o\
  397. hal/phydm/rtl8812a/halphyrf_8812a_ce.o\
  398. hal/phydm/rtl8821a/halphyrf_8821a_ce.o\
  399. hal/phydm/rtl8821a/phydm_regconfig8821a.o\
  400. hal/phydm/rtl8821a/phydm_rtl8821a.o\
  401. hal/phydm/rtl8821a/phydm_iqk_8821a_ce.o\
  402. hal/phydm/txbf/haltxbfjaguar.o
  403. endif
  404. endif
  405. ########### HAL_RTL8723B #################################
  406. ifeq ($(CONFIG_RTL8723B), y)
  407. RTL871X = rtl8723b
  408. ifeq ($(CONFIG_USB_HCI), y)
  409. MODULE_NAME = 8723bu
  410. endif
  411. ifeq ($(CONFIG_PCI_HCI), y)
  412. MODULE_NAME = 8723be
  413. endif
  414. ifeq ($(CONFIG_SDIO_HCI), y)
  415. MODULE_NAME = 8723bs
  416. endif
  417. EXTRA_CFLAGS += -DCONFIG_RTL8723B
  418. _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
  419. hal/$(RTL871X)/Hal8723BPwrSeq.o\
  420. hal/$(RTL871X)/$(RTL871X)_sreset.o
  421. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  422. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  423. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  424. hal/$(RTL871X)/$(RTL871X)_dm.o \
  425. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  426. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  427. _HAL_INTFS_FILES += \
  428. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  429. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  430. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  431. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  432. ifeq ($(CONFIG_PCI_HCI), y)
  433. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  434. else
  435. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  436. endif
  437. ifeq ($(CONFIG_USB_HCI), y)
  438. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8723B_USB.o
  439. endif
  440. ifeq ($(CONFIG_PCI_HCI), y)
  441. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8723B_PCIE.o
  442. endif
  443. _OUTSRC_FILES += hal/phydm/$(RTL871X)/halhwimg8723b_bb.o\
  444. hal/phydm/$(RTL871X)/halhwimg8723b_mac.o\
  445. hal/phydm/$(RTL871X)/halhwimg8723b_rf.o\
  446. hal/phydm/$(RTL871X)/halhwimg8723b_fw.o\
  447. hal/phydm/$(RTL871X)/halhwimg8723b_mp.o\
  448. hal/phydm/$(RTL871X)/phydm_regconfig8723b.o\
  449. hal/phydm/$(RTL871X)/halphyrf_8723b_ce.o\
  450. hal/phydm/$(RTL871X)/phydm_rtl8723b.o
  451. endif
  452. ########### HAL_RTL8814A #################################
  453. ifeq ($(CONFIG_RTL8814A), y)
  454. RTL871X = rtl8814a
  455. ifeq ($(CONFIG_USB_HCI), y)
  456. MODULE_NAME = 8814au
  457. endif
  458. ifeq ($(CONFIG_PCI_HCI), y)
  459. MODULE_NAME = 8814ae
  460. endif
  461. ifeq ($(CONFIG_SDIO_HCI), y)
  462. MODULE_NAME = 8814as
  463. endif
  464. EXTRA_CFLAGS += -DCONFIG_RTL8814A
  465. _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
  466. hal/$(RTL871X)/Hal8814PwrSeq.o \
  467. hal/$(RTL871X)/$(RTL871X)_xmit.o\
  468. hal/$(RTL871X)/$(RTL871X)_sreset.o
  469. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  470. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  471. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  472. hal/$(RTL871X)/$(RTL871X)_dm.o \
  473. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  474. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  475. _HAL_INTFS_FILES += \
  476. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  477. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  478. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  479. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  480. ifeq ($(CONFIG_SDIO_HCI), y)
  481. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  482. else
  483. ifeq ($(CONFIG_GSPI_HCI), y)
  484. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  485. else
  486. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  487. endif
  488. endif
  489. ifeq ($(CONFIG_USB_HCI), y)
  490. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8814A_USB.o
  491. endif
  492. ifeq ($(CONFIG_PCI_HCI), y)
  493. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8814A_PCIE.o
  494. endif
  495. _OUTSRC_FILES += hal/phydm/$(RTL871X)/halhwimg8814a_bb.o\
  496. hal/phydm/$(RTL871X)/halhwimg8814a_mac.o\
  497. hal/phydm/$(RTL871X)/halhwimg8814a_rf.o\
  498. hal/phydm/$(RTL871X)/halhwimg8814a_fw.o\
  499. hal/phydm/$(RTL871X)/phydm_iqk_8814a.o\
  500. hal/phydm/$(RTL871X)/phydm_regconfig8814a.o\
  501. hal/phydm/$(RTL871X)/halphyrf_8814a_ce.o\
  502. hal/phydm/$(RTL871X)/phydm_rtl8814a.o\
  503. hal/phydm/txbf/haltxbf8814a.o
  504. endif
  505. ########### HAL_RTL8723C #################################
  506. ifeq ($(CONFIG_RTL8723C), y)
  507. RTL871X = rtl8703b
  508. ifeq ($(CONFIG_USB_HCI), y)
  509. MODULE_NAME = 8723cu
  510. MODULE_SUB_NAME = 8703bu
  511. endif
  512. ifeq ($(CONFIG_PCI_HCI), y)
  513. MODULE_NAME = 8723ce
  514. MODULE_SUB_NAME = 8703be
  515. endif
  516. ifeq ($(CONFIG_SDIO_HCI), y)
  517. MODULE_NAME = 8723cs
  518. MODULE_SUB_NAME = 8703bs
  519. endif
  520. EXTRA_CFLAGS += -DCONFIG_RTL8703B
  521. _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
  522. hal/$(RTL871X)/Hal8703BPwrSeq.o\
  523. hal/$(RTL871X)/$(RTL871X)_sreset.o
  524. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  525. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  526. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  527. hal/$(RTL871X)/$(RTL871X)_dm.o \
  528. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  529. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  530. _HAL_INTFS_FILES += \
  531. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  532. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_SUB_NAME)_led.o \
  533. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_SUB_NAME)_xmit.o \
  534. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_SUB_NAME)_recv.o
  535. ifeq ($(CONFIG_PCI_HCI), y)
  536. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  537. else
  538. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  539. endif
  540. ifeq ($(CONFIG_USB_HCI), y)
  541. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8703B_USB.o
  542. endif
  543. ifeq ($(CONFIG_PCI_HCI), y)
  544. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8703B_PCIE.o
  545. endif
  546. _OUTSRC_FILES += hal/phydm/$(RTL871X)/halhwimg8703b_bb.o\
  547. hal/phydm/$(RTL871X)/halhwimg8703b_mac.o\
  548. hal/phydm/$(RTL871X)/halhwimg8703b_rf.o\
  549. hal/phydm/$(RTL871X)/halhwimg8703b_fw.o\
  550. hal/phydm/$(RTL871X)/phydm_regconfig8703b.o\
  551. hal/phydm/$(RTL871X)/halphyrf_8703b.o
  552. endif
  553. ########### HAL_RTL8188F #################################
  554. ifeq ($(CONFIG_RTL8188F), y)
  555. RTL871X = rtl8188f
  556. ifeq ($(CONFIG_USB_HCI), y)
  557. MODULE_NAME = 8188fu
  558. endif
  559. ifeq ($(CONFIG_PCI_HCI), y)
  560. MODULE_NAME = 8188fe
  561. endif
  562. ifeq ($(CONFIG_SDIO_HCI), y)
  563. MODULE_NAME = 8189fs
  564. endif
  565. EXTRA_CFLAGS += -DCONFIG_RTL8188F
  566. _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
  567. hal/$(RTL871X)/Hal8188FPwrSeq.o\
  568. hal/$(RTL871X)/$(RTL871X)_sreset.o
  569. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  570. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  571. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  572. hal/$(RTL871X)/$(RTL871X)_dm.o \
  573. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  574. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  575. _HAL_INTFS_FILES += \
  576. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  577. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  578. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  579. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  580. ifeq ($(CONFIG_PCI_HCI), y)
  581. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  582. else
  583. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  584. endif
  585. ifeq ($(CONFIG_USB_HCI), y)
  586. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8188F_USB.o
  587. endif
  588. ifeq ($(CONFIG_SDIO_HCI), y)
  589. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8188F_SDIO.o
  590. endif
  591. _OUTSRC_FILES += hal/phydm/$(RTL871X)/halhwimg8188f_bb.o\
  592. hal/phydm/$(RTL871X)/halhwimg8188f_mac.o\
  593. hal/phydm/$(RTL871X)/halhwimg8188f_rf.o\
  594. hal/phydm/$(RTL871X)/halhwimg8188f_fw.o\
  595. hal/phydm/$(RTL871X)/phydm_regconfig8188f.o\
  596. hal/phydm/$(RTL871X)/halphyrf_8188f.o \
  597. hal/phydm/$(RTL871X)/phydm_rtl8188f.o
  598. endif
  599. ########### AUTO_CFG #################################
  600. ifeq ($(CONFIG_AUTOCFG_CP), y)
  601. ifeq ($(CONFIG_MULTIDRV), y)
  602. $(shell cp $(TopDIR)/autoconf_multidrv_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h)
  603. else
  604. ifeq ($(CONFIG_RTL8188E)$(CONFIG_SDIO_HCI),yy)
  605. $(shell cp $(TopDIR)/autoconf_rtl8189e_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h)
  606. else ifeq ($(CONFIG_RTL8188F)$(CONFIG_SDIO_HCI),yy)
  607. $(shell cp $(TopDIR)/autoconf_rtl8189f_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h)
  608. else ifeq ($(CONFIG_RTL8723C),y)
  609. $(shell cp $(TopDIR)/autoconf_rtl8723c_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h)
  610. else
  611. $(shell cp $(TopDIR)/autoconf_$(RTL871X)_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h)
  612. endif
  613. endif
  614. endif
  615. ########### END OF PATH #################################
  616. ifeq ($(CONFIG_USB_HCI), y)
  617. ifeq ($(CONFIG_USB_AUTOSUSPEND), y)
  618. EXTRA_CFLAGS += -DCONFIG_USB_AUTOSUSPEND
  619. endif
  620. endif
  621. ifeq ($(CONFIG_MP_INCLUDED), y)
  622. #MODULE_NAME := $(MODULE_NAME)_mp
  623. EXTRA_CFLAGS += -DCONFIG_MP_INCLUDED
  624. endif
  625. ifeq ($(CONFIG_POWER_SAVING), y)
  626. EXTRA_CFLAGS += -DCONFIG_POWER_SAVING
  627. endif
  628. ifeq ($(CONFIG_HW_PWRP_DETECTION), y)
  629. EXTRA_CFLAGS += -DCONFIG_HW_PWRP_DETECTION
  630. endif
  631. ifeq ($(CONFIG_WIFI_TEST), y)
  632. EXTRA_CFLAGS += -DCONFIG_WIFI_TEST
  633. endif
  634. ifeq ($(CONFIG_BT_COEXIST), y)
  635. EXTRA_CFLAGS += -DCONFIG_BT_COEXIST
  636. endif
  637. ifeq ($(CONFIG_INTEL_WIDI), y)
  638. EXTRA_CFLAGS += -DCONFIG_INTEL_WIDI
  639. endif
  640. ifeq ($(CONFIG_WAPI_SUPPORT), y)
  641. EXTRA_CFLAGS += -DCONFIG_WAPI_SUPPORT
  642. endif
  643. ifeq ($(CONFIG_EFUSE_CONFIG_FILE), y)
  644. EXTRA_CFLAGS += -DCONFIG_EFUSE_CONFIG_FILE
  645. #EFUSE_MAP_PATH
  646. USER_EFUSE_MAP_PATH ?=
  647. ifneq ($(USER_EFUSE_MAP_PATH),)
  648. EXTRA_CFLAGS += -DEFUSE_MAP_PATH=\"$(USER_EFUSE_MAP_PATH)\"
  649. else ifeq ($(MODULE_NAME), 8189es)
  650. EXTRA_CFLAGS += -DEFUSE_MAP_PATH=\"/system/etc/wifi/wifi_efuse_8189e.map\"
  651. else ifeq ($(MODULE_NAME), 8723bs)
  652. EXTRA_CFLAGS += -DEFUSE_MAP_PATH=\"/system/etc/wifi/wifi_efuse_8723bs.map\"
  653. else
  654. EXTRA_CFLAGS += -DEFUSE_MAP_PATH=\"/system/etc/wifi/wifi_efuse_$(MODULE_NAME).map\"
  655. endif
  656. #WIFIMAC_PATH
  657. USER_WIFIMAC_PATH ?= /lib/firmware/rtlwifi/rtl8723cs_mac.txt
  658. ifneq ($(USER_WIFIMAC_PATH),)
  659. EXTRA_CFLAGS += -DWIFIMAC_PATH=\"$(USER_WIFIMAC_PATH)\"
  660. else
  661. EXTRA_CFLAGS += -DWIFIMAC_PATH=\"/data/wifimac.txt\"
  662. endif
  663. endif
  664. ifeq ($(CONFIG_EXT_CLK), y)
  665. EXTRA_CFLAGS += -DCONFIG_EXT_CLK
  666. endif
  667. ifeq ($(CONFIG_TRAFFIC_PROTECT), y)
  668. EXTRA_CFLAGS += -DCONFIG_TRAFFIC_PROTECT
  669. endif
  670. ifeq ($(CONFIG_LOAD_PHY_PARA_FROM_FILE), y)
  671. EXTRA_CFLAGS += -DCONFIG_LOAD_PHY_PARA_FROM_FILE
  672. #EXTRA_CFLAGS += -DREALTEK_CONFIG_PATH=\"/lib/firmware/\"
  673. EXTRA_CFLAGS += -DREALTEK_CONFIG_PATH=\"\"
  674. endif
  675. ifeq ($(CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY), y)
  676. EXTRA_CFLAGS += -DCONFIG_CALIBRATE_TX_POWER_BY_REGULATORY
  677. endif
  678. ifeq ($(CONFIG_CALIBRATE_TX_POWER_TO_MAX), y)
  679. EXTRA_CFLAGS += -DCONFIG_CALIBRATE_TX_POWER_TO_MAX
  680. endif
  681. ifeq ($(CONFIG_RTW_ADAPTIVITY_EN), disable)
  682. EXTRA_CFLAGS += -DCONFIG_RTW_ADAPTIVITY_EN=0
  683. else ifeq ($(CONFIG_RTW_ADAPTIVITY_EN), enable)
  684. EXTRA_CFLAGS += -DCONFIG_RTW_ADAPTIVITY_EN=1
  685. endif
  686. ifeq ($(CONFIG_RTW_ADAPTIVITY_MODE), normal)
  687. EXTRA_CFLAGS += -DCONFIG_RTW_ADAPTIVITY_MODE=0
  688. else ifeq ($(CONFIG_RTW_ADAPTIVITY_MODE), carrier_sense)
  689. EXTRA_CFLAGS += -DCONFIG_RTW_ADAPTIVITY_MODE=1
  690. endif
  691. ifeq ($(CONFIG_SIGNAL_SCALE_MAPPING), y)
  692. EXTRA_CFLAGS += -DCONFIG_SIGNAL_SCALE_MAPPING
  693. endif
  694. ifeq ($(CONFIG_80211W), y)
  695. EXTRA_CFLAGS += -DCONFIG_IEEE80211W
  696. endif
  697. ifeq ($(CONFIG_WOWLAN), y)
  698. EXTRA_CFLAGS += -DCONFIG_WOWLAN
  699. ifeq ($(CONFIG_SDIO_HCI), y)
  700. EXTRA_CFLAGS += -DCONFIG_RTW_SDIO_PM_KEEP_POWER
  701. endif
  702. endif
  703. ifeq ($(CONFIG_AP_WOWLAN), y)
  704. EXTRA_CFLAGS += -DCONFIG_AP_WOWLAN
  705. ifeq ($(CONFIG_SDIO_HCI), y)
  706. EXTRA_CFLAGS += -DCONFIG_RTW_SDIO_PM_KEEP_POWER
  707. endif
  708. endif
  709. ifeq ($(CONFIG_PNO_SUPPORT), y)
  710. EXTRA_CFLAGS += -DCONFIG_PNO_SUPPORT
  711. ifeq ($(CONFIG_PNO_SET_DEBUG), y)
  712. EXTRA_CFLAGS += -DCONFIG_PNO_SET_DEBUG
  713. endif
  714. endif
  715. ifeq ($(CONFIG_GPIO_WAKEUP), y)
  716. EXTRA_CFLAGS += -DCONFIG_GPIO_WAKEUP
  717. ifeq ($(CONFIG_HIGH_ACTIVE), y)
  718. EXTRA_CFLAGS += -DHIGH_ACTIVE=1
  719. else
  720. EXTRA_CFLAGS += -DHIGH_ACTIVE=0
  721. endif
  722. endif
  723. ifneq ($(CONFIG_WAKEUP_GPIO_IDX), default)
  724. EXTRA_CFLAGS += -DWAKEUP_GPIO_IDX=$(CONFIG_WAKEUP_GPIO_IDX)
  725. endif
  726. ifeq ($(CONFIG_RTW_SDIO_PM_KEEP_POWER), y)
  727. ifeq ($(CONFIG_SDIO_HCI), y)
  728. EXTRA_CFLAGS += -DCONFIG_RTW_SDIO_PM_KEEP_POWER
  729. endif
  730. endif
  731. ifeq ($(CONFIG_REDUCE_TX_CPU_LOADING), y)
  732. EXTRA_CFLAGS += -DCONFIG_REDUCE_TX_CPU_LOADING
  733. endif
  734. ifeq ($(CONFIG_BR_EXT), y)
  735. BR_NAME = br0
  736. EXTRA_CFLAGS += -DCONFIG_BR_EXT
  737. EXTRA_CFLAGS += '-DCONFIG_BR_EXT_BRNAME="'$(BR_NAME)'"'
  738. endif
  739. ifeq ($(CONFIG_ANTENNA_DIVERSITY), y)
  740. EXTRA_CFLAGS += -DCONFIG_ANTENNA_DIVERSITY
  741. endif
  742. ifeq ($(CONFIG_TDLS), y)
  743. EXTRA_CFLAGS += -DCONFIG_TDLS
  744. endif
  745. ifeq ($(CONFIG_WIFI_MONITOR), y)
  746. EXTRA_CFLAGS += -DCONFIG_WIFI_MONITOR
  747. endif
  748. EXTRA_CFLAGS += -DDM_ODM_SUPPORT_TYPE=0x04
  749. ifeq ($(CONFIG_PLATFORM_I386_PC), y)
  750. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  751. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  752. SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
  753. ARCH ?= $(SUBARCH)
  754. CROSS_COMPILE ?=
  755. KVER := $(shell uname -r)
  756. KSRC := /lib/modules/$(KVER)/build
  757. MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
  758. INSTALL_PREFIX :=
  759. endif
  760. ifeq ($(CONFIG_PLATFORM_ACTIONS_ATM702X), y)
  761. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_ACTIONS_ATM702X
  762. #ARCH := arm
  763. ARCH := $(R_ARCH)
  764. #CROSS_COMPILE := arm-none-linux-gnueabi-
  765. CROSS_COMPILE := $(R_CROSS_COMPILE)
  766. KVER:= 3.4.0
  767. #KSRC := ../../../../build/out/kernel
  768. KSRC := $(KERNEL_BUILD_PATH)
  769. MODULE_NAME :=wlan
  770. endif
  771. ifeq ($(CONFIG_PLATFORM_ACTIONS_ATM705X), y)
  772. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  773. #EXTRA_CFLAGS += -DRTW_ENABLE_WIFI_CONTROL_FUNC
  774. # default setting for Android 4.1, 4.2, 4.3, 4.4
  775. EXTRA_CFLAGS += -DCONFIG_PLATFORM_ACTIONS_ATM705X
  776. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  777. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  778. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  779. # Enable this for Android 5.0
  780. EXTRA_CFLAGS += -DCONFIG_RADIO_WORK
  781. ifeq ($(CONFIG_SDIO_HCI), y)
  782. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  783. _PLATFORM_FILES += platform/platform_arm_act_sdio.o
  784. endif
  785. ARCH := arm
  786. CROSS_COMPILE := /opt/arm-2011.09/bin/arm-none-linux-gnueabi-
  787. KSRC := /home/android_sdk/Action-semi/705a_android_L/android/kernel
  788. endif
  789. ifeq ($(CONFIG_PLATFORM_ARM_SUN50IW1P1), y)
  790. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  791. EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUN50IW1P1
  792. EXTRA_CFLAGS += -DCONFIG_TRAFFIC_PROTECT
  793. # default setting for Android 4.1, 4.2
  794. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  795. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  796. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  797. EXTRA_CFLAGS += -DCONFIG_RESUME_IN_WORKQUEUE
  798. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  799. # Enable this for Android 5.0
  800. EXTRA_CFLAGS += -DCONFIG_RADIO_WORK
  801. ifeq ($(CONFIG_USB_HCI), y)
  802. EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX
  803. _PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o
  804. endif
  805. ifeq ($(CONFIG_SDIO_HCI), y)
  806. _PLATFORM_FILES += platform/platform_ARM_SUN50IW1P1_sdio.o
  807. endif
  808. ARCH := arm64
  809. CROSS_COMPILE ?=
  810. KVER := $(shell uname -r)
  811. KSRC := /lib/modules/$(KVER)/build
  812. # ===Cross compile setting for Android 5.1(64) SDK ===
  813. #CROSS_COMPILE := /home/android_sdk/Allwinner/a64/android-51/lichee/out/sun50iw1p1/android/common/buildroot/external-toolchain/bin/aarch64-linux-gnu-
  814. #KSRC :=/home/android_sdk/Allwinner/a64/android-51/lichee/linux-3.10/
  815. endif
  816. ifeq ($(CONFIG_PLATFORM_TI_AM3517), y)
  817. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_SHUTTLE
  818. CROSS_COMPILE := arm-eabi-
  819. KSRC := $(shell pwd)/../../../Android/kernel
  820. ARCH := arm
  821. endif
  822. ifeq ($(CONFIG_PLATFORM_MSTAR_TITANIA12), y)
  823. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MSTAR -DCONFIG_PLATFORM_MSTAR_TITANIA12
  824. ARCH:=mips
  825. CROSS_COMPILE:= /usr/src/Mstar_kernel/mips-4.3/bin/mips-linux-gnu-
  826. KVER:= 2.6.28.9
  827. KSRC:= /usr/src/Mstar_kernel/2.6.28.9/
  828. endif
  829. ifeq ($(CONFIG_PLATFORM_MSTAR), y)
  830. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  831. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  832. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MSTAR -DCONFIG_USE_USB_BUFFER_ALLOC_TX -DCONFIG_FIX_NR_BULKIN_BUFFER -DCONFIG_PREALLOC_RX_SKB_BUFFER
  833. EXTRA_CFLAGS += -DCONFIG_PLATFORM_MSTAR_HIGH
  834. ARCH:=arm
  835. CROSS_COMPILE:= /usr/src/bin/arm-none-linux-gnueabi-
  836. KVER:= 3.1.10
  837. KSRC:= /usr/src/Mstar_kernel/3.1.10/
  838. endif
  839. ifeq ($(CONFIG_PLATFORM_ANDROID_X86), y)
  840. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  841. SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
  842. ARCH := $(SUBARCH)
  843. CROSS_COMPILE := /media/DATA-2/android-x86/ics-x86_20120130/prebuilt/linux-x86/toolchain/i686-unknown-linux-gnu-4.2.1/bin/i686-unknown-linux-gnu-
  844. KSRC := /media/DATA-2/android-x86/ics-x86_20120130/out/target/product/generic_x86/obj/kernel
  845. MODULE_NAME :=wlan
  846. endif
  847. ifeq ($(CONFIG_PLATFORM_ANDROID_INTEL_X86), y)
  848. EXTRA_CFLAGS += -DCONFIG_PLATFORM_ANDROID_INTEL_X86
  849. EXTRA_CFLAGS += -DCONFIG_PLATFORM_INTEL_BYT
  850. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID
  851. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  852. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  853. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  854. EXTRA_CFLAGS += -DCONFIG_SKIP_SIGNAL_SCALE_MAPPING
  855. ifeq ($(CONFIG_SDIO_HCI), y)
  856. EXTRA_CFLAGS += -DCONFIG_RESUME_IN_WORKQUEUE
  857. endif
  858. endif
  859. ifeq ($(CONFIG_PLATFORM_JB_X86), y)
  860. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  861. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  862. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  863. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  864. SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
  865. ARCH := $(SUBARCH)
  866. CROSS_COMPILE := /home/android_sdk/android-x86_JB/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.7/bin/i686-linux-android-
  867. KSRC := /home/android_sdk/android-x86_JB/out/target/product/x86/obj/kernel/
  868. MODULE_NAME :=wlan
  869. endif
  870. ifeq ($(CONFIG_PLATFORM_ARM_PXA2XX), y)
  871. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  872. ARCH := arm
  873. CROSS_COMPILE := arm-none-linux-gnueabi-
  874. KVER := 2.6.34.1
  875. KSRC ?= /usr/src/linux-2.6.34.1
  876. endif
  877. ifeq ($(CONFIG_PLATFORM_ARM_S3C2K4), y)
  878. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  879. ARCH := arm
  880. CROSS_COMPILE := arm-linux-
  881. KVER := 2.6.24.7_$(ARCH)
  882. KSRC := /usr/src/kernels/linux-$(KVER)
  883. endif
  884. ifeq ($(CONFIG_PLATFORM_ARM_S3C6K4), y)
  885. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  886. ARCH := arm
  887. CROSS_COMPILE := arm-none-linux-gnueabi-
  888. KVER := 2.6.34.1
  889. KSRC ?= /usr/src/linux-2.6.34.1
  890. endif
  891. ifeq ($(CONFIG_PLATFORM_RTD2880B), y)
  892. EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN -DCONFIG_PLATFORM_RTD2880B
  893. ARCH:=
  894. CROSS_COMPILE:=
  895. KVER:=
  896. KSRC:=
  897. endif
  898. ifeq ($(CONFIG_PLATFORM_MIPS_RMI), y)
  899. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  900. ARCH:=mips
  901. CROSS_COMPILE:=mipsisa32r2-uclibc-
  902. KVER:=
  903. KSRC:= /root/work/kernel_realtek
  904. endif
  905. ifeq ($(CONFIG_PLATFORM_MIPS_PLM), y)
  906. EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN
  907. ARCH:=mips
  908. CROSS_COMPILE:=mipsisa32r2-uclibc-
  909. KVER:=
  910. KSRC:= /root/work/kernel_realtek
  911. endif
  912. ifeq ($(CONFIG_PLATFORM_MSTAR389), y)
  913. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MSTAR389
  914. ARCH:=mips
  915. CROSS_COMPILE:= mips-linux-gnu-
  916. KVER:= 2.6.28.10
  917. KSRC:= /home/mstar/mstar_linux/2.6.28.9/
  918. endif
  919. ifeq ($(CONFIG_PLATFORM_MIPS_AR9132), y)
  920. EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN
  921. ARCH := mips
  922. CROSS_COMPILE := mips-openwrt-linux-
  923. KSRC := /home/alex/test_openwrt/tmp/linux-2.6.30.9
  924. endif
  925. ifeq ($(CONFIG_PLATFORM_DMP_PHILIPS), y)
  926. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DRTK_DMP_PLATFORM
  927. ARCH := mips
  928. #CROSS_COMPILE:=/usr/local/msdk-4.3.6-mips-EL-2.6.12.6-0.9.30.3/bin/mipsel-linux-
  929. CROSS_COMPILE:=/usr/local/toolchain_mipsel/bin/mipsel-linux-
  930. KSRC ?=/usr/local/Jupiter/linux-2.6.12
  931. endif
  932. ifeq ($(CONFIG_PLATFORM_RTK_DMP), y)
  933. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DRTK_DMP_PLATFORM -DCONFIG_WIRELESS_EXT
  934. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  935. ifeq ($(CONFIG_USB_HCI), y)
  936. _PLATFORM_FILES += platform/platform_RTK_DMP_usb.o
  937. endif
  938. ARCH:=mips
  939. CROSS_COMPILE:=mipsel-linux-
  940. KVER:=
  941. KSRC ?= /usr/src/DMP_Kernel/jupiter/linux-2.6.12
  942. endif
  943. ifeq ($(CONFIG_PLATFORM_MT53XX), y)
  944. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MT53XX
  945. ARCH:= arm
  946. CROSS_COMPILE:= arm11_mtk_le-
  947. KVER:= 2.6.27
  948. KSRC?= /proj/mtk00802/BD_Compare/BDP/Dev/BDP_V301/BDP_Linux/linux-2.6.27
  949. endif
  950. ifeq ($(CONFIG_PLATFORM_ARM_MX51_241H), y)
  951. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_WISTRON_PLATFORM
  952. ARCH := arm
  953. CROSS_COMPILE := /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-
  954. KVER := 2.6.31
  955. KSRC ?= /lib/modules/2.6.31-770-g0e46b52/source
  956. endif
  957. ifeq ($(CONFIG_PLATFORM_FS_MX61), y)
  958. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  959. ARCH := arm
  960. CROSS_COMPILE := /home/share/CusEnv/FreeScale/arm-eabi-4.4.3/bin/arm-eabi-
  961. KSRC ?= /home/share/CusEnv/FreeScale/FS_kernel_env
  962. endif
  963. ifeq ($(CONFIG_PLATFORM_ACTIONS_ATJ227X), y)
  964. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ACTIONS_ATJ227X
  965. ARCH := mips
  966. CROSS_COMPILE := /home/cnsd4/project/actions/tools-2.6.27/bin/mipsel-linux-gnu-
  967. KVER := 2.6.27
  968. KSRC := /home/cnsd4/project/actions/linux-2.6.27.28
  969. endif
  970. ifeq ($(CONFIG_PLATFORM_TI_DM365), y)
  971. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_TI_DM365
  972. EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_RX
  973. EXTRA_CFLAGS += -DCONFIG_SINGLE_XMIT_BUF -DCONFIG_SINGLE_RECV_BUF
  974. ARCH := arm
  975. #CROSS_COMPILE := /home/cnsd4/Appro/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/bin/arm_v5t_le-
  976. #KSRC := /home/cnsd4/Appro/mv_pro_5.0/montavista/pro/devkit/lsp/ti-davinci/linux-dm365
  977. CROSS_COMPILE := /opt/montavista/pro5.0/devkit/arm/v5t_le/bin/arm-linux-
  978. KSRC:= /home/vivotek/lsp/DM365/kernel_platform/kernel/linux-2.6.18
  979. KERNELOUTPUT := ${PRODUCTDIR}/tmp
  980. KVER := 2.6.18
  981. endif
  982. ifeq ($(CONFIG_PLATFORM_MOZART), y)
  983. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MOZART
  984. ARCH := arm
  985. CROSS_COMPILE := /home/vivotek/lsp/mozart3v2/Mozart3e_Toolchain/build_arm_nofpu/usr/bin/arm-linux-
  986. KVER := $(shell uname -r)
  987. KSRC:= /opt/Vivotek/lsp/mozart3v2/kernel_platform/kernel/mozart_kernel-1.17
  988. KERNELOUTPUT := /home/pink/sample/ODM/IP8136W-VINT/tmp/kernel
  989. endif
  990. ifeq ($(CONFIG_PLATFORM_TEGRA3_CARDHU), y)
  991. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  992. # default setting for Android 4.1, 4.2
  993. EXTRA_CFLAGS += -DRTW_ENABLE_WIFI_CONTROL_FUNC
  994. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  995. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  996. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  997. ARCH := arm
  998. CROSS_COMPILE := /home/android_sdk/nvidia/tegra-16r3-partner-android-4.1_20120723/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
  999. KSRC := /home/android_sdk/nvidia/tegra-16r3-partner-android-4.1_20120723/out/target/product/cardhu/obj/KERNEL
  1000. MODULE_NAME := wlan
  1001. endif
  1002. ifeq ($(CONFIG_PLATFORM_TEGRA4_DALMORE), y)
  1003. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1004. # default setting for Android 4.1, 4.2
  1005. EXTRA_CFLAGS += -DRTW_ENABLE_WIFI_CONTROL_FUNC
  1006. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1007. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1008. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  1009. ARCH := arm
  1010. CROSS_COMPILE := /home/android_sdk/nvidia/tegra-17r9-partner-android-4.2-dalmore_20130131/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
  1011. KSRC := /home/android_sdk/nvidia/tegra-17r9-partner-android-4.2-dalmore_20130131/out/target/product/dalmore/obj/KERNEL
  1012. MODULE_NAME := wlan
  1013. endif
  1014. ifeq ($(CONFIG_PLATFORM_ARM_TCC8900), y)
  1015. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1016. ARCH := arm
  1017. CROSS_COMPILE := /home/android_sdk/Telechips/SDK_2304_20110613/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
  1018. KSRC := /home/android_sdk/Telechips/SDK_2304_20110613/kernel
  1019. MODULE_NAME := wlan
  1020. endif
  1021. ifeq ($(CONFIG_PLATFORM_ARM_TCC8920), y)
  1022. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1023. ARCH := arm
  1024. CROSS_COMPILE := /home/android_sdk/Telechips/v12.06_r1-tcc-android-4.0.4/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
  1025. KSRC := /home/android_sdk/Telechips/v12.06_r1-tcc-android-4.0.4/kernel
  1026. MODULE_NAME := wlan
  1027. endif
  1028. ifeq ($(CONFIG_PLATFORM_ARM_TCC8920_JB42), y)
  1029. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1030. # default setting for Android 4.1, 4.2
  1031. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1032. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1033. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  1034. ARCH := arm
  1035. CROSS_COMPILE := /home/android_sdk/Telechips/v13.03_r1-tcc-android-4.2.2_ds_patched/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
  1036. KSRC := /home/android_sdk/Telechips/v13.03_r1-tcc-android-4.2.2_ds_patched/kernel
  1037. MODULE_NAME := wlan
  1038. endif
  1039. ifeq ($(CONFIG_PLATFORM_ARM_RK2818), y)
  1040. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_ROCKCHIPS
  1041. ARCH := arm
  1042. CROSS_COMPILE := /usr/src/release_fae_version/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
  1043. KSRC := /usr/src/release_fae_version/kernel25_A7_281x
  1044. MODULE_NAME := wlan
  1045. endif
  1046. ifeq ($(CONFIG_PLATFORM_ARM_RK3188), y)
  1047. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_ROCKCHIPS
  1048. # default setting for Android 4.1, 4.2, 4.3, 4.4
  1049. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1050. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1051. # default setting for Power control
  1052. EXTRA_CFLAGS += -DRTW_ENABLE_WIFI_CONTROL_FUNC
  1053. EXTRA_CFLAGS += -DRTW_SUPPORT_PLATFORM_SHUTDOWN
  1054. # default setting for Special function
  1055. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  1056. ARCH := arm
  1057. CROSS_COMPILE := /home/android_sdk/Rockchip/Rk3188/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
  1058. KSRC := /home/android_sdk/Rockchip/Rk3188/kernel
  1059. MODULE_NAME := wlan
  1060. endif
  1061. ifeq ($(CONFIG_PLATFORM_ARM_RK3066), y)
  1062. EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_RK3066
  1063. EXTRA_CFLAGS += -DRTW_ENABLE_WIFI_CONTROL_FUNC
  1064. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1065. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1066. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211
  1067. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  1068. ifeq ($(CONFIG_SDIO_HCI), y)
  1069. EXTRA_CFLAGS += -DRTW_SUPPORT_PLATFORM_SHUTDOWN
  1070. endif
  1071. EXTRA_CFLAGS += -fno-pic
  1072. ARCH := arm
  1073. CROSS_COMPILE := /home/android_sdk/Rockchip/rk3066_20130607/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-
  1074. #CROSS_COMPILE := /home/android_sdk/Rockchip/Rk3066sdk/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-
  1075. KSRC := /home/android_sdk/Rockchip/Rk3066sdk/kernel
  1076. MODULE_NAME :=wlan
  1077. endif
  1078. ifeq ($(CONFIG_PLATFORM_ARM_URBETTER), y)
  1079. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN #-DCONFIG_MINIMAL_MEMORY_USAGE
  1080. ARCH := arm
  1081. CROSS_COMPILE := /media/DATA-1/urbetter/arm-2009q3/bin/arm-none-linux-gnueabi-
  1082. KSRC := /media/DATA-1/urbetter/ics-urbetter/kernel
  1083. MODULE_NAME := wlan
  1084. endif
  1085. ifeq ($(CONFIG_PLATFORM_ARM_TI_PANDA), y)
  1086. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN #-DCONFIG_MINIMAL_MEMORY_USAGE
  1087. ARCH := arm
  1088. #CROSS_COMPILE := /media/DATA-1/aosp/ics-aosp_20111227/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
  1089. #KSRC := /media/DATA-1/aosp/android-omap-panda-3.0_20120104
  1090. CROSS_COMPILE := /media/DATA-1/android-4.0/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
  1091. KSRC := /media/DATA-1/android-4.0/panda_kernel/omap
  1092. MODULE_NAME := wlan
  1093. endif
  1094. ifeq ($(CONFIG_PLATFORM_MIPS_JZ4760), y)
  1095. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_MINIMAL_MEMORY_USAGE
  1096. ARCH ?= mips
  1097. CROSS_COMPILE ?= /mnt/sdb5/Ingenic/Umido/mips-4.3/bin/mips-linux-gnu-
  1098. KSRC ?= /mnt/sdb5/Ingenic/Umido/kernel
  1099. endif
  1100. ifeq ($(CONFIG_PLATFORM_SZEBOOK), y)
  1101. EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN
  1102. ARCH:=arm
  1103. CROSS_COMPILE:=/opt/crosstool2/bin/armeb-unknown-linux-gnueabi-
  1104. KVER:= 2.6.31.6
  1105. KSRC:= ../code/linux-2.6.31.6-2020/
  1106. endif
  1107. #Add setting for MN10300
  1108. ifeq ($(CONFIG_PLATFORM_MN10300), y)
  1109. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MN10300
  1110. ARCH := mn10300
  1111. CROSS_COMPILE := mn10300-linux-
  1112. KVER := 2.6.32.2
  1113. KSRC := /home/winuser/work/Plat_sLD2T_V3010/usr/src/linux-2.6.32.2
  1114. INSTALL_PREFIX :=
  1115. endif
  1116. ifeq ($(CONFIG_PLATFORM_ARM_SUNxI), y)
  1117. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1118. EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUNxI
  1119. # default setting for Android 4.1, 4.2
  1120. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1121. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1122. EXTRA_CFLAGS += -DDCONFIG_P2P_IPS
  1123. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  1124. ifeq ($(CONFIG_USB_HCI), y)
  1125. EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX
  1126. _PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o
  1127. endif
  1128. ifeq ($(CONFIG_SDIO_HCI), y)
  1129. # default setting for A10-EVB mmc0
  1130. #EXTRA_CFLAGS += -DCONFIG_WITS_EVB_V13
  1131. _PLATFORM_FILES += platform/platform_ARM_SUNxI_sdio.o
  1132. endif
  1133. ARCH := arm
  1134. #CROSS_COMPILE := arm-none-linux-gnueabi-
  1135. CROSS_COMPILE=/home/android_sdk/Allwinner/a10/android-jb42/lichee-jb42/buildroot/output/external-toolchain/bin/arm-none-linux-gnueabi-
  1136. KVER := 3.0.8
  1137. #KSRC:= ../lichee/linux-3.0/
  1138. KSRC=/home/android_sdk/Allwinner/a10/android-jb42/lichee-jb42/linux-3.0
  1139. endif
  1140. ifeq ($(CONFIG_PLATFORM_ARM_SUN6I), y)
  1141. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1142. EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUN6I
  1143. EXTRA_CFLAGS += -DCONFIG_TRAFFIC_PROTECT
  1144. # default setting for Android 4.1, 4.2, 4.3, 4.4
  1145. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1146. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1147. EXTRA_CFLAGS += -DCONFIG_P2P_IPS -DCONFIG_QOS_OPTIMIZATION
  1148. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  1149. ifeq ($(CONFIG_USB_HCI), y)
  1150. EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX
  1151. _PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o
  1152. endif
  1153. ifeq ($(CONFIG_SDIO_HCI), y)
  1154. # default setting for A31-EVB mmc0
  1155. EXTRA_CFLAGS += -DCONFIG_A31_EVB
  1156. _PLATFORM_FILES += platform/platform_ARM_SUNnI_sdio.o
  1157. endif
  1158. ARCH := arm
  1159. #Android-JB42
  1160. #CROSS_COMPILE := /home/android_sdk/Allwinner/a31/android-jb42/lichee/buildroot/output/external-toolchain/bin/arm-linux-gnueabi-
  1161. #KSRC :=/home/android_sdk/Allwinner/a31/android-jb42/lichee/linux-3.3
  1162. #ifeq ($(CONFIG_USB_HCI), y)
  1163. #MODULE_NAME := 8188eu_sw
  1164. #endif
  1165. # ==== Cross compile setting for kitkat-a3x_v4.5 =====
  1166. CROSS_COMPILE := /home/android_sdk/Allwinner/a31/kitkat-a3x_v4.5/lichee/buildroot/output/external-toolchain/bin/arm-linux-gnueabi-
  1167. KSRC :=/home/android_sdk/Allwinner/a31/kitkat-a3x_v4.5/lichee/linux-3.3
  1168. endif
  1169. ifeq ($(CONFIG_PLATFORM_ARM_SUN7I), y)
  1170. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1171. EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUN7I
  1172. EXTRA_CFLAGS += -DCONFIG_TRAFFIC_PROTECT
  1173. # default setting for Android 4.1, 4.2, 4.3, 4.4
  1174. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1175. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1176. EXTRA_CFLAGS += -DCONFIG_P2P_IPS -DCONFIG_QOS_OPTIMIZATION
  1177. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  1178. ifeq ($(CONFIG_USB_HCI), y)
  1179. EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX
  1180. _PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o
  1181. endif
  1182. ifeq ($(CONFIG_SDIO_HCI), y)
  1183. _PLATFORM_FILES += platform/platform_ARM_SUNnI_sdio.o
  1184. endif
  1185. ARCH := arm
  1186. # ===Cross compile setting for Android 4.2 SDK ===
  1187. #CROSS_COMPILE := /home/android_sdk/Allwinner/a20_evb/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi-
  1188. #KSRC := /home/android_sdk/Allwinner/a20_evb/lichee/linux-3.3
  1189. # ==== Cross compile setting for Android 4.3 SDK =====
  1190. #CROSS_COMPILE := /home/android_sdk/Allwinner/a20/android-jb43/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi-
  1191. #KSRC := /home/android_sdk/Allwinner/a20/android-jb43/lichee/linux-3.4
  1192. # ==== Cross compile setting for kitkat-a20_v4.4 =====
  1193. CROSS_COMPILE := /home/android_sdk/Allwinner/a20/kitkat-a20_v4.4/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi-
  1194. KSRC := /home/android_sdk/Allwinner/a20/kitkat-a20_v4.4/lichee/linux-3.4
  1195. endif
  1196. ifeq ($(CONFIG_PLATFORM_ARM_SUN8I_W3P1), y)
  1197. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1198. EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUN8I
  1199. EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUN8I_W3P1
  1200. EXTRA_CFLAGS += -DCONFIG_TRAFFIC_PROTECT
  1201. # default setting for Android 4.1, 4.2
  1202. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1203. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1204. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  1205. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  1206. ifeq ($(CONFIG_USB_HCI), y)
  1207. EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX
  1208. _PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o
  1209. endif
  1210. ifeq ($(CONFIG_SDIO_HCI), y)
  1211. _PLATFORM_FILES += platform/platform_ARM_SUNnI_sdio.o
  1212. endif
  1213. ARCH := arm
  1214. # ===Cross compile setting for Android 4.2 SDK ===
  1215. #CROSS_COMPILE := /home/android_sdk/Allwinner/a23/android-jb42/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi-
  1216. #KSRC :=/home/android_sdk/Allwinner/a23/android-jb42/lichee/linux-3.4
  1217. # ===Cross compile setting for Android 4.4 SDK ===
  1218. CROSS_COMPILE := /home/android_sdk/Allwinner/a23/android-kk44/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi-
  1219. KSRC :=/home/android_sdk/Allwinner/a23/android-kk44/lichee/linux-3.4
  1220. endif
  1221. ifeq ($(CONFIG_PLATFORM_ARM_SUN8I_W5P1), y)
  1222. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1223. EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUN8I
  1224. EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUN8I_W5P1
  1225. EXTRA_CFLAGS += -DCONFIG_TRAFFIC_PROTECT
  1226. # default setting for Android 4.1, 4.2
  1227. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1228. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1229. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  1230. # Enable this for Android 5.0
  1231. EXTRA_CFLAGS += -DCONFIG_RADIO_WORK
  1232. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  1233. ifeq ($(CONFIG_USB_HCI), y)
  1234. EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX
  1235. _PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o
  1236. endif
  1237. ifeq ($(CONFIG_SDIO_HCI), y)
  1238. _PLATFORM_FILES += platform/platform_ARM_SUNnI_sdio.o
  1239. endif
  1240. ARCH := arm
  1241. # ===Cross compile setting for Android L SDK ===
  1242. CROSS_COMPILE := /home/android_sdk/Allwinner/a33/android-L/lichee/out/sun8iw5p1/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi-
  1243. KSRC :=/home/android_sdk/Allwinner/a33/android-L/lichee/linux-3.4
  1244. endif
  1245. ifeq ($(CONFIG_PLATFORM_ACTIONS_ATV5201), y)
  1246. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ACTIONS_ATV5201
  1247. EXTRA_CFLAGS += -DCONFIG_SDIO_DISABLE_RXFIFO_POLLING_LOOP
  1248. ARCH := mips
  1249. CROSS_COMPILE := mipsel-linux-gnu-
  1250. KVER := $(KERNEL_VER)
  1251. KSRC:= $(CFGDIR)/../../kernel/linux-$(KERNEL_VER)
  1252. endif
  1253. ifeq ($(CONFIG_PLATFORM_ARM_RTD299X), y)
  1254. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1255. EXTRA_CFLAGS += -DUSB_XMITBUF_ALIGN_SZ=1024 -DUSB_PACKET_OFFSET_SZ=0
  1256. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1257. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  1258. ifeq ($(CONFIG_ANDROID), y)
  1259. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1260. # Enable this for Android 5.0
  1261. EXTRA_CFLAGS += -DCONFIG_RADIO_WORK
  1262. endif
  1263. #ARCH, CROSS_COMPILE, KSRC,and MODDESTDIR are provided by external makefile
  1264. INSTALL_PREFIX :=
  1265. endif
  1266. ifeq ($(CONFIG_PLATFORM_HISILICON), y)
  1267. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_HISILICON
  1268. ifeq ($(SUPPORT_CONCURRENT),y)
  1269. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1270. endif
  1271. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1272. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  1273. ARCH := arm
  1274. ifeq ($(CROSS_COMPILE),)
  1275. CROSS_COMPILE = arm-hisiv200-linux-
  1276. endif
  1277. MODULE_NAME := rtl8192eu
  1278. ifeq ($(KSRC),)
  1279. KSRC := ../../../../../../kernel/linux-3.4.y
  1280. endif
  1281. endif
  1282. # Platform setting
  1283. ifeq ($(CONFIG_PLATFORM_ARM_SPREADTRUM_6820), y)
  1284. ifeq ($(CONFIG_ANDROID_2X), y)
  1285. EXTRA_CFLAGS += -DANDROID_2X
  1286. endif
  1287. EXTRA_CFLAGS += -DCONFIG_PLATFORM_SPRD
  1288. EXTRA_CFLAGS += -DPLATFORM_SPREADTRUM_6820
  1289. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1290. ifeq ($(RTL871X), rtl8188e)
  1291. EXTRA_CFLAGS += -DSOFTAP_PS_DURATION=50
  1292. endif
  1293. ifeq ($(CONFIG_SDIO_HCI), y)
  1294. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  1295. _PLATFORM_FILES += platform/platform_sprd_sdio.o
  1296. endif
  1297. endif
  1298. ifeq ($(CONFIG_PLATFORM_ARM_SPREADTRUM_8810), y)
  1299. ifeq ($(CONFIG_ANDROID_2X), y)
  1300. EXTRA_CFLAGS += -DANDROID_2X
  1301. endif
  1302. EXTRA_CFLAGS += -DCONFIG_PLATFORM_SPRD
  1303. EXTRA_CFLAGS += -DPLATFORM_SPREADTRUM_8810
  1304. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1305. ifeq ($(RTL871X), rtl8188e)
  1306. EXTRA_CFLAGS += -DSOFTAP_PS_DURATION=50
  1307. endif
  1308. ifeq ($(CONFIG_SDIO_HCI), y)
  1309. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  1310. _PLATFORM_FILES += platform/platform_sprd_sdio.o
  1311. endif
  1312. endif
  1313. ifeq ($(CONFIG_PLATFORM_ARM_WMT), y)
  1314. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1315. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1316. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1317. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  1318. ifeq ($(CONFIG_SDIO_HCI), y)
  1319. _PLATFORM_FILES += platform/platform_ARM_WMT_sdio.o
  1320. endif
  1321. ARCH := arm
  1322. CROSS_COMPILE := /home/android_sdk/WonderMedia/wm8880-android4.4/toolchain/arm_201103_gcc4.5.2/mybin/arm_1103_le-
  1323. KSRC := /home/android_sdk/WonderMedia/wm8880-android4.4/kernel4.4/
  1324. MODULE_NAME :=8189es_kk
  1325. endif
  1326. ifeq ($(CONFIG_PLATFORM_RTK119X), y)
  1327. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1328. #EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUN7I
  1329. EXTRA_CFLAGS += -DCONFIG_TRAFFIC_PROTECT
  1330. # default setting for Android 4.1, 4.2
  1331. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1332. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1333. #EXTRA_CFLAGS += -DCONFIG_P2P_IPS -DCONFIG_QOS_OPTIMIZATION
  1334. EXTRA_CFLAGS += -DCONFIG_QOS_OPTIMIZATION
  1335. #EXTRA_CFLAGS += -DCONFIG_#PLATFORM_OPS
  1336. ifeq ($(CONFIG_USB_HCI), y)
  1337. EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX
  1338. #_PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o
  1339. endif
  1340. ifeq ($(CONFIG_SDIO_HCI), y)
  1341. _PLATFORM_FILES += platform/platform_ARM_SUNnI_sdio.o
  1342. endif
  1343. ARCH := arm
  1344. # ==== Cross compile setting for Android 4.4 SDK =====
  1345. #CROSS_COMPILE := arm-linux-gnueabihf-
  1346. KVER := 3.10.24
  1347. #KSRC :=/home/android_sdk/Allwinner/a20/android-kitkat44/lichee/linux-3.4
  1348. CROSS_COMPILE := /home/realtek/software_phoenix/phoenix/toolchain/usr/local/arm-2013.11/bin/arm-linux-gnueabihf-
  1349. KSRC := /home/realtek/software_phoenix/linux-kernel
  1350. MODULE_NAME := 8192eu
  1351. endif
  1352. ifeq ($(CONFIG_PLATFORM_NOVATEK_NT72668), y)
  1353. EXTRA_CFLAGS += -DCONFIG_PLATFORM_NOVATEK_NT72668
  1354. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1355. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1356. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1357. EXTRA_CFLAGS += -DDCONFIG_P2P_IPS
  1358. EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_RX
  1359. EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX
  1360. ARCH ?= arm
  1361. CROSS_COMPILE := arm-linux-gnueabihf-
  1362. KVER := 3.8.0
  1363. KSRC := /Custom/Novatek/TCL/linux-3.8_header
  1364. #KSRC := $(KERNELDIR)
  1365. endif
  1366. ifeq ($(CONFIG_MULTIDRV), y)
  1367. ifeq ($(CONFIG_SDIO_HCI), y)
  1368. MODULE_NAME := rtw_sdio
  1369. endif
  1370. ifeq ($(CONFIG_USB_HCI), y)
  1371. MODULE_NAME := rtw_usb
  1372. endif
  1373. ifeq ($(CONFIG_PCI_HCI), y)
  1374. MODULE_NAME := rtw_pci
  1375. endif
  1376. endif
  1377. USER_MODULE_NAME ?=
  1378. ifneq ($(USER_MODULE_NAME),)
  1379. MODULE_NAME := $(USER_MODULE_NAME)
  1380. endif
  1381. ifneq ($(KERNELRELEASE),)
  1382. rtk_core := core/rtw_cmd.o \
  1383. core/rtw_security.o \
  1384. core/rtw_debug.o \
  1385. core/rtw_io.o \
  1386. core/rtw_ioctl_query.o \
  1387. core/rtw_ioctl_set.o \
  1388. core/rtw_ieee80211.o \
  1389. core/rtw_mlme.o \
  1390. core/rtw_mlme_ext.o \
  1391. core/rtw_wlan_util.o \
  1392. core/rtw_vht.o \
  1393. core/rtw_pwrctrl.o \
  1394. core/rtw_rf.o \
  1395. core/rtw_recv.o \
  1396. core/rtw_sta_mgt.o \
  1397. core/rtw_ap.o \
  1398. core/rtw_xmit.o \
  1399. core/rtw_p2p.o \
  1400. core/rtw_tdls.o \
  1401. core/rtw_br_ext.o \
  1402. core/rtw_iol.o \
  1403. core/rtw_sreset.o \
  1404. core/rtw_btcoex.o \
  1405. core/rtw_beamforming.o \
  1406. core/rtw_odm.o \
  1407. core/efuse/rtw_efuse.o
  1408. $(MODULE_NAME)-y += $(rtk_core)
  1409. $(MODULE_NAME)-$(CONFIG_INTEL_WIDI) += core/rtw_intel_widi.o
  1410. $(MODULE_NAME)-$(CONFIG_WAPI_SUPPORT) += core/rtw_wapi.o \
  1411. core/rtw_wapi_sms4.o
  1412. $(MODULE_NAME)-y += $(_OS_INTFS_FILES)
  1413. $(MODULE_NAME)-y += $(_HAL_INTFS_FILES)
  1414. $(MODULE_NAME)-y += $(_OUTSRC_FILES)
  1415. $(MODULE_NAME)-y += $(_PLATFORM_FILES)
  1416. $(MODULE_NAME)-$(CONFIG_MP_INCLUDED) += core/rtw_mp.o \
  1417. core/rtw_mp_ioctl.o
  1418. ifeq ($(CONFIG_RTL8723B), y)
  1419. $(MODULE_NAME)-$(CONFIG_MP_INCLUDED)+= core/rtw_bt_mp.o
  1420. endif
  1421. obj-$(CONFIG_RTL8723CS) := $(MODULE_NAME).o
  1422. else
  1423. export CONFIG_RTL8723CS = m
  1424. all: modules
  1425. modules:
  1426. $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules
  1427. modules_install:
  1428. $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules_install
  1429. strip:
  1430. $(CROSS_COMPILE)strip $(MODULE_NAME).ko --strip-unneeded
  1431. install:
  1432. install -p -m 644 $(MODULE_NAME).ko $(MODDESTDIR)
  1433. /sbin/depmod -a ${KVER}
  1434. uninstall:
  1435. rm -f $(MODDESTDIR)/$(MODULE_NAME).ko
  1436. /sbin/depmod -a ${KVER}
  1437. config_r:
  1438. @echo "make config"
  1439. /bin/bash script/Configure script/config.in
  1440. .PHONY: modules clean
  1441. clean:
  1442. cd hal/phydm/ ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
  1443. cd hal/phydm/ ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
  1444. cd hal/led ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
  1445. cd hal ; rm -fr */*/*.mod.c */*/*.mod */*/*.o */*/.*.cmd */*/*.ko
  1446. cd hal ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
  1447. cd hal ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
  1448. cd core/efuse ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
  1449. cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
  1450. cd os_dep/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
  1451. cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
  1452. cd platform ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
  1453. rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
  1454. rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
  1455. rm -fr .tmp_versions
  1456. endif