Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b1aed93 authored by Rohit Sekhar's avatar Rohit Sekhar
Browse files

Add 'drivers/staging/qcacld-3.0/' from commit '185914d7'

git-subtree-dir: drivers/staging/qcacld-3.0
git-subtree-mainline: a1bad8e5
git-subtree-split: 185914d7
parents a1bad8e5 185914d7
Loading
Loading
Loading
Loading
+180 −0
Original line number Diff line number Diff line
ENABLE_QCACLD := true
ifeq ($(TARGET_USES_QMAA), true)
ifneq ($(TARGET_USES_QMAA_OVERRIDE_WLAN), true)
ENABLE_QCACLD := false
else
ENABLE_QCACLD := true
endif
endif

ifeq  ($(ENABLE_QCACLD), true)
# Android makefile for the WLAN Module
LOCAL_PATH := $(call my-dir)

# Assume no targets will be supported
WLAN_CHIPSET :=

ifeq ($(BOARD_HAS_QCOM_WLAN), true)

# Check if this driver needs be built for current target
ifneq ($(findstring qca_cld3,$(WIFI_DRIVER_BUILT)),)
	WLAN_CHIPSET := qca_cld3
	WLAN_SELECT  := CONFIG_QCA_CLD_WLAN=m
endif

# Build/Package only in case of supported target
ifneq ($(WLAN_CHIPSET),)

# This makefile is only for DLKM
ifneq ($(findstring vendor,$(LOCAL_PATH)),)

ifneq ($(findstring opensource,$(LOCAL_PATH)),)
	WLAN_BLD_DIR := vendor/qcom/opensource/wlan
endif # opensource

# Multi-ko check
LOCAL_DEV_NAME := $(patsubst .%,%,\
	$(lastword $(strip $(subst /, ,$(LOCAL_PATH)))))

ifeq (1, $(strip $(shell expr $(words $(strip $(TARGET_WLAN_CHIP))) \>= 2)))

ifeq ($(LOCAL_DEV_NAME), qcacld-3.0)
LOCAL_MULTI_KO := true
else
LOCAL_MULTI_KO := false
endif

endif

ifeq ($(LOCAL_MULTI_KO), true)
LOCAL_ANDROID_ROOT := $(shell pwd)
LOCAL_WLAN_BLD_DIR := $(LOCAL_ANDROID_ROOT)/$(WLAN_BLD_DIR)
$(shell find $(LOCAL_WLAN_BLD_DIR)/qcacld-3.0/ -maxdepth 1 \
	-name '.*' ! -name '.git' -exec rm -rf {} +)

$(foreach chip, $(TARGET_WLAN_CHIP), \
	$($(shell mkdir -p $(LOCAL_WLAN_BLD_DIR)/qcacld-3.0/.$(chip); \
	ln -sf $(LOCAL_WLAN_BLD_DIR)/qca-wifi-host-cmn \
		$(LOCAL_WLAN_BLD_DIR)/qcacld-3.0/.$(chip)/qca-wifi-host-cmn); \
	$(foreach node, \
	$(shell find $(LOCAL_WLAN_BLD_DIR)/qcacld-3.0/ -maxdepth 1 \
		! -name '.*' ! -name '*~' \
		! -name '.' ! -name 'qcacld-3.0'), \
	$(shell ln -sf $(node) \
	$(LOCAL_WLAN_BLD_DIR)/qcacld-3.0/.$(chip)/$(lastword $(strip $(subst /, ,$(node)))) \
	))))

include $(foreach chip, $(TARGET_WLAN_CHIP), $(LOCAL_PATH)/.$(chip)/Android.mk)

else # Multi-ok check

ifeq ($(WLAN_PROFILE),)
WLAN_PROFILE := default
endif

ifeq ($(LOCAL_DEV_NAME), qcacld-3.0)

