EXTRA_CFLAGS = -Idrivers/net/wireless/rt2860v2/include

obj-$(CONFIG_RT2860V2_STA) += rt2860v2_sta.o

rt2860v2_sta-objs += ../rt2860v2/common/crypt_md5.obj
rt2860v2_sta-objs += ../rt2860v2/common/crypt_sha2.obj
rt2860v2_sta-objs += ../rt2860v2/common/crypt_biginteger.obj
rt2860v2_sta-objs += ../rt2860v2/common/crypt_hmac.obj
rt2860v2_sta-objs += ../rt2860v2/common/mlme.obj
rt2860v2_sta-objs += ../rt2860v2/common/cmm_wep.obj
rt2860v2_sta-objs += ../rt2860v2/common/action.obj
rt2860v2_sta-objs += ../rt2860v2/common/ba_action.obj
rt2860v2_sta-objs += ../rt2860v2/common/cmm_data.obj
rt2860v2_sta-objs += ../rt2860v2/common/rtmp_init.obj
rt2860v2_sta-objs += ../rt2860v2/common/cmm_tkip.obj
rt2860v2_sta-objs += ../rt2860v2/common/cmm_aes.obj
rt2860v2_sta-objs += ../rt2860v2/common/cmm_sync.obj
rt2860v2_sta-objs += ../rt2860v2/common/cmm_sanity.obj
rt2860v2_sta-objs += ../rt2860v2/common/cmm_info.obj
rt2860v2_sta-objs += ../rt2860v2/common/cmm_wpa.obj
rt2860v2_sta-objs += ../rt2860v2/common/dfs.obj
#rt2860v2_sta-objs += ../rt2860v2/common/dfs_mcu.obj
rt2860v2_sta-objs += ../rt2860v2/common/spectrum.obj

rt2860v2_sta-objs += ../rt2860v2/common/rtmp_timer.obj
rt2860v2_sta-objs += ../rt2860v2/common/rt_channel.obj
rt2860v2_sta-objs += ../rt2860v2/common/cmm_profile.obj
rt2860v2_sta-objs += ../rt2860v2/common/cmm_asic.obj
rt2860v2_sta-objs += ../rt2860v2/common/rtmp_swmcu.obj
rt2860v2_sta-objs += ../rt2860v2/common/cmm_cfg.obj
rt2860v2_sta-objs += ../rt2860v2/common/eeprom.obj
rt2860v2_sta-objs += ../rt2860v2/common/ee_flash.obj
#rt2860v2_sta-objs += ../rt2860v2/common/rtmp_mcu.obj

rt2860v2_sta-objs += ../rt2860v2/common/cmm_mac_pci.obj
rt2860v2_sta-objs += ../rt2860v2/common/cmm_data_pci.obj


rt2860v2_sta-objs += ../rt2860v2/sta/assoc.obj
rt2860v2_sta-objs += ../rt2860v2/sta/auth.obj
rt2860v2_sta-objs += ../rt2860v2/sta/auth_rsp.obj
rt2860v2_sta-objs += ../rt2860v2/sta/sync.obj
rt2860v2_sta-objs += ../rt2860v2/sta/sanity.obj
rt2860v2_sta-objs += ../rt2860v2/sta/rtmp_data.obj
rt2860v2_sta-objs += ../rt2860v2/sta/connect.obj
rt2860v2_sta-objs +=  ../rt2860v2/sta/wpa.obj


rt2860v2_sta-objs +=  ../rt2860v2/os/linux/rt_linux.obj
rt2860v2_sta-objs +=  ../rt2860v2/os/linux/rt_profile.obj
rt2860v2_sta-objs +=  ../rt2860v2/os/linux/rt_main_dev.obj
rt2860v2_sta-objs +=  ../rt2860v2/os/linux/sta_ioctl.obj
#rt2860v2_sta-objs +=  ../rt2860v2/os/linux/rt_eeprom.obj
rt2860v2_sta-objs +=  ../rt2860v2/os/linux/rt_ate.obj
#rt2860v2_sta-objs +=  ../rt2860v2/common/netif_block.obj

#rt2860v2_sta-objs +=  ../rt2860v2/os/linux/pci_main_dev.obj
rt2860v2_sta-objs +=  ../rt2860v2/os/linux/rbus_main_dev.obj
rt2860v2_sta-objs +=  ../rt2860v2/os/linux/rt_pci_rbus.obj


ifeq ($(CONFIG_RALINK_RT2883),y)
rt2860v2_sta-objs += ../rt2860v2/common/mfb_tlv.obj
endif

ifeq ($(CONFIG_RALINK_RT2880),y)
rt2860v2_sta-objs +=  ../rt2860v2/chips/rt2880.obj
endif

ifeq ($(CONFIG_RALINK_RT2883),y)
rt2860v2_sta-objs +=  ../rt2860v2/chips/rt2883.obj
endif

ifeq ($(CONFIG_RALINK_RT3052),y)
rt2860v2_sta-objs +=  ../rt2860v2/common/rt_rf.obj
rt2860v2_sta-objs +=  ../rt2860v2/chips/rt305x.obj
endif

ifeq ($(CONFIG_RT2860V2_STA_LED),y)
rt2860v2_sta-objs += ../rt2860v2/common/led.obj
endif

ifeq ($(CONFIG_RT2860V2_STA_WAPI),y)
obj-$(CONFIG_RT2860V2_WAPI) += wapi_lib.obj
wapi_lib-objs += ../rt2860v2/common/sms4.obj
wapi_lib-objs += ../rt2860v2/common/wpi_pcrypt.obj
wapi_lib-objs += ../rt2860v2/common/cmm_wapi.obj