LOCAL_DEV_NAME := wlan
LOCAL_MOD_NAME := wlan
CMN_OFFSET := ..
LOCAL_SRC_DIR :=
TARGET_FW_DIR := firmware/wlan/qca_cld
TARGET_CFG_PATH := /vendor/etc/wifi
TARGET_MAC_BIN_PATH := /mnt/vendor/persist

else

LOCAL_SRC_DIR := .$(LOCAL_DEV_NAME)
CMN_OFFSET := .
# Use default profile if WLAN_CFG_USE_DEFAULT defined.
ifeq ($(WLAN_CFG_USE_DEFAULT),)
WLAN_PROFILE := $(LOCAL_DEV_NAME)
endif
TARGET_FW_DIR := firmware/wlan/qca_cld/$(LOCAL_DEV_NAME)
TARGET_CFG_PATH := /vendor/etc/wifi/$(LOCAL_DEV_NAME)
TARGET_MAC_BIN_PATH := /mnt/vendor/persist/$(LOCAL_DEV_NAME)

ifneq ($(TARGET_MULTI_WLAN), true)
LOCAL_MOD_NAME := wlan
DYNAMIC_SINGLE_CHIP := $(LOCAL_DEV_NAME)
else
LOCAL_MOD_NAME := $(LOCAL_DEV_NAME)
endif

endif

# DLKM_DIR was moved for JELLY_BEAN (PLATFORM_SDK 16)
ifeq ($(call is-platform-sdk-version-at-least,16),true)
	DLKM_DIR := $(TOP)/device/qcom/common/dlkm
else
	DLKM_DIR := build/dlkm
endif # platform-sdk-version

# Build wlan.ko as $(WLAN_CHIPSET)_wlan.ko
###########################################################
# This is set once per LOCAL_PATH, not per (kernel) module
KBUILD_OPTIONS := WLAN_ROOT=$(WLAN_BLD_DIR)/qcacld-3.0/$(LOCAL_SRC_DIR)
KBUILD_OPTIONS += WLAN_COMMON_ROOT=$(CMN_OFFSET)/qca-wifi-host-cmn
KBUILD_OPTIONS += WLAN_COMMON_INC=$(WLAN_BLD_DIR)/qca-wifi-host-cmn
KBUILD_OPTIONS += WLAN_FW_API=$(WLAN_BLD_DIR)/fw-api
KBUILD_OPTIONS += WLAN_PROFILE=$(WLAN_PROFILE)
KBUILD_OPTIONS += DYNAMIC_SINGLE_CHIP=$(DYNAMIC_SINGLE_CHIP)

# We are actually building wlan.ko here, as per the
# requirement we are specifying <chipset>_wlan.ko as LOCAL_MODULE.
# This means we need to rename the module to <chipset>_wlan.ko
# after wlan.ko is built.
KBUILD_OPTIONS += MODNAME=$(LOCAL_MOD_NAME)
KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM)
KBUILD_OPTIONS += $(WLAN_SELECT)

ifneq ($(WLAN_CFG_OVERRIDE_$(LOCAL_DEV_NAME)),)
KBUILD_OPTIONS += WLAN_CFG_OVERRIDE="$(WLAN_CFG_OVERRIDE_$(LOCAL_DEV_NAME))"
endif

include $(CLEAR_VARS)
LOCAL_MODULE              := $(WLAN_CHIPSET)_$(LOCAL_DEV_NAME).ko
LOCAL_MODULE_KBUILD_NAME  := $(LOCAL_MOD_NAME).ko
LOCAL_MODULE_DEBUG_ENABLE := true
ifeq ($(PRODUCT_VENDOR_MOVE_ENABLED),true)
    ifeq ($(WIFI_DRIVER_INSTALL_TO_KERNEL_OUT),true)
        LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
    else
        LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/lib/modules/$(WLAN_CHIPSET)
    endif
else
    LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/modules/$(WLAN_CHIPSET)
endif

include $(DLKM_DIR)/AndroidKernelModule.mk
###########################################################