rt2860v2_sta-objs += wapi_lib.obj
endif

ifeq ($(CONFIG_RT2860V2_STA_IDS),y)
rt2860v2_ap-objs += ../rt2860v2/ap/ap_ids.obj
endif

ifeq ($(CONFIG_RT2860V2_STA_MESH),y)
rt2860v2_sta-objs += ../rt2860v2/common/mesh_bmpkt.obj 
rt2860v2_sta-objs += ../rt2860v2/common/mesh_ctrl.obj 
rt2860v2_sta-objs += ../rt2860v2/common/mesh_link_mng.obj 
rt2860v2_sta-objs += ../rt2860v2/common/mesh_sanity.obj 
rt2860v2_sta-objs += ../rt2860v2/common/mesh_tlv.obj 
rt2860v2_sta-objs += ../rt2860v2/common/mesh.obj 
rt2860v2_sta-objs += ../rt2860v2/common/mesh_forwarding.obj 
rt2860v2_sta-objs += ../rt2860v2/common/mesh_path_mng.obj 
rt2860v2_sta-objs += ../rt2860v2/common/mlme_ex.obj 
endif

ifeq ($(CONFIG_RT2860V2_STA_DLS),y)
rt2860v2_sta-objs += ../rt2860v2/sta/dls.obj
endif

ifeq ($(CONFIG_RT2860V2_STA_WSC),y)
rt2860v2_sta-objs += ../rt2860v2/common/wsc.obj
rt2860v2_sta-objs += ../rt2860v2/common/wsc_tlv.obj
rt2860v2_sta-objs += ../rt2860v2/common/crypt_dh.obj
rt2860v2_sta-objs += ../rt2860v2/common/crypt_aes.obj
rt2860v2_sta-objs += ../rt2860v2/common/dh_key.obj
rt2860v2_sta-objs += ../rt2860v2/common/evp_enc.obj
endif

ifeq ($(CONFIG_RT2860V2_STA_DPB),y)
rt2860v2_sta-objs += ../rt2860v2/common/cmm_mat.obj
rt2860v2_sta-objs += ../rt2860v2/common/cmm_mat_iparp.obj
rt2860v2_sta-objs += ../rt2860v2/common/cmm_mat_pppoe.obj
rt2860v2_sta-objs += ../rt2860v2/common/cmm_mat_ipv6.obj
endif
###################
#  CFLAGS
##################
EXTRA_CFLAGS += -DAGGREGATION_SUPPORT -DPIGGYBACK_SUPPORT -DWMM_SUPPORT  -DLINUX \
	       -Wall -Wstrict-prototypes -Wno-trigraphs 

EXTRA_CFLAGS += -DCONFIG_STA_SUPPORT -DDBG -DRALINK_ATE -DRALINK_28xx_QA -DRTMP_RBUS_SUPPORT -DRTMP_MAC_PCI -DDOT11_N_SUPPORT -DRELASE_EXCLUDE #-DBLOCK_NET_IF
EXTRA_CFLAGS += -DMERGE_ARCH_TEAM

ifeq ($(CONFIG_RALINK_RT2880),y)
EXTRA_CFLAGS += -DRT2880
endif

ifeq ($(CONFIG_RALINK_RT2883),y)
EXTRA_CFLAGS += -DRT2883
endif

ifeq ($(CONFIG_RALINK_RT3052),y)
EXTRA_CFLAGS += -DRT3052 -DRT305x -DRTMP_RF_RW_SUPPORT
endif

ifeq ($(CONFIG_RT2860V2_STA_WPA_SUPPLICANT),y)
EXTRA_CFLAGS += -DWPA_SUPPLICANT_SUPPORT
endif

ifeq ($(CONFIG_RT2860V2_STA_LED),y)
EXTRA_CFLAGS += -DWLAN_LED
endif

ifeq ($(CONFIG_RT2860V2_SNMP),y)
EXTRA_CFLAGS += -DSNMP_SUPPORT
endif

ifeq ($(CONFIG_RT2860V2_STA_CARRIER),y)
EXTRA_CFLAGS += -DCARRIER_DETECTION_SUPPORT
endif

ifeq ($(CONFIG_RT2860V2_EXT_CHANNEL_LIST),y)
EXTRA_CFLAGS   += -DEXT_BUILD_CHANNEL_LIST
endif

ifeq ($(CONFIG_RT2860V2_STA_IDS),y)
EXTRA_CFLAGS += -DIDS_SUPPORT
endif

ifeq ($(CONFIG_RT2860V2_STA_DLS),y)
EXTRA_CFLAGS += -DQOS_DLS_SUPPORT
endif

ifeq ($(CONFIG_RT2860V2_STA_WAPI),y)
EXTRA_CFLAGS += -DWAPI_SUPPORT
endif

ifeq ($(CONFIG_RT2860V2_STA_MESH),y)
EXTRA_CFLAGS += -DMESH_SUPPORT -DMLME_EX
endif

ifeq ($(CONFIG_RT2860V2_STA_WSC),y)
EXTRA_CFLAGS += -DWSC_STA_SUPPORT
endif

ifeq ($(CONFIG_RT2860V2_STA_DPB),y)
EXTRA_CFLAGS += -DETH_CONVERT_SUPPORT -DMAT_SUPPORT
endif