# Create Symbolic link
ifneq ($(findstring $(WLAN_CHIPSET),$(WIFI_DRIVER_DEFAULT)),)
ifeq ($(PRODUCT_VENDOR_MOVE_ENABLED),true)
ifneq ($(WIFI_DRIVER_INSTALL_TO_KERNEL_OUT),)
$(shell mkdir -p $(TARGET_OUT_VENDOR)/lib/modules; \
	ln -sf /$(TARGET_COPY_OUT_VENDOR)/lib/modules/$(WLAN_CHIPSET)/$(LOCAL_MODULE) $(TARGET_OUT_VENDOR)/lib/modules/$(LOCAL_MODULE))
endif
else
$(shell mkdir -p $(TARGET_OUT)/lib/modules; \
	ln -sf /system/lib/modules/$(WLAN_CHIPSET)/$(LOCAL_MODULE) $(TARGET_OUT)/lib/modules/$(LOCAL_MODULE))
endif
endif

ifeq ($(PRODUCT_VENDOR_MOVE_ENABLED),true)
TARGET_FW_PATH := $(TARGET_OUT_VENDOR)/$(TARGET_FW_DIR)
else
TARGET_FW_PATH := $(TARGET_OUT_ETC)/$(TARGET_FW_DIR)
endif

$(shell mkdir -p $(TARGET_FW_PATH); \
	ln -sf $(TARGET_MAC_BIN_PATH)/wlan_mac.bin $(TARGET_FW_PATH)/wlan_mac.bin)
ifneq ($(GENERIC_ODM_IMAGE),true)
$(shell ln -sf $(TARGET_CFG_PATH)/WCNSS_qcom_cfg.ini $(TARGET_FW_PATH)/WCNSS_qcom_cfg.ini)
endif
endif # Multi-ko check
endif # DLKM check
endif # supported target check
endif # WLAN enabled check
endif # ENABLE_QCACLD
+3423 −0

File added.

Preview size limit exceeded, changes collapsed.

+154 −0
Original line number Diff line number Diff line
comment "Qualcomm Atheros CLD WLAN module"

config QCA_CLD_WLAN

	tristate "Qualcomm Atheros CLD WLAN module"
	default n
	help
	Add support for the Qualcomm Atheros CLD WLAN module

if QCA_CLD_WLAN != n

config QCACLD_WLAN_LFR3
	bool "Enable the WLAN Legacy Fast Roaming feature Version 3"
	default n

config PRIMA_WLAN_OKC
	bool "Enable the Prima WLAN Opportunistic Key Caching feature"
	default n

config WLAN_FEATURE_11W
	bool "Enable the WLAN 802.11w Protected Management Frames feature"
	default n

config WLAN_FEATURE_LPSS
	bool "Enable the WLAN LPSS feature"
	default n

config QCOM_VOWIFI_11R
	bool "Enable Fast Transition (11r) feature"
	default n

config QCACLD_FEATURE_NAN
	bool "Enable NAN feature"
	default n

config QCACLD_FEATURE_GREEN_AP
	bool "Enable Green AP feature"
	default n

config HELIUMPLUS
	bool "Enable Beeliner based descriptor structures for Helium"
	default n

config 64BIT_PADDR
	bool "Enable 37-bit physical/bus addresses"
	depends on HELIUMPLUS
	default n

config QCOM_TDLS
	bool "Enable TDLS feature"
	default n

config QCOM_LTE_COEX
	bool "Enable QCOM LTE Coex feature"
	default n

config MPC_UT_FRAMEWORK
	bool "Enable Unit test framework for multiport concurrency"
	default n

config WLAN_OFFLOAD_PACKETS
	bool "Enable offload packets feature"
	default n

config FEATURE_TSO
	bool "Enable TCP Segmentation Offload"
	depends on HELIUMPLUS
	default n

config FEATURE_TSO_DEBUG
	bool "Enable TCP Segmentation Offload with debug"
	depends on FEATURE_TSO
	default n

config WLAN_FASTPATH
	bool "Enable fastpath for datapackets"
	default n

config WLAN_NAPI
	bool "Enable NAPI - datapath rx"
	default n

config WLAN_NAPI_DEBUG
       bool "Enable debug logging on NAPI"
       depends on WLAN_NAPI
       default n

config WLAN_TX_FLOW_CONTROL_V2
	bool "Enable tx flow control version:2"
	default n

config WLAN_LRO
	bool "Enable Large Receive Offload"
	depends on HELIUMPLUS
	depends on INET_LRO
	default n

config WLAN_SYNC_TSF
	bool "Enable QCOM sync multi devices tsf feature"
	default n

config LFR_SUBNET_DETECTION
	bool "Enable LFR Subnet Change Detection"
	default n

config MCC_TO_SCC_SWITCH
	bool "Enable MCC to SCC Switch Logic"
	default n

config QCACLD_WLAN_LFR2
	bool "Enable the WLAN Legacy Fast Roaming feature Version 2"
	default n

config WLAN_FEATURE_DISA
	bool "Enable DISA certification feature"
	default n

config WLAN_FEATURE_FIPS
	bool "Enable FIPS certification feature"
	default n

config WLAN_FEATURE_11AX
	bool "Enable 11AX(High Efficiency) feature"
	default n

config ICMP_DISABLE_PS
	bool "Enable ICMP packet disable powersave feature"
	default n

config BUILD_TIMESTAMP
	bool "Embed timestamp in wlan version"
	default n

config WLAN_FEATURE_FILS
	bool "Enable FILS feature"
	default n

config NAN_CONVERGENCE
	bool "Enable NAN_CONVERGENCE feature"
	default n

config WLAN_OBJMGR_DEBUG
	bool "Enable WLAN Obj Mgr Debug services"
	default n

config WLAN_FEATURE_DFS_OFFLOAD
	bool "Enable dfs offload feature"
	default n

config WLAN_FEATURE_SARV1_TO_SARV2
	bool "Enable conversion of SAR v1 to v2 feature"
	default n

endif # QCA_CLD_WLAN
+32 −0
Original line number Diff line number Diff line
KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build

# The Make variable $(M) must point to the directory that contains the module
# source code (which includes this Makefile). It can either be an absolute or a
# relative path. If it is a relative path, then it must be relative to the
# kernel source directory (KERNEL_SRC). An absolute path can be obtained very
# easily through $(shell pwd). Generating a path relative to KERNEL_SRC is
# difficult and we accept some outside help by letting the caller override the
# variable $(M). Allowing a relative path for $(M) enables us to have the build
# system put output/object files (.o, .ko.) into a directory different from the
# module source directory.
M ?= $(shell pwd)

# WLAN_ROOT must contain an absolute path (i.e. not a relative path)
KBUILD_OPTIONS := WLAN_ROOT=$(shell cd $(KERNEL_SRC); readlink -e $(M))
KBUILD_OPTIONS += MODNAME?=wlan

#By default build for CLD
WLAN_SELECT := CONFIG_QCA_CLD_WLAN=m
KBUILD_OPTIONS += CONFIG_QCA_WIFI_ISOC=0
KBUILD_OPTIONS += CONFIG_QCA_WIFI_2_0=1
KBUILD_OPTIONS += $(WLAN_SELECT)
KBUILD_OPTIONS += $(KBUILD_EXTRA) # Extra config if any

all:
	$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS)

modules_install:
	$(MAKE) INSTALL_MOD_STRIP=1 M=$(M) -C $(KERNEL_SRC) modules_install

clean:
	$(MAKE) -C $(KERNEL_SRC) M=$(M) clean $(KBUILD_OPTIONS)
+1 −0
Original line number Diff line number Diff line
This is CNSS WLAN Host Driver for products starting from iHelium
Loading