net: wireless: rockchip_wlan: bcmdhd: Update driver to 101.10.591.68.32
This commit is contained in:
parent
012b053912
commit
6c49f0aa67
|
|
@ -1,5 +1,24 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2023, Broadcom.
|
# Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
#
|
||||||
|
# This software is licensed to you under the terms of the
|
||||||
|
# GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
#
|
||||||
|
# INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
# EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
# AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
# IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
# SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
# WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
# AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
# NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
# THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
# DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
# SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
# EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
#
|
||||||
|
# Copyright (C) 2024, Broadcom.
|
||||||
#
|
#
|
||||||
# Unless you and Broadcom execute a separate written software license
|
# Unless you and Broadcom execute a separate written software license
|
||||||
# agreement governing use of this software, this software is licensed to you
|
# agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,25 @@
|
||||||
# bcmdhd
|
# bcmdhd
|
||||||
#
|
#
|
||||||
# Copyright (C) 2023, Broadcom.
|
# Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
#
|
||||||
|
# This software is licensed to you under the terms of the
|
||||||
|
# GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
#
|
||||||
|
# INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
# EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
# AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
# IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
# SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
# WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
# AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
# NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
# THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
# DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
# SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
# EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
#
|
||||||
|
# Copyright (C) 2024, Broadcom.
|
||||||
#
|
#
|
||||||
# Unless you and Broadcom execute a separate written software license
|
# Unless you and Broadcom execute a separate written software license
|
||||||
# agreement governing use of this software, this software is licensed to you
|
# agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -31,7 +50,6 @@ CONFIG_BCMDHD_OOB := y
|
||||||
#CONFIG_BCMDHD_CUSB := y
|
#CONFIG_BCMDHD_CUSB := y
|
||||||
#CONFIG_BCMDHD_NO_POWER_OFF := y
|
#CONFIG_BCMDHD_NO_POWER_OFF := y
|
||||||
CONFIG_BCMDHD_PROPTXSTATUS := y
|
CONFIG_BCMDHD_PROPTXSTATUS := y
|
||||||
CONFIG_BCMDHD_AG := y
|
|
||||||
CONFIG_DHD_USE_STATIC_BUF := y
|
CONFIG_DHD_USE_STATIC_BUF := y
|
||||||
CONFIG_BCMDHD_STATIC_BUF_IN_DHD := y
|
CONFIG_BCMDHD_STATIC_BUF_IN_DHD := y
|
||||||
CONFIG_BCMDHD_ANDROID_VERSION := 14
|
CONFIG_BCMDHD_ANDROID_VERSION := 14
|
||||||
|
|
@ -62,7 +80,7 @@ DHDCFLAGS = -Wall -Wstrict-prototypes -Wno-date-time -Wno-strict-prototypes \
|
||||||
-DKEEP_ALIVE -DPKT_FILTER_SUPPORT -DDHDTCPACK_SUPPRESS \
|
-DKEEP_ALIVE -DPKT_FILTER_SUPPORT -DDHDTCPACK_SUPPRESS \
|
||||||
-DDHD_DONOT_FORWARD_BCMEVENT_AS_NETWORK_PKT -DOEM_ANDROID \
|
-DDHD_DONOT_FORWARD_BCMEVENT_AS_NETWORK_PKT -DOEM_ANDROID \
|
||||||
-DMULTIPLE_SUPPLICANT -DTSQ_MULTIPLIER -DMFP -DDHD_8021X_DUMP \
|
-DMULTIPLE_SUPPLICANT -DTSQ_MULTIPLIER -DMFP -DDHD_8021X_DUMP \
|
||||||
-DPOWERUP_MAX_RETRY=0 -DIFACE_HANG_FORCE_DEV_CLOSE -DWAIT_DEQUEUE \
|
-DPOWERUP_MAX_RETRY=1 -DIFACE_HANG_FORCE_DEV_CLOSE -DWAIT_DEQUEUE \
|
||||||
-DUSE_NEW_RSPEC_DEFS \
|
-DUSE_NEW_RSPEC_DEFS \
|
||||||
-DWL_EXT_IAPSTA -DWL_ESCAN -DCCODE_LIST -DSUSPEND_EVENT \
|
-DWL_EXT_IAPSTA -DWL_ESCAN -DCCODE_LIST -DSUSPEND_EVENT \
|
||||||
-DKEY_INSTALL_CHECK \
|
-DKEY_INSTALL_CHECK \
|
||||||
|
|
@ -90,7 +108,11 @@ ifneq ($(CONFIG_CFG80211),)
|
||||||
DHDOFILES += dhd_cfg80211.o wl_cfgvif.o wl_roam.o
|
DHDOFILES += dhd_cfg80211.o wl_cfgvif.o wl_roam.o
|
||||||
DHDCFLAGS += -DWL_CFG80211 -DWLP2P -DWL_CFG80211_STA_EVENT
|
DHDCFLAGS += -DWL_CFG80211 -DWLP2P -DWL_CFG80211_STA_EVENT
|
||||||
DHDCFLAGS += -DWL_CFG80211_GON_COLLISION
|
DHDCFLAGS += -DWL_CFG80211_GON_COLLISION
|
||||||
DHDCFLAGS += -DWL_CAP_HE -DWL_6G_BAND -DWL_5P9G
|
# DHDCFLAGS += -DCFG80211_INFO_CHANDEF
|
||||||
|
# DHDCFLAGS += -DAP_P2P_CONCURRENT
|
||||||
|
DHDCFLAGS += -DCONFIG_CFG80211_INTERNAL_REGDB #-DEXT_REG_INFO
|
||||||
|
DHDCFLAGS += -DWL_CAP_HE -DWL_6G_BAND -DWL_5P9G -DWL_P2P_6G
|
||||||
|
DHDCFLAGS += -DWL11U
|
||||||
# DHDCFLAGS += -DCONFIG_6GHZ_BKPORT
|
# DHDCFLAGS += -DCONFIG_6GHZ_BKPORT
|
||||||
DHDCFLAGS += -DWL_IFACE_COMB_NUM_CHANNELS
|
DHDCFLAGS += -DWL_IFACE_COMB_NUM_CHANNELS
|
||||||
DHDCFLAGS += -DCUSTOM_PNO_EVENT_LOCK_xTIME=10
|
DHDCFLAGS += -DCUSTOM_PNO_EVENT_LOCK_xTIME=10
|
||||||
|
|
@ -99,21 +121,24 @@ ifneq ($(CONFIG_CFG80211),)
|
||||||
DHDCFLAGS += -DESCAN_RESULT_PATCH -DESCAN_BUF_OVERFLOW_MGMT
|
DHDCFLAGS += -DESCAN_RESULT_PATCH -DESCAN_BUF_OVERFLOW_MGMT
|
||||||
DHDCFLAGS += -DVSDB -DWL_CFG80211_VSDB_PRIORITIZE_SCAN_REQUEST
|
DHDCFLAGS += -DVSDB -DWL_CFG80211_VSDB_PRIORITIZE_SCAN_REQUEST
|
||||||
DHDCFLAGS += -DWLTDLS -DMIRACAST_AMPDU_SIZE=8
|
DHDCFLAGS += -DWLTDLS -DMIRACAST_AMPDU_SIZE=8
|
||||||
# DHDCFLAGS += -DHOSTAPD_BW_SUPPORT
|
# DHDCFLAGS += -DHOSTAPD_BW_SUPPORT
|
||||||
DHDCFLAGS += -DWL_VIRTUAL_APSTA -DSTA_MGMT -DSOFTAP_UAPSD_OFF
|
DHDCFLAGS += -DWL_VIRTUAL_APSTA -DSOFTAP_UAPSD_OFF #-DSTA_MGMT
|
||||||
DHDCFLAGS += -DWL_SOFTAP_ACS
|
DHDCFLAGS += -DWL_SOFTAP_ACS #-DACS_MONITOR
|
||||||
DHDCFLAGS += -DNUM_SCB_MAX_PROBE=3
|
DHDCFLAGS += -DNUM_SCB_MAX_PROBE=3
|
||||||
DHDCFLAGS += -DWL_SCB_TIMEOUT=10
|
DHDCFLAGS += -DWL_SCB_TIMEOUT=10
|
||||||
|
# DHDCFLAGS += -DWL_BEACON_RATE
|
||||||
DHDCFLAGS += -DEXPLICIT_DISCIF_CLEANUP
|
DHDCFLAGS += -DEXPLICIT_DISCIF_CLEANUP
|
||||||
DHDCFLAGS += -DDHD_USE_SCAN_WAKELOCK
|
DHDCFLAGS += -DDHD_USE_SCAN_WAKELOCK #DHD_DEBUG_SCAN_WAKELOCK
|
||||||
DHDCFLAGS += -DSPECIFIC_MAC_GEN_SCHEME
|
DHDCFLAGS += -DSPECIFIC_MAC_GEN_SCHEME
|
||||||
DHDCFLAGS += -DWL_IFACE_MGMT
|
DHDCFLAGS += -DWL_IFACE_MGMT
|
||||||
DHDCFLAGS += -DSUPPORT_RSSI_SUM_REPORT
|
DHDCFLAGS += -DSUPPORT_RSSI_SUM_REPORT
|
||||||
DHDCFLAGS += -DWLFBT -DWL_GCMP_SUPPORT -DWL_OWE -DWL_SAE_FT
|
DHDCFLAGS += -DWLFBT -DWL_GCMP_SUPPORT -DWL_OWE -DWL_SAE_FT
|
||||||
DHDCFLAGS += -DROAM_CHANNEL_CACHE -DDHD_LOSSLESS_ROAMING
|
DHDCFLAGS += -DROAM_CHANNEL_CACHE -DDHD_LOSSLESS_ROAMING
|
||||||
|
# DHDCFLAGS += -DWL_SKIP_CONNECT_HINTS
|
||||||
# DHDCFLAGS += -DWL_CFGVENDOR_SEND_HANG_EVENT
|
# DHDCFLAGS += -DWL_CFGVENDOR_SEND_HANG_EVENT
|
||||||
DHDCFLAGS += -DGTK_OFFLOAD_SUPPORT
|
DHDCFLAGS += -DGTK_OFFLOAD_SUPPORT
|
||||||
#DHDCFLAGS += -DWL_STATIC_IF #-DDHD_MAX_STATIC_IFS=2
|
# DHDCFLAGS += -DWL_STATIC_IF #-DDHD_MAX_STATIC_IFS=2
|
||||||
|
# DHDCFLAGS += -DWL_STATIC_IFNAME_PREFIX=\"sap%d\"
|
||||||
DHDCFLAGS += -DWL_CLIENT_SAE
|
DHDCFLAGS += -DWL_CLIENT_SAE
|
||||||
DHDCFLAGS += -DCONNECT_INFO_WAR -DWL_ROAM_WAR
|
DHDCFLAGS += -DCONNECT_INFO_WAR -DWL_ROAM_WAR
|
||||||
DHDCFLAGS += -DVNDR_IE_WAR
|
DHDCFLAGS += -DVNDR_IE_WAR
|
||||||
|
|
@ -125,11 +150,12 @@ ifneq ($(CONFIG_BCMDHD_SDIO),)
|
||||||
BUS_TYPE := sdio
|
BUS_TYPE := sdio
|
||||||
DHDCFLAGS += -DBCMSDIO -DMMC_SDIO_ABORT -DUSE_SDIOFIFO_IOVAR -DBCMLXSDMMC \
|
DHDCFLAGS += -DBCMSDIO -DMMC_SDIO_ABORT -DUSE_SDIOFIFO_IOVAR -DBCMLXSDMMC \
|
||||||
-DSDTEST -DBDC -DDHD_USE_IDLECOUNT -DCUSTOM_SDIO_F2_BLKSIZE=256 \
|
-DSDTEST -DBDC -DDHD_USE_IDLECOUNT -DCUSTOM_SDIO_F2_BLKSIZE=256 \
|
||||||
-DBCMSDIOH_TXGLOM -DBCMSDIOH_TXGLOM_EXT -DBCMSDIOH_STATIC_COPY_BUF \
|
-DBCMSDIOH_TXGLOM -DDHD_SI_WD_RESET -DBCMSDIOH_STATIC_COPY_BUF \
|
||||||
-DRXFRAME_THREAD -DDHDENABLE_TAILPAD -DSUPPORT_P2P_GO_PS \
|
-DRXFRAME_THREAD -DDHDENABLE_TAILPAD -DSUPPORT_P2P_GO_PS \
|
||||||
-DBCMSDIO_RXLIM_POST -DBCMSDIO_TXSEQ_SYNC -DCONSOLE_DPC \
|
-DBCMSDIO_RXLIM_POST -DBCMSDIO_TXSEQ_SYNC -DCONSOLE_DPC \
|
||||||
-DBCMSDIO_INTSTATUS_WAR
|
-DBCMSDIO_INTSTATUS_WAR
|
||||||
DHDCFLAGS += -DMMC_HW_RESET #-DMMC_SW_RESET #-DBUS_POWER_RESTORE
|
DHDCFLAGS += -DMMC_HW_RESET #-DMMC_SW_RESET #-DBUS_POWER_RESTORE
|
||||||
|
#DHDCFLAGS += -DDEVICE_PM_CALLBACK
|
||||||
ifeq ($(CONFIG_BCMDHD_OOB),y)
|
ifeq ($(CONFIG_BCMDHD_OOB),y)
|
||||||
DHDCFLAGS += -DOOB_INTR_ONLY -DCUSTOMER_OOB -DHW_OOB
|
DHDCFLAGS += -DOOB_INTR_ONLY -DCUSTOMER_OOB -DHW_OOB
|
||||||
ifeq ($(CONFIG_BCMDHD_DISABLE_WOWLAN),y)
|
ifeq ($(CONFIG_BCMDHD_DISABLE_WOWLAN),y)
|
||||||
|
|
@ -150,6 +176,7 @@ BUS_TYPE := pcie
|
||||||
DHDCFLAGS += -DDHD_LB -DDHD_LB_RXP -DDHD_LB_STATS -DDHD_LB_TXP
|
DHDCFLAGS += -DDHD_LB -DDHD_LB_RXP -DDHD_LB_STATS -DDHD_LB_TXP
|
||||||
DHDCFLAGS += -DDHD_LB_PRIMARY_CPUS=0xF0 -DDHD_LB_SECONDARY_CPUS=0x0E
|
DHDCFLAGS += -DDHD_LB_PRIMARY_CPUS=0xF0 -DDHD_LB_SECONDARY_CPUS=0x0E
|
||||||
# DHDCFLAGS += -DDHD_PKTID_AUDIT_ENABLED
|
# DHDCFLAGS += -DDHD_PKTID_AUDIT_ENABLED
|
||||||
|
DHDCFLAGS += -DBCMPCIE_CTO_PREVENTION
|
||||||
DHDCFLAGS += -DEAPOL_PKT_PRIO -DENABLE_DHD_GRO
|
DHDCFLAGS += -DEAPOL_PKT_PRIO -DENABLE_DHD_GRO
|
||||||
DHDCFLAGS += -DDHD_SKIP_DONGLE_RESET_IN_ATTACH
|
DHDCFLAGS += -DDHD_SKIP_DONGLE_RESET_IN_ATTACH
|
||||||
DHDCFLAGS += -DDHD_DONGLE_TRAP_IN_DETACH
|
DHDCFLAGS += -DDHD_DONGLE_TRAP_IN_DETACH
|
||||||
|
|
@ -234,8 +261,8 @@ endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_64BIT),y)
|
ifeq ($(CONFIG_64BIT),y)
|
||||||
DHDCFLAGS := $(filter-out -DBCMDMA32,$(DHDCFLAGS))
|
DHDCFLAGS := $(filter-out -DBCMDMA32,$(DHDCFLAGS))
|
||||||
DHDCFLAGS += -DBCMDMA64OSL
|
DHDCFLAGS += -DBCMDMA64OSL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# For Android VTS
|
# For Android VTS
|
||||||
|
|
@ -245,19 +272,21 @@ ifneq ($(CONFIG_BCMDHD_ANDROID_VERSION),)
|
||||||
DHDCFLAGS += -DANDROID_BKPORT
|
DHDCFLAGS += -DANDROID_BKPORT
|
||||||
ifneq ($(CONFIG_CFG80211),)
|
ifneq ($(CONFIG_CFG80211),)
|
||||||
DHDCFLAGS += -DPNO_SUPPORT
|
DHDCFLAGS += -DPNO_SUPPORT
|
||||||
DHDCFLAGS += -DWL_SCHED_SCAN
|
DHDCFLAGS += -DWL_SCHED_SCAN
|
||||||
DHDCFLAGS += -DWL_P2P_RAND
|
DHDCFLAGS += -DWL_P2P_RAND
|
||||||
DHDCFLAGS += -DGSCAN_SUPPORT -DRTT_SUPPORT
|
DHDCFLAGS += -DGSCAN_SUPPORT -DRTT_SUPPORT
|
||||||
DHDCFLAGS += -DLINKSTAT_SUPPORT -DLINKSTAT_EXT_SUPPORT
|
DHDCFLAGS += -DLINKSTAT_SUPPORT -DLINKSTAT_EXT_SUPPORT
|
||||||
DHDCFLAGS += -DCUSTOM_COUNTRY_CODE -DDHD_GET_VALID_CHANNELS
|
DHDCFLAGS += -DCUSTOM_COUNTRY_CODE -DDHD_GET_VALID_CHANNELS
|
||||||
DHDCFLAGS += -DDEBUGABILITY -DDEBUGABILITY_DISABLE_MEMDUMP -DDBG_PKT_MON
|
DHDCFLAGS += -DDEBUGABILITY -DDBG_PKT_MON -DDEBUGABILITY_DISABLE_MEMDUMP
|
||||||
DHDCFLAGS += -DDHD_LOG_DUMP -DDHD_FW_COREDUMP
|
DHDCFLAGS += -DDHD_LOG_DUMP -DDHD_FW_COREDUMP
|
||||||
# DHDCFLAGS += -DDHD_PKT_LOGGING_DBGRING
|
DHDCFLAGS += -DWIFI_TURNON_USE_HALINIT
|
||||||
|
DHDCFLAGS += -DDHD_PKT_LOGGING_DBGRING -DDHD_PKT_LOGGING
|
||||||
DHDCFLAGS += -DAPF -DNDO_CONFIG_SUPPORT -DRSSI_MONITOR_SUPPORT
|
DHDCFLAGS += -DAPF -DNDO_CONFIG_SUPPORT -DRSSI_MONITOR_SUPPORT
|
||||||
DHDCFLAGS += -DDHD_WAKE_STATUS
|
DHDCFLAGS += -DDHD_WAKE_STATUS
|
||||||
DHDCFLAGS += -DWL_LATENCY_MODE
|
DHDCFLAGS += -DWL_LATENCY_MODE -DWL_USABLE_CHAN -DWL_SAR_TX_POWER
|
||||||
DHDOFILES += dhd_rtt.o
|
DHDOFILES += dhd_rtt.o
|
||||||
DHDOFILES += dhd_log_dump.o
|
DHDOFILES += dhd_log_dump.o
|
||||||
|
DHDOFILES += dhd_pktlog.o
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
DHDCFLAGS += -DANDROID_VERSION=0
|
DHDCFLAGS += -DANDROID_VERSION=0
|
||||||
|
|
@ -321,7 +350,7 @@ ifneq ($(CONFIG_CFG80211),)
|
||||||
ifneq ($(CONFIG_BCMDHD_SDIO),)
|
ifneq ($(CONFIG_BCMDHD_SDIO),)
|
||||||
DHDCFLAGS += -DRXF_DEQUEUE_ON_BUSY
|
DHDCFLAGS += -DRXF_DEQUEUE_ON_BUSY
|
||||||
endif
|
endif
|
||||||
#DHDCFLAGS += -DWL_STATIC_IF
|
DHDCFLAGS += -DWL_STATIC_IF
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
@ -364,10 +393,8 @@ endif
|
||||||
# For WAPI
|
# For WAPI
|
||||||
ifeq ($(CONFIG_BCMDHD_WAPI),y)
|
ifeq ($(CONFIG_BCMDHD_WAPI),y)
|
||||||
DHDCFLAGS += -DBCMWAPI_WPI -DBCMWAPI_WAI
|
DHDCFLAGS += -DBCMWAPI_WPI -DBCMWAPI_WAI
|
||||||
ifeq ($(CONFIG_BCMDHD_ANDROID_VERSION),11)
|
|
||||||
DHDCFLAGS += -DCFG80211_WAPI_BKPORT
|
DHDCFLAGS += -DCFG80211_WAPI_BKPORT
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
# For scan random mac
|
# For scan random mac
|
||||||
ifneq ($(CONFIG_BCMDHD_RANDOM_MAC),)
|
ifneq ($(CONFIG_BCMDHD_RANDOM_MAC),)
|
||||||
|
|
@ -410,12 +437,13 @@ ifeq ($(CONFIG_BCMDHD_DTS),y)
|
||||||
endif
|
endif
|
||||||
DHDCFLAGS += -DCUSTOMER_HW -DDHD_OF_SUPPORT
|
DHDCFLAGS += -DCUSTOMER_HW -DDHD_OF_SUPPORT
|
||||||
DHDCFLAGS += -DCUSTOMER_HW_ROCKCHIP
|
DHDCFLAGS += -DCUSTOMER_HW_ROCKCHIP
|
||||||
# DHDCFLAGS += -DCUSTOMER_HW_ROCKCHIP_RK3588
|
DHDCFLAGS += -DBLOCK_IPV6_PACKET
|
||||||
DHDCFLAGS += -DBCM_USE_PLATFORM_STRLCPY
|
DHDCFLAGS += -DBCM_USE_PLATFORM_STRLCPY
|
||||||
|
# DHDCFLAGS += -DGET_CUSTOM_MAC_ENABLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_BCMDHD_PCIE),)
|
ifneq ($(CONFIG_BCMDHD_PCIE),)
|
||||||
ifneq ($(filter -DCUSTOMER_HW_ROCKCHIP_RK3588, $(DHDCFLAGS)),)
|
ifeq ($(CONFIG_PCIEASPM_ROCKCHIP_WIFI_EXTENSION),y)
|
||||||
DHDCFLAGS += -DDHD_CONTROL_PCIE_ASPM_WIFI_TURNON
|
DHDCFLAGS += -DDHD_CONTROL_PCIE_ASPM_WIFI_TURNON
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
@ -442,10 +470,6 @@ ifeq ($(CONFIG_BCMDHD_FW_SIGNATURE),y)
|
||||||
DHDCFLAGS += -DBL_HEAP_START_GAP_SIZE=0x1000 -DBL_HEAP_SIZE=0x10000
|
DHDCFLAGS += -DBL_HEAP_START_GAP_SIZE=0x1000 -DBL_HEAP_SIZE=0x10000
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_BCMDHD_AG),y)
|
|
||||||
DHDCFLAGS += -DBAND_AG
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_DHD_USE_STATIC_BUF),y)
|
ifeq ($(CONFIG_DHD_USE_STATIC_BUF),y)
|
||||||
ifeq ($(CONFIG_BCMDHD_STATIC_BUF_IN_DHD),y)
|
ifeq ($(CONFIG_BCMDHD_STATIC_BUF_IN_DHD),y)
|
||||||
DHDOFILES += dhd_static_buf.o
|
DHDOFILES += dhd_static_buf.o
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,26 @@
|
||||||
* Misc utility routines for accessing chip-specific features
|
* Misc utility routines for accessing chip-specific features
|
||||||
* of the SiliconBackplane-based Broadcom chips.
|
* of the SiliconBackplane-based Broadcom chips.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -1238,8 +1257,8 @@ ai_core_disable(const si_t *sih, uint32 bits)
|
||||||
* bits - core specific bits that are set during and after reset sequence
|
* bits - core specific bits that are set during and after reset sequence
|
||||||
* resetbits - core specific bits that are set only during reset sequence
|
* resetbits - core specific bits that are set only during reset sequence
|
||||||
*/
|
*/
|
||||||
static void
|
static bool
|
||||||
BCMPOSTTRAPFN(_ai_core_reset)(const si_t *sih, uint32 bits, uint32 resetbits)
|
_ai_core_reset(const si_t *sih, uint32 bits, uint32 resetbits)
|
||||||
{
|
{
|
||||||
const si_info_t *sii = SI_INFO(sih);
|
const si_info_t *sii = SI_INFO(sih);
|
||||||
aidmp_t *ai;
|
aidmp_t *ai;
|
||||||
|
|
@ -1249,6 +1268,12 @@ BCMPOSTTRAPFN(_ai_core_reset)(const si_t *sih, uint32 bits, uint32 resetbits)
|
||||||
ASSERT(GOODREGS(sii->curwrap));
|
ASSERT(GOODREGS(sii->curwrap));
|
||||||
ai = sii->curwrap;
|
ai = sii->curwrap;
|
||||||
|
|
||||||
|
if (R_REG(sii->osh, &ai->resetstatus) == 0xffffffff &&
|
||||||
|
R_REG(sii->osh, &ai->ioctrl) == 0xffffffff &&
|
||||||
|
R_REG(sii->osh, &ai->resetctrl) == 0xffffffff) {
|
||||||
|
SI_ERROR(("%s: fail, resetstatus&ioctrl&resetctrl is 0xffffffff\n", __func__));
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
/* ensure there are no pending backplane operations */
|
/* ensure there are no pending backplane operations */
|
||||||
SPINWAIT(((dummy = R_REG(sii->osh, &ai->resetstatus)) != 0), 300);
|
SPINWAIT(((dummy = R_REG(sii->osh, &ai->resetstatus)) != 0), 300);
|
||||||
|
|
||||||
|
|
@ -1258,6 +1283,12 @@ BCMPOSTTRAPFN(_ai_core_reset)(const si_t *sih, uint32 bits, uint32 resetbits)
|
||||||
}
|
}
|
||||||
#endif /* BCMDBG_ERR */
|
#endif /* BCMDBG_ERR */
|
||||||
|
|
||||||
|
SI_ERROR(("%s: &ai->ioctrl = 0x%x, &ai->resetctrl = 0x%x, &ai->resetstatus = 0x%x\n",
|
||||||
|
__func__,
|
||||||
|
R_REG(sii->osh, &ai->ioctrl),
|
||||||
|
R_REG(sii->osh, &ai->resetctrl),
|
||||||
|
R_REG(sii->osh, &ai->resetstatus)));
|
||||||
|
|
||||||
/* put core into reset state */
|
/* put core into reset state */
|
||||||
W_REG(sii->osh, &ai->resetctrl, AIRC_RESET);
|
W_REG(sii->osh, &ai->resetctrl, AIRC_RESET);
|
||||||
OSL_DELAY(10);
|
OSL_DELAY(10);
|
||||||
|
|
@ -1322,28 +1353,31 @@ BCMPOSTTRAPFN(_ai_core_reset)(const si_t *sih, uint32 bits, uint32 resetbits)
|
||||||
}
|
}
|
||||||
#endif /* UCM_CORRUPTION_WAR */
|
#endif /* UCM_CORRUPTION_WAR */
|
||||||
OSL_DELAY(1);
|
OSL_DELAY(1);
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
bool
|
||||||
BCMPOSTTRAPFN(ai_core_reset)(si_t *sih, uint32 bits, uint32 resetbits)
|
ai_core_reset(si_t *sih, uint32 bits, uint32 resetbits)
|
||||||
{
|
{
|
||||||
si_info_t *sii = SI_INFO(sih);
|
si_info_t *sii = SI_INFO(sih);
|
||||||
const si_cores_info_t *cores_info = (const si_cores_info_t *)sii->cores_info;
|
const si_cores_info_t *cores_info = (const si_cores_info_t *)sii->cores_info;
|
||||||
uint idx = sii->curidx;
|
uint idx = sii->curidx;
|
||||||
|
bool ret = TRUE;
|
||||||
|
|
||||||
if (cores_info->wrapba3[idx] != 0) {
|
if (cores_info->wrapba3[idx] != 0) {
|
||||||
ai_setcoreidx_3rdwrap(sih, idx);
|
ai_setcoreidx_3rdwrap(sih, idx);
|
||||||
_ai_core_reset(sih, bits, resetbits);
|
ret = _ai_core_reset(sih, bits, resetbits);
|
||||||
ai_setcoreidx(sih, idx);
|
ai_setcoreidx(sih, idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cores_info->wrapba2[idx] != 0) {
|
if (cores_info->wrapba2[idx] != 0) {
|
||||||
ai_setcoreidx_2ndwrap(sih, idx);
|
ai_setcoreidx_2ndwrap(sih, idx);
|
||||||
_ai_core_reset(sih, bits, resetbits);
|
ret = _ai_core_reset(sih, bits, resetbits);
|
||||||
ai_setcoreidx(sih, idx);
|
ai_setcoreidx(sih, idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
_ai_core_reset(sih, bits, resetbits);
|
ret = _ai_core_reset(sih, bits, resetbits);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef BOOKER_NIC400_INF
|
#ifdef BOOKER_NIC400_INF
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,26 @@
|
||||||
* Contents are wifi-specific, used by any kernel or app-level
|
* Contents are wifi-specific, used by any kernel or app-level
|
||||||
* software that might want wifi things as it grows.
|
* software that might want wifi things as it grows.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Bloom filter support
|
* Bloom filter support
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* bcmevent read-only data shared by kernel or app layers
|
* bcmevent read-only data shared by kernel or app layers
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,26 @@
|
||||||
* BCMSDH interface glue
|
* BCMSDH interface glue
|
||||||
* implement bcmsdh API for SDIOH driver
|
* implement bcmsdh API for SDIOH driver
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -933,6 +952,7 @@ uint
|
||||||
bcmsdh_set_mode(void *sdh, uint mode)
|
bcmsdh_set_mode(void *sdh, uint mode)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *)sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *)sdh;
|
||||||
|
|
||||||
return (sdioh_set_mode(bcmsdh->sdioh, mode));
|
return (sdioh_set_mode(bcmsdh->sdioh, mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* SDIO access interface for drivers - linux specific (pci only)
|
* SDIO access interface for drivers - linux specific (pci only)
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -283,6 +302,26 @@ int bcmsdh_resume(bcmsdh_info_t *bcmsdh)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DEVICE_PM_CALLBACK
|
||||||
|
int bcmsdh_prepare(bcmsdh_info_t *bcmsdh)
|
||||||
|
{
|
||||||
|
bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
|
||||||
|
|
||||||
|
if (drvinfo.prepare && drvinfo.prepare(bcmsdh_osinfo->context))
|
||||||
|
return -EBUSY;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int bcmsdh_complete(bcmsdh_info_t *bcmsdh)
|
||||||
|
{
|
||||||
|
bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt;
|
||||||
|
|
||||||
|
if (drvinfo.complete)
|
||||||
|
return drvinfo.complete(bcmsdh_osinfo->context);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif /* DEVICE_PM_CALLBACK */
|
||||||
|
|
||||||
extern int bcmsdh_register_client_driver(void);
|
extern int bcmsdh_register_client_driver(void);
|
||||||
extern void bcmsdh_unregister_client_driver(void);
|
extern void bcmsdh_unregister_client_driver(void);
|
||||||
extern int sdio_func_reg_notify(void* semaphore);
|
extern int sdio_func_reg_notify(void* semaphore);
|
||||||
|
|
@ -308,8 +347,11 @@ bcmsdh_register(bcmsdh_driver_t *driver)
|
||||||
drvinfo = *driver;
|
drvinfo = *driver;
|
||||||
SDLX_MSG(("%s: register client driver\n", __FUNCTION__));
|
SDLX_MSG(("%s: register client driver\n", __FUNCTION__));
|
||||||
error = bcmsdh_register_client_driver();
|
error = bcmsdh_register_client_driver();
|
||||||
if (error)
|
if (error) {
|
||||||
SDLX_ERR(("%s: failed %d\n", __FUNCTION__, error));
|
SDLX_MSG(("%s: failed %d\n", __FUNCTION__, error));
|
||||||
|
bcmsdh_unregister_client_driver();
|
||||||
|
memset(&drvinfo, 0, sizeof(drvinfo));
|
||||||
|
}
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* BCMSDH Function Driver for the native SDIO/MMC driver in the Linux Kernel
|
* BCMSDH Function Driver for the native SDIO/MMC driver in the Linux Kernel
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -83,13 +102,13 @@ static void IRQHandlerF2(struct sdio_func *func);
|
||||||
#endif /* !defined(OOB_INTR_ONLY) */
|
#endif /* !defined(OOB_INTR_ONLY) */
|
||||||
static int sdioh_sdmmc_get_cisaddr(sdioh_info_t *sd, uint32 regaddr);
|
static int sdioh_sdmmc_get_cisaddr(sdioh_info_t *sd, uint32 regaddr);
|
||||||
#if defined(ENABLE_INSMOD_NO_FW_LOAD)
|
#if defined(ENABLE_INSMOD_NO_FW_LOAD)
|
||||||
#if defined(MMC_SW_RESET) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
|
#if defined(MMC_SW_RESET) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||||
extern int mmc_sw_reset(struct mmc_card *card);
|
extern int mmc_sw_reset(struct mmc_card *card);
|
||||||
#else
|
#else
|
||||||
extern int mmc_sw_reset(struct mmc_host *host);
|
extern int mmc_sw_reset(struct mmc_host *host);
|
||||||
#endif
|
#endif
|
||||||
#elif defined(MMC_HW_RESET) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
|
#elif defined(MMC_HW_RESET) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
|
||||||
extern int mmc_hw_reset(struct mmc_card *card);
|
extern int mmc_hw_reset(struct mmc_card *card);
|
||||||
#else
|
#else
|
||||||
|
|
@ -312,9 +331,6 @@ sdioh_attach(osl_t *osh, struct sdio_func *func)
|
||||||
}
|
}
|
||||||
|
|
||||||
sdio_claim_host(sd->func[2]);
|
sdio_claim_host(sd->func[2]);
|
||||||
if ((func->device == BCM43362_CHIP_ID || func->device == BCM4330_CHIP_ID) &&
|
|
||||||
sd_f2_blocksize > 128)
|
|
||||||
sd_f2_blocksize = 128;
|
|
||||||
sd->client_block_size[2] = sd_f2_blocksize;
|
sd->client_block_size[2] = sd_f2_blocksize;
|
||||||
printf("%s: set sd_f2_blocksize %d\n", __FUNCTION__, sd_f2_blocksize);
|
printf("%s: set sd_f2_blocksize %d\n", __FUNCTION__, sd_f2_blocksize);
|
||||||
err_ret = sdio_set_block_size(sd->func[2], sd_f2_blocksize);
|
err_ret = sdio_set_block_size(sd->func[2], sd_f2_blocksize);
|
||||||
|
|
@ -1150,17 +1166,6 @@ sdioh_request_byte(sdioh_info_t *sd, uint rw, uint func, uint regaddr, uint8 *by
|
||||||
return ((err_ret == 0) ? SDIOH_API_RC_SUCCESS : SDIOH_API_RC_FAIL);
|
return ((err_ret == 0) ? SDIOH_API_RC_SUCCESS : SDIOH_API_RC_FAIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint
|
|
||||||
sdioh_set_mode(sdioh_info_t *sd, uint mode)
|
|
||||||
{
|
|
||||||
if (mode == SDPCM_TXGLOM_CPY)
|
|
||||||
sd->txglom_mode = mode;
|
|
||||||
else if (mode == SDPCM_TXGLOM_MDESC)
|
|
||||||
sd->txglom_mode = mode;
|
|
||||||
|
|
||||||
return (sd->txglom_mode);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef PKT_STATICS
|
#ifdef PKT_STATICS
|
||||||
uint32
|
uint32
|
||||||
sdioh_get_spend_time(sdioh_info_t *sd)
|
sdioh_get_spend_time(sdioh_info_t *sd)
|
||||||
|
|
@ -1262,7 +1267,7 @@ sdioh_request_packet_chain(sdioh_info_t *sd, uint fix_inc, uint write, uint func
|
||||||
bool fifo = (fix_inc == SDIOH_DATA_FIX);
|
bool fifo = (fix_inc == SDIOH_DATA_FIX);
|
||||||
int err_ret = 0;
|
int err_ret = 0;
|
||||||
void *pnext;
|
void *pnext;
|
||||||
uint ttl_len, pkt_offset;
|
uint ttl_len = 0, pkt_offset;
|
||||||
uint blk_num;
|
uint blk_num;
|
||||||
uint blk_size;
|
uint blk_size;
|
||||||
uint max_blk_count;
|
uint max_blk_count;
|
||||||
|
|
@ -1270,7 +1275,7 @@ sdioh_request_packet_chain(sdioh_info_t *sd, uint fix_inc, uint write, uint func
|
||||||
struct mmc_request mmc_req;
|
struct mmc_request mmc_req;
|
||||||
struct mmc_command mmc_cmd;
|
struct mmc_command mmc_cmd;
|
||||||
struct mmc_data mmc_dat;
|
struct mmc_data mmc_dat;
|
||||||
uint32 sg_count;
|
uint32 sg_count = 0;
|
||||||
struct sdio_func *sdio_func = sd->func[func];
|
struct sdio_func *sdio_func = sd->func[func];
|
||||||
struct mmc_host *host = sdio_func->card->host;
|
struct mmc_host *host = sdio_func->card->host;
|
||||||
uint8 *localbuf = NULL;
|
uint8 *localbuf = NULL;
|
||||||
|
|
@ -1298,96 +1303,96 @@ sdioh_request_packet_chain(sdioh_info_t *sd, uint fix_inc, uint write, uint func
|
||||||
ttl_len = 0;
|
ttl_len = 0;
|
||||||
sg_count = 0;
|
sg_count = 0;
|
||||||
if(sd->txglom_mode == SDPCM_TXGLOM_MDESC) {
|
if(sd->txglom_mode == SDPCM_TXGLOM_MDESC) {
|
||||||
while (pnext != NULL) {
|
while (pnext != NULL) {
|
||||||
ttl_len = 0;
|
ttl_len = 0;
|
||||||
sg_count = 0;
|
sg_count = 0;
|
||||||
memset(&mmc_req, 0, sizeof(struct mmc_request));
|
memset(&mmc_req, 0, sizeof(struct mmc_request));
|
||||||
memset(&mmc_cmd, 0, sizeof(struct mmc_command));
|
memset(&mmc_cmd, 0, sizeof(struct mmc_command));
|
||||||
memset(&mmc_dat, 0, sizeof(struct mmc_data));
|
memset(&mmc_dat, 0, sizeof(struct mmc_data));
|
||||||
sg_init_table(sd->sg_list, ARRAYSIZE(sd->sg_list));
|
sg_init_table(sd->sg_list, ARRAYSIZE(sd->sg_list));
|
||||||
|
|
||||||
/* Set up scatter-gather DMA descriptors. this loop is to find out the max
|
/* Set up scatter-gather DMA descriptors. this loop is to find out the max
|
||||||
* data we can transfer with one command 53. blocks per command is limited by
|
* data we can transfer with one command 53. blocks per command is limited by
|
||||||
* host max_req_size and 9-bit max block number. when the total length of this
|
* host max_req_size and 9-bit max block number. when the total length of this
|
||||||
* packet chain is bigger than max_req_size, use multiple SD_IO_RW_EXTENDED
|
* packet chain is bigger than max_req_size, use multiple SD_IO_RW_EXTENDED
|
||||||
* commands (each transfer is still block aligned)
|
* commands (each transfer is still block aligned)
|
||||||
*/
|
|
||||||
while (pnext != NULL && ttl_len < max_req_size) {
|
|
||||||
int pkt_len;
|
|
||||||
int sg_data_size;
|
|
||||||
uint8 *pdata = (uint8*)PKTDATA(sd->osh, pnext);
|
|
||||||
|
|
||||||
ASSERT(pdata != NULL);
|
|
||||||
pkt_len = PKTLEN(sd->osh, pnext);
|
|
||||||
sd_trace(("%s[%d] data=%p, len=%d\n", __FUNCTION__, write, pdata, pkt_len));
|
|
||||||
/* sg_count is unlikely larger than the array size, and this is
|
|
||||||
* NOT something we can handle here, but in case it happens, PLEASE put
|
|
||||||
* a restriction on max tx/glom count (based on host->max_segs).
|
|
||||||
*/
|
*/
|
||||||
if (sg_count >= ARRAYSIZE(sd->sg_list)) {
|
while (pnext != NULL && ttl_len < max_req_size) {
|
||||||
sd_err(("%s: sg list entries(%u) exceed limit(%zu),"
|
int pkt_len;
|
||||||
" sd blk_size=%u\n",
|
int sg_data_size;
|
||||||
__FUNCTION__, sg_count, (size_t)ARRAYSIZE(sd->sg_list), blk_size));
|
uint8 *pdata = (uint8*)PKTDATA(sd->osh, pnext);
|
||||||
return (SDIOH_API_RC_FAIL);
|
|
||||||
}
|
|
||||||
pdata += pkt_offset;
|
|
||||||
|
|
||||||
sg_data_size = pkt_len - pkt_offset;
|
ASSERT(pdata != NULL);
|
||||||
if (sg_data_size > max_req_size - ttl_len)
|
pkt_len = PKTLEN(sd->osh, pnext);
|
||||||
sg_data_size = max_req_size - ttl_len;
|
sd_trace(("%s[%d] data=%p, len=%d\n", __FUNCTION__, write, pdata, pkt_len));
|
||||||
/* some platforms put a restriction on the data size of each scatter-gather
|
/* sg_count is unlikely larger than the array size, and this is
|
||||||
* DMA descriptor, use multiple sg buffers when xfer_size is bigger than
|
* NOT something we can handle here, but in case it happens, PLEASE put
|
||||||
* max_seg_size
|
* a restriction on max tx/glom count (based on host->max_segs).
|
||||||
*/
|
*/
|
||||||
if (sg_data_size > host->max_seg_size) {
|
if (sg_count >= ARRAYSIZE(sd->sg_list)) {
|
||||||
sg_data_size = host->max_seg_size;
|
sd_err(("%s: sg list entries(%u) exceed limit(%zu),"
|
||||||
}
|
" sd blk_size=%u\n",
|
||||||
sg_set_buf(&sd->sg_list[sg_count++], pdata, sg_data_size);
|
__FUNCTION__, sg_count, (size_t)ARRAYSIZE(sd->sg_list), blk_size));
|
||||||
|
return (SDIOH_API_RC_FAIL);
|
||||||
|
}
|
||||||
|
pdata += pkt_offset;
|
||||||
|
|
||||||
ttl_len += sg_data_size;
|
sg_data_size = pkt_len - pkt_offset;
|
||||||
pkt_offset += sg_data_size;
|
if (sg_data_size > max_req_size - ttl_len)
|
||||||
if (pkt_offset == pkt_len) {
|
sg_data_size = max_req_size - ttl_len;
|
||||||
pnext = PKTNEXT(sd->osh, pnext);
|
/* some platforms put a restriction on the data size of each scatter-gather
|
||||||
pkt_offset = 0;
|
* DMA descriptor, use multiple sg buffers when xfer_size is bigger than
|
||||||
|
* max_seg_size
|
||||||
|
*/
|
||||||
|
if (sg_data_size > host->max_seg_size) {
|
||||||
|
sg_data_size = host->max_seg_size;
|
||||||
|
}
|
||||||
|
sg_set_buf(&sd->sg_list[sg_count++], pdata, sg_data_size);
|
||||||
|
|
||||||
|
ttl_len += sg_data_size;
|
||||||
|
pkt_offset += sg_data_size;
|
||||||
|
if (pkt_offset == pkt_len) {
|
||||||
|
pnext = PKTNEXT(sd->osh, pnext);
|
||||||
|
pkt_offset = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ttl_len % blk_size != 0) {
|
||||||
|
sd_err(("%s, data length %d not aligned to block size %d\n",
|
||||||
|
__FUNCTION__, ttl_len, blk_size));
|
||||||
|
return SDIOH_API_RC_FAIL;
|
||||||
|
}
|
||||||
|
blk_num = ttl_len / blk_size;
|
||||||
|
mmc_dat.sg = sd->sg_list;
|
||||||
|
mmc_dat.sg_len = sg_count;
|
||||||
|
mmc_dat.blksz = blk_size;
|
||||||
|
mmc_dat.blocks = blk_num;
|
||||||
|
mmc_dat.flags = write ? MMC_DATA_WRITE : MMC_DATA_READ;
|
||||||
|
mmc_cmd.opcode = 53; /* SD_IO_RW_EXTENDED */
|
||||||
|
mmc_cmd.arg = write ? 1<<31 : 0;
|
||||||
|
mmc_cmd.arg |= (func & 0x7) << 28;
|
||||||
|
mmc_cmd.arg |= 1<<27;
|
||||||
|
mmc_cmd.arg |= fifo ? 0 : 1<<26;
|
||||||
|
mmc_cmd.arg |= (addr & 0x1FFFF) << 9;
|
||||||
|
mmc_cmd.arg |= blk_num & 0x1FF;
|
||||||
|
mmc_cmd.flags = MMC_RSP_SPI_R5 | MMC_RSP_R5 | MMC_CMD_ADTC;
|
||||||
|
mmc_req.cmd = &mmc_cmd;
|
||||||
|
mmc_req.data = &mmc_dat;
|
||||||
|
if (!fifo)
|
||||||
|
addr += ttl_len;
|
||||||
|
|
||||||
|
sdio_claim_host(sdio_func);
|
||||||
|
mmc_set_data_timeout(&mmc_dat, sdio_func->card);
|
||||||
|
mmc_wait_for_req(host, &mmc_req);
|
||||||
|
sdio_release_host(sdio_func);
|
||||||
|
|
||||||
|
err_ret = mmc_cmd.error? mmc_cmd.error : mmc_dat.error;
|
||||||
|
if (0 != err_ret) {
|
||||||
|
sd_err(("%s:CMD53 %s failed with code %d\n",
|
||||||
|
__FUNCTION__, write ? "write" : "read", err_ret));
|
||||||
|
return SDIOH_API_RC_FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ttl_len % blk_size != 0) {
|
|
||||||
sd_err(("%s, data length %d not aligned to block size %d\n",
|
|
||||||
__FUNCTION__, ttl_len, blk_size));
|
|
||||||
return SDIOH_API_RC_FAIL;
|
|
||||||
}
|
|
||||||
blk_num = ttl_len / blk_size;
|
|
||||||
mmc_dat.sg = sd->sg_list;
|
|
||||||
mmc_dat.sg_len = sg_count;
|
|
||||||
mmc_dat.blksz = blk_size;
|
|
||||||
mmc_dat.blocks = blk_num;
|
|
||||||
mmc_dat.flags = write ? MMC_DATA_WRITE : MMC_DATA_READ;
|
|
||||||
mmc_cmd.opcode = 53; /* SD_IO_RW_EXTENDED */
|
|
||||||
mmc_cmd.arg = write ? 1<<31 : 0;
|
|
||||||
mmc_cmd.arg |= (func & 0x7) << 28;
|
|
||||||
mmc_cmd.arg |= 1<<27;
|
|
||||||
mmc_cmd.arg |= fifo ? 0 : 1<<26;
|
|
||||||
mmc_cmd.arg |= (addr & 0x1FFFF) << 9;
|
|
||||||
mmc_cmd.arg |= blk_num & 0x1FF;
|
|
||||||
mmc_cmd.flags = MMC_RSP_SPI_R5 | MMC_RSP_R5 | MMC_CMD_ADTC;
|
|
||||||
mmc_req.cmd = &mmc_cmd;
|
|
||||||
mmc_req.data = &mmc_dat;
|
|
||||||
if (!fifo)
|
|
||||||
addr += ttl_len;
|
|
||||||
|
|
||||||
sdio_claim_host(sdio_func);
|
|
||||||
mmc_set_data_timeout(&mmc_dat, sdio_func->card);
|
|
||||||
mmc_wait_for_req(host, &mmc_req);
|
|
||||||
sdio_release_host(sdio_func);
|
|
||||||
|
|
||||||
err_ret = mmc_cmd.error? mmc_cmd.error : mmc_dat.error;
|
|
||||||
if (0 != err_ret) {
|
|
||||||
sd_err(("%s:CMD53 %s failed with code %d\n",
|
|
||||||
__FUNCTION__, write ? "write" : "read", err_ret));
|
|
||||||
return SDIOH_API_RC_FAIL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if(sd->txglom_mode == SDPCM_TXGLOM_CPY) {
|
else if(sd->txglom_mode == SDPCM_TXGLOM_CPY) {
|
||||||
for (pnext = pkt; pnext; pnext = PKTNEXT(sd->osh, pnext)) {
|
for (pnext = pkt; pnext; pnext = PKTNEXT(sd->osh, pnext)) {
|
||||||
|
|
@ -1791,7 +1796,7 @@ static int sdio_sw_reset(sdioh_info_t *sd)
|
||||||
struct mmc_card *card = sd->func[0]->card;
|
struct mmc_card *card = sd->func[0]->card;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
#if defined(MMC_SW_RESET) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
|
#if defined(MMC_SW_RESET) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
|
||||||
/* MMC_SW_RESET */
|
/* MMC_SW_RESET */
|
||||||
printf("%s: call mmc_sw_reset\n", __FUNCTION__);
|
printf("%s: call mmc_sw_reset\n", __FUNCTION__);
|
||||||
sdio_claim_host(sd->func[0]);
|
sdio_claim_host(sd->func[0]);
|
||||||
|
|
@ -1801,7 +1806,7 @@ static int sdio_sw_reset(sdioh_info_t *sd)
|
||||||
err = mmc_sw_reset(card->host);
|
err = mmc_sw_reset(card->host);
|
||||||
#endif
|
#endif
|
||||||
sdio_release_host(sd->func[0]);
|
sdio_release_host(sd->func[0]);
|
||||||
#elif defined(MMC_HW_RESET) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
|
#elif defined(MMC_HW_RESET) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
|
||||||
/* MMC_HW_RESET */
|
/* MMC_HW_RESET */
|
||||||
printf("%s: call mmc_hw_reset\n", __FUNCTION__);
|
printf("%s: call mmc_hw_reset\n", __FUNCTION__);
|
||||||
sdio_claim_host(sd->func[0]);
|
sdio_claim_host(sd->func[0]);
|
||||||
|
|
@ -1822,6 +1827,7 @@ LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) && LINUX_VERSION_CODE < KERNEL_VE
|
||||||
mmc_power_restore_host(card->host);
|
mmc_power_restore_host(card->host);
|
||||||
#else
|
#else
|
||||||
/* sdio_reset_comm */
|
/* sdio_reset_comm */
|
||||||
|
printf("%s: call sdio_reset_comm\n", __FUNCTION__);
|
||||||
err = sdio_reset_comm(card);
|
err = sdio_reset_comm(card);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -1836,7 +1842,7 @@ int
|
||||||
sdioh_start(sdioh_info_t *sd, int stage)
|
sdioh_start(sdioh_info_t *sd, int stage)
|
||||||
{
|
{
|
||||||
#if defined(OEM_ANDROID)
|
#if defined(OEM_ANDROID)
|
||||||
int ret;
|
int ret = 0;
|
||||||
|
|
||||||
if (!sd) {
|
if (!sd) {
|
||||||
sd_err(("%s Failed, sd is NULL\n", __FUNCTION__));
|
sd_err(("%s Failed, sd is NULL\n", __FUNCTION__));
|
||||||
|
|
@ -1922,7 +1928,7 @@ sdioh_start(sdioh_info_t *sd, int stage)
|
||||||
sd_err(("%s Failed\n", __FUNCTION__));
|
sd_err(("%s Failed\n", __FUNCTION__));
|
||||||
#endif /* defined(OEM_ANDROID) */
|
#endif /* defined(OEM_ANDROID) */
|
||||||
|
|
||||||
return (0);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
@ -2077,3 +2083,14 @@ sdmmc_set_clock_divisor(sdioh_info_t *sd, uint sd_div)
|
||||||
hz = sd->sd_clk_rate / sd_div;
|
hz = sd->sd_clk_rate / sd_div;
|
||||||
sdmmc_set_clock_rate(sd, hz);
|
sdmmc_set_clock_rate(sd, hz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint
|
||||||
|
sdioh_set_mode(sdioh_info_t *sd, uint mode)
|
||||||
|
{
|
||||||
|
if (mode == SDPCM_TXGLOM_CPY)
|
||||||
|
sd->txglom_mode = mode;
|
||||||
|
else if (mode == SDPCM_TXGLOM_MDESC)
|
||||||
|
sd->txglom_mode = mode;
|
||||||
|
|
||||||
|
return (sd->txglom_mode);
|
||||||
|
}
|
||||||
|
|
|
||||||
136
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc_linux.c
Normal file → Executable file
136
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc_linux.c
Normal file → Executable file
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* BCMSDH Function Driver for the native SDIO/MMC driver in the Linux Kernel
|
* BCMSDH Function Driver for the native SDIO/MMC driver in the Linux Kernel
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -45,6 +64,10 @@
|
||||||
#define SDIO_VENDOR_ID_BROADCOM 0x02d0
|
#define SDIO_VENDOR_ID_BROADCOM 0x02d0
|
||||||
#endif /* !defined(SDIO_VENDOR_ID_BROADCOM) */
|
#endif /* !defined(SDIO_VENDOR_ID_BROADCOM) */
|
||||||
|
|
||||||
|
#if !defined(SDIO_VENDOR_ID_SYNAPTICS)
|
||||||
|
#define SDIO_VENDOR_ID_SYNAPTICS 0x06cb
|
||||||
|
#endif /* !defined(SDIO_VENDOR_ID_SYNAPTICS) */
|
||||||
|
|
||||||
#define SDIO_DEVICE_ID_BROADCOM_DEFAULT 0x0000
|
#define SDIO_DEVICE_ID_BROADCOM_DEFAULT 0x0000
|
||||||
|
|
||||||
extern void wl_cfg80211_set_parent_dev(void *dev);
|
extern void wl_cfg80211_set_parent_dev(void *dev);
|
||||||
|
|
@ -73,7 +96,9 @@ PBCMSDH_SDMMC_INSTANCE gInstance;
|
||||||
/* Maximum number of bcmsdh_sdmmc devices supported by driver */
|
/* Maximum number of bcmsdh_sdmmc devices supported by driver */
|
||||||
#define BCMSDH_SDMMC_MAX_DEVICES 1
|
#define BCMSDH_SDMMC_MAX_DEVICES 1
|
||||||
|
|
||||||
|
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM_SLEEP)
|
||||||
extern volatile bool dhd_mmc_suspend;
|
extern volatile bool dhd_mmc_suspend;
|
||||||
|
#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM_SLEEP) */
|
||||||
|
|
||||||
static int sdioh_probe(struct sdio_func *func)
|
static int sdioh_probe(struct sdio_func *func)
|
||||||
{
|
{
|
||||||
|
|
@ -83,7 +108,8 @@ static int sdioh_probe(struct sdio_func *func)
|
||||||
osl_t *osh = NULL;
|
osl_t *osh = NULL;
|
||||||
sdioh_info_t *sdioh = NULL;
|
sdioh_info_t *sdioh = NULL;
|
||||||
|
|
||||||
sd_err(("bus num (host idx)=%d, slot num (rca)=%d\n", host_idx, rca));
|
sd_err(("bus num (host idx)=%d, slot num (rca)=%d, caps=0x%x\n",
|
||||||
|
host_idx, rca, func->card->host->caps));
|
||||||
adapter = dhd_wifi_platform_get_adapter(SDIO_BUS, host_idx, rca);
|
adapter = dhd_wifi_platform_get_adapter(SDIO_BUS, host_idx, rca);
|
||||||
if (adapter != NULL) {
|
if (adapter != NULL) {
|
||||||
sd_err(("found adapter info '%s'\n", adapter->name));
|
sd_err(("found adapter info '%s'\n", adapter->name));
|
||||||
|
|
@ -102,23 +128,31 @@ static int sdioh_probe(struct sdio_func *func)
|
||||||
wl_cfg80211_set_parent_dev(&func->dev);
|
wl_cfg80211_set_parent_dev(&func->dev);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* allocate SDIO Host Controller state info */
|
/* allocate SDIO Host Controller state info */
|
||||||
osh = osl_attach(&func->dev, SDIO_BUS, TRUE);
|
osh = osl_attach(&func->dev, SDIO_BUS, TRUE);
|
||||||
if (osh == NULL) {
|
if (osh == NULL) {
|
||||||
sd_err(("%s: osl_attach failed\n", __FUNCTION__));
|
sd_err(("%s: osl_attach failed\n", __FUNCTION__));
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
osl_static_mem_init(osh, adapter);
|
osl_static_mem_init(osh, adapter);
|
||||||
sdioh = sdioh_attach(osh, func);
|
sdioh = sdioh_attach(osh, func);
|
||||||
if (sdioh == NULL) {
|
if (sdioh == NULL) {
|
||||||
sd_err(("%s: sdioh_attach failed\n", __FUNCTION__));
|
sd_err(("%s: sdioh_attach failed\n", __FUNCTION__));
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
sdioh->bcmsdh = bcmsdh_probe(osh, &func->dev, sdioh, adapter, SDIO_BUS, host_idx, rca);
|
if (!(func->card->host->caps & MMC_CAP_NONREMOVABLE)) {
|
||||||
if (sdioh->bcmsdh == NULL) {
|
sd_err(("%s: MMC_CAP_NONREMOVABLE not enabled in SDIO driver\n", __FUNCTION__));
|
||||||
sd_err(("%s: bcmsdh_probe failed\n", __FUNCTION__));
|
// func->card->host->caps |= MMC_CAP_NONREMOVABLE;
|
||||||
goto fail;
|
}
|
||||||
}
|
if ((func->card->host->caps & MMC_CAP_NEEDS_POLL)) {
|
||||||
|
sd_err(("%s: MMC_CAP_NEEDS_POLL enabled in SDIO driver\n", __FUNCTION__));
|
||||||
|
// func->card->host->caps &= ~MMC_CAP_NEEDS_POLL;
|
||||||
|
}
|
||||||
|
sdioh->bcmsdh = bcmsdh_probe(osh, &func->dev, sdioh, adapter, SDIO_BUS, host_idx, rca);
|
||||||
|
if (sdioh->bcmsdh == NULL) {
|
||||||
|
sd_err(("%s: bcmsdh_probe failed\n", __FUNCTION__));
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
sdio_set_drvdata(func, sdioh);
|
sdio_set_drvdata(func, sdioh);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -215,6 +249,7 @@ static const struct sdio_device_id bcmsdh_sdmmc_ids[] = {
|
||||||
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_ANY_ID) },
|
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_ANY_ID) },
|
||||||
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, BCM4381_CHIP_ID) },
|
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, BCM4381_CHIP_ID) },
|
||||||
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, BCM4382_CHIP_ID) },
|
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, BCM4382_CHIP_ID) },
|
||||||
|
{ SDIO_DEVICE(SDIO_VENDOR_ID_SYNAPTICS, BCM43711_CHIP_ID) },
|
||||||
{ SDIO_DEVICE_CLASS(SDIO_CLASS_NONE) },
|
{ SDIO_DEVICE_CLASS(SDIO_CLASS_NONE) },
|
||||||
{ 0, 0, 0, 0 /* end: all zeroes */
|
{ 0, 0, 0, 0 /* end: all zeroes */
|
||||||
},
|
},
|
||||||
|
|
@ -222,7 +257,7 @@ static const struct sdio_device_id bcmsdh_sdmmc_ids[] = {
|
||||||
|
|
||||||
MODULE_DEVICE_TABLE(sdio, bcmsdh_sdmmc_ids);
|
MODULE_DEVICE_TABLE(sdio, bcmsdh_sdmmc_ids);
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM)
|
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM_SLEEP)
|
||||||
static int bcmsdh_sdmmc_suspend(struct device *pdev)
|
static int bcmsdh_sdmmc_suspend(struct device *pdev)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
@ -281,11 +316,54 @@ static int bcmsdh_sdmmc_resume(struct device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DEVICE_PM_CALLBACK
|
||||||
|
static int bcmsdh_sdmmc_prepare(struct device *pdev)
|
||||||
|
{
|
||||||
|
int err;
|
||||||
|
sdioh_info_t *sdioh;
|
||||||
|
struct sdio_func *func = dev_to_sdio_func(pdev);
|
||||||
|
|
||||||
|
printf("%s Enter func->num=%d\n", __FUNCTION__, func->num);
|
||||||
|
if (func->num != 2)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
sdioh = sdio_get_drvdata(func);
|
||||||
|
err = bcmsdh_prepare(sdioh->bcmsdh);
|
||||||
|
if (err) {
|
||||||
|
printf("%s bcmsdh_suspend err=%d\n", __FUNCTION__, err);
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("%s Exit\n", __FUNCTION__);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void bcmsdh_sdmmc_complete(struct device *pdev)
|
||||||
|
{
|
||||||
|
sdioh_info_t *sdioh;
|
||||||
|
struct sdio_func *func = dev_to_sdio_func(pdev);
|
||||||
|
|
||||||
|
printf("%s Enter func->num=%d\n", __FUNCTION__, func->num);
|
||||||
|
if (func->num != 2)
|
||||||
|
return ;
|
||||||
|
|
||||||
|
sdioh = sdio_get_drvdata(func);
|
||||||
|
bcmsdh_complete(sdioh->bcmsdh);
|
||||||
|
|
||||||
|
printf("%s Exit\n", __FUNCTION__);
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
#endif /* DEVICE_PM_CALLBACK */
|
||||||
|
|
||||||
static const struct dev_pm_ops bcmsdh_sdmmc_pm_ops = {
|
static const struct dev_pm_ops bcmsdh_sdmmc_pm_ops = {
|
||||||
.suspend = bcmsdh_sdmmc_suspend,
|
.suspend = bcmsdh_sdmmc_suspend,
|
||||||
.resume = bcmsdh_sdmmc_resume,
|
.resume = bcmsdh_sdmmc_resume,
|
||||||
|
#ifdef DEVICE_PM_CALLBACK
|
||||||
|
.prepare = bcmsdh_sdmmc_prepare,
|
||||||
|
.complete = bcmsdh_sdmmc_complete,
|
||||||
|
#endif /* DEVICE_PM_CALLBACK */
|
||||||
};
|
};
|
||||||
#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM) */
|
#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM_SLEEP) */
|
||||||
|
|
||||||
#if defined(BCMLXSDMMC)
|
#if defined(BCMLXSDMMC)
|
||||||
static struct semaphore *notify_semaphore = NULL;
|
static struct semaphore *notify_semaphore = NULL;
|
||||||
|
|
@ -293,7 +371,17 @@ static struct semaphore *notify_semaphore = NULL;
|
||||||
static int dummy_probe(struct sdio_func *func,
|
static int dummy_probe(struct sdio_func *func,
|
||||||
const struct sdio_device_id *id)
|
const struct sdio_device_id *id)
|
||||||
{
|
{
|
||||||
sd_err(("%s: enter\n", __FUNCTION__));
|
if (func)
|
||||||
|
sd_err(("%s: func->num=0x%x; \n", __FUNCTION__, func->num));
|
||||||
|
if (id) {
|
||||||
|
if ((id->vendor != SDIO_VENDOR_ID_BROADCOM) &&
|
||||||
|
(id->vendor != SDIO_VENDOR_ID_SYNAPTICS)) {
|
||||||
|
sd_err(("%s: class=0x%x; vendor=0x%x; device=0x%x\n", __FUNCTION__,
|
||||||
|
id->class, id->vendor, id->device));
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (func && (func->num != 2)) {
|
if (func && (func->num != 2)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -333,11 +421,11 @@ static struct sdio_driver bcmsdh_sdmmc_driver = {
|
||||||
.remove = bcmsdh_sdmmc_remove,
|
.remove = bcmsdh_sdmmc_remove,
|
||||||
.name = "bcmsdh_sdmmc",
|
.name = "bcmsdh_sdmmc",
|
||||||
.id_table = bcmsdh_sdmmc_ids,
|
.id_table = bcmsdh_sdmmc_ids,
|
||||||
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM)
|
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM_SLEEP)
|
||||||
.drv = {
|
.drv = {
|
||||||
.pm = &bcmsdh_sdmmc_pm_ops,
|
.pm = &bcmsdh_sdmmc_pm_ops,
|
||||||
},
|
},
|
||||||
#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM) */
|
#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM_SLEEP) */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sdos_info {
|
struct sdos_info {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* 'Standard' SDIO HOST CONTROLLER driver
|
* 'Standard' SDIO HOST CONTROLLER driver
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -63,7 +82,7 @@ uint sd_msglevel = SDH_ERROR_VAL;
|
||||||
|
|
||||||
uint sd_hiok = TRUE; /* Use hi-speed mode if available? */
|
uint sd_hiok = TRUE; /* Use hi-speed mode if available? */
|
||||||
uint sd_sdmode = SDIOH_MODE_SD4; /* Use SD4 mode by default */
|
uint sd_sdmode = SDIOH_MODE_SD4; /* Use SD4 mode by default */
|
||||||
uint sd_f2_blocksize = 64; /* Default blocksize */
|
uint sd_f2_blocksize = 256; /* Default blocksize */
|
||||||
uint sd_f1_blocksize = BLOCK_SIZE_4318; /* Default blocksize */
|
uint sd_f1_blocksize = BLOCK_SIZE_4318; /* Default blocksize */
|
||||||
|
|
||||||
#define sd3_trace(x)
|
#define sd3_trace(x)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* 'Standard' SDIO HOST CONTROLLER driver
|
* 'Standard' SDIO HOST CONTROLLER driver
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* 'Standard' SDIO HOST CONTROLLER driver - linux portion
|
* 'Standard' SDIO HOST CONTROLLER driver - linux portion
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Broadcom Secure Standard Library.
|
* Broadcom Secure Standard Library.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Driver O/S-independent utility routines
|
* Driver O/S-independent utility routines
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -1804,9 +1823,10 @@ BCMFASTPATH(bcm_mwbmap_alloc)(struct bcm_mwbmap * mwbmap_hdl)
|
||||||
}
|
}
|
||||||
MWBMAP_ASSERT(C_bcm_count_leading_zeros(bitmap) ==
|
MWBMAP_ASSERT(C_bcm_count_leading_zeros(bitmap) ==
|
||||||
bcm_count_leading_zeros(bitmap));
|
bcm_count_leading_zeros(bitmap));
|
||||||
bitix = (BCM_MWBMAP_BITS_WORD - 1)
|
bitix = bcm_count_leading_zeros(bitmap); /* use asm clz */
|
||||||
- bcm_count_leading_zeros(bitmap); /* use asm clz */
|
bitix = (bitix <= (BCM_MWBMAP_BITS_WORD - 1)) ?
|
||||||
wordix = BCM_MWBMAP_MULOP(wordix) + bitix;
|
((BCM_MWBMAP_BITS_WORD - 1) - bitix) : 0;
|
||||||
|
wordix = BCM_MWBMAP_MULOP(wordix) + bitix;
|
||||||
|
|
||||||
/* Clear bit if wd count is 0, without conditional branch */
|
/* Clear bit if wd count is 0, without conditional branch */
|
||||||
#if defined(BCM_MWBMAP_USE_CNTSETBITS)
|
#if defined(BCM_MWBMAP_USE_CNTSETBITS)
|
||||||
|
|
|
||||||
21
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmwifi_channels.c
Normal file → Executable file
21
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmwifi_channels.c
Normal file → Executable file
|
|
@ -3,7 +3,26 @@
|
||||||
* Contents are wifi-specific, used by any kernel or app-level
|
* Contents are wifi-specific, used by any kernel or app-level
|
||||||
* software that might want wifi things as it grows.
|
* software that might want wifi things as it grows.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
21
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmwifi_radiotap.c
Normal file → Executable file
21
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmwifi_radiotap.c
Normal file → Executable file
|
|
@ -3,7 +3,26 @@
|
||||||
* This file housing the functions use by
|
* This file housing the functions use by
|
||||||
* wl driver.
|
* wl driver.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Driver O/S-independent utility routines
|
* Driver O/S-independent utility routines
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,26 @@
|
||||||
* provide the caller with one common bus interface for all dongle devices. In practice, it is only
|
* provide the caller with one common bus interface for all dongle devices. In practice, it is only
|
||||||
* used for USB interfaces. DBUS is not a protocol, but an abstraction layer.
|
* used for USB interfaces. DBUS is not a protocol, but an abstraction layer.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -2762,14 +2781,12 @@ dhd_dbus_state_change(void *handle, int state)
|
||||||
{
|
{
|
||||||
dhd_pub_t *dhd = (dhd_pub_t *)handle;
|
dhd_pub_t *dhd = (dhd_pub_t *)handle;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
wifi_adapter_info_t *adapter;
|
|
||||||
int wowl_dngldown = 0;
|
int wowl_dngldown = 0;
|
||||||
|
|
||||||
if (dhd == NULL) {
|
if (dhd == NULL) {
|
||||||
DBUSERR(("%s: dhd is NULL\n", __FUNCTION__));
|
DBUSERR(("%s: dhd is NULL\n", __FUNCTION__));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
adapter = (wifi_adapter_info_t *)dhd->adapter;
|
|
||||||
#ifdef WL_EXT_WOWL
|
#ifdef WL_EXT_WOWL
|
||||||
wowl_dngldown = dhd_conf_wowl_dngldown(dhd);
|
wowl_dngldown = dhd_conf_wowl_dngldown(dhd);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Dongle BUS interface for USB, OS independent
|
* Dongle BUS interface for USB, OS independent
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -901,14 +920,6 @@ dbus_usb_update_chipinfo(usb_info_t *usbinfo, uint32 chip)
|
||||||
usbinfo->rdlram_size = RDL_RAM_SIZE_4360;
|
usbinfo->rdlram_size = RDL_RAM_SIZE_4360;
|
||||||
usbinfo->rdlram_base_addr = RDL_RAM_BASE_4360;
|
usbinfo->rdlram_base_addr = RDL_RAM_BASE_4360;
|
||||||
break;
|
break;
|
||||||
case 43242:
|
|
||||||
usbinfo->rdlram_size = RDL_RAM_SIZE_43242;
|
|
||||||
usbinfo->rdlram_base_addr = RDL_RAM_BASE_43242;
|
|
||||||
break;
|
|
||||||
case 43143:
|
|
||||||
usbinfo->rdlram_size = RDL_RAM_SIZE_43143;
|
|
||||||
usbinfo->rdlram_base_addr = RDL_RAM_BASE_43143;
|
|
||||||
break;
|
|
||||||
case 43569:
|
case 43569:
|
||||||
usbinfo->rdlram_size = RDL_RAM_SIZE_4350;
|
usbinfo->rdlram_size = RDL_RAM_SIZE_4350;
|
||||||
usbinfo->rdlram_base_addr = RDL_RAM_BASE_4350;
|
usbinfo->rdlram_base_addr = RDL_RAM_BASE_4350;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,26 @@
|
||||||
* Dongle BUS interface
|
* Dongle BUS interface
|
||||||
* USB Linux Implementation
|
* USB Linux Implementation
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -488,9 +507,6 @@ static int dbus_usbos_usbreset_func(void *data);
|
||||||
static struct usb_device_id devid_table[] = {
|
static struct usb_device_id devid_table[] = {
|
||||||
{ USB_DEVICE(BCM_DNGL_VID, 0x0000) }, /* Configurable via register() */
|
{ USB_DEVICE(BCM_DNGL_VID, 0x0000) }, /* Configurable via register() */
|
||||||
#if defined(BCM_DNGL_EMBEDIMAGE) || defined(BCM_REQUEST_FW)
|
#if defined(BCM_DNGL_EMBEDIMAGE) || defined(BCM_REQUEST_FW)
|
||||||
{ USB_DEVICE(BCM_DNGL_VID, BCM_DNGL_BL_PID_4328) },
|
|
||||||
{ USB_DEVICE(BCM_DNGL_VID, BCM_DNGL_BL_PID_43143) },
|
|
||||||
{ USB_DEVICE(BCM_DNGL_VID, BCM_DNGL_BL_PID_43242) },
|
|
||||||
{ USB_DEVICE(BCM_DNGL_VID, BCM_DNGL_BL_PID_4360) },
|
{ USB_DEVICE(BCM_DNGL_VID, BCM_DNGL_BL_PID_4360) },
|
||||||
{ USB_DEVICE(BCM_DNGL_VID, BCM_DNGL_BL_PID_43569) },
|
{ USB_DEVICE(BCM_DNGL_VID, BCM_DNGL_BL_PID_43569) },
|
||||||
{ USB_DEVICE(BCM_DNGL_VID, BCM_DNGL_BL_PID_4381) },
|
{ USB_DEVICE(BCM_DNGL_VID, BCM_DNGL_BL_PID_4381) },
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,26 @@
|
||||||
* Provides type definitions and function prototypes used to link the
|
* Provides type definitions and function prototypes used to link the
|
||||||
* DHD OS, bus, and protocol modules.
|
* DHD OS, bus, and protocol modules.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -1874,6 +1893,13 @@ typedef struct dhd_pub {
|
||||||
#endif /* DEVICE_TX_STUCK_DETECT && ASSOC_CHECK_SR */
|
#endif /* DEVICE_TX_STUCK_DETECT && ASSOC_CHECK_SR */
|
||||||
uint32 p2p_disc_busy_cnt;
|
uint32 p2p_disc_busy_cnt;
|
||||||
bool skip_memdump_map_read;
|
bool skip_memdump_map_read;
|
||||||
|
#if defined(DHD_SI_WD_RESET)
|
||||||
|
bool si_wd;
|
||||||
|
#endif
|
||||||
|
#ifdef PKT_FILTER_SUPPORT
|
||||||
|
uint8 pfaoe_enab;
|
||||||
|
#endif /* PKT_FILTER_SUPPORT */
|
||||||
|
|
||||||
#ifdef CSI_SUPPORT
|
#ifdef CSI_SUPPORT
|
||||||
struct list_head csi_list;
|
struct list_head csi_list;
|
||||||
int csi_count;
|
int csi_count;
|
||||||
|
|
@ -2138,16 +2164,19 @@ inline static void MUTEX_UNLOCK_SOFTAP_SET(dhd_pub_t * dhdp)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DHD_DEBUG_WAKE_LOCK
|
#ifdef DHD_DEBUG_WAKE_LOCK
|
||||||
|
extern int dhd_wakelock_counter_get(dhd_pub_t *pub);
|
||||||
|
extern int dhd_wakelock_wd_counter_get(dhd_pub_t *pub);
|
||||||
|
|
||||||
#define DHD_OS_WAKE_LOCK(pub) \
|
#define DHD_OS_WAKE_LOCK(pub) \
|
||||||
do { \
|
do { \
|
||||||
printf("call wake_lock: %s %d\n", \
|
printf("call wake_lock: %s %d (%d)\n", \
|
||||||
__FUNCTION__, __LINE__); \
|
__FUNCTION__, __LINE__, dhd_wakelock_counter_get(pub)); \
|
||||||
dhd_os_wake_lock(pub); \
|
dhd_os_wake_lock(pub); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define DHD_OS_WAKE_UNLOCK(pub) \
|
#define DHD_OS_WAKE_UNLOCK(pub) \
|
||||||
do { \
|
do { \
|
||||||
printf("call wake_unlock: %s %d\n", \
|
printf("call wake_unlock: %s %d (%d)\n", \
|
||||||
__FUNCTION__, __LINE__); \
|
__FUNCTION__, __LINE__, dhd_wakelock_counter_get(pub)); \
|
||||||
dhd_os_wake_unlock(pub); \
|
dhd_os_wake_unlock(pub); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define DHD_EVENT_WAKE_LOCK(pub) \
|
#define DHD_EVENT_WAKE_LOCK(pub) \
|
||||||
|
|
@ -2246,6 +2275,18 @@ inline static void MUTEX_UNLOCK_SOFTAP_SET(dhd_pub_t * dhdp)
|
||||||
__FUNCTION__, __LINE__); \
|
__FUNCTION__, __LINE__); \
|
||||||
dhd_os_wake_lock_destroy(dhd); \
|
dhd_os_wake_lock_destroy(dhd); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
#define DHD_OS_WD_WAKE_LOCK(pub) \
|
||||||
|
do { \
|
||||||
|
printf("call dhd_os_WD_wake_lock: %s %d (%d)\n", \
|
||||||
|
__FUNCTION__, __LINE__, dhd_wakelock_wd_counter_get(pub)); \
|
||||||
|
dhd_os_wd_wake_lock(pub); \
|
||||||
|
} while (0)
|
||||||
|
#define DHD_OS_WD_WAKE_UNLOCK(pub) \
|
||||||
|
do { \
|
||||||
|
printf("call dhd_os_WD_wake_unlock: %s %d (%d)\n", \
|
||||||
|
__FUNCTION__, __LINE__, dhd_wakelock_wd_counter_get(pub)); \
|
||||||
|
dhd_os_wd_wake_unlock(pub); \
|
||||||
|
} while (0)
|
||||||
#else
|
#else
|
||||||
#define DHD_OS_WAKE_LOCK(pub) dhd_os_wake_lock(pub)
|
#define DHD_OS_WAKE_LOCK(pub) dhd_os_wake_lock(pub)
|
||||||
#define DHD_OS_WAKE_UNLOCK(pub) dhd_os_wake_unlock(pub)
|
#define DHD_OS_WAKE_UNLOCK(pub) dhd_os_wake_unlock(pub)
|
||||||
|
|
@ -2268,10 +2309,9 @@ inline static void MUTEX_UNLOCK_SOFTAP_SET(dhd_pub_t * dhdp)
|
||||||
#define DHD_OS_WAKE_LOCK_RESTORE(pub) dhd_os_wake_lock_restore(pub)
|
#define DHD_OS_WAKE_LOCK_RESTORE(pub) dhd_os_wake_lock_restore(pub)
|
||||||
#define DHD_OS_WAKE_LOCK_INIT(dhd) dhd_os_wake_lock_init(dhd);
|
#define DHD_OS_WAKE_LOCK_INIT(dhd) dhd_os_wake_lock_init(dhd);
|
||||||
#define DHD_OS_WAKE_LOCK_DESTROY(dhd) dhd_os_wake_lock_destroy(dhd);
|
#define DHD_OS_WAKE_LOCK_DESTROY(dhd) dhd_os_wake_lock_destroy(dhd);
|
||||||
#endif /* DHD_DEBUG_WAKE_LOCK */
|
|
||||||
|
|
||||||
#define DHD_OS_WD_WAKE_LOCK(pub) dhd_os_wd_wake_lock(pub)
|
#define DHD_OS_WD_WAKE_LOCK(pub) dhd_os_wd_wake_lock(pub)
|
||||||
#define DHD_OS_WD_WAKE_UNLOCK(pub) dhd_os_wd_wake_unlock(pub)
|
#define DHD_OS_WD_WAKE_UNLOCK(pub) dhd_os_wd_wake_unlock(pub)
|
||||||
|
#endif /* DHD_DEBUG_WAKE_LOCK */
|
||||||
|
|
||||||
#ifdef DHD_USE_SCAN_WAKELOCK
|
#ifdef DHD_USE_SCAN_WAKELOCK
|
||||||
#ifdef DHD_DEBUG_SCAN_WAKELOCK
|
#ifdef DHD_DEBUG_SCAN_WAKELOCK
|
||||||
|
|
@ -2554,6 +2594,7 @@ extern void dhd_bus_wakeup_work(dhd_pub_t *dhdp);
|
||||||
#define MAX_FEATURE_SET_CONCURRRENT_GROUPS 3
|
#define MAX_FEATURE_SET_CONCURRRENT_GROUPS 3
|
||||||
|
|
||||||
#if defined(linux) || defined(LINUX) || defined(OEM_ANDROID)
|
#if defined(linux) || defined(LINUX) || defined(OEM_ANDROID)
|
||||||
|
extern int dhd_dev_indoor_cfg(struct net_device *dev, u8 enable);
|
||||||
extern int dhd_dev_get_feature_set(struct net_device *dev);
|
extern int dhd_dev_get_feature_set(struct net_device *dev);
|
||||||
extern int dhd_dev_get_feature_set_matrix(struct net_device *dev, int num);
|
extern int dhd_dev_get_feature_set_matrix(struct net_device *dev, int num);
|
||||||
extern int dhd_dev_cfg_rand_mac_oui(struct net_device *dev, uint8 *oui);
|
extern int dhd_dev_cfg_rand_mac_oui(struct net_device *dev, uint8 *oui);
|
||||||
|
|
@ -3278,7 +3319,7 @@ extern uint dhd_force_tx_queueing;
|
||||||
#define CUSTOM_RXF_PRIO_SETTING MAX((CUSTOM_DPC_PRIO_SETTING - 1), 1)
|
#define CUSTOM_RXF_PRIO_SETTING MAX((CUSTOM_DPC_PRIO_SETTING - 1), 1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEFAULT_WIFI_TURNOFF_DELAY 0
|
#define DEFAULT_WIFI_TURNOFF_DELAY 10
|
||||||
#ifndef WIFI_TURNOFF_DELAY
|
#ifndef WIFI_TURNOFF_DELAY
|
||||||
#define WIFI_TURNOFF_DELAY DEFAULT_WIFI_TURNOFF_DELAY
|
#define WIFI_TURNOFF_DELAY DEFAULT_WIFI_TURNOFF_DELAY
|
||||||
#endif /* WIFI_TURNOFF_DELAY */
|
#endif /* WIFI_TURNOFF_DELAY */
|
||||||
|
|
@ -4109,6 +4150,7 @@ extern int dhd_prot_debug_info_print(dhd_pub_t *dhd);
|
||||||
extern bool dhd_bus_skip_clm(dhd_pub_t *dhdp);
|
extern bool dhd_bus_skip_clm(dhd_pub_t *dhdp);
|
||||||
extern void dhd_pcie_dump_rc_conf_space_cap(dhd_pub_t *dhd);
|
extern void dhd_pcie_dump_rc_conf_space_cap(dhd_pub_t *dhd);
|
||||||
extern bool dhd_pcie_dump_int_regs(dhd_pub_t *dhd);
|
extern bool dhd_pcie_dump_int_regs(dhd_pub_t *dhd);
|
||||||
|
extern bool dhd_pcie_check_lps_d3_acked(dhd_pub_t *dhd);
|
||||||
void dhd_prot_ctrl_info_print(dhd_pub_t *dhd);
|
void dhd_prot_ctrl_info_print(dhd_pub_t *dhd);
|
||||||
#else
|
#else
|
||||||
#define dhd_prot_debug_info_print(x)
|
#define dhd_prot_debug_info_print(x)
|
||||||
|
|
@ -4391,6 +4433,7 @@ typedef struct dhd_gdb_proxy_probe_data {
|
||||||
#endif /* GDB_PROXY */
|
#endif /* GDB_PROXY */
|
||||||
|
|
||||||
#ifdef PKT_FILTER_SUPPORT
|
#ifdef PKT_FILTER_SUPPORT
|
||||||
|
extern int dhd_pktfilter_mode_change(dhd_pub_t * dhd, int enable);
|
||||||
extern void dhd_pktfilter_offload_set(dhd_pub_t * dhd, char *arg);
|
extern void dhd_pktfilter_offload_set(dhd_pub_t * dhd, char *arg);
|
||||||
extern void dhd_pktfilter_offload_enable(dhd_pub_t * dhd, char *arg, int enable, int master_mode);
|
extern void dhd_pktfilter_offload_enable(dhd_pub_t * dhd, char *arg, int enable, int master_mode);
|
||||||
extern void dhd_pktfilter_offload_delete(dhd_pub_t *dhd, int id);
|
extern void dhd_pktfilter_offload_delete(dhd_pub_t *dhd, int id);
|
||||||
|
|
@ -4536,6 +4579,9 @@ static inline uint32 next_larger_power2(uint32 num)
|
||||||
|
|
||||||
extern struct dhd_if * dhd_get_ifp(dhd_pub_t *dhdp, uint32 ifidx);
|
extern struct dhd_if * dhd_get_ifp(dhd_pub_t *dhdp, uint32 ifidx);
|
||||||
uint8 dhd_d11_slices_num_get(dhd_pub_t *dhdp);
|
uint8 dhd_d11_slices_num_get(dhd_pub_t *dhdp);
|
||||||
|
#if defined(WL_AUTO_QOS) && defined(DHD_QOS_ON_SOCK_FLOW)
|
||||||
|
extern void dhd_wl_sock_qos_set_status(dhd_pub_t *dhdp, unsigned long on_off);
|
||||||
|
#endif /* WL_AUTO_QOS && DHD_QOS_ON_SOCK_FLOW */
|
||||||
|
|
||||||
extern void *dhd_get_roam_evt(dhd_pub_t *dhdp);
|
extern void *dhd_get_roam_evt(dhd_pub_t *dhdp);
|
||||||
#if defined(DISABLE_HE_ENAB) || defined(CUSTOM_CONTROL_HE_ENAB)
|
#if defined(DISABLE_HE_ENAB) || defined(CUSTOM_CONTROL_HE_ENAB)
|
||||||
|
|
@ -4704,8 +4750,8 @@ static INLINE int dhd_kern_path(char *name, int flags, struct path *file_path)
|
||||||
#define DHD_VFS_INODE(dir) d_inode(dir)
|
#define DHD_VFS_INODE(dir) d_inode(dir)
|
||||||
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0) */
|
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0) */
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)) && (RHEL_RELEASE_CODE < \
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)) && \
|
||||||
RHEL_RELEASE_VERSION(7, 6))
|
(RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7, 6))
|
||||||
#define DHD_VFS_UNLINK(dir, file_path, c) vfs_unlink(DHD_VFS_INODE(dir), file_path.dentry)
|
#define DHD_VFS_UNLINK(dir, file_path, c) vfs_unlink(DHD_VFS_INODE(dir), file_path.dentry)
|
||||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))
|
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))
|
||||||
#define DHD_VFS_UNLINK(dir, file_path, c) \
|
#define DHD_VFS_UNLINK(dir, file_path, c) \
|
||||||
|
|
@ -4762,6 +4808,14 @@ extern uint32 dhd_get_concurrent_capabilites(dhd_pub_t *dhd);
|
||||||
#endif
|
#endif
|
||||||
int dhd_config_rts_in_suspend(dhd_pub_t *dhdp, bool suspend);
|
int dhd_config_rts_in_suspend(dhd_pub_t *dhdp, bool suspend);
|
||||||
#endif /* DHD_CUSTOM_CONFIG_RTS_IN_SUSPEND */
|
#endif /* DHD_CUSTOM_CONFIG_RTS_IN_SUSPEND */
|
||||||
|
|
||||||
|
extern void dhd_unregister_net(struct net_device *net, bool need_rtnl_lock);
|
||||||
|
extern int dhd_register_net(struct net_device *net, bool need_rtnl_lock);
|
||||||
|
|
||||||
|
#if defined(DHD_HWTSTAMP)
|
||||||
|
extern int dhd_hwtstamp_txtype(dhd_pub_t *dhdp);
|
||||||
|
#endif /* DHD_HWTSTAMP */
|
||||||
|
|
||||||
#ifdef WL_MONITOR
|
#ifdef WL_MONITOR
|
||||||
void dhd_set_monitor(dhd_pub_t *pub, int ifidx, int val);
|
void dhd_set_monitor(dhd_pub_t *pub, int ifidx, int val);
|
||||||
#ifdef BCMSDIO
|
#ifdef BCMSDIO
|
||||||
|
|
@ -4769,4 +4823,11 @@ extern void dhd_rx_mon_pkt_sdio(dhd_pub_t *dhdp, void *pkt, int ifidx);
|
||||||
bool dhd_monitor_enabled(dhd_pub_t *dhd, int ifidx);
|
bool dhd_monitor_enabled(dhd_pub_t *dhd, int ifidx);
|
||||||
#endif /* BCMSDIO */
|
#endif /* BCMSDIO */
|
||||||
#endif /* WL_MONITOR */
|
#endif /* WL_MONITOR */
|
||||||
|
int dhd_pm_callback(
|
||||||
|
#ifdef DEVICE_PM_CALLBACK
|
||||||
|
dhd_pub_t *dhd,
|
||||||
|
#else
|
||||||
|
struct notifier_block *nfb,
|
||||||
|
#endif
|
||||||
|
unsigned long action, void *ignored);
|
||||||
#endif /* _dhd_h_ */
|
#endif /* _dhd_h_ */
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Bit packing and Base64 utils for EWP
|
* Bit packing and Base64 utils for EWP
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,26 @@
|
||||||
* Provides type definitions and function prototypes used to link the
|
* Provides type definitions and function prototypes used to link the
|
||||||
* DHD OS, bus, and protocol modules.
|
* DHD OS, bus, and protocol modules.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -87,37 +87,6 @@ const char ccode_43455c0[] = "";
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CCODE_4356A2
|
|
||||||
const char ccode_4356a2[] = \
|
|
||||||
"AE/6 AG/2 AI/1 AL/2 AN/2 AR/21 AS/12 AT/4 AU/6 AW/2 AZ/2 "\
|
|
||||||
"BA/2 BD/2 BE/4 BG/4 BH/4 BM/12 BN/4 BR/4 BS/2 BY/3 "\
|
|
||||||
"CA/31 CH/4 CN/38 CO/17 CR/17 CY/4 CZ/4 "\
|
|
||||||
"DE/7 DK/4 DZ/1 "\
|
|
||||||
"EC/21 EE/4 ES/4 ET/2 "\
|
|
||||||
"FI/4 FR/5 "\
|
|
||||||
"GB/6 GD/2 GF/2 GP/2 GR/4 GT/1 GU/12 "\
|
|
||||||
"HK/2 HR/4 HU/4 "\
|
|
||||||
"ID/13 IE/5 IL/7 IN/28 IS/4 IT/4 "\
|
|
||||||
"JO/3 JP/45 "\
|
|
||||||
"KH/2 KR/57 KW/5 KY/3 "\
|
|
||||||
"LA/2 LB/5 LI/4 LK/1 LS/2 LT/4 LU/3 LV/4 "\
|
|
||||||
"MA/2 MC/1 MD/2 ME/2 MK/2 MN/1 MO/2 MR/2 MT/4 MQ/2 MU/2 MV/3 MW/1 MX/20 MY/16 "\
|
|
||||||
"NI/2 NL/4 NO/4 NP/3 NZ/4 "\
|
|
||||||
"OM/4 "\
|
|
||||||
"PA/17 PE/20 PG/2 PH/5 PL/4 PR/20 PT/4 PY/2 "\
|
|
||||||
"RE/2 RO/4 RS/2 RU/986 "\
|
|
||||||
"SE/4 SG/19 SI/4 SK/4 SN/2 SV/19 "\
|
|
||||||
"TH/9 TN/1 TR/7 TT/3 TW/1 "\
|
|
||||||
"UA/8 UG/2 US/1 UY/1 "\
|
|
||||||
"VA/2 VE/3 VG/2 VI/13 VN/4 "\
|
|
||||||
"XZ/11 "\
|
|
||||||
"YT/2 "\
|
|
||||||
"ZM/2 "\
|
|
||||||
"E0/32";
|
|
||||||
#else
|
|
||||||
const char ccode_4356a2[] = "";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CCODE_4359C0
|
#ifdef CCODE_4359C0
|
||||||
const char ccode_4359c0[] = \
|
const char ccode_4359c0[] = \
|
||||||
"AD/1 AE/6 AG/2 AI/1 AL/3 AS/12 AT/21 AU/6 AW/2 AZ/8 "\
|
"AD/1 AE/6 AG/2 AI/1 AL/3 AS/12 AT/21 AU/6 AW/2 AZ/8 "\
|
||||||
|
|
@ -207,42 +176,68 @@ typedef struct ccode_list_map_t {
|
||||||
const char *ccode_ww;
|
const char *ccode_ww;
|
||||||
} ccode_list_map_t;
|
} ccode_list_map_t;
|
||||||
|
|
||||||
extern const char ccode_43438[];
|
|
||||||
extern const char ccode_43455c0[];
|
|
||||||
extern const char ccode_4356a2[];
|
|
||||||
extern const char ccode_4359c0[];
|
|
||||||
extern const char ccode_4358u[];
|
|
||||||
|
|
||||||
const ccode_list_map_t ccode_list_map[] = {
|
const ccode_list_map_t ccode_list_map[] = {
|
||||||
/* ChipID Chiprev ccode */
|
/* ChipID Chiprev ccode */
|
||||||
|
#if defined(BCMSDIO) || defined(BCMPCIE)
|
||||||
|
{BCM4359_CHIP_ID, 9, ccode_4359c0, "XZ/11"},
|
||||||
|
#endif
|
||||||
#ifdef BCMSDIO
|
#ifdef BCMSDIO
|
||||||
{BCM43430_CHIP_ID, 0, ccode_43438, ""},
|
{BCM43430_CHIP_ID, 0, ccode_43438, ""},
|
||||||
{BCM43430_CHIP_ID, 1, ccode_43438, ""},
|
{BCM43430_CHIP_ID, 1, ccode_43438, ""},
|
||||||
{BCM43430_CHIP_ID, 2, ccode_43436, ""},
|
{BCM43430_CHIP_ID, 2, ccode_43436, ""},
|
||||||
{BCM4345_CHIP_ID, 6, ccode_43455c0, "XZ/11"},
|
{BCM4345_CHIP_ID, 6, ccode_43455c0, "XZ/11"},
|
||||||
{BCM43454_CHIP_ID, 6, ccode_43455c0, "XZ/11"},
|
|
||||||
{BCM4345_CHIP_ID, 9, ccode_43455c0, "XZ/11"},
|
{BCM4345_CHIP_ID, 9, ccode_43455c0, "XZ/11"},
|
||||||
{BCM43454_CHIP_ID, 9, ccode_43455c0, "XZ/11"},
|
|
||||||
{BCM4354_CHIP_ID, 2, ccode_4356a2, "XZ/11"},
|
|
||||||
{BCM4356_CHIP_ID, 2, ccode_4356a2, "XZ/11"},
|
|
||||||
{BCM4371_CHIP_ID, 2, ccode_4356a2, "XZ/11"},
|
|
||||||
{BCM4359_CHIP_ID, 9, ccode_4359c0, "XZ/11"},
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef BCMPCIE
|
#ifdef BCMPCIE
|
||||||
{BCM4354_CHIP_ID, 2, ccode_4356a2, "XZ/11"},
|
|
||||||
{BCM4356_CHIP_ID, 2, ccode_4356a2, "XZ/11"},
|
|
||||||
{BCM4359_CHIP_ID, 9, ccode_4359c0, "XZ/11"},
|
|
||||||
{BCM4375_CHIP_ID, 5, ccode_4375b4, ""},
|
{BCM4375_CHIP_ID, 5, ccode_4375b4, ""},
|
||||||
#endif
|
#endif
|
||||||
#ifdef BCMDBUS
|
#ifdef BCMDBUS
|
||||||
{BCM43569_CHIP_ID, 2, ccode_4358u, "XW/0"},
|
{BCM43569_CHIP_ID, 2, ccode_4358u, "XZ/11"},
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* [ccode]:[disable_6g_band][disable_5g_band][ww_2g_chan_only]
|
||||||
|
* [ccode]:[x][xxxx][x]
|
||||||
|
*/
|
||||||
|
const char ccode_all_map[] = \
|
||||||
|
"AA:000002 "\
|
||||||
|
"AU:E08203 "\
|
||||||
|
"BH:F0E042 BR:00E002 "\
|
||||||
|
"CA:00E203 CN:F0E042 "\
|
||||||
|
"EU:E08002 "\
|
||||||
|
"GB:E08002 "\
|
||||||
|
"ID:F0F042 IL:F08002 IN:F08002 "\
|
||||||
|
"JP:E00082 "\
|
||||||
|
"KR:00E002 "\
|
||||||
|
"NZ:E0E002 "\
|
||||||
|
"PH:F0C002 "\
|
||||||
|
"RU:E0C302 "\
|
||||||
|
"SG:E0E002 "\
|
||||||
|
"TR:F00882 TW:F0E043 "\
|
||||||
|
"US:000003 "\
|
||||||
|
"VN:F0E002 "\
|
||||||
|
"ZA:F00882 ";
|
||||||
|
|
||||||
|
typedef struct ccode_all_chip_t {
|
||||||
|
uint chip;
|
||||||
|
uint chiprev;
|
||||||
|
} ccode_all_chip_t;
|
||||||
|
|
||||||
|
const ccode_all_chip_t ccode_all_chip[] = {
|
||||||
|
/* ChipID Chiprev */
|
||||||
|
// {0, 0},
|
||||||
|
#if defined(BCMSDIO) || defined(BCMPCIE)
|
||||||
|
{BCM43752_CHIP_ID, 4},
|
||||||
|
{BCM43756_CHIP_ID, 4},
|
||||||
|
{BCM43756_CHIP_ID, 6},
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
dhd_ccode_map_country_list(dhd_pub_t *dhd, wl_country_t *cspec)
|
dhd_ccode_map_country_list(dhd_pub_t *dhd, wl_country_t *cspec)
|
||||||
{
|
{
|
||||||
int bcmerror = -1, i;
|
int ret = -1, i;
|
||||||
uint chip = dhd->conf->chip, chiprev = dhd->conf->chiprev;
|
uint chip = dhd->conf->chip, chiprev = dhd->conf->chiprev;
|
||||||
const char *ccode_list = NULL, *ccode_ww = NULL;
|
const char *ccode_list = NULL, *ccode_ww = NULL;
|
||||||
char *pch;
|
char *pch;
|
||||||
|
|
@ -260,17 +255,86 @@ dhd_ccode_map_country_list(dhd_pub_t *dhd, wl_country_t *cspec)
|
||||||
pch = strstr(ccode_list, cspec->ccode);
|
pch = strstr(ccode_list, cspec->ccode);
|
||||||
if (pch) {
|
if (pch) {
|
||||||
cspec->rev = (int)simple_strtol(pch+strlen(cspec->ccode)+1, NULL, 0);
|
cspec->rev = (int)simple_strtol(pch+strlen(cspec->ccode)+1, NULL, 0);
|
||||||
bcmerror = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dhd->op_mode != DHD_FLAG_MFG_MODE) {
|
if (dhd->op_mode != DHD_FLAG_MFG_MODE) {
|
||||||
if (bcmerror && ccode_ww && strlen(ccode_ww)>=4) {
|
if (ret && ccode_ww && strlen(ccode_ww)>=4) {
|
||||||
memcpy(cspec->ccode, ccode_ww, 2);
|
memcpy(cspec->ccode, ccode_ww, 2);
|
||||||
cspec->rev = (int)simple_strtol(ccode_ww+3, NULL, 0);
|
cspec->rev = (int)simple_strtol(ccode_ww+3, NULL, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return bcmerror;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define WW_2G_CHAN_ONLY_MASK 0x00000F
|
||||||
|
#define DISABLE_5G_BAND_MASK 0x0FFFF0
|
||||||
|
#define DISABLE_6G_BAND_MASK 0xF00000
|
||||||
|
|
||||||
|
#define DISABLE_5G_BAND_OFFSET 4
|
||||||
|
#define DISABLE_6G_BAND_OFFSET 20
|
||||||
|
|
||||||
|
int
|
||||||
|
dhd_ccode_map_country_all(dhd_pub_t *dhd, wl_country_t *cspec)
|
||||||
|
{
|
||||||
|
int ret = -1, i;
|
||||||
|
struct dhd_conf *conf = dhd->conf;
|
||||||
|
wl_ccode_all_t *ccode_all = &dhd->conf->ccode_all;
|
||||||
|
uint chip = conf->chip, chiprev = conf->chiprev, val;
|
||||||
|
char *pch, *pick_tmp;
|
||||||
|
bool picked = FALSE;
|
||||||
|
|
||||||
|
if (conf->ccode_all_list) {
|
||||||
|
pch = strstr(conf->ccode_all_list, cspec->ccode);
|
||||||
|
if (!pch)
|
||||||
|
goto exit;
|
||||||
|
pick_tmp = bcmstrtok(&pch, ", ", 0);
|
||||||
|
if (!pick_tmp)
|
||||||
|
goto exit;
|
||||||
|
ccode_all->ww_2g_chan_only = 0x2;
|
||||||
|
ccode_all->disable_5g_band = 0;
|
||||||
|
ccode_all->disable_6g_band = 0;
|
||||||
|
pch = strstr(pick_tmp, "2g");
|
||||||
|
if (pch) {
|
||||||
|
ccode_all->ww_2g_chan_only = (int)simple_strtol(pch+strlen("2g"), NULL, 16);
|
||||||
|
picked = TRUE;
|
||||||
|
}
|
||||||
|
pch = strstr(pick_tmp, "5g");
|
||||||
|
if (pch) {
|
||||||
|
ccode_all->disable_5g_band = (int)simple_strtol(pch+strlen("5g"), NULL, 16);
|
||||||
|
picked = TRUE;
|
||||||
|
}
|
||||||
|
pch = strstr(pick_tmp, "6g");
|
||||||
|
if (pch) {
|
||||||
|
ccode_all->disable_6g_band = (int)simple_strtol(pch+strlen("6g"), NULL, 16);
|
||||||
|
picked = TRUE;
|
||||||
|
}
|
||||||
|
if (picked) {
|
||||||
|
memcpy(cspec->ccode, &ccode_all->cspec.ccode, WLC_CNTRY_BUF_SZ);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
exit:
|
||||||
|
for (i=0; i<sizeof(ccode_all_chip)/sizeof(ccode_all_chip[0]); i++) {
|
||||||
|
const ccode_all_chip_t* row = &ccode_all_chip[i];
|
||||||
|
if ((row->chip == chip && row->chiprev == chiprev) ||
|
||||||
|
(row->chip == 0 && row->chiprev == 0)) {
|
||||||
|
pch = strstr(ccode_all_map, cspec->ccode);
|
||||||
|
if (pch) {
|
||||||
|
val = simple_strtol(pch+strlen(cspec->ccode)+1, NULL, 16);
|
||||||
|
ccode_all->ww_2g_chan_only = val & WW_2G_CHAN_ONLY_MASK;
|
||||||
|
ccode_all->disable_5g_band = (val & DISABLE_5G_BAND_MASK) >> DISABLE_5G_BAND_OFFSET;
|
||||||
|
ccode_all->disable_6g_band = (val & DISABLE_6G_BAND_MASK) >> DISABLE_6G_BAND_OFFSET;
|
||||||
|
memcpy(cspec->ccode, &ccode_all->cspec.ccode, WLC_CNTRY_BUF_SZ);
|
||||||
|
ret = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* DHD Protocol Module for CDC and BDC.
|
* DHD Protocol Module for CDC and BDC.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -50,6 +69,10 @@
|
||||||
#include <wlfc_proto.h>
|
#include <wlfc_proto.h>
|
||||||
#include <dhd_wlfc.h>
|
#include <dhd_wlfc.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef DHD_HWTSTAMP
|
||||||
|
#include <dhd_linux_priv.h>
|
||||||
|
#endif /* DHD_HWTSTAMP */
|
||||||
#ifdef BCMDBUS
|
#ifdef BCMDBUS
|
||||||
#include <dhd_config.h>
|
#include <dhd_config.h>
|
||||||
#endif /* BCMDBUS */
|
#endif /* BCMDBUS */
|
||||||
|
|
@ -521,6 +544,7 @@ dhd_prot_hdrpull(dhd_pub_t *dhd, int *ifidx, void *pktbuf, uchar *reorder_buf_in
|
||||||
struct bdc_header *h;
|
struct bdc_header *h;
|
||||||
#endif
|
#endif
|
||||||
uint8 data_offset = 0;
|
uint8 data_offset = 0;
|
||||||
|
uint32 bdc_hdr_len = BDC_HEADER_LEN;
|
||||||
|
|
||||||
DHD_TRACE(("%s: Enter\n", __FUNCTION__));
|
DHD_TRACE(("%s: Enter\n", __FUNCTION__));
|
||||||
|
|
||||||
|
|
@ -536,11 +560,36 @@ dhd_prot_hdrpull(dhd_pub_t *dhd, int *ifidx, void *pktbuf, uchar *reorder_buf_in
|
||||||
}
|
}
|
||||||
|
|
||||||
h = (struct bdc_header *)PKTDATA(dhd->osh, pktbuf);
|
h = (struct bdc_header *)PKTDATA(dhd->osh, pktbuf);
|
||||||
|
#ifdef DHD_HWTSTAMP
|
||||||
|
if (h->flags2 & BDC_FLAG2_TSF_FLAG) {
|
||||||
|
struct bdc_header_tsf *h_tsf = (struct bdc_header_tsf *)PKTDATA(dhd->osh, pktbuf);
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))
|
||||||
|
if (dhd->info->stmpconf.rx_filter) {
|
||||||
|
ktime_t tsf;
|
||||||
|
struct skb_shared_hwtstamps *tst;
|
||||||
|
tst = skb_hwtstamps(((struct sk_buff*)(pktbuf)));
|
||||||
|
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0))
|
||||||
|
tsf = (s64) h_tsf->tsf_h;
|
||||||
|
tsf = tsf << 32 | h_tsf->tsf_l;
|
||||||
|
/* Convert micro sec tsf to nano sec kernel hw timestamp */
|
||||||
|
tst->hwtstamp = tsf * 1000;
|
||||||
|
#else
|
||||||
|
tsf.tv64 = (s64) h_tsf->tsf_h;
|
||||||
|
tsf.tv64 = tsf.tv64 << 32 | h_tsf->tsf_l;
|
||||||
|
/* Convert micro sec tsf to nano sec kernel hw timestamp */
|
||||||
|
tst->hwtstamp.tv64 = tsf.tv64 * 1000;
|
||||||
|
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)) */
|
||||||
|
}
|
||||||
|
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)) */
|
||||||
|
h_tsf->dataOffset = h_tsf->dataOffset - 2;
|
||||||
|
bdc_hdr_len = bdc_hdr_len + 8;
|
||||||
|
}
|
||||||
|
#endif /* DHD_HWTSTAMP */
|
||||||
if (!ifidx) {
|
if (!ifidx) {
|
||||||
/* for tx packet, skip the analysis */
|
/* for tx packet, skip the analysis */
|
||||||
data_offset = h->dataOffset;
|
data_offset = h->dataOffset;
|
||||||
PKTPULL(dhd->osh, pktbuf, BDC_HEADER_LEN);
|
PKTPULL(dhd->osh, pktbuf, bdc_hdr_len);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -563,7 +612,7 @@ dhd_prot_hdrpull(dhd_pub_t *dhd, int *ifidx, void *pktbuf, uchar *reorder_buf_in
|
||||||
|
|
||||||
PKTSETPRIO(pktbuf, (h->priority & BDC_PRIORITY_MASK));
|
PKTSETPRIO(pktbuf, (h->priority & BDC_PRIORITY_MASK));
|
||||||
data_offset = h->dataOffset;
|
data_offset = h->dataOffset;
|
||||||
PKTPULL(dhd->osh, pktbuf, BDC_HEADER_LEN);
|
PKTPULL(dhd->osh, pktbuf, bdc_hdr_len);
|
||||||
#endif /* BDC */
|
#endif /* BDC */
|
||||||
|
|
||||||
#ifdef PROP_TXSTATUS
|
#ifdef PROP_TXSTATUS
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Linux cfg80211 driver - Dongle Host Driver (DHD) related
|
* Linux cfg80211 driver - Dongle Host Driver (DHD) related
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Linux cfg80211 driver - Dongle Host Driver (DHD) related
|
* Linux cfg80211 driver - Dongle Host Driver (DHD) related
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Broadcom Dongle Host Driver (DHD), common DHD core.
|
* Broadcom Dongle Host Driver (DHD), common DHD core.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -497,8 +516,10 @@ const bcm_iovar_t dhd_iovars[] = {
|
||||||
/* name varid flags flags2 type minlen */
|
/* name varid flags flags2 type minlen */
|
||||||
{"version", IOV_VERSION, 0, 0, IOVT_BUFFER, 0},
|
{"version", IOV_VERSION, 0, 0, IOVT_BUFFER, 0},
|
||||||
{"wlmsglevel", IOV_WLMSGLEVEL, 0, 0, IOVT_UINT32, 0 },
|
{"wlmsglevel", IOV_WLMSGLEVEL, 0, 0, IOVT_UINT32, 0 },
|
||||||
#ifdef DHD_DEBUG
|
#if defined(DHD_DEBUG) || defined(DHD_MSG_LEVEL_SUPPORT)
|
||||||
{"msglevel", IOV_MSGLEVEL, 0, 0, IOVT_UINT32, 0},
|
{"msglevel", IOV_MSGLEVEL, 0, 0, IOVT_UINT32, 0},
|
||||||
|
#endif /* DHD_DEBUG || DHD_MSG_LEVEL_SUPPORT */
|
||||||
|
#ifdef DHD_DEBUG
|
||||||
{"mem_debug", IOV_MEM_DEBUG, 0, 0, IOVT_BUFFER, 0 },
|
{"mem_debug", IOV_MEM_DEBUG, 0, 0, IOVT_BUFFER, 0 },
|
||||||
#ifdef BCMPCIE
|
#ifdef BCMPCIE
|
||||||
{"flow_ring_debug", IOV_FLOW_RING_DEBUG, 0, 0, IOVT_BUFFER, 0 },
|
{"flow_ring_debug", IOV_FLOW_RING_DEBUG, 0, 0, IOVT_BUFFER, 0 },
|
||||||
|
|
@ -2808,9 +2829,9 @@ int dhd_sar_init_parameter(dhd_pub_t *dhd, eCountry_flag_type type, int advance_
|
||||||
|
|
||||||
#ifdef VSDB
|
#ifdef VSDB
|
||||||
if (FW_SUPPORTED(dhd, 6g)) {
|
if (FW_SUPPORTED(dhd, 6g)) {
|
||||||
sarctrl->ver = SAR_PARAM_6G_V3_VSDB;
|
sarctrl->ver = SAR_PARAM_6G_V3_VSDB | (idx << SAR_PARAM_NUM_OFFSET);
|
||||||
} else {
|
} else {
|
||||||
sarctrl->ver = SAR_PARAM_V1_VSDB;
|
sarctrl->ver = SAR_PARAM_V1_VSDB | (idx << SAR_PARAM_NUM_OFFSET);
|
||||||
}
|
}
|
||||||
if (CONST_SARCTRL_SINGLE_SET_QTY != idx) {
|
if (CONST_SARCTRL_SINGLE_SET_QTY != idx) {
|
||||||
DHD_ERROR(("%s: *Waring, idx=%d mismatch VSDB expect=%d\n",
|
DHD_ERROR(("%s: *Waring, idx=%d mismatch VSDB expect=%d\n",
|
||||||
|
|
@ -2818,9 +2839,9 @@ int dhd_sar_init_parameter(dhd_pub_t *dhd, eCountry_flag_type type, int advance_
|
||||||
}
|
}
|
||||||
#else /* VSDB */
|
#else /* VSDB */
|
||||||
if (FW_SUPPORTED(dhd, 6g)) {
|
if (FW_SUPPORTED(dhd, 6g)) {
|
||||||
sarctrl->ver = SAR_PARAM_6G_V4_RSDB;
|
sarctrl->ver = SAR_PARAM_6G_V4_RSDB | (idx << SAR_PARAM_NUM_OFFSET);
|
||||||
} else {
|
} else {
|
||||||
sarctrl->ver = SAR_PARAM_V2_RSDB;
|
sarctrl->ver = SAR_PARAM_V2_RSDB | (idx << SAR_PARAM_NUM_OFFSET);
|
||||||
}
|
}
|
||||||
if (CONST_SARCTRL_SET_QTY != idx) {
|
if (CONST_SARCTRL_SET_QTY != idx) {
|
||||||
DHD_ERROR(("%s: *Waring, idx=%d mismatch RSDB expect=%d\n",
|
DHD_ERROR(("%s: *Waring, idx=%d mismatch RSDB expect=%d\n",
|
||||||
|
|
@ -2845,6 +2866,7 @@ int dhd_sar_set_parameter(dhd_pub_t *dhd_pub, int advance_mode)
|
||||||
wl_country_t *cspec = NULL;
|
wl_country_t *cspec = NULL;
|
||||||
sarctrl_set sarctrl_iov = { 0 }, *sarctrl = NULL;
|
sarctrl_set sarctrl_iov = { 0 }, *sarctrl = NULL;
|
||||||
eCountry_flag_type type = SYNA_COUNTRY_TYPE_INVALID;
|
eCountry_flag_type type = SYNA_COUNTRY_TYPE_INVALID;
|
||||||
|
int sar_ver = 0, sar_param_num = 0;
|
||||||
|
|
||||||
if (dhd_pub == NULL) {
|
if (dhd_pub == NULL) {
|
||||||
DHD_ERROR(("%s: bcm_mkiovar failed.", __FUNCTION__));
|
DHD_ERROR(("%s: bcm_mkiovar failed.", __FUNCTION__));
|
||||||
|
|
@ -2900,12 +2922,39 @@ int dhd_sar_set_parameter(dhd_pub_t *dhd_pub, int advance_mode)
|
||||||
}
|
}
|
||||||
DHD_TRACE(("%s: country='%s', type=%d, advance_mode=%d\n",
|
DHD_TRACE(("%s: country='%s', type=%d, advance_mode=%d\n",
|
||||||
__FUNCTION__, cspec->ccode, type, advance_mode));
|
__FUNCTION__, cspec->ccode, type, advance_mode));
|
||||||
|
/* Try to get sar version from FW */
|
||||||
|
err = dhd_iovar(dhd_pub, 0, "sar_params", NULL, 0,
|
||||||
|
(char *)&sarctrl_iov, sizeof(sarctrl_iov), FALSE);
|
||||||
|
if (err) {
|
||||||
|
/* Not support sar_params read */
|
||||||
|
} else {
|
||||||
|
sar_ver = sarctrl_iov.ver & SAR_PARAM_VER_MASK;
|
||||||
|
sar_param_num = (sarctrl_iov.ver & SAR_PARAM_NUM_MASK) >> SAR_PARAM_NUM_OFFSET;
|
||||||
|
}
|
||||||
|
|
||||||
/* prepare IOVAR */
|
memset(&sarctrl_iov, 0, sizeof(sarctrl_iov));
|
||||||
sarctrl_iov.ver = sarctrl->ver;
|
if (sar_ver == SAR_PARAM_DYN) {
|
||||||
sarctrl_iov.basic = sarctrl->basic;
|
int file_sar_num = (sarctrl->ver & SAR_PARAM_NUM_MASK) >> SAR_PARAM_NUM_OFFSET;
|
||||||
sarctrl_iov.rsdb = sarctrl->rsdb;
|
if (file_sar_num != sar_param_num) {
|
||||||
DHD_TRACE(("%s: sarctrl_iov=0x%p, ver=%d, sarctrl_2g=0x%X, sarctrl_2g_2=0x%X\n",
|
DHD_ERROR(("%s: Need confirm SAR PARAMETERS configuration based on FW\n",
|
||||||
|
__FUNCTION__));
|
||||||
|
return BCME_BADARG;
|
||||||
|
}
|
||||||
|
sarctrl_iov.ver = sarctrl->ver;
|
||||||
|
err = memcpy_s(sarctrl_iov.sarctrl, MAX_SAR_PARAMS_NUM * sizeof(u32),
|
||||||
|
sarctrl->sarctrl, file_sar_num * sizeof(u32));
|
||||||
|
if (err) {
|
||||||
|
DHD_ERROR(("%s: memcpy error num = %d\n",
|
||||||
|
__FUNCTION__, file_sar_num));
|
||||||
|
return BCME_BADARG;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
/* prepare IOVAR for old version*/
|
||||||
|
sarctrl_iov.ver = sarctrl->ver & SAR_PARAM_VER_MASK;
|
||||||
|
sarctrl_iov.basic = sarctrl->basic;
|
||||||
|
sarctrl_iov.rsdb = sarctrl->rsdb;
|
||||||
|
}
|
||||||
|
DHD_TRACE(("%s: sarctrl_iov=0x%p, ver=%x, sarctrl_2g=0x%X, sarctrl_2g_2=0x%X\n",
|
||||||
__FUNCTION__, &sarctrl_iov, sarctrl_iov.ver,
|
__FUNCTION__, &sarctrl_iov, sarctrl_iov.ver,
|
||||||
sarctrl_iov.basic.sarctrl_2g,
|
sarctrl_iov.basic.sarctrl_2g,
|
||||||
sarctrl_iov.basic.sarctrl_2g_2));
|
sarctrl_iov.basic.sarctrl_2g_2));
|
||||||
|
|
@ -6179,7 +6228,7 @@ wl_process_host_event(dhd_pub_t *dhd_pub, int *ifidx, void *pktdata, uint pktlen
|
||||||
{
|
{
|
||||||
uint8* ea = pvt_data->eth.ether_dhost;
|
uint8* ea = pvt_data->eth.ether_dhost;
|
||||||
WLFC_DBGMESG(("WLC_E_IF: idx:%d, action:%s, iftype:%s, ["MACDBG"]\n"
|
WLFC_DBGMESG(("WLC_E_IF: idx:%d, action:%s, iftype:%s, ["MACDBG"]\n"
|
||||||
ifevent->ifidx,
|
,ifevent->ifidx,
|
||||||
((ifevent->opcode == WLC_E_IF_ADD) ? "ADD":"DEL"),
|
((ifevent->opcode == WLC_E_IF_ADD) ? "ADD":"DEL"),
|
||||||
((ifevent->role == 0) ? "STA":"AP "),
|
((ifevent->role == 0) ? "STA":"AP "),
|
||||||
MAC2STRDBG(ea)));
|
MAC2STRDBG(ea)));
|
||||||
|
|
@ -6189,11 +6238,27 @@ wl_process_host_event(dhd_pub_t *dhd_pub, int *ifidx, void *pktdata, uint pktlen
|
||||||
dhd_wlfc_interface_event(dhd_pub,
|
dhd_wlfc_interface_event(dhd_pub,
|
||||||
eWLFC_MAC_ENTRY_ACTION_UPDATE,
|
eWLFC_MAC_ENTRY_ACTION_UPDATE,
|
||||||
ifevent->ifidx, ifevent->role, ea);
|
ifevent->ifidx, ifevent->role, ea);
|
||||||
else
|
else {
|
||||||
|
#if defined(__linux__)
|
||||||
|
/* Early set interface "del_in_progress" to prevent from packets
|
||||||
|
* flooding to interface which is going to be removed. That would
|
||||||
|
* cause proptx transit_count not consistent and has entry suppressed issue.
|
||||||
|
*/
|
||||||
|
if (ifevent->opcode == WLC_E_IF_DEL) {
|
||||||
|
unsigned long fl;
|
||||||
|
ifp = dhd_get_ifp(dhd_pub, ifevent->ifidx);
|
||||||
|
if (ifp) {
|
||||||
|
DHD_GENERAL_LOCK(dhd_pub, fl);
|
||||||
|
ifp->del_in_progress = true;
|
||||||
|
DHD_GENERAL_UNLOCK(dhd_pub, fl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* __linux__ */
|
||||||
dhd_wlfc_interface_event(dhd_pub,
|
dhd_wlfc_interface_event(dhd_pub,
|
||||||
((ifevent->opcode == WLC_E_IF_ADD) ?
|
((ifevent->opcode == WLC_E_IF_ADD) ?
|
||||||
eWLFC_MAC_ENTRY_ACTION_ADD : eWLFC_MAC_ENTRY_ACTION_DEL),
|
eWLFC_MAC_ENTRY_ACTION_ADD : eWLFC_MAC_ENTRY_ACTION_DEL),
|
||||||
ifevent->ifidx, ifevent->role, ea);
|
ifevent->ifidx, ifevent->role, ea);
|
||||||
|
}
|
||||||
|
|
||||||
/* dhd already has created an interface by default, for 0 */
|
/* dhd already has created an interface by default, for 0 */
|
||||||
if (ifevent->ifidx == 0)
|
if (ifevent->ifidx == 0)
|
||||||
|
|
@ -6330,11 +6395,12 @@ wl_process_host_event(dhd_pub_t *dhd_pub, int *ifidx, void *pktdata, uint pktlen
|
||||||
if (!ifp)
|
if (!ifp)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Consider STA role only since roam is disabled on P2P GC.
|
/* Consider both STA and GC due to CSA.
|
||||||
* Drop EAPOL M1 frame only if roam is done to same BSS.
|
* Drop EAPOL M1 frame only if roam is done to the same BSSID.
|
||||||
|
* wpa_supplicant only handles different BSSID case.
|
||||||
*/
|
*/
|
||||||
if ((status == WLC_E_STATUS_SUCCESS) &&
|
if ((status == WLC_E_STATUS_SUCCESS) &&
|
||||||
IS_STA_IFACE(ndev_to_wdev(ifp->net)) &&
|
(IS_STA_IFACE(ndev_to_wdev(ifp->net)) || IS_P2P_GC(ndev_to_wdev(ifp->net))) &&
|
||||||
wl_cfg80211_is_event_from_connected_bssid(ifp->net, event, event->ifidx)) {
|
wl_cfg80211_is_event_from_connected_bssid(ifp->net, event, event->ifidx)) {
|
||||||
ifp->recv_reassoc_evt = TRUE;
|
ifp->recv_reassoc_evt = TRUE;
|
||||||
}
|
}
|
||||||
|
|
@ -6361,6 +6427,31 @@ wl_process_host_event(dhd_pub_t *dhd_pub, int *ifidx, void *pktdata, uint pktlen
|
||||||
dhd_flow_rings_delete(dhd_pub, (uint8)dhd_ifname2idx(dhd_pub->info,
|
dhd_flow_rings_delete(dhd_pub, (uint8)dhd_ifname2idx(dhd_pub->info,
|
||||||
event->ifname));
|
event->ifname));
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
#ifdef PROP_TXSTATUS
|
||||||
|
/* Link down */
|
||||||
|
if (!flags) {
|
||||||
|
struct wl_event_data_if *ifevent = (struct wl_event_data_if *)event_data;
|
||||||
|
uint8* ea = pvt_data->eth.ether_dhost;
|
||||||
|
WLFC_DBGMESG(("WLC_E_LINK: idx:%d, action:%s, "
|
||||||
|
"iftype:%s, ["MACDBG"]\n",
|
||||||
|
ifevent->ifidx,
|
||||||
|
((flags) ? "UP":"DOWN"),
|
||||||
|
((ifevent->role == 0) ? "STA":"AP "),
|
||||||
|
MAC2STRDBG(ea)));
|
||||||
|
(void)ea;
|
||||||
|
|
||||||
|
/* only need to handle STA here */
|
||||||
|
if (!ifevent->role) {
|
||||||
|
dhd_wlfc_interface_event(dhd_pub,
|
||||||
|
eWLFC_MAC_ENTRY_ACTION_DEL,
|
||||||
|
ifevent->ifidx, ifevent->role, ea);
|
||||||
|
dhd_wlfc_interface_event(dhd_pub,
|
||||||
|
eWLFC_MAC_ENTRY_ACTION_ADD,
|
||||||
|
ifevent->ifidx, ifevent->role, ea);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* PROP_TXSTATUS */
|
||||||
#endif /* PCIE_FULL_DONGLE */
|
#endif /* PCIE_FULL_DONGLE */
|
||||||
/* fall through */
|
/* fall through */
|
||||||
fallthrough;
|
fallthrough;
|
||||||
|
|
@ -6403,6 +6494,7 @@ wl_process_host_event(dhd_pub_t *dhd_pub, int *ifidx, void *pktdata, uint pktlen
|
||||||
}
|
}
|
||||||
#endif /* PCIE_FULL_DONGLE */
|
#endif /* PCIE_FULL_DONGLE */
|
||||||
#ifdef DHD_POST_EAPOL_M1_AFTER_ROAM_EVT
|
#ifdef DHD_POST_EAPOL_M1_AFTER_ROAM_EVT
|
||||||
|
/* fall through */
|
||||||
ifp = dhd_get_ifp(dhd_pub, event->ifidx);
|
ifp = dhd_get_ifp(dhd_pub, event->ifidx);
|
||||||
if (ifp) {
|
if (ifp) {
|
||||||
ifp->recv_reassoc_evt = FALSE;
|
ifp->recv_reassoc_evt = FALSE;
|
||||||
|
|
@ -6549,6 +6641,22 @@ pattern_atoh_len(char *src, char *dst, int len)
|
||||||
#endif /* PKT_FILTER_SUPPORT || DHD_PKT_LOGGING */
|
#endif /* PKT_FILTER_SUPPORT || DHD_PKT_LOGGING */
|
||||||
|
|
||||||
#ifdef PKT_FILTER_SUPPORT
|
#ifdef PKT_FILTER_SUPPORT
|
||||||
|
|
||||||
|
int
|
||||||
|
dhd_pktfilter_mode_change(dhd_pub_t * dhd, int enable)
|
||||||
|
{
|
||||||
|
int rc = 0;
|
||||||
|
uint operation_mode = PKT_FILTER_MODE_DISABLE;
|
||||||
|
|
||||||
|
operation_mode = dhd_master_mode
|
||||||
|
| ((enable)?(0):(PKT_FILTER_MODE_DISABLE));
|
||||||
|
|
||||||
|
/* Contorl the master mode */
|
||||||
|
rc = dhd_wl_ioctl_set_intiovar(dhd, "pkt_filter_mode", operation_mode, WLC_SET_VAR, TRUE, 0);
|
||||||
|
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
dhd_pktfilter_offload_enable(dhd_pub_t * dhd, char *arg, int enable, int master_mode)
|
dhd_pktfilter_offload_enable(dhd_pub_t * dhd, char *arg, int enable, int master_mode)
|
||||||
{
|
{
|
||||||
|
|
@ -6993,6 +7101,14 @@ dhd_arp_offload_enable(dhd_pub_t * dhd, int arp_enable)
|
||||||
{
|
{
|
||||||
int retcode;
|
int retcode;
|
||||||
|
|
||||||
|
#ifdef DISABLE_ARP_OFFLOAD_ON_SOFTAP
|
||||||
|
/* IF SoftAP is enabled, do NOT enable ARP Offload */
|
||||||
|
if (dhd->pfaoe_enab && (dhd->op_mode & DHD_FLAG_HOSTAP_MODE) && arp_enable) {
|
||||||
|
DHD_ERROR(("%s: Skip enabling ARP offload when SoftAP is enabled\n", __FUNCTION__));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif /* DISABLE_ARP_OFFLOAD_ON_SOFTAP */
|
||||||
|
|
||||||
if (!dhd->arpol_configured) {
|
if (!dhd->arpol_configured) {
|
||||||
/* If arpol is not applied, apply it */
|
/* If arpol is not applied, apply it */
|
||||||
dhd_arp_offload_set(dhd, dhd_arp_mode);
|
dhd_arp_offload_set(dhd, dhd_arp_mode);
|
||||||
|
|
@ -7822,7 +7938,7 @@ int dhd_keep_alive_onoff(dhd_pub_t *dhd)
|
||||||
{
|
{
|
||||||
char buf[32] = {0};
|
char buf[32] = {0};
|
||||||
const char *str;
|
const char *str;
|
||||||
wl_mkeep_alive_pkt_v1_t mkeep_alive_pkt = {0, 0, 0, 0, 0, {0}};
|
wl_mkeep_alive_pkt_v1_t mkeep_alive_pkt;
|
||||||
wl_mkeep_alive_pkt_v1_t *mkeep_alive_pktp;
|
wl_mkeep_alive_pkt_v1_t *mkeep_alive_pktp;
|
||||||
int buf_len;
|
int buf_len;
|
||||||
int str_len;
|
int str_len;
|
||||||
|
|
@ -7837,6 +7953,7 @@ int dhd_keep_alive_onoff(dhd_pub_t *dhd)
|
||||||
str_len = strlen(str);
|
str_len = strlen(str);
|
||||||
strlcpy(buf, str, sizeof(buf));
|
strlcpy(buf, str, sizeof(buf));
|
||||||
mkeep_alive_pktp = (wl_mkeep_alive_pkt_v1_t *) (buf + str_len + 1);
|
mkeep_alive_pktp = (wl_mkeep_alive_pkt_v1_t *) (buf + str_len + 1);
|
||||||
|
bzero(&mkeep_alive_pkt, sizeof(mkeep_alive_pkt));
|
||||||
mkeep_alive_pkt.period_msec = dhd->conf->keep_alive_period;
|
mkeep_alive_pkt.period_msec = dhd->conf->keep_alive_period;
|
||||||
buf_len = str_len + 1;
|
buf_len = str_len + 1;
|
||||||
mkeep_alive_pkt.version = htod16(WL_MKEEP_ALIVE_VERSION_1);
|
mkeep_alive_pkt.version = htod16(WL_MKEEP_ALIVE_VERSION_1);
|
||||||
|
|
@ -7845,7 +7962,6 @@ int dhd_keep_alive_onoff(dhd_pub_t *dhd)
|
||||||
mkeep_alive_pkt.keep_alive_id = 0;
|
mkeep_alive_pkt.keep_alive_id = 0;
|
||||||
mkeep_alive_pkt.len_bytes = 0;
|
mkeep_alive_pkt.len_bytes = 0;
|
||||||
buf_len += WL_MKEEP_ALIVE_FIXED_LEN;
|
buf_len += WL_MKEEP_ALIVE_FIXED_LEN;
|
||||||
bzero(mkeep_alive_pkt.data, sizeof(mkeep_alive_pkt.data));
|
|
||||||
/* Keep-alive attributes are set in local variable (mkeep_alive_pkt), and
|
/* Keep-alive attributes are set in local variable (mkeep_alive_pkt), and
|
||||||
* then memcpy'ed into buffer (mkeep_alive_pktp) since there is no
|
* then memcpy'ed into buffer (mkeep_alive_pktp) since there is no
|
||||||
* guarantee that the buffer is properly aligned.
|
* guarantee that the buffer is properly aligned.
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -17,8 +17,6 @@
|
||||||
#define FW_TYPE_ES 5
|
#define FW_TYPE_ES 5
|
||||||
#define FW_TYPE_MFG 6
|
#define FW_TYPE_MFG 6
|
||||||
#define FW_TYPE_MINIME 7
|
#define FW_TYPE_MINIME 7
|
||||||
#define FW_TYPE_G 0
|
|
||||||
#define FW_TYPE_AG 1
|
|
||||||
|
|
||||||
#define FW_PATH_AUTO_SELECT 1
|
#define FW_PATH_AUTO_SELECT 1
|
||||||
#ifdef BCMDHD_MDRIVER
|
#ifdef BCMDHD_MDRIVER
|
||||||
|
|
@ -95,6 +93,13 @@ typedef struct country_list {
|
||||||
wl_country_t cspec;
|
wl_country_t cspec;
|
||||||
} country_list_t;
|
} country_list_t;
|
||||||
|
|
||||||
|
typedef struct wl_ccode_all {
|
||||||
|
wl_country_t cspec;
|
||||||
|
int32 ww_2g_chan_only;
|
||||||
|
int32 disable_5g_band;
|
||||||
|
int32 disable_6g_band;
|
||||||
|
} wl_ccode_all_t;
|
||||||
|
|
||||||
/* mchan_params */
|
/* mchan_params */
|
||||||
#define MCHAN_MAX_NUM 4
|
#define MCHAN_MAX_NUM 4
|
||||||
#define MIRACAST_SOURCE 1
|
#define MIRACAST_SOURCE 1
|
||||||
|
|
@ -149,15 +154,6 @@ enum in_suspend_mode {
|
||||||
SUSPEND_MODE_2 = 2
|
SUSPEND_MODE_2 = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef TPUT_MONITOR
|
|
||||||
enum data_drop_mode {
|
|
||||||
NO_DATA_DROP = -1,
|
|
||||||
FW_DROP = 0,
|
|
||||||
TXPKT_DROP = 1,
|
|
||||||
XMIT_DROP = 2
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
enum conn_state {
|
enum conn_state {
|
||||||
CONN_STATE_IDLE = 0,
|
CONN_STATE_IDLE = 0,
|
||||||
CONN_STATE_CONNECTING = 1,
|
CONN_STATE_CONNECTING = 1,
|
||||||
|
|
@ -214,9 +210,12 @@ typedef struct dhd_conf {
|
||||||
#endif
|
#endif
|
||||||
wl_chip_nv_path_list_ctrl_t nv_by_chip;
|
wl_chip_nv_path_list_ctrl_t nv_by_chip;
|
||||||
country_list_t *country_head;
|
country_list_t *country_head;
|
||||||
|
char *ccode_all_list;
|
||||||
|
wl_ccode_all_t ccode_all;
|
||||||
int ioctl_ver;
|
int ioctl_ver;
|
||||||
int band;
|
int band;
|
||||||
int bw_cap[2];
|
int bw_cap[2];
|
||||||
|
int mapsta_mode;
|
||||||
wl_country_t cspec;
|
wl_country_t cspec;
|
||||||
uint roam_off;
|
uint roam_off;
|
||||||
uint roam_off_suspend;
|
uint roam_off_suspend;
|
||||||
|
|
@ -224,6 +223,9 @@ typedef struct dhd_conf {
|
||||||
int roam_scan_period[2];
|
int roam_scan_period[2];
|
||||||
int roam_delta[2];
|
int roam_delta[2];
|
||||||
int fullroamperiod;
|
int fullroamperiod;
|
||||||
|
#ifdef WL_SCHED_SCAN
|
||||||
|
int max_sched_scan_reqs;
|
||||||
|
#endif /* WL_SCHED_SCAN */
|
||||||
uint keep_alive_period;
|
uint keep_alive_period;
|
||||||
bool rekey_offload;
|
bool rekey_offload;
|
||||||
#ifdef ARP_OFFLOAD_SUPPORT
|
#ifdef ARP_OFFLOAD_SUPPORT
|
||||||
|
|
@ -236,6 +238,8 @@ typedef struct dhd_conf {
|
||||||
conf_pkt_filter_add_t pkt_filter_add;
|
conf_pkt_filter_add_t pkt_filter_add;
|
||||||
conf_pkt_filter_del_t pkt_filter_del;
|
conf_pkt_filter_del_t pkt_filter_del;
|
||||||
char *magic_pkt_filter_add;
|
char *magic_pkt_filter_add;
|
||||||
|
int magic_pkt_hdr_len;
|
||||||
|
int pkt_filter_cnt_default;
|
||||||
#endif
|
#endif
|
||||||
int srl;
|
int srl;
|
||||||
int lrl;
|
int lrl;
|
||||||
|
|
@ -356,13 +360,10 @@ typedef struct dhd_conf {
|
||||||
int proptx_maxcnt_5g;
|
int proptx_maxcnt_5g;
|
||||||
#endif /* DYNAMIC_PROPTX_MAXCOUNT */
|
#endif /* DYNAMIC_PROPTX_MAXCOUNT */
|
||||||
#ifdef TPUT_MONITOR
|
#ifdef TPUT_MONITOR
|
||||||
int data_drop_mode;
|
|
||||||
unsigned long net_len;
|
|
||||||
uint tput_monitor_ms;
|
uint tput_monitor_ms;
|
||||||
struct osl_timespec tput_ts;
|
struct osl_timespec tput_ts;
|
||||||
unsigned long last_tx;
|
unsigned long last_tx;
|
||||||
unsigned long last_rx;
|
unsigned long last_rx;
|
||||||
unsigned long last_net_tx;
|
|
||||||
#ifdef BCMSDIO
|
#ifdef BCMSDIO
|
||||||
int32 doflow_tput_thresh;
|
int32 doflow_tput_thresh;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -392,15 +393,14 @@ typedef struct dhd_conf {
|
||||||
|
|
||||||
#ifdef BCMSDIO
|
#ifdef BCMSDIO
|
||||||
void dhd_conf_get_otp(dhd_pub_t *dhd, bcmsdh_info_t *sdh, si_t *sih);
|
void dhd_conf_get_otp(dhd_pub_t *dhd, bcmsdh_info_t *sdh, si_t *sih);
|
||||||
#if defined(HW_OOB) || defined(FORCE_WOWLAN)
|
|
||||||
void dhd_conf_set_hw_oob_intr(bcmsdh_info_t *sdh, struct si_pub *sih);
|
|
||||||
#endif
|
|
||||||
void dhd_conf_set_txglom_params(dhd_pub_t *dhd, bool enable);
|
void dhd_conf_set_txglom_params(dhd_pub_t *dhd, bool enable);
|
||||||
bool dhd_conf_legacy_otp_chip(dhd_pub_t *dhd);
|
bool dhd_conf_legacy_otp_chip(dhd_pub_t *dhd);
|
||||||
#endif
|
#endif
|
||||||
#ifdef BCMPCIE
|
#ifdef BCMPCIE
|
||||||
int dhd_conf_get_otp(dhd_pub_t *dhd, si_t *sih);
|
|
||||||
bool dhd_conf_legacy_msi_chip(dhd_pub_t *dhd);
|
bool dhd_conf_legacy_msi_chip(dhd_pub_t *dhd);
|
||||||
|
#if defined(BCMPCIE_CTO_PREVENTION)
|
||||||
|
bool dhd_conf_legacy_cto_chip(uint16 chip);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef WL_CFG80211
|
#ifdef WL_CFG80211
|
||||||
bool dhd_conf_legacy_chip_check(dhd_pub_t *dhd);
|
bool dhd_conf_legacy_chip_check(dhd_pub_t *dhd);
|
||||||
|
|
@ -415,6 +415,7 @@ bool dhd_conf_same_country(dhd_pub_t *dhd, char *buf);
|
||||||
int dhd_conf_country(dhd_pub_t *dhd, char *cmd, char *buf);
|
int dhd_conf_country(dhd_pub_t *dhd, char *cmd, char *buf);
|
||||||
int dhd_conf_get_country(dhd_pub_t *dhd, wl_country_t *cspec);
|
int dhd_conf_get_country(dhd_pub_t *dhd, wl_country_t *cspec);
|
||||||
#ifdef CCODE_LIST
|
#ifdef CCODE_LIST
|
||||||
|
int dhd_ccode_map_country_all(dhd_pub_t *dhd, wl_country_t *cspec);
|
||||||
int dhd_ccode_map_country_list(dhd_pub_t *dhd, wl_country_t *cspec);
|
int dhd_ccode_map_country_list(dhd_pub_t *dhd, wl_country_t *cspec);
|
||||||
#endif
|
#endif
|
||||||
void dhd_conf_set_wme(dhd_pub_t *dhd, int ifidx, int mode);
|
void dhd_conf_set_wme(dhd_pub_t *dhd, int ifidx, int mode);
|
||||||
|
|
@ -427,6 +428,7 @@ int dhd_conf_set_chiprev(dhd_pub_t *dhd, uint chip, uint chiprev);
|
||||||
uint dhd_conf_get_chip(void *context);
|
uint dhd_conf_get_chip(void *context);
|
||||||
uint dhd_conf_get_chiprev(void *context);
|
uint dhd_conf_get_chiprev(void *context);
|
||||||
int dhd_conf_get_pm(dhd_pub_t *dhd);
|
int dhd_conf_get_pm(dhd_pub_t *dhd);
|
||||||
|
int dhd_conf_custom_mac(dhd_pub_t *dhd);
|
||||||
int dhd_conf_reg2args(dhd_pub_t *dhd, char *cmd, bool set, uint32 index, uint32 *val);
|
int dhd_conf_reg2args(dhd_pub_t *dhd, char *cmd, bool set, uint32 index, uint32 *val);
|
||||||
int dhd_conf_check_hostsleep(dhd_pub_t *dhd, int cmd, void *buf, int len,
|
int dhd_conf_check_hostsleep(dhd_pub_t *dhd, int cmd, void *buf, int len,
|
||||||
int *hostsleep_set, int *hostsleep_val, int *ret);
|
int *hostsleep_set, int *hostsleep_val, int *ret);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Customer code to add GPIO control during WLAN start/stop
|
* Customer code to add GPIO control during WLAN start/stop
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
21
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_custom_hikey.c
Normal file → Executable file
21
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_custom_hikey.c
Normal file → Executable file
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Platform Dependent file for Hikey
|
* Platform Dependent file for Hikey
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
21
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_custom_memprealloc.c
Normal file → Executable file
21
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_custom_memprealloc.c
Normal file → Executable file
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Platform Dependent file for usage of Preallocted Memory
|
* Platform Dependent file for usage of Preallocted Memory
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Debug/trace/assert driver definitions for Dongle Host Driver.
|
* Debug/trace/assert driver definitions for Dongle Host Driver.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* DHD debug ring API and structures - implementation
|
* DHD debug ring API and structures - implementation
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* DHD debug ring header file - interface
|
* DHD debug ring header file - interface
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* DHD debugability support
|
* DHD debugability support
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -454,10 +473,6 @@ dhd_dbg_msgtrace_msg_parser(void *event_data)
|
||||||
#ifdef SHOW_LOGTRACE
|
#ifdef SHOW_LOGTRACE
|
||||||
#define DATA_UNIT_FOR_LOG_CNT 4
|
#define DATA_UNIT_FOR_LOG_CNT 4
|
||||||
|
|
||||||
#if defined(STRICT_GCC_WARNINGS) && defined(__GNUC__)
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
replace_percent_p_to_x(char *fmt)
|
replace_percent_p_to_x(char *fmt)
|
||||||
{
|
{
|
||||||
|
|
@ -583,8 +598,19 @@ done:
|
||||||
#define LOG_PRINT_CNT_MAX 16u
|
#define LOG_PRINT_CNT_MAX 16u
|
||||||
#define EL_MSEC_PER_SEC 1000
|
#define EL_MSEC_PER_SEC 1000
|
||||||
#ifdef DHD_LOG_PRINT_RATE_LIMIT
|
#ifdef DHD_LOG_PRINT_RATE_LIMIT
|
||||||
#define MAX_LOG_PRINT_COUNT 100u
|
#ifdef DHD_DEBUG
|
||||||
#define LOG_PRINT_THRESH (1u * USEC_PER_SEC)
|
#undef MAX_LOG_PRINT_COUNT
|
||||||
|
#define MAX_LOG_PRINT_COUNT 50000u
|
||||||
|
#undef LOG_PRINT_THRESH
|
||||||
|
#define LOG_PRINT_THRESH (1u * USEC_PER_SEC)
|
||||||
|
#else /* DHD_DEBUG */
|
||||||
|
#ifndef MAX_LOG_PRINT_COUNT
|
||||||
|
#define MAX_LOG_PRINT_COUNT 5000u
|
||||||
|
#endif /* MAX_LOG_PRINT_COUNT */
|
||||||
|
#ifndef LOG_PRINT_THRESH
|
||||||
|
#define LOG_PRINT_THRESH (1u * USEC_PER_SEC)
|
||||||
|
#endif /* LOG_PRINT_THRESH */
|
||||||
|
#endif /* DHD_DEBUG */
|
||||||
#endif
|
#endif
|
||||||
#define EL_PARSE_VER "V02"
|
#define EL_PARSE_VER "V02"
|
||||||
static uint64 verboselog_ts_saved = 0;
|
static uint64 verboselog_ts_saved = 0;
|
||||||
|
|
@ -2490,6 +2516,7 @@ dhd_dbg_monitor_get_rx_pkts(dhd_pub_t *dhdp, void __user *user_buf,
|
||||||
if ((ret = memcpy_s(tmp_rx_pkt, alloc_len, ori_rx_pkt, alloc_len))) {
|
if ((ret = memcpy_s(tmp_rx_pkt, alloc_len, ori_rx_pkt, alloc_len))) {
|
||||||
DHD_PKT_MON_UNLOCK(dhdp->dbg->pkt_mon_lock, flags);
|
DHD_PKT_MON_UNLOCK(dhdp->dbg->pkt_mon_lock, flags);
|
||||||
DHD_ERROR(("%s: failed to copy tmp_rx_pkt ret:%d", __FUNCTION__, ret));
|
DHD_ERROR(("%s: failed to copy tmp_rx_pkt ret:%d", __FUNCTION__, ret));
|
||||||
|
ret = -EINVAL;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
for (i = 0; i < pkt_count; i++) {
|
for (i = 0; i < pkt_count; i++) {
|
||||||
|
|
@ -2498,6 +2525,7 @@ dhd_dbg_monitor_get_rx_pkts(dhd_pub_t *dhdp, void __user *user_buf,
|
||||||
if (!tmp_rx_pkt[i].info.pkt) {
|
if (!tmp_rx_pkt[i].info.pkt) {
|
||||||
DHD_PKT_MON_UNLOCK(dhdp->dbg->pkt_mon_lock, flags);
|
DHD_PKT_MON_UNLOCK(dhdp->dbg->pkt_mon_lock, flags);
|
||||||
DHD_ERROR(("%s: failed to copy skb", __FUNCTION__));
|
DHD_ERROR(("%s: failed to copy skb", __FUNCTION__));
|
||||||
|
ret = -ENOMEM;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3374,22 +3402,14 @@ void
|
||||||
dhd_dbg_detach(dhd_pub_t *dhdp)
|
dhd_dbg_detach(dhd_pub_t *dhdp)
|
||||||
{
|
{
|
||||||
dhd_dbg_t *dbg;
|
dhd_dbg_t *dbg;
|
||||||
#if defined(DHD_DEBUGABILITY_LOG_DUMP_RING) || defined(DHD_DEBUGABILITY_EVENT_RING) || \
|
|
||||||
defined(DHD_PKT_LOGGING_DBGRING)
|
|
||||||
int ring_id;
|
int ring_id;
|
||||||
dhd_dbg_ring_t *ring = NULL;
|
dhd_dbg_ring_t *ring = NULL;
|
||||||
#endif /* DHD_DEBUGABILITY_LOG_DUMP_RING || BTLOG ||
|
|
||||||
* DHD_DEBUGABILITY_EVENT_RING || DHD_PKT_LOGGING_DBGRING ||
|
|
||||||
* (DEBUGABILITY && CUSTOMER_HW6)
|
|
||||||
*/
|
|
||||||
|
|
||||||
dbg = dhdp->dbg;
|
dbg = dhdp->dbg;
|
||||||
if (!dbg) {
|
if (!dbg) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(DHD_DEBUGABILITY_LOG_DUMP_RING) || defined(DHD_DEBUGABILITY_EVENT_RING) || \
|
|
||||||
defined(DHD_PKT_LOGGING_DBGRING)
|
|
||||||
for (ring_id = DEBUG_RING_ID_INVALID + 1; ring_id < DEBUG_RING_ID_MAX; ring_id++) {
|
for (ring_id = DEBUG_RING_ID_INVALID + 1; ring_id < DEBUG_RING_ID_MAX; ring_id++) {
|
||||||
if (VALID_RING(dbg->dbg_rings[ring_id].id)) {
|
if (VALID_RING(dbg->dbg_rings[ring_id].id)) {
|
||||||
ring = &dbg->dbg_rings[ring_id];
|
ring = &dbg->dbg_rings[ring_id];
|
||||||
|
|
@ -3408,12 +3428,7 @@ dhd_dbg_detach(dhd_pub_t *dhdp)
|
||||||
ring->ring_size = 0;
|
ring->ring_size = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VMFREE(dhdp->osh, dbg, sizeof(dhd_dbg_t));
|
VMFREE(dhdp->osh, dbg, sizeof(dhd_dbg_t));
|
||||||
#endif /* DHD_DEBUGABILITY_LOG_DUMP_RING || BTLOG ||
|
|
||||||
* DHD_DEBUGABILITY_EVENT_RING || DHD_PKT_LOGGING_DBGRING ||
|
|
||||||
* (DEBUGABILITY && CUSTOMER_HW6)
|
|
||||||
*/
|
|
||||||
#ifdef DHD_DEBUGABILITY_LOG_DUMP_RING
|
#ifdef DHD_DEBUGABILITY_LOG_DUMP_RING
|
||||||
g_ring_buf.dhd_pub = NULL;
|
g_ring_buf.dhd_pub = NULL;
|
||||||
#endif /* DHD_DEBUGABILITY_LOG_DUMP_RING */
|
#endif /* DHD_DEBUGABILITY_LOG_DUMP_RING */
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* DHD debugability header file
|
* DHD debugability header file
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* DHD debugability Linux os layer
|
* DHD debugability Linux os layer
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -524,20 +543,11 @@ int
|
||||||
dhd_os_dbg_get_feature(dhd_pub_t *dhdp, int32 *features)
|
dhd_os_dbg_get_feature(dhd_pub_t *dhdp, int32 *features)
|
||||||
{
|
{
|
||||||
int ret = BCME_OK;
|
int ret = BCME_OK;
|
||||||
#ifdef DEBUGABILITY
|
|
||||||
#ifndef DEBUGABILITY_DISABLE_MEMDUMP
|
|
||||||
struct dhd_conf *conf = dhdp->conf;
|
|
||||||
#endif /* !DEBUGABILITY_DISABLE_MEMDUMP */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* XXX : we need to find a way to get the features for dbg */
|
/* XXX : we need to find a way to get the features for dbg */
|
||||||
*features = 0;
|
*features = 0;
|
||||||
#ifdef DEBUGABILITY
|
#ifdef DEBUGABILITY
|
||||||
#ifndef DEBUGABILITY_DISABLE_MEMDUMP
|
#ifndef DEBUGABILITY_DISABLE_MEMDUMP
|
||||||
// fix for RequestFirmwareDebugDump issue of VTS
|
*features |= DBG_MEMORY_DUMP_SUPPORTED;
|
||||||
if ((conf->chip != BCM4359_CHIP_ID) && (conf->chip != BCM43751_CHIP_ID) &&
|
|
||||||
(conf->chip != BCM43752_CHIP_ID) && (conf->chip != BCM4375_CHIP_ID))
|
|
||||||
*features |= DBG_MEMORY_DUMP_SUPPORTED;
|
|
||||||
#endif /* !DEBUGABILITY_DISABLE_MEMDUMP */
|
#endif /* !DEBUGABILITY_DISABLE_MEMDUMP */
|
||||||
if (FW_SUPPORTED(dhdp, logtrace)) {
|
if (FW_SUPPORTED(dhdp, logtrace)) {
|
||||||
*features |= DBG_CONNECT_EVENT_SUPPORTED;
|
*features |= DBG_CONNECT_EVENT_SUPPORTED;
|
||||||
|
|
|
||||||
21
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_event_log_filter.c
Normal file → Executable file
21
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_event_log_filter.c
Normal file → Executable file
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Wifi dongle status Filter and Report
|
* Wifi dongle status Filter and Report
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
21
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_event_log_filter.h
Normal file → Executable file
21
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_event_log_filter.h
Normal file → Executable file
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Wifi dongle status Filter and Report
|
* Wifi dongle status Filter and Report
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,26 @@
|
||||||
* Flow rings are transmit traffic (=propagating towards antenna) related entities
|
* Flow rings are transmit traffic (=propagating towards antenna) related entities
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,26 @@
|
||||||
* Provides type definitions and function prototypes used to create, delete and manage flow rings at
|
* Provides type definitions and function prototypes used to create, delete and manage flow rings at
|
||||||
* high level.
|
* high level.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -307,6 +307,7 @@ dhd_wlan_init_gpio(wifi_adapter_info_t *adapter)
|
||||||
adapter->gpio_wl_reg_on = gpio_wl_reg_on;
|
adapter->gpio_wl_reg_on = gpio_wl_reg_on;
|
||||||
|
|
||||||
#ifdef CUSTOMER_OOB
|
#ifdef CUSTOMER_OOB
|
||||||
|
adapter->gpio_wl_host_wake = -1;
|
||||||
if (gpio_wl_host_wake >= 0) {
|
if (gpio_wl_host_wake >= 0) {
|
||||||
err = gpio_request(gpio_wl_host_wake, "bcmdhd");
|
err = gpio_request(gpio_wl_host_wake, "bcmdhd");
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* IP Packet Parser Module.
|
* IP Packet Parser Module.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -976,9 +995,8 @@ dhd_tcpdata_info_get(dhd_pub_t *dhdp, void *pkt)
|
||||||
ip_hdr = ether_hdr + ETHER_HDR_LEN;
|
ip_hdr = ether_hdr + ETHER_HDR_LEN;
|
||||||
cur_framelen -= ETHER_HDR_LEN;
|
cur_framelen -= ETHER_HDR_LEN;
|
||||||
|
|
||||||
ASSERT(cur_framelen >= IPV4_MIN_HEADER_LEN);
|
|
||||||
if (cur_framelen < IPV4_MIN_HEADER_LEN) {
|
if (cur_framelen < IPV4_MIN_HEADER_LEN) {
|
||||||
DHD_TRACE(("%s %d: cur_framelen(%d) < IPV4_MIN_HEADER_LEN\n", __FUNCTION__,
|
DHD_ERROR(("%s %d: cur_framelen(%d) < IPV4_MIN_HEADER_LEN\n", __FUNCTION__,
|
||||||
__LINE__, cur_framelen));
|
__LINE__, cur_framelen));
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,26 @@
|
||||||
*
|
*
|
||||||
* Provides type definitions and function prototypes used to parse ip packet.
|
* Provides type definitions and function prototypes used to parse ip packet.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -67,7 +86,7 @@ extern tcp_hdr_flag_t dhd_tcpdata_get_flag(dhd_pub_t *dhdp, void *pkt);
|
||||||
#ifndef TCPDATA_INFO_MAXNUM
|
#ifndef TCPDATA_INFO_MAXNUM
|
||||||
#define TCPDATA_INFO_MAXNUM 40
|
#define TCPDATA_INFO_MAXNUM 40
|
||||||
#endif
|
#endif
|
||||||
#define TCPDATA_PSH_INFO_MAXNUM (8 * TCPDATA_INFO_MAXNUM)
|
#define TCPDATA_PSH_INFO_MAXNUM (16 * TCPDATA_INFO_MAXNUM)
|
||||||
|
|
||||||
#define TCPDATA_INFO_TIMEOUT 5000 /* Remove tcpdata_info if inactive for this time (in ms) */
|
#define TCPDATA_INFO_TIMEOUT 5000 /* Remove tcpdata_info if inactive for this time (in ms) */
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* DHD Linux header file (dhd_linux exports for cfg80211 and other components)
|
* DHD Linux header file (dhd_linux exports for cfg80211 and other components)
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
23
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_exportfs.c
Normal file → Executable file
23
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_exportfs.c
Normal file → Executable file
|
|
@ -2,7 +2,26 @@
|
||||||
* Broadcom Dongle Host Driver (DHD), Linux-specific network interface
|
* Broadcom Dongle Host Driver (DHD), Linux-specific network interface
|
||||||
* Basically selected code segments from usb-cdc.c and usb-rndis.c
|
* Basically selected code segments from usb-cdc.c and usb-rndis.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -46,6 +65,7 @@
|
||||||
|
|
||||||
#ifdef SHOW_LOGTRACE
|
#ifdef SHOW_LOGTRACE
|
||||||
extern dhd_pub_t* g_dhd_pub;
|
extern dhd_pub_t* g_dhd_pub;
|
||||||
|
#if defined(DEBUGABILITY) || defined(EWP_ECNTRS_LOGGING) || defined(EWP_RTT_LOGGING)
|
||||||
static int dhd_ring_proc_open(struct inode *inode, struct file *file);
|
static int dhd_ring_proc_open(struct inode *inode, struct file *file);
|
||||||
ssize_t dhd_ring_proc_read(struct file *file, char *buffer, size_t tt, loff_t *loff);
|
ssize_t dhd_ring_proc_read(struct file *file, char *buffer, size_t tt, loff_t *loff);
|
||||||
|
|
||||||
|
|
@ -123,6 +143,7 @@ exit:
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif /* DEBUGABILITY || EWP_ECNTRS_LOGGING || EWP_RTT_LOGGING */
|
||||||
|
|
||||||
void
|
void
|
||||||
dhd_dbg_ring_proc_create(dhd_pub_t *dhdp)
|
dhd_dbg_ring_proc_create(dhd_pub_t *dhdp)
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,26 @@
|
||||||
* Broadcom Dongle Host Driver (DHD), Linux-specific network interface
|
* Broadcom Dongle Host Driver (DHD), Linux-specific network interface
|
||||||
* Basically selected code segments from usb-cdc.c and usb-rndis.c
|
* Basically selected code segments from usb-cdc.c and usb-rndis.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -35,6 +54,9 @@ extern dhd_pub_t* g_dhd_pub;
|
||||||
#define DHD_NAPI_LATENCY_SIZE (sizeof(uint64) * DHD_NUM_NAPI_LATENCY_ROWS)
|
#define DHD_NAPI_LATENCY_SIZE (sizeof(uint64) * DHD_NUM_NAPI_LATENCY_ROWS)
|
||||||
#endif /* DHD_LB_STATS */
|
#endif /* DHD_LB_STATS */
|
||||||
|
|
||||||
|
/* latency improvement */
|
||||||
|
#define DHD_LB_ACTIVE_LOW_WATERMARK 3
|
||||||
|
|
||||||
void
|
void
|
||||||
dhd_lb_set_default_cpus(dhd_info_t *dhd)
|
dhd_lb_set_default_cpus(dhd_info_t *dhd)
|
||||||
{
|
{
|
||||||
|
|
@ -1224,7 +1246,8 @@ dhd_lb_rx_napi_dispatch(dhd_pub_t *dhdp)
|
||||||
DHD_RX_NAPI_QUEUE_UNLOCK(&dhd->rx_napi_queue.lock, flags);
|
DHD_RX_NAPI_QUEUE_UNLOCK(&dhd->rx_napi_queue.lock, flags);
|
||||||
|
|
||||||
/* If sysfs lb_rxp_active is not set, schedule on current cpu */
|
/* If sysfs lb_rxp_active is not set, schedule on current cpu */
|
||||||
if (!atomic_read(&dhd->lb_rxp_active))
|
if (!atomic_read(&dhd->lb_rxp_active) ||
|
||||||
|
(skb_queue_len(&dhd->rx_napi_queue) < DHD_LB_ACTIVE_LOW_WATERMARK))
|
||||||
{
|
{
|
||||||
dhd_napi_schedule(dhd);
|
dhd_napi_schedule(dhd);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
279
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_pktdump.c
Normal file → Executable file
279
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_pktdump.c
Normal file → Executable file
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Packet dump helper functions
|
* Packet dump helper functions
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -344,6 +363,38 @@ typedef struct hdr_fmt {
|
||||||
struct bcmudp_hdr udph;
|
struct bcmudp_hdr udph;
|
||||||
} PACKED_STRUCT hdr_fmt_t;
|
} PACKED_STRUCT hdr_fmt_t;
|
||||||
|
|
||||||
|
#ifdef DHD_IPV6_DUMP
|
||||||
|
typedef struct ipv6hdr_fmt {
|
||||||
|
struct ipv6_hdr ip6h;
|
||||||
|
struct bcmudp_hdr udph;
|
||||||
|
} PACKED_STRUCT ipv6hdr_fmt_t;
|
||||||
|
|
||||||
|
typedef struct dhcp6_fmt {
|
||||||
|
struct ipv6_hdr iph;
|
||||||
|
struct bcmudp_hdr udph;
|
||||||
|
uint8 msgtype;
|
||||||
|
} PACKED_STRUCT dhcp6_fmt_t;
|
||||||
|
|
||||||
|
typedef struct icmpv6 {
|
||||||
|
uint8 icmp6_type;
|
||||||
|
uint8 icmp6_code;
|
||||||
|
uint16 icmp6_cksum;
|
||||||
|
uint16 id;
|
||||||
|
uint16 seq;
|
||||||
|
} PACKED_STRUCT icmpv6_hdr_t;
|
||||||
|
|
||||||
|
typedef struct dns6_fmt {
|
||||||
|
struct ipv6_hdr ip6h;
|
||||||
|
struct bcmudp_hdr udph;
|
||||||
|
uint16 id;
|
||||||
|
uint16 flags;
|
||||||
|
uint16 qdcount;
|
||||||
|
uint16 ancount;
|
||||||
|
uint16 nscount;
|
||||||
|
uint16 arcount;
|
||||||
|
} PACKED_STRUCT dns6_fmt_t;
|
||||||
|
#endif /* DHD_IPV6_DUMP */
|
||||||
|
|
||||||
msg_eapol_t
|
msg_eapol_t
|
||||||
dhd_is_4way_msg(uint8 *pktdata)
|
dhd_is_4way_msg(uint8 *pktdata)
|
||||||
{
|
{
|
||||||
|
|
@ -437,7 +488,7 @@ dhd_dump_pkt(dhd_pub_t *dhdp, int ifidx, uint8 *pktdata, uint32 pktlen,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(BCMPCIE) && defined(DHD_PKT_LOGGING)
|
#if 0 // defined(BCMPCIE) && defined(DHD_PKT_LOGGING)
|
||||||
if (tx && !pkthash && !pktfate) {
|
if (tx && !pkthash && !pktfate) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1139,6 +1190,64 @@ static char dhcp_types[MAX_DHCP_TYPES_STR][10] = {
|
||||||
#define DHCP_TYPES_STR(type) ((type < MAX_DHCP_TYPES_STR) ? \
|
#define DHCP_TYPES_STR(type) ((type < MAX_DHCP_TYPES_STR) ? \
|
||||||
(dhcp_types[type]) : "UNKNOWN_DHCP_TYPE")
|
(dhcp_types[type]) : "UNKNOWN_DHCP_TYPE")
|
||||||
|
|
||||||
|
#ifdef DHD_IPV6_DUMP
|
||||||
|
#define DHCP6_PRINT(str) \
|
||||||
|
do { \
|
||||||
|
if (tx) { \
|
||||||
|
DHD_PKTDUMP_MEM((str " %s[%s] [TX] -" TXFATE_FMT "\n", \
|
||||||
|
typestr, ifname, \
|
||||||
|
TX_PKTHASH(pkthash), TX_FATE(pktfate))); \
|
||||||
|
} else { \
|
||||||
|
DHD_PKTDUMP_MEM((str " %s[%s] [RX]\n", \
|
||||||
|
typestr, ifname)); \
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define ICMPv6_PRINT(str) \
|
||||||
|
do { \
|
||||||
|
if (tx) { \
|
||||||
|
DHD_PKTDUMP_MEM((str " %s[%s] [TX] -" TXFATE_FMT "\n", \
|
||||||
|
typestr, ifname, \
|
||||||
|
TX_PKTHASH(pkthash), TX_FATE(pktfate))); \
|
||||||
|
} else { \
|
||||||
|
if (msgtype == ICMPV6_PKT_TYPE_RA) { \
|
||||||
|
DHD_PKTDUMP_MEM((str " %s[%s] flags 0x%x [RX]\n", \
|
||||||
|
typestr, ifname, icmp6_ra_flag)); \
|
||||||
|
} else { \
|
||||||
|
DHD_PKTDUMP_MEM((str " %s[%s] [RX]\n", \
|
||||||
|
typestr, ifname)); \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define MAX_DHCP6_TYPES_STR 11
|
||||||
|
#define MAX_DHCP6_TYPES_STAT 11
|
||||||
|
|
||||||
|
static char dhcp6_types[MAX_DHCP6_TYPES_STR][10] = {
|
||||||
|
"NA", "SOLICIT", "ADVERTISE", "REQUEST", "CONFIRM",
|
||||||
|
"RENEW", "REBIND", "REPLY", "RELEASE", "DECLINE", "RECONFIG"
|
||||||
|
};
|
||||||
|
#define DHCP6_TYPES_STR(type) ((type < MAX_DHCP6_TYPES_STR) ? \
|
||||||
|
(dhcp6_types[type]) : "UNKNOWN_DHCP_TYPE")
|
||||||
|
|
||||||
|
static const int dhcp6_types_stat[MAX_DHCP6_TYPES_STAT] = {
|
||||||
|
ST(INVALID), ST(SOLICIT), ST(ADVERTISE), ST(REQUEST),
|
||||||
|
ST(CONFIRM), ST(RENEW), ST(REBIND), ST(REPLY),
|
||||||
|
ST(RELEASE), ST(DECLINE), ST(RECONFIGURE)
|
||||||
|
};
|
||||||
|
#define DHCP6_TYPES_STAT(type) ((type < MAX_DHCP6_TYPES_STAT) ? \
|
||||||
|
(dhcp6_types_stat[type]) : ST(INVALID))
|
||||||
|
|
||||||
|
#define MAX_ICMPV6_TYPES_STAT 10
|
||||||
|
static const int icmpv6_types_stat[MAX_ICMPV6_TYPES_STAT] = {
|
||||||
|
ST(INVALID), ST(ECHO_REQ), ST(ECHO_REPLY), ST(MULTI_QUERY),
|
||||||
|
ST(MULTI_REPORT), ST(MULTI_DONE), ST(ROUTER_SOLIC), ST(ROUTER_ADV),
|
||||||
|
ST(NEIGHBOR_SOLIC), ST(NEIGHBOR_ADV)
|
||||||
|
};
|
||||||
|
#define ICMPV6_TYPES_STAT(type) ((type < MAX_ICMPV6_TYPES_STAT) ? \
|
||||||
|
(icmpv6_types_stat[type]) : ST(INVALID))
|
||||||
|
#endif /* DHD_IPV6_DUMP */
|
||||||
|
|
||||||
#ifdef DHD_STATUS_LOGGING
|
#ifdef DHD_STATUS_LOGGING
|
||||||
#define MAX_DHCP_TYPES_STAT 9
|
#define MAX_DHCP_TYPES_STAT 9
|
||||||
#define DHCP_TYPES_STAT(type) ((type < MAX_DHCP_TYPES_STAT) ? \
|
#define DHCP_TYPES_STAT(type) ((type < MAX_DHCP_TYPES_STAT) ? \
|
||||||
|
|
@ -1565,6 +1674,172 @@ dhd_dns_dump(dhd_pub_t *dhdp, int ifidx, uint8 *pktdata, bool tx,
|
||||||
}
|
}
|
||||||
#endif /* DHD_DNS_DUMP */
|
#endif /* DHD_DNS_DUMP */
|
||||||
|
|
||||||
|
#ifdef DHD_IPV6_DUMP
|
||||||
|
void
|
||||||
|
dhd_dhcp6_dump(dhd_pub_t *dhdp, int ifidx, uint8 *pktdata, bool tx,
|
||||||
|
uint32 *pkthash, uint16 *pktfate)
|
||||||
|
{
|
||||||
|
dhcp6_fmt_t *b = (dhcp6_fmt_t *)&pktdata[ETHER_HDR_LEN];
|
||||||
|
char *ifname = NULL, *typestr = NULL;
|
||||||
|
uint8 msgtype;
|
||||||
|
bool cond;
|
||||||
|
|
||||||
|
ifname = dhd_ifname(dhdp, ifidx);
|
||||||
|
msgtype = ntoh16(b->msgtype);
|
||||||
|
cond = (tx && pktfate) ? FALSE : TRUE;
|
||||||
|
|
||||||
|
/* only handle DHCPv6 msgtype from 1 ~ 10 */
|
||||||
|
if (msgtype > 10)
|
||||||
|
return;
|
||||||
|
|
||||||
|
typestr = DHCP6_TYPES_STR(msgtype);
|
||||||
|
DHD_STATLOG_DATA(dhdp, DHCP6_TYPES_STAT(msgtype),
|
||||||
|
ifidx, tx, cond);
|
||||||
|
DHCP6_PRINT("DHCPv6");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dhd_dns6_dump(dhd_pub_t *dhdp, int ifidx, uint8 *pktdata, bool tx,
|
||||||
|
uint32 *pkthash, uint16 *pktfate)
|
||||||
|
{
|
||||||
|
dns6_fmt_t *dns6h = (dns6_fmt_t *)&pktdata[ETHER_HDR_LEN];
|
||||||
|
uint16 flags, opcode, id;
|
||||||
|
char *ifname;
|
||||||
|
bool cond, dump_enabled;
|
||||||
|
|
||||||
|
ifname = dhd_ifname(dhdp, ifidx);
|
||||||
|
cond = (tx && pktfate) ? FALSE : TRUE;
|
||||||
|
dump_enabled = dhd_dump_pkt_enabled(dhdp);
|
||||||
|
flags = hton16(dns6h->flags);
|
||||||
|
opcode = GET_DNS_OPCODE(flags);
|
||||||
|
id = hton16(dns6h->id);
|
||||||
|
if (GET_DNS_QR(flags)) {
|
||||||
|
/* Response */
|
||||||
|
DHD_STATLOG_DATA(dhdp, ST(DNS_RESP), ifidx, tx, cond);
|
||||||
|
DNS_RESP_PRINT("DNS6 RESPONSE");
|
||||||
|
} else {
|
||||||
|
/* Request */
|
||||||
|
DHD_STATLOG_DATA(dhdp, ST(DNS_QUERY), ifidx, tx, cond);
|
||||||
|
DNS_REQ_PRINT("DNS6 REQUEST");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
char*
|
||||||
|
icmpv6_types(uint8 type)
|
||||||
|
{
|
||||||
|
switch (type) {
|
||||||
|
case ICMPV6_PKT_TYPE_ECHO_REQ:
|
||||||
|
return "Echo Request";
|
||||||
|
case ICMPV6_PKT_TYPE_ECHO_REPLY:
|
||||||
|
return "Echo Reply";
|
||||||
|
case ICMPV6_PKT_TYPE_MULTI_LST_QUERY:
|
||||||
|
return "Multicast Listener Query";
|
||||||
|
case ICMPV6_PKT_TYPE_MULTI_LST_REPORT:
|
||||||
|
return "Multicast Listener Report";
|
||||||
|
case ICMPV6_PKT_TYPE_MULTI_LST_DONE:
|
||||||
|
return "Multicast Listener Done";
|
||||||
|
case ICMPV6_PKT_TYPE_RS:
|
||||||
|
return "Router Solicitation";
|
||||||
|
case ICMPV6_PKT_TYPE_RA:
|
||||||
|
return "Router Advertisement";
|
||||||
|
case ICMPV6_PKT_TYPE_NS:
|
||||||
|
return "Neighbor Solicitation";
|
||||||
|
case ICMPV6_PKT_TYPE_NA:
|
||||||
|
return "Neighbor Advertisement";
|
||||||
|
default:
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dhd_icmpv6_dump(dhd_pub_t *dhdp, int ifidx, uint8 *pktdata, bool tx,
|
||||||
|
uint32 *pkthash, uint16 *pktfate)
|
||||||
|
{
|
||||||
|
struct ipv6_hdr *ip6h = (struct ipv6_hdr *)&pktdata[ETHER_HDR_LEN];
|
||||||
|
struct icmp6_hdr *icmpv6;
|
||||||
|
char *ifname = NULL, *typestr = NULL;
|
||||||
|
uint8 icmp6_ra_flag;
|
||||||
|
uint8 msgtype;
|
||||||
|
bool cond;
|
||||||
|
|
||||||
|
uint8 nexthdr = ip6h->nexthdr;
|
||||||
|
|
||||||
|
if (nexthdr != ICMPV6_HEADER_TYPE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
icmpv6 = (struct icmp6_hdr *) ((uint8 *)ip6h + sizeof(struct ipv6_hdr));
|
||||||
|
ifname = dhd_ifname(dhdp, ifidx);
|
||||||
|
msgtype = icmpv6->icmp6_type;
|
||||||
|
cond = (tx && pktfate) ? FALSE : TRUE;
|
||||||
|
typestr = icmpv6_types(msgtype);
|
||||||
|
|
||||||
|
/* only handle ICMPv6 msgtype from 128 ~ 136 */
|
||||||
|
if (!typestr)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (msgtype == ICMPV6_PKT_TYPE_RA) {
|
||||||
|
/* check IPv6 configuration is stateless or stateful DHCPv6 */
|
||||||
|
icmp6_ra_flag = *((uint8 *)ip6h + sizeof(struct ipv6_hdr) + ICMPV6_RA_FLAG_OFFSET);
|
||||||
|
}
|
||||||
|
|
||||||
|
DHD_STATLOG_DATA(dhdp, ICMPV6_TYPES_STAT(msgtype - 127),
|
||||||
|
ifidx, tx, cond);
|
||||||
|
ICMPv6_PRINT("ICMPv6");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
dhd_check_dhcp6(uint8 *pktdata, uint32 plen)
|
||||||
|
{
|
||||||
|
ipv6hdr_fmt_t *b = (ipv6hdr_fmt_t *)&pktdata[ETHER_HDR_LEN];
|
||||||
|
struct ipv6_hdr *ip6h = &b->ip6h;
|
||||||
|
|
||||||
|
/* check header length */
|
||||||
|
if (plen <= IPV6_MIN_HLEN) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IPV6_PROT(ip6h) != IP_PROT_UDP) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* check UDP port for bootp (546, 547) */
|
||||||
|
if (b->udph.src_port != htons(DHCP6_PORT_SERVER) &&
|
||||||
|
b->udph.src_port != htons(DHCP6_PORT_CLIENT) &&
|
||||||
|
b->udph.dst_port != htons(DHCP6_PORT_SERVER) &&
|
||||||
|
b->udph.dst_port != htons(DHCP6_PORT_CLIENT)) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
dhd_check_dns6(uint8 *pktdata, uint32 plen)
|
||||||
|
{
|
||||||
|
ipv6hdr_fmt_t *b = (ipv6hdr_fmt_t *)&pktdata[ETHER_HDR_LEN];
|
||||||
|
struct ipv6_hdr *ip6h = &b->ip6h;
|
||||||
|
|
||||||
|
/* check header length */
|
||||||
|
if (plen <= IPV6_MIN_HLEN) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IPV6_PROT(ip6h) != IP_PROT_UDP) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* check UDP port for DNS */
|
||||||
|
if (b->udph.src_port != hton16(UDP_PORT_DNS) &&
|
||||||
|
b->udph.dst_port != hton16(UDP_PORT_DNS)) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
#endif /* DHD_IPV6_DUMP */
|
||||||
|
|
||||||
#ifdef DHD_TRX_DUMP
|
#ifdef DHD_TRX_DUMP
|
||||||
void
|
void
|
||||||
dhd_trx_pkt_dump(dhd_pub_t *dhdp, int ifidx, uint8 *pktdata, uint32 pktlen, bool tx)
|
dhd_trx_pkt_dump(dhd_pub_t *dhdp, int ifidx, uint8 *pktdata, uint32 pktlen, bool tx)
|
||||||
|
|
|
||||||
34
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_pktdump.h
Normal file → Executable file
34
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_pktdump.h
Normal file → Executable file
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Header file for the Packet dump helper functions
|
* Header file for the Packet dump helper functions
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -55,7 +74,8 @@ enum pkt_type {
|
||||||
PKT_TYPE_DNS = 4,
|
PKT_TYPE_DNS = 4,
|
||||||
PKT_TYPE_ARP = 5,
|
PKT_TYPE_ARP = 5,
|
||||||
PKT_TYPE_EAP = 6,
|
PKT_TYPE_EAP = 6,
|
||||||
PKT_TYPE_IGMP = 7
|
PKT_TYPE_DHCP6 = 7,
|
||||||
|
PKT_TYPE_DNS6 = 8
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WL_CFGVENDOR_CUST_ADVLOG
|
#ifdef WL_CFGVENDOR_CUST_ADVLOG
|
||||||
|
|
@ -147,6 +167,16 @@ extern void dhd_dump_eapol_message(dhd_pub_t *dhd, int ifidx,
|
||||||
static INLINE void dhd_dump_eapol_message(dhd_pub_t *dhd, int ifidx,
|
static INLINE void dhd_dump_eapol_message(dhd_pub_t *dhd, int ifidx,
|
||||||
uint8 *pktdata, uint32 pktlen, bool tx, uint32 *pkthash, uint16 *pktfate) { }
|
uint8 *pktdata, uint32 pktlen, bool tx, uint32 *pkthash, uint16 *pktfate) { }
|
||||||
#endif /* DHD_8021X_DUMP */
|
#endif /* DHD_8021X_DUMP */
|
||||||
|
#ifdef DHD_IPV6_DUMP
|
||||||
|
extern void dhd_dhcp6_dump(dhd_pub_t *dhdp, int ifidx, uint8 *pktdata, bool tx,
|
||||||
|
uint32 *pkthash, uint16 *pktfate);
|
||||||
|
extern void dhd_icmpv6_dump(dhd_pub_t *dhdp, int ifidx, uint8 *pktdata, bool tx,
|
||||||
|
uint32 *pkthash, uint16 *pktfate);
|
||||||
|
extern void dhd_dns6_dump(dhd_pub_t *dhdp, int ifidx, uint8 *pktdata, bool tx,
|
||||||
|
uint32 *pkthash, uint16 *pktfate);
|
||||||
|
extern bool dhd_check_dhcp6(uint8 *pktdata, uint32 plen);
|
||||||
|
extern bool dhd_check_dns6(uint8 *pktdata, uint32 plen);
|
||||||
|
#endif
|
||||||
extern bool dhd_check_ip_prot(uint8 *pktdata, uint16 ether_type);
|
extern bool dhd_check_ip_prot(uint8 *pktdata, uint16 ether_type);
|
||||||
extern bool dhd_check_arp(uint8 *pktdata, uint16 ether_type);
|
extern bool dhd_check_arp(uint8 *pktdata, uint16 ether_type);
|
||||||
extern bool dhd_check_dhcp(uint8 *pktdata);
|
extern bool dhd_check_dhcp(uint8 *pktdata);
|
||||||
|
|
|
||||||
26
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_platdev.c
Normal file → Executable file
26
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_platdev.c
Normal file → Executable file
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Linux platform device for DHD WLAN adapter
|
* Linux platform device for DHD WLAN adapter
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -261,7 +280,7 @@ int wifi_platform_set_power(wifi_adapter_info_t *adapter, bool on, unsigned long
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (!adapter || !adapter->wifi_plat_data) {
|
if (!adapter->wifi_plat_data) {
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
@ -724,7 +743,8 @@ void wifi_ctrlfunc_unregister_drv(void)
|
||||||
#endif /* !defined(CONFIG_DTS) */
|
#endif /* !defined(CONFIG_DTS) */
|
||||||
|
|
||||||
#if defined(CUSTOMER_HW)
|
#if defined(CUSTOMER_HW)
|
||||||
dhd_wlan_deinit_plat_data(adapter);
|
if (adapter)
|
||||||
|
dhd_wlan_deinit_plat_data(adapter);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* DHD Linux header file - contains private structure definition of the Linux specific layer
|
* DHD Linux header file - contains private structure definition of the Linux specific layer
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -52,6 +71,9 @@
|
||||||
#include <bcmmsgbuf.h>
|
#include <bcmmsgbuf.h>
|
||||||
#include <dhd_flowring.h>
|
#include <dhd_flowring.h>
|
||||||
#endif /* PCIE_FULL_DONGLE */
|
#endif /* PCIE_FULL_DONGLE */
|
||||||
|
#if defined(DHD_HWTSTAMP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))
|
||||||
|
#include <linux/net_tstamp.h>
|
||||||
|
#endif /* defined(DHD_HWTSTAMP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)) */
|
||||||
|
|
||||||
#ifdef RX_PKT_POOL
|
#ifdef RX_PKT_POOL
|
||||||
#define RX_PKTPOOL_RESCHED_DELAY_MS 500u
|
#define RX_PKTPOOL_RESCHED_DELAY_MS 500u
|
||||||
|
|
@ -441,6 +463,9 @@ typedef struct dhd_info {
|
||||||
osl_atomic_t dump_status;
|
osl_atomic_t dump_status;
|
||||||
struct work_struct dhd_dump_proc_work;
|
struct work_struct dhd_dump_proc_work;
|
||||||
#endif /* DHD_FILE_DUMP_EVENT && DHD_FW_COREDUMP */
|
#endif /* DHD_FILE_DUMP_EVENT && DHD_FW_COREDUMP */
|
||||||
|
#if defined(DHD_HWTSTAMP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))
|
||||||
|
struct hwtstamp_config stmpconf;
|
||||||
|
#endif /* defined(DHD_HWTSTAMP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)) */
|
||||||
} dhd_info_t;
|
} dhd_info_t;
|
||||||
|
|
||||||
/** priv_link is the link between netdev and the dhdif and dhd_info structs. */
|
/** priv_link is the link between netdev and the dhdif and dhd_info structs. */
|
||||||
|
|
@ -520,7 +545,7 @@ extern uint sssr_enab;
|
||||||
extern uint fis_enab;
|
extern uint fis_enab;
|
||||||
#endif /* DHD_SSSR_DUMP */
|
#endif /* DHD_SSSR_DUMP */
|
||||||
|
|
||||||
#if defined(ANDROID_VERSION) && (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
|
#if (ANDROID_VERSION > 0) && (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
|
||||||
#define WAKELOCK_BACKPORT
|
#define WAKELOCK_BACKPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,26 @@
|
||||||
* Broadcom Dongle Host Driver (DHD),
|
* Broadcom Dongle Host Driver (DHD),
|
||||||
* Linux-specific network interface for receive(rx) path
|
* Linux-specific network interface for receive(rx) path
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -338,18 +357,23 @@ dhd_rx_frame(dhd_pub_t *dhdp, int ifidx, void *pktbuf, int numpkt, uint8 chan)
|
||||||
if (dev_ingress_queue(ifp->net)) {
|
if (dev_ingress_queue(ifp->net)) {
|
||||||
qdisc = dev_ingress_queue(ifp->net)->qdisc_sleeping;
|
qdisc = dev_ingress_queue(ifp->net)->qdisc_sleeping;
|
||||||
if (qdisc != NULL && (qdisc->flags & TCQ_F_INGRESS)) {
|
if (qdisc != NULL && (qdisc->flags & TCQ_F_INGRESS)) {
|
||||||
#ifdef CONFIG_NET_CLS_ACT
|
if (
|
||||||
|
#if defined(CONFIG_NET_XGRESS)
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0))
|
||||||
|
(ifp->net->tcx_ingress != NULL) ||
|
||||||
|
#endif /* LINUX_VERSION >= 6.6.0 */
|
||||||
|
#elif defined(CONFIG_NET_CLS_ACT)
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
|
||||||
if (ifp->net->miniq_ingress != NULL)
|
(ifp->net->miniq_ingress != NULL) ||
|
||||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0))
|
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0))
|
||||||
if (ifp->net->ingress_cl_list != NULL)
|
(ifp->net->ingress_cl_list != NULL) ||
|
||||||
#endif /* LINUX_VERSION >= 4.2.0 */
|
#endif /* LINUX_VERSION >= 4.2.0 */
|
||||||
{
|
#endif /* CONFIG_NET_CLS_ACT */
|
||||||
|
0) {
|
||||||
dhd_gro_enable = FALSE;
|
dhd_gro_enable = FALSE;
|
||||||
DHD_TRACE(("%s: disable sw gro because of"
|
DHD_TRACE(("%s: disable sw gro because of"
|
||||||
" qdisc rx traffic control\n", __FUNCTION__));
|
" qdisc rx traffic control\n", __FUNCTION__));
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_NET_CLS_ACT */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -686,7 +710,7 @@ dhd_rx_frame(dhd_pub_t *dhdp, int ifidx, void *pktbuf, int numpkt, uint8 chan)
|
||||||
#endif /* PCIE_FULL_DONGLE */
|
#endif /* PCIE_FULL_DONGLE */
|
||||||
#endif /* BCM_ROUTER_DHD */
|
#endif /* BCM_ROUTER_DHD */
|
||||||
#ifdef DHD_POST_EAPOL_M1_AFTER_ROAM_EVT
|
#ifdef DHD_POST_EAPOL_M1_AFTER_ROAM_EVT
|
||||||
if (IS_STA_IFACE(ndev_to_wdev(ifp->net)) &&
|
if ((IS_STA_IFACE(ndev_to_wdev(ifp->net)) || (IS_P2P_GC(ndev_to_wdev(ifp->net)))) &&
|
||||||
(ifp->recv_reassoc_evt == TRUE) && (ifp->post_roam_evt == FALSE) &&
|
(ifp->recv_reassoc_evt == TRUE) && (ifp->post_roam_evt == FALSE) &&
|
||||||
(dhd_is_4way_msg((char *)(skb->data)) == EAPOL_4WAY_M1)) {
|
(dhd_is_4way_msg((char *)(skb->data)) == EAPOL_4WAY_M1)) {
|
||||||
DHD_ERROR(("%s: Reassoc is in progress. "
|
DHD_ERROR(("%s: Reassoc is in progress. "
|
||||||
|
|
@ -899,10 +923,11 @@ dhd_rx_frame(dhd_pub_t *dhdp, int ifidx, void *pktbuf, int numpkt, uint8 chan)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SENDPROB
|
#ifdef SENDPROB
|
||||||
if (dhdp->wl_event_enabled ||
|
if ((dhdp->wl_event_enabled) || (WLC_E_ESCAN_RESULT == event_type) ||
|
||||||
(dhdp->recv_probereq && (event.event_type == WLC_E_PROBREQ_MSG)))
|
(dhdp->recv_probereq && (event.event_type == WLC_E_PROBREQ_MSG)))
|
||||||
#else
|
#else
|
||||||
if (dhdp->wl_event_enabled)
|
/* always send up WLC_E_ESCAN_RESULT for WL utility */
|
||||||
|
if ((dhdp->wl_event_enabled) || (WLC_E_ESCAN_RESULT == event_type))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef DHD_USE_STATIC_CTRLBUF
|
#ifdef DHD_USE_STATIC_CTRLBUF
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Expose some of the kernel scheduler routines
|
* Expose some of the kernel scheduler routines
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
21
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_sock_qos.h
Normal file → Executable file
21
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_sock_qos.h
Normal file → Executable file
|
|
@ -4,7 +4,26 @@
|
||||||
* Provides type definitions and function prototypes to call into
|
* Provides type definitions and function prototypes to call into
|
||||||
* DHD's QOS on Socket Flow module.
|
* DHD's QOS on Socket Flow module.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,26 @@
|
||||||
* Broadcom Dongle Host Driver (DHD),
|
* Broadcom Dongle Host Driver (DHD),
|
||||||
* Linux-specific network interface for transmit(tx) path
|
* Linux-specific network interface for transmit(tx) path
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -399,6 +418,16 @@ BCMFASTPATH(__dhd_sendpkt)(dhd_pub_t *dhdp, int ifidx, void *pktbuf)
|
||||||
|
|
||||||
#ifdef PROP_TXSTATUS
|
#ifdef PROP_TXSTATUS
|
||||||
if (dhd_wlfc_is_supported(dhdp)) {
|
if (dhd_wlfc_is_supported(dhdp)) {
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
|
DHD_GENERAL_LOCK(dhdp, flags);
|
||||||
|
if (ifp->del_in_progress) {
|
||||||
|
DHD_GENERAL_UNLOCK(dhdp, flags);
|
||||||
|
PKTCFREE(dhdp->osh, pktbuf, TRUE);
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
DHD_GENERAL_UNLOCK(dhdp, flags);
|
||||||
|
|
||||||
/* store the interface ID */
|
/* store the interface ID */
|
||||||
DHD_PKTTAG_SETIF(PKTTAG(pktbuf), ifidx);
|
DHD_PKTTAG_SETIF(PKTTAG(pktbuf), ifidx);
|
||||||
|
|
||||||
|
|
@ -572,13 +601,14 @@ BCMFASTPATH(dhd_start_xmit)(struct sk_buff *skb, struct net_device *net)
|
||||||
int cpuid = 0;
|
int cpuid = 0;
|
||||||
int prio = 0;
|
int prio = 0;
|
||||||
#endif /* DHD_MQ && DHD_MQ_STATS */
|
#endif /* DHD_MQ && DHD_MQ_STATS */
|
||||||
#ifndef DHD_TCP_PACING_SHIFT
|
#if defined(WL_CFG80211)
|
||||||
#if defined(BCMPCIE) && defined(DHD_VSDB_SKIP_ORPHAN)
|
|
||||||
struct bcm_cfg80211 *cfg = wl_get_cfg(net);
|
struct bcm_cfg80211 *cfg = wl_get_cfg(net);
|
||||||
#endif /* (BCMPCIE) && (DHD_VSDB_SKIP_ORPHAN) */
|
#endif /* defined(WL_CFG80211) */
|
||||||
#endif /* DHD_TCP_PACING_SHIFT */
|
|
||||||
|
|
||||||
DHD_TRACE(("%s: Enter\n", __FUNCTION__));
|
DHD_TRACE(("%s: Enter\n", __FUNCTION__));
|
||||||
|
#if defined(WL_CFG80211)
|
||||||
|
UNUSED_PARAMETER(cfg);
|
||||||
|
#endif /* defined(WL_CFG80211) */
|
||||||
|
|
||||||
#if defined(DHD_MQ) && defined(DHD_MQ_STATS)
|
#if defined(DHD_MQ) && defined(DHD_MQ_STATS)
|
||||||
qidx = skb_get_queue_mapping(skb);
|
qidx = skb_get_queue_mapping(skb);
|
||||||
|
|
@ -707,18 +737,6 @@ BCMFASTPATH(dhd_start_xmit)(struct sk_buff *skb, struct net_device *net)
|
||||||
PKTSETLEN(dhd->pub.osh, skb, length);
|
PKTSETLEN(dhd->pub.osh, skb, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TPUT_MONITOR
|
|
||||||
if (dhd->pub.conf->tput_monitor_ms) {
|
|
||||||
dhd_os_sdlock_txq(&dhd->pub);
|
|
||||||
dhd->pub.conf->net_len += PKTLEN(dhd->pub.osh, skb);
|
|
||||||
dhd_os_sdunlock_txq(&dhd->pub);
|
|
||||||
if ((dhd->pub.conf->data_drop_mode == XMIT_DROP) &&
|
|
||||||
(PKTLEN(dhd->pub.osh, skb) > 500)) {
|
|
||||||
dev_kfree_skb(skb);
|
|
||||||
return NETDEV_TX_OK;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
/* Make sure there's enough room for any header */
|
/* Make sure there's enough room for any header */
|
||||||
#if !defined(BCM_ROUTER_DHD)
|
#if !defined(BCM_ROUTER_DHD)
|
||||||
if (skb_cow(skb, (dhd->pub.hdrlen + htsfdlystat_sz))) {
|
if (skb_cow(skb, (dhd->pub.hdrlen + htsfdlystat_sz))) {
|
||||||
|
|
@ -868,9 +886,9 @@ BCMFASTPATH(dhd_start_xmit)(struct sk_buff *skb, struct net_device *net)
|
||||||
sk_pacing_shift_update(skb->sk, DHD_DEFAULT_TCP_PACING_SHIFT);
|
sk_pacing_shift_update(skb->sk, DHD_DEFAULT_TCP_PACING_SHIFT);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#if defined(BCMPCIE) && defined(DHD_VSDB_SKIP_ORPHAN)
|
#if defined(BCMPCIE) && defined(DHD_VSDB_SKIP_ORPHAN) && defined(WL_CFG80211)
|
||||||
if (!cfg->vsdb_mode)
|
if (!cfg->vsdb_mode)
|
||||||
#endif /* (BCMPCIE) && (DHD_VSDB_SKIP_ORPHAN) */
|
#endif /* (BCMPCIE) && (DHD_VSDB_SKIP_ORPHAN) && defined(WL_CFG80211) */
|
||||||
skb_orphan(skb);
|
skb_orphan(skb);
|
||||||
#endif /* LINUX_VERSION_CODE >= 4.19.0 && DHD_TCP_PACING_SHIFT */
|
#endif /* LINUX_VERSION_CODE >= 4.19.0 && DHD_TCP_PACING_SHIFT */
|
||||||
|
|
||||||
|
|
@ -1194,6 +1212,13 @@ dhd_handle_pktdata(dhd_pub_t *dhdp, int ifidx, void *pkt, uint8 *pktdata, uint32
|
||||||
if (dhd_check_icmpv6(pktdata, pktlen)) {
|
if (dhd_check_icmpv6(pktdata, pktlen)) {
|
||||||
pkt_type = PKT_TYPE_ICMPV6;
|
pkt_type = PKT_TYPE_ICMPV6;
|
||||||
}
|
}
|
||||||
|
#ifdef DHD_IPV6_DUMP
|
||||||
|
else if (dhd_check_dhcp6(pktdata, pktlen)) {
|
||||||
|
pkt_type = PKT_TYPE_DHCP6;
|
||||||
|
} else if (dhd_check_dns6(pktdata, pktlen)) {
|
||||||
|
pkt_type = PKT_TYPE_DNS6;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else if (dhd_check_arp(pktdata, ether_type)) {
|
else if (dhd_check_arp(pktdata, ether_type)) {
|
||||||
pkt_type = PKT_TYPE_ARP;
|
pkt_type = PKT_TYPE_ARP;
|
||||||
|
|
@ -1284,6 +1309,17 @@ dhd_handle_pktdata(dhd_pub_t *dhdp, int ifidx, void *pkt, uint8 *pktdata, uint32
|
||||||
case PKT_TYPE_EAP:
|
case PKT_TYPE_EAP:
|
||||||
dhd_send_supp_eap(dhdp, ifidx, pktdata, pktlen, tx, pktfate);
|
dhd_send_supp_eap(dhdp, ifidx, pktdata, pktlen, tx, pktfate);
|
||||||
break;
|
break;
|
||||||
|
#ifdef DHD_IPV6_DUMP
|
||||||
|
case PKT_TYPE_ICMPV6:
|
||||||
|
dhd_icmpv6_dump(dhdp, ifidx, pktdata, tx, &pkthash, pktfate);
|
||||||
|
break;
|
||||||
|
case PKT_TYPE_DHCP6:
|
||||||
|
dhd_dhcp6_dump(dhdp, ifidx, pktdata, tx, &pkthash, pktfate);
|
||||||
|
break;
|
||||||
|
case PKT_TYPE_DNS6:
|
||||||
|
dhd_dns6_dump(dhdp, ifidx, pktdata, tx, &pkthash, pktfate);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,26 @@
|
||||||
* Broadcom Dongle Host Driver (DHD),
|
* Broadcom Dongle Host Driver (DHD),
|
||||||
* Linux-specific network interface for transmit(tx) path
|
* Linux-specific network interface for transmit(tx) path
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,26 @@
|
||||||
* Broadcom Dongle Host Driver (DHD), Generic work queue framework
|
* Broadcom Dongle Host Driver (DHD), Generic work queue framework
|
||||||
* Generic interface to handle dhd deferred work events
|
* Generic interface to handle dhd deferred work events
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,26 @@
|
||||||
* Broadcom Dongle Host Driver (DHD), Generic work queue framework
|
* Broadcom Dongle Host Driver (DHD), Generic work queue framework
|
||||||
* Generic interface to handle dhd deferred work events
|
* Generic interface to handle dhd deferred work events
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* log_dump - debugability support for dumping logs to file
|
* log_dump - debugability support for dumping logs to file
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -1689,6 +1708,13 @@ dhd_log_dump_deinit(dhd_pub_t *dhd)
|
||||||
|
|
||||||
BCM_REFERENCE(ring);
|
BCM_REFERENCE(ring);
|
||||||
|
|
||||||
|
#if defined(DHD_EVENT_LOG_FILTER)
|
||||||
|
/* XXX deinit filter first, because filter use buffer which alloced by log dump */
|
||||||
|
if (dhd->event_log_filter) {
|
||||||
|
dhd_event_log_filter_deinit(dhd);
|
||||||
|
}
|
||||||
|
#endif /* DHD_EVENT_LOG_FILTER */
|
||||||
|
|
||||||
if (dhd->concise_dbg_buf) {
|
if (dhd->concise_dbg_buf) {
|
||||||
MFREE(dhd->osh, dhd->concise_dbg_buf, CONCISE_DUMP_BUFLEN);
|
MFREE(dhd->osh, dhd->concise_dbg_buf, CONCISE_DUMP_BUFLEN);
|
||||||
dhd->concise_dbg_buf = NULL;
|
dhd->concise_dbg_buf = NULL;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* log_dump - debugability support for dumping logs to file - header file
|
* log_dump - debugability support for dumping logs to file - header file
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -49,7 +68,7 @@
|
||||||
#define DHD_LOG_DUMP_MAX_TEMP_BUFFER_SIZE 512
|
#define DHD_LOG_DUMP_MAX_TEMP_BUFFER_SIZE 512
|
||||||
#define DHD_LOG_DUMP_MAX_TAIL_FLUSH_SIZE (80 * 1024)
|
#define DHD_LOG_DUMP_MAX_TAIL_FLUSH_SIZE (80 * 1024)
|
||||||
#define DHD_LOG_DUMP_TS_MULTIPLIER_VALUE 60
|
#define DHD_LOG_DUMP_TS_MULTIPLIER_VALUE 60
|
||||||
#define DHD_LOG_DUMP_TS_FMT_YYMMDDHHMMSSMSMS "%02d-%02d-%02d/%02d:%02d:%02d.%04lu"
|
#define DHD_LOG_DUMP_TS_FMT_YYMMDDHHMMSSMSMS "%02d%02d%02d%02d%02d%02d%04lu"
|
||||||
#define DHD_LOG_DUMP_TS_FMT_YYMMDDHHMMSS "%02d%02d%02d%02d%02d%02d"
|
#define DHD_LOG_DUMP_TS_FMT_YYMMDDHHMMSS "%02d%02d%02d%02d%02d%02d"
|
||||||
#define DHD_DEBUG_DUMP_TYPE "debug_dump"
|
#define DHD_DEBUG_DUMP_TYPE "debug_dump"
|
||||||
#define DEBUG_DUMP_TRIGGER_INTERVAL_SEC 4
|
#define DEBUG_DUMP_TRIGGER_INTERVAL_SEC 4
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* DHD debugability support
|
* DHD debugability support
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* DHD debugability header file
|
* DHD debugability header file
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,26 @@
|
||||||
* Provides type definitions and function prototypes used to link the
|
* Provides type definitions and function prototypes used to link the
|
||||||
* DHD OS, bus, and protocol modules.
|
* DHD OS, bus, and protocol modules.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -2825,6 +2844,10 @@ dhd_pktid_map_reset_ioctl(dhd_pub_t *dhd, dhd_pktid_map_handle_t *handle)
|
||||||
uint32 map_items;
|
uint32 map_items;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
|
if (handle == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
map = (dhd_pktid_map_t *)handle;
|
map = (dhd_pktid_map_t *)handle;
|
||||||
DHD_PKTID_LOCK(map->pktid_lock, flags);
|
DHD_PKTID_LOCK(map->pktid_lock, flags);
|
||||||
|
|
||||||
|
|
@ -3318,6 +3341,10 @@ dhd_pktid_map_reset(dhd_pub_t *dhd, pktlists_t *handle)
|
||||||
{
|
{
|
||||||
osl_t *osh = dhd->osh;
|
osl_t *osh = dhd->osh;
|
||||||
|
|
||||||
|
if (handle == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (handle->ctrl_pkt_list) {
|
if (handle->ctrl_pkt_list) {
|
||||||
PKTLIST_FINI(handle->ctrl_pkt_list);
|
PKTLIST_FINI(handle->ctrl_pkt_list);
|
||||||
MFREE(osh, handle->ctrl_pkt_list, sizeof(PKT_LIST));
|
MFREE(osh, handle->ctrl_pkt_list, sizeof(PKT_LIST));
|
||||||
|
|
@ -3639,7 +3666,7 @@ dhd_prot_attach(dhd_pub_t *dhd)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
prot->pktid_tx_map = DHD_NATIVE_TO_PKTID_INIT(dhd, MAX_PKTID_TX);
|
prot->pktid_tx_map = DHD_NATIVE_TO_PKTID_INIT(dhd, MAX_PKTID_TX);
|
||||||
if (prot->pktid_rx_map == NULL)
|
if (prot->pktid_tx_map == NULL)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
#ifdef IOCTLRESP_USE_CONSTMEM
|
#ifdef IOCTLRESP_USE_CONSTMEM
|
||||||
|
|
@ -5467,11 +5494,13 @@ BCMFASTPATH(dhd_prot_rxbuf_post)(dhd_pub_t *dhd, uint16 count, bool use_rsv_pkti
|
||||||
pktlen = (uint32 *)((uint8 *)pktbuf_pa + sizeof(dmaaddr_t) * prot->rx_buf_burst);
|
pktlen = (uint32 *)((uint8 *)pktbuf_pa + sizeof(dmaaddr_t) * prot->rx_buf_burst);
|
||||||
|
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
|
if (
|
||||||
|
#if defined(DHD_LB_RXP)
|
||||||
/* First try to dequeue from emergency queue which will be filled
|
/* First try to dequeue from emergency queue which will be filled
|
||||||
* during rx flow control.
|
* during rx flow control.
|
||||||
*/
|
*/
|
||||||
p = dhd_rx_emerge_dequeue(dhd);
|
((p = dhd_rx_emerge_dequeue(dhd)) == NULL) &&
|
||||||
if ((p == NULL) &&
|
#endif /* DHD_LB_RXP */
|
||||||
((p = PKTGET(dhd->osh, prot->rxbufpost_alloc_sz, FALSE)) == NULL)) {
|
((p = PKTGET(dhd->osh, prot->rxbufpost_alloc_sz, FALSE)) == NULL)) {
|
||||||
dhd->rx_pktgetfail++;
|
dhd->rx_pktgetfail++;
|
||||||
DHD_ERROR_RLMT(("%s:%d: PKTGET for rxbuf failed, rx_pktget_fail :%lu\n",
|
DHD_ERROR_RLMT(("%s:%d: PKTGET for rxbuf failed, rx_pktget_fail :%lu\n",
|
||||||
|
|
@ -6753,6 +6782,11 @@ BCMFASTPATH(dhd_prot_process_msgbuf_rxcpl)(dhd_pub_t *dhd, int ringtype, uint32
|
||||||
DHD_ERROR(("Received non 802.11 packet, "
|
DHD_ERROR(("Received non 802.11 packet, "
|
||||||
"when monitor mode is enabled\n"));
|
"when monitor mode is enabled\n"));
|
||||||
}
|
}
|
||||||
|
} else if (dhd->op_mode == DHD_FLAG_MFG_MODE &&
|
||||||
|
msg->flags & BCMPCIE_PKT_FLAGS_FRAME_802_11) {
|
||||||
|
DHD_TRACE(("Monitor disable, PKTFREE\n"));
|
||||||
|
PKTFREE(dhd->osh, pkt, TRUE);
|
||||||
|
continue;
|
||||||
#ifdef DBG_PKT_MON
|
#ifdef DBG_PKT_MON
|
||||||
} else {
|
} else {
|
||||||
if (msg->flags & BCMPCIE_PKT_FLAGS_FRAME_802_11) {
|
if (msg->flags & BCMPCIE_PKT_FLAGS_FRAME_802_11) {
|
||||||
|
|
@ -9465,10 +9499,16 @@ dhd_msgbuf_iovar_timeout_dump(dhd_pub_t *dhd)
|
||||||
g_assert_type = 2;
|
g_assert_type = 2;
|
||||||
/* use ASSERT() to trigger panic */
|
/* use ASSERT() to trigger panic */
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
#endif /* DHD_KERNEL_SCHED_DEBUG && DHD_FW_COREDUMP */
|
#endif /* DHD_KERNEL_SCHED_DEBUG && DHD_FW_COREDUMP */
|
||||||
|
|
||||||
/* Check the PCIe link status by reading intstatus register */
|
/* Check the PCIe link status by reading intstatus register */
|
||||||
|
if (!dhd || !dhd->bus || !dhd->bus->sih) {
|
||||||
|
DHD_ERROR(("%s: skip due to invalid parameter\n", __FUNCTION__));
|
||||||
|
ASSERT(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
intstatus = si_corereg(dhd->bus->sih,
|
intstatus = si_corereg(dhd->bus->sih,
|
||||||
dhd->bus->sih->buscoreidx, dhd->bus->pcie_mailbox_int, 0, 0);
|
dhd->bus->sih->buscoreidx, dhd->bus->pcie_mailbox_int, 0, 0);
|
||||||
if (intstatus == (uint32)-1) {
|
if (intstatus == (uint32)-1) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* DHD Bus Module for PCIE
|
* DHD Bus Module for PCIE
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -72,6 +91,9 @@
|
||||||
#include <bcmevent.h>
|
#include <bcmevent.h>
|
||||||
#include <dhd_config.h>
|
#include <dhd_config.h>
|
||||||
|
|
||||||
|
#if IS_ENABLED(CONFIG_PCIEASPM_ROCKCHIP_WIFI_EXTENSION)
|
||||||
|
#include <rk_dhd_pcie_linux.h>
|
||||||
|
#endif /* CONFIG_PCIEASPM_ROCKCHIP_WIFI_EXTENSION */
|
||||||
#ifdef BCM_ROUTER_DHD
|
#ifdef BCM_ROUTER_DHD
|
||||||
#include <bcmnvram.h>
|
#include <bcmnvram.h>
|
||||||
#define STR_END "END\0\0"
|
#define STR_END "END\0\0"
|
||||||
|
|
@ -184,6 +206,7 @@ extern int host_edl_support;
|
||||||
extern int qt_dngl_timeout;
|
extern int qt_dngl_timeout;
|
||||||
#endif /* BCMQT_HW */
|
#endif /* BCMQT_HW */
|
||||||
|
|
||||||
|
#define CONS_ADDR_SIGNATURE 0xac0ffee
|
||||||
/* This can be overwritten by module parameter(dma_ring_indices) defined in dhd_linux.c */
|
/* This can be overwritten by module parameter(dma_ring_indices) defined in dhd_linux.c */
|
||||||
uint dma_ring_indices = 0;
|
uint dma_ring_indices = 0;
|
||||||
/* This can be overwritten by module parameter(h2d_phase) defined in dhd_linux.c */
|
/* This can be overwritten by module parameter(h2d_phase) defined in dhd_linux.c */
|
||||||
|
|
@ -314,7 +337,8 @@ int dbushost_initvars_flash(si_t *sih, osl_t *osh, char **base, uint len);
|
||||||
static void dhdpci_bus_rte_log_time_sync_poll(dhd_bus_t *bus);
|
static void dhdpci_bus_rte_log_time_sync_poll(dhd_bus_t *bus);
|
||||||
#endif /* DHD_H2D_LOG_TIME_SYNC */
|
#endif /* DHD_H2D_LOG_TIME_SYNC */
|
||||||
|
|
||||||
#define PCI_VENDOR_ID_BROADCOM 0x14e4
|
#define PCI_VENDOR_ID_BROADCOM 0x14e4
|
||||||
|
#define PCI_VENDOR_ID_SYNAPTICS 0x1e01
|
||||||
|
|
||||||
#ifdef DHD_PCIE_NATIVE_RUNTIMEPM
|
#ifdef DHD_PCIE_NATIVE_RUNTIMEPM
|
||||||
#define MAX_D3_ACK_TIMEOUT 100
|
#define MAX_D3_ACK_TIMEOUT 100
|
||||||
|
|
@ -998,9 +1022,6 @@ int dhdpcie_bus_attach(osl_t *osh, dhd_bus_t **bus_ptr,
|
||||||
ret = BCME_NORESOURCE;
|
ret = BCME_NORESOURCE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#if defined(GET_OTP_MAC_ENABLE) || defined(GET_OTP_MODULE_NAME)
|
|
||||||
dhd_conf_get_otp(bus->dhd, bus->sih);
|
|
||||||
#endif
|
|
||||||
DHD_ERROR(("%s: making DHD_BUS_DOWN\n", __FUNCTION__));
|
DHD_ERROR(("%s: making DHD_BUS_DOWN\n", __FUNCTION__));
|
||||||
bus->dhd->busstate = DHD_BUS_DOWN;
|
bus->dhd->busstate = DHD_BUS_DOWN;
|
||||||
bus->dhd->hostrdy_after_init = TRUE;
|
bus->dhd->hostrdy_after_init = TRUE;
|
||||||
|
|
@ -1524,18 +1545,17 @@ skip_intstatus_read:
|
||||||
}
|
}
|
||||||
#endif /* DHD_FLOW_RING_STATUS_TRACE */
|
#endif /* DHD_FLOW_RING_STATUS_TRACE */
|
||||||
#if defined(PCIE_ISR_THREAD)
|
#if defined(PCIE_ISR_THREAD)
|
||||||
|
|
||||||
DHD_TRACE(("Calling dhd_bus_dpc() from %s\n", __FUNCTION__));
|
DHD_TRACE(("Calling dhd_bus_dpc() from %s\n", __FUNCTION__));
|
||||||
DHD_OS_WAKE_LOCK(bus->dhd);
|
DHD_OS_WAKE_LOCK(bus->dhd);
|
||||||
while (dhd_bus_dpc(bus));
|
while (dhd_bus_dpc(bus));
|
||||||
DHD_OS_WAKE_UNLOCK(bus->dhd);
|
DHD_OS_WAKE_UNLOCK(bus->dhd);
|
||||||
#else
|
#else // defined(PCIE_ISR_THREAD)
|
||||||
bus->dpc_sched = TRUE;
|
bus->dpc_sched = TRUE;
|
||||||
bus->isr_sched_dpc_time = OSL_LOCALTIME_NS();
|
bus->isr_sched_dpc_time = OSL_LOCALTIME_NS();
|
||||||
#ifndef NDIS
|
#ifndef NDIS
|
||||||
dhd_sched_dpc(bus->dhd); /* queue DPC now!! */
|
dhd_sched_dpc(bus->dhd); /* queue DPC now!! */
|
||||||
#endif /* !NDIS */
|
#endif /* !NDIS */
|
||||||
#endif /* defined(SDIO_ISR_THREAD) */
|
#endif /* defined(PCIE_ISR_THREAD) */
|
||||||
|
|
||||||
DHD_INTR(("%s: Exit Success DPC Queued\n", __FUNCTION__));
|
DHD_INTR(("%s: Exit Success DPC Queued\n", __FUNCTION__));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
@ -1610,7 +1630,7 @@ dhdpcie_config_check(dhd_bus_t *bus)
|
||||||
|
|
||||||
for (i = 0; i < DHDPCIE_CONFIG_CHECK_RETRY_COUNT; i++) {
|
for (i = 0; i < DHDPCIE_CONFIG_CHECK_RETRY_COUNT; i++) {
|
||||||
val = OSL_PCI_READ_CONFIG(bus->osh, PCI_CFG_VID, sizeof(uint32));
|
val = OSL_PCI_READ_CONFIG(bus->osh, PCI_CFG_VID, sizeof(uint32));
|
||||||
if ((val & 0xFFFF) == VENDOR_BROADCOM) {
|
if (((val & 0xFFFF) == VENDOR_BROADCOM) || ((val & 0xFFFF) == VENDOR_SYNAPTICS)) {
|
||||||
ret = BCME_OK;
|
ret = BCME_OK;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -2121,6 +2141,10 @@ dhdpcie_dongle_attach(dhd_bus_t *bus)
|
||||||
if (BCM4349_CHIP(chipid) || BCM4350_CHIP(chipid) || BCM4345_CHIP(chipid)) {
|
if (BCM4349_CHIP(chipid) || BCM4350_CHIP(chipid) || BCM4345_CHIP(chipid)) {
|
||||||
DHD_ERROR(("Disable CTO\n"));
|
DHD_ERROR(("Disable CTO\n"));
|
||||||
bus->cto_enable = FALSE;
|
bus->cto_enable = FALSE;
|
||||||
|
}
|
||||||
|
else if (dhd_conf_legacy_cto_chip(chipid)) {
|
||||||
|
DHD_ERROR(("Disable CTO for chip 0x%x\n", chipid));
|
||||||
|
bus->cto_enable = FALSE;
|
||||||
} else {
|
} else {
|
||||||
DHD_ERROR(("Enable CTO\n"));
|
DHD_ERROR(("Enable CTO\n"));
|
||||||
bus->cto_enable = TRUE;
|
bus->cto_enable = TRUE;
|
||||||
|
|
@ -2151,7 +2175,7 @@ dhdpcie_dongle_attach(dhd_bus_t *bus)
|
||||||
|
|
||||||
/* Checking PCIe bus status with reading configuration space */
|
/* Checking PCIe bus status with reading configuration space */
|
||||||
val = OSL_PCI_READ_CONFIG(osh, PCI_CFG_VID, sizeof(uint32));
|
val = OSL_PCI_READ_CONFIG(osh, PCI_CFG_VID, sizeof(uint32));
|
||||||
if ((val & 0xFFFF) != VENDOR_BROADCOM) {
|
if (((val & 0xFFFF) != VENDOR_BROADCOM) && ((val & 0xFFFF) != VENDOR_SYNAPTICS)) {
|
||||||
DHD_ERROR(("%s : failed to read PCI configuration space!\n", __FUNCTION__));
|
DHD_ERROR(("%s : failed to read PCI configuration space!\n", __FUNCTION__));
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
@ -2380,6 +2404,7 @@ dhdpcie_dongle_attach(dhd_bus_t *bus)
|
||||||
break;
|
break;
|
||||||
case BCM4358_CHIP_ID:
|
case BCM4358_CHIP_ID:
|
||||||
case BCM4354_CHIP_ID:
|
case BCM4354_CHIP_ID:
|
||||||
|
case BCM4356_CHIP_ID:
|
||||||
case BCM43567_CHIP_ID:
|
case BCM43567_CHIP_ID:
|
||||||
case BCM43569_CHIP_ID:
|
case BCM43569_CHIP_ID:
|
||||||
case BCM4350_CHIP_ID:
|
case BCM4350_CHIP_ID:
|
||||||
|
|
@ -4279,6 +4304,78 @@ dhdpcie_download_code_file(struct dhd_bus *bus, char *pfw_path)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if defined(DHD_DEBUG) && defined(DHD_FW_MEM_CORRUPTION)
|
||||||
|
/* Upload and compare the downloaded code */
|
||||||
|
{
|
||||||
|
unsigned char *ulblock = NULL;
|
||||||
|
unsigned int uploded_len;
|
||||||
|
read_len = 0;
|
||||||
|
uploded_len = 0;
|
||||||
|
bcmerror = BCME_ERROR;
|
||||||
|
ulblock = MALLOC(bus->dhd->osh, MEMBLOCK);
|
||||||
|
if (ulblock == NULL)
|
||||||
|
goto upload_err;
|
||||||
|
/* Close and re-open the image file to reset the file pointer.
|
||||||
|
*/
|
||||||
|
dhd_os_close_image1(bus->dhd, imgbuf);
|
||||||
|
imgbuf = dhd_os_open_image1(bus->dhd, pfw_path);
|
||||||
|
if (imgbuf == NULL) {
|
||||||
|
goto upload_err;
|
||||||
|
}
|
||||||
|
/* Upload image to verify downloaded contents. */
|
||||||
|
offset = bus->dongle_ram_base;
|
||||||
|
offset_end = offset + bus->ramsize;
|
||||||
|
/* Upload image with MEMBLOCK size */
|
||||||
|
while ((len = dhd_os_get_image_block((char*)memptr, MEMBLOCK, imgbuf))) {
|
||||||
|
if (len < 0) {
|
||||||
|
DHD_ERROR(("%s: dhd_os_get_image_block failed (%d)\n", __FUNCTION__, len));
|
||||||
|
bcmerror = BCME_ERROR;
|
||||||
|
goto upload_err;
|
||||||
|
}
|
||||||
|
|
||||||
|
read_len += len;
|
||||||
|
if (read_len > file_size) {
|
||||||
|
DHD_ERROR(("%s: WARNING! reading beyond EOF, len=%d; read_len=%u;"
|
||||||
|
" file_size=%u truncating len to %d \n", __FUNCTION__,
|
||||||
|
len, read_len, file_size, (len - (read_len - file_size))));
|
||||||
|
len -= (read_len - file_size);
|
||||||
|
}
|
||||||
|
memset(ulblock, 0xaa, MEMBLOCK);
|
||||||
|
bcmerror = dhdpcie_bus_membytes(bus, FALSE, offset,
|
||||||
|
(uint8 *)ulblock, len);
|
||||||
|
if (bcmerror) {
|
||||||
|
DHD_ERROR(("%s: error %d on reading %d membytes at 0x%08x\n",
|
||||||
|
__FUNCTION__, bcmerror, len, offset));
|
||||||
|
goto upload_err;
|
||||||
|
}
|
||||||
|
if (memcmp(memptr, ulblock, len)) {
|
||||||
|
DHD_ERROR(("%s: Downloaded image is corrupted! \n",
|
||||||
|
__FUNCTION__));
|
||||||
|
bcmerror = BCME_ERROR;
|
||||||
|
goto upload_err;
|
||||||
|
}
|
||||||
|
|
||||||
|
uploded_len += len;
|
||||||
|
offset += MEMBLOCK;
|
||||||
|
|
||||||
|
if (offset >= offset_end) {
|
||||||
|
DHD_ERROR(("%s: invalid address access to %x (offset end: %x)\n",
|
||||||
|
__FUNCTION__, offset, offset_end));
|
||||||
|
bcmerror = BCME_ERROR;
|
||||||
|
goto upload_err;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (read_len >= file_size) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
DHD_ERROR(("%s: Download, Upload and compare succeeded.\n", __FUNCTION__));
|
||||||
|
|
||||||
|
upload_err:
|
||||||
|
if (ulblock)
|
||||||
|
MFREE(bus->dhd->osh, ulblock, MEMBLOCK);
|
||||||
|
}
|
||||||
|
#endif /* DHD_DEBUG && DHD_FW_MEM_CORRUPTION */
|
||||||
err:
|
err:
|
||||||
if (memblock) {
|
if (memblock) {
|
||||||
MFREE(bus->dhd->osh, memblock, MEMBLOCK + DHD_SDALIGN);
|
MFREE(bus->dhd->osh, memblock, MEMBLOCK + DHD_SDALIGN);
|
||||||
|
|
@ -4811,10 +4908,6 @@ _dhdpcie_download_firmware(struct dhd_bus *bus)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CHIPID(bus->sih->chip) == BCM43711_CHIP_ID) {
|
|
||||||
si_pmu_43711a0_pll_war(bus->sih);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Take arm out of reset */
|
/* Take arm out of reset */
|
||||||
if (dhdpcie_bus_download_state(bus, FALSE)) {
|
if (dhdpcie_bus_download_state(bus, FALSE)) {
|
||||||
DHD_ERROR(("%s: error getting out of ARM core reset\n", __FUNCTION__));
|
DHD_ERROR(("%s: error getting out of ARM core reset\n", __FUNCTION__));
|
||||||
|
|
@ -5004,6 +5097,26 @@ exit:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void dhdpcie_force_console_dump(dhd_bus_t *bus)
|
||||||
|
{
|
||||||
|
uint32 cons_sign = 0;
|
||||||
|
uint32 cons_addr = 0;
|
||||||
|
uint32 val = 0;
|
||||||
|
|
||||||
|
cons_sign = bus->dongle_ram_base + bus->ramsize - 12;
|
||||||
|
|
||||||
|
val = LTOH32(dhdpcie_bus_rtcm32(bus, cons_sign));
|
||||||
|
|
||||||
|
if (val == CONS_ADDR_SIGNATURE) {
|
||||||
|
cons_addr = bus->dongle_ram_base + bus->ramsize - 8;
|
||||||
|
val = LTOH32(dhdpcie_bus_rtcm32(bus, cons_addr));
|
||||||
|
bus->console_addr = val;
|
||||||
|
dhd_msg_level |= DHD_FWLOG_VAL;
|
||||||
|
dhdpcie_bus_readconsole(bus);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dhdpcie_schedule_log_dump(dhd_bus_t *bus)
|
dhdpcie_schedule_log_dump(dhd_bus_t *bus)
|
||||||
{
|
{
|
||||||
|
|
@ -5861,9 +5974,6 @@ BCMFASTPATH(dhd_bus_schedule_queue)(struct dhd_bus *bus, uint16 flow_id, bool t
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
void *txp = NULL;
|
void *txp = NULL;
|
||||||
flow_queue_t *queue;
|
flow_queue_t *queue;
|
||||||
#ifdef TPUT_MONITOR
|
|
||||||
int pktlen;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
queue = &flow_ring_node->queue; /* queue associated with flow ring */
|
queue = &flow_ring_node->queue; /* queue associated with flow ring */
|
||||||
|
|
||||||
|
|
@ -5908,12 +6018,6 @@ BCMFASTPATH(dhd_bus_schedule_queue)(struct dhd_bus *bus, uint16 flow_id, bool t
|
||||||
/* Attempt to transfer packet over flow ring */
|
/* Attempt to transfer packet over flow ring */
|
||||||
/* XXX: ifidx is wrong */
|
/* XXX: ifidx is wrong */
|
||||||
++cnt;
|
++cnt;
|
||||||
#ifdef TPUT_MONITOR
|
|
||||||
pktlen = PKTLEN(OSH_NULL, txp);
|
|
||||||
if ((bus->dhd->conf->data_drop_mode == TXPKT_DROP) && (pktlen > 500))
|
|
||||||
ret = BCME_OK;
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
ret = dhd_prot_txdata(bus->dhd, txp, flow_ring_node->flow_info.ifindex);
|
ret = dhd_prot_txdata(bus->dhd, txp, flow_ring_node->flow_info.ifindex);
|
||||||
if (ret != BCME_OK) { /* may not have resources in flow ring */
|
if (ret != BCME_OK) { /* may not have resources in flow ring */
|
||||||
DHD_INFO(("%s: Reinserrt %d\n", __FUNCTION__, ret));
|
DHD_INFO(("%s: Reinserrt %d\n", __FUNCTION__, ret));
|
||||||
|
|
@ -7712,6 +7816,13 @@ dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag)
|
||||||
dhdpcie_bus_intr_disable(bus);
|
dhdpcie_bus_intr_disable(bus);
|
||||||
dhdpcie_free_irq(bus);
|
dhdpcie_free_irq(bus);
|
||||||
}
|
}
|
||||||
|
#if IS_ENABLED(CONFIG_PCIEASPM_ROCKCHIP_WIFI_EXTENSION)
|
||||||
|
if (!rk_dhd_bus_pcie_wait_for_l1ss(bus)) {
|
||||||
|
DHD_ERROR(("%s: wait for l1ss success\n", __FUNCTION__));
|
||||||
|
} else {
|
||||||
|
DHD_ERROR(("%s: wait for l1ss failed\n", __FUNCTION__));
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_PCIEASPM_ROCKCHIP_WIFI_EXTENSION */
|
||||||
dhd_deinit_bus_lp_state_lock(bus);
|
dhd_deinit_bus_lp_state_lock(bus);
|
||||||
dhd_deinit_bar1_switch_lock(bus);
|
dhd_deinit_bar1_switch_lock(bus);
|
||||||
dhd_deinit_backplane_access_lock(bus);
|
dhd_deinit_backplane_access_lock(bus);
|
||||||
|
|
@ -13103,7 +13214,8 @@ BCMFASTPATH(dhd_bus_dpc)(struct dhd_bus *bus)
|
||||||
INTR_ON:
|
INTR_ON:
|
||||||
#endif /* DHD_READ_INTSTATUS_IN_DPC */
|
#endif /* DHD_READ_INTSTATUS_IN_DPC */
|
||||||
bus->dpc_exit_time = OSL_LOCALTIME_NS();
|
bus->dpc_exit_time = OSL_LOCALTIME_NS();
|
||||||
bus->dpc_time_usec = DIV_U64_BY_U64((bus->dpc_exit_time - bus->dpc_entry_time), NSEC_PER_USEC);
|
bus->dpc_time_usec = DIV_U64_BY_U64((bus->dpc_exit_time - bus->dpc_entry_time),
|
||||||
|
NSEC_PER_USEC);
|
||||||
if (!dhd_query_bus_erros(bus->dhd)) {
|
if (!dhd_query_bus_erros(bus->dhd)) {
|
||||||
/* Due to irq mismatch WARNING in linux, currently keeping it disabled and
|
/* Due to irq mismatch WARNING in linux, currently keeping it disabled and
|
||||||
* using dongle intmask to control INTR enable/disable
|
* using dongle intmask to control INTR enable/disable
|
||||||
|
|
@ -13119,7 +13231,8 @@ INTR_ON:
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
bus->resched_dpc_time = OSL_LOCALTIME_NS();
|
bus->resched_dpc_time = OSL_LOCALTIME_NS();
|
||||||
bus->dpc_time_usec = DIV_U64_BY_U64((bus->resched_dpc_time - bus->dpc_entry_time), NSEC_PER_USEC);
|
bus->dpc_time_usec = DIV_U64_BY_U64((bus->resched_dpc_time - bus->dpc_entry_time),
|
||||||
|
NSEC_PER_USEC);
|
||||||
}
|
}
|
||||||
dhd_histo_update(bus->dhd, bus->dpc_time_histo, (uint32)bus->dpc_time_usec);
|
dhd_histo_update(bus->dhd, bus->dpc_time_histo, (uint32)bus->dpc_time_usec);
|
||||||
|
|
||||||
|
|
@ -14555,6 +14668,7 @@ int dhd_bus_init(dhd_pub_t *dhdp, bool enforce_mutex)
|
||||||
ret = dhdpcie_readshared(bus);
|
ret = dhdpcie_readshared(bus);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
DHD_ERROR(("%s :Shared area read failed \n", __FUNCTION__));
|
DHD_ERROR(("%s :Shared area read failed \n", __FUNCTION__));
|
||||||
|
dhdpcie_force_console_dump(bus);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -14632,7 +14746,7 @@ dhdpcie_init_shared_addr(dhd_bus_t *bus)
|
||||||
bool
|
bool
|
||||||
dhdpcie_chipmatch(uint16 vendor, uint16 device)
|
dhdpcie_chipmatch(uint16 vendor, uint16 device)
|
||||||
{
|
{
|
||||||
if (vendor != PCI_VENDOR_ID_BROADCOM) {
|
if ((vendor != PCI_VENDOR_ID_BROADCOM) && (vendor != PCI_VENDOR_ID_SYNAPTICS)) {
|
||||||
DHD_ERROR(("%s: Unsupported vendor %x device %x\n", __FUNCTION__,
|
DHD_ERROR(("%s: Unsupported vendor %x device %x\n", __FUNCTION__,
|
||||||
vendor, device));
|
vendor, device));
|
||||||
return (-ENODEV);
|
return (-ENODEV);
|
||||||
|
|
@ -14752,7 +14866,12 @@ dhdpcie_chipmatch(uint16 vendor, uint16 device)
|
||||||
case BCM43752_CHIP_ID:
|
case BCM43752_CHIP_ID:
|
||||||
case BCM43756_D11AX_ID:
|
case BCM43756_D11AX_ID:
|
||||||
case BCM43756_CHIP_ID:
|
case BCM43756_CHIP_ID:
|
||||||
|
case BCM43756E_D11AX6E_ID:
|
||||||
|
case BCM43756E_D11AC_ID:
|
||||||
|
case BCM43756E_D11AX_ID:
|
||||||
case BCM43711_CHIP_ID:
|
case BCM43711_CHIP_ID:
|
||||||
|
case BCM43711_D11AX6E_ID:
|
||||||
|
case BCM43711_D11AC_ID:
|
||||||
case BCM43711_D11AX_ID:
|
case BCM43711_D11AX_ID:
|
||||||
case BCM4381_CHIP_ID:
|
case BCM4381_CHIP_ID:
|
||||||
case BCM4381_D11AX_ID:
|
case BCM4381_D11AX_ID:
|
||||||
|
|
@ -17798,6 +17917,12 @@ dhd_pcie_dma_info_dump(dhd_pub_t *dhd)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
dhd_pcie_check_lps_d3_acked(dhd_pub_t *dhd)
|
||||||
|
{
|
||||||
|
return DHD_CHK_BUS_LPS_D3_ACKED(dhd->bus);
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
dhd_pcie_dump_int_regs(dhd_pub_t *dhd)
|
dhd_pcie_dump_int_regs(dhd_pub_t *dhd)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Linux DHD Bus Module for PCIE
|
* Linux DHD Bus Module for PCIE
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -810,11 +829,6 @@ extern void dhd_bus_doorbell_timeout_reset(struct dhd_bus *bus);
|
||||||
#define DHD_PCIE_DMA_MASK_FOR_GS101 36
|
#define DHD_PCIE_DMA_MASK_FOR_GS101 36
|
||||||
#endif /* DHD_SET_PCIE_DMA_MASK_FOR_GS101 */
|
#endif /* DHD_SET_PCIE_DMA_MASK_FOR_GS101 */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_TEGRA
|
|
||||||
extern int tegra_pcie_pm_suspend(void);
|
|
||||||
extern int tegra_pcie_pm_resume(void);
|
|
||||||
#endif /* CONFIG_ARCH_TEGRA */
|
|
||||||
|
|
||||||
extern int dhd_buzzz_dump_dngl(dhd_bus_t *bus);
|
extern int dhd_buzzz_dump_dngl(dhd_bus_t *bus);
|
||||||
#ifdef IDLE_TX_FLOW_MGMT
|
#ifdef IDLE_TX_FLOW_MGMT
|
||||||
extern int dhd_bus_flow_ring_resume_request(struct dhd_bus *bus, void *arg);
|
extern int dhd_bus_flow_ring_resume_request(struct dhd_bus *bus, void *arg);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Linux DHD Bus Module for PCIE
|
* Linux DHD Bus Module for PCIE
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -47,9 +66,9 @@
|
||||||
#include <pcicfg.h>
|
#include <pcicfg.h>
|
||||||
#include <dhd_pcie.h>
|
#include <dhd_pcie.h>
|
||||||
#include <dhd_linux.h>
|
#include <dhd_linux.h>
|
||||||
#if defined(CUSTOMER_HW_ROCKCHIP) && defined(CUSTOMER_HW_ROCKCHIP_RK3588)
|
#if defined(CUSTOMER_HW_ROCKCHIP) && IS_ENABLED(CONFIG_PCIEASPM_ROCKCHIP_WIFI_EXTENSION)
|
||||||
#include <rk_dhd_pcie_linux.h>
|
#include <rk_dhd_pcie_linux.h>
|
||||||
#endif /* CUSTOMER_HW_ROCKCHIP && CUSTOMER_HW_ROCKCHIP_RK3588 */
|
#endif /* CUSTOMER_HW_ROCKCHIP && CONFIG_PCIEASPM_ROCKCHIP_WIFI_EXTENSION */
|
||||||
#ifdef OEM_ANDROID
|
#ifdef OEM_ANDROID
|
||||||
#ifdef CONFIG_ARCH_MSM
|
#ifdef CONFIG_ARCH_MSM
|
||||||
#if IS_ENABLED(CONFIG_PCI_MSM) || defined(CONFIG_ARCH_MSM8996)
|
#if IS_ENABLED(CONFIG_PCI_MSM) || defined(CONFIG_ARCH_MSM8996)
|
||||||
|
|
@ -87,6 +106,10 @@
|
||||||
|
|
||||||
#include <dhd_plat.h>
|
#include <dhd_plat.h>
|
||||||
|
|
||||||
|
#if defined(CUSTOMER_HW_ROCKCHIP) && defined(CONFIG_ARCH_ROCKCHIP)
|
||||||
|
#include <linux/aspm_ext.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define PCI_CFG_RETRY 10 /* PR15065: retry count for pci cfg accesses */
|
#define PCI_CFG_RETRY 10 /* PR15065: retry count for pci cfg accesses */
|
||||||
#define OS_HANDLE_MAGIC 0x1234abcd /* Magic # to recognize osh */
|
#define OS_HANDLE_MAGIC 0x1234abcd /* Magic # to recognize osh */
|
||||||
#define BCM_MEM_FILENAME_LEN 24 /* Mem. filename length */
|
#define BCM_MEM_FILENAME_LEN 24 /* Mem. filename length */
|
||||||
|
|
@ -107,6 +130,10 @@ unsigned char gpio_direction = 0;
|
||||||
#define BCMPCI_DEV_ID PCI_ANY_ID
|
#define BCMPCI_DEV_ID PCI_ANY_ID
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef SYNAPCI_DEV_ID
|
||||||
|
#define SYNAPCI_DEV_ID PCI_ANY_ID
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef FORCE_TPOWERON
|
#ifdef FORCE_TPOWERON
|
||||||
extern uint32 tpoweron_scale;
|
extern uint32 tpoweron_scale;
|
||||||
#endif /* FORCE_TPOWERON */
|
#endif /* FORCE_TPOWERON */
|
||||||
|
|
@ -225,6 +252,17 @@ static struct pci_device_id dhdpcie_pci_devid[] __devinitdata = {
|
||||||
driver_data: 0,
|
driver_data: 0,
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))
|
||||||
override_only: 0,
|
override_only: 0,
|
||||||
|
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) */
|
||||||
|
},
|
||||||
|
{ vendor: VENDOR_SYNAPTICS,
|
||||||
|
device: BCMPCI_DEV_ID,
|
||||||
|
subvendor: PCI_ANY_ID,
|
||||||
|
subdevice: PCI_ANY_ID,
|
||||||
|
class: PCI_CLASS_NETWORK_OTHER << 8,
|
||||||
|
class_mask: 0xffff00,
|
||||||
|
driver_data: 0,
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))
|
||||||
|
override_only: 0,
|
||||||
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) */
|
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) */
|
||||||
},
|
},
|
||||||
#if (BCMPCI_DEV_ID != PCI_ANY_ID) && defined(BCMPCI_NOOTP_DEV_ID)
|
#if (BCMPCI_DEV_ID != PCI_ANY_ID) && defined(BCMPCI_NOOTP_DEV_ID)
|
||||||
|
|
@ -265,7 +303,9 @@ static const struct dev_pm_ops dhd_pcie_pm_ops = {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct pci_driver dhdpcie_driver = {
|
static struct pci_driver dhdpcie_driver = {
|
||||||
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0))
|
||||||
node: {&dhdpcie_driver.node, &dhdpcie_driver.node},
|
node: {&dhdpcie_driver.node, &dhdpcie_driver.node},
|
||||||
|
#endif /* LINUX_VERSION_CODE < 6.8.0 */
|
||||||
name: "pcieh"BUS_TYPE,
|
name: "pcieh"BUS_TYPE,
|
||||||
id_table: dhdpcie_pci_devid,
|
id_table: dhdpcie_pci_devid,
|
||||||
probe: dhdpcie_pci_probe,
|
probe: dhdpcie_pci_probe,
|
||||||
|
|
@ -626,17 +666,15 @@ dhd_bus_is_rc_ep_l1ss_capable(dhd_bus_t *bus)
|
||||||
uint32 rc_l1ss_cap;
|
uint32 rc_l1ss_cap;
|
||||||
uint32 ep_l1ss_cap;
|
uint32 ep_l1ss_cap;
|
||||||
|
|
||||||
#if defined(CUSTOMER_HW_ROCKCHIP) && defined(CUSTOMER_HW_ROCKCHIP_RK3588)
|
#if defined(CUSTOMER_HW_ROCKCHIP) && IS_ENABLED(CONFIG_PCIEASPM_ROCKCHIP_WIFI_EXTENSION)
|
||||||
if (IS_ENABLED(CONFIG_PCIEASPM_ROCKCHIP_WIFI_EXTENSION)) {
|
if (rk_dhd_bus_is_rc_ep_l1ss_capable(bus)) {
|
||||||
if (rk_dhd_bus_is_rc_ep_l1ss_capable(bus)) {
|
DHD_ERROR(("%s L1ss is capable\n", __FUNCTION__));
|
||||||
DHD_ERROR(("%s L1ss is capable\n", __FUNCTION__));
|
return TRUE;
|
||||||
return TRUE;
|
} else {
|
||||||
} else {
|
DHD_ERROR(("%s L1ss is not capable\n", __FUNCTION__));
|
||||||
DHD_ERROR(("%s L1ss is not capable\n", __FUNCTION__));
|
return FALSE;
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif /* CUSTOMER_HW_ROCKCHIP && CUSTOMER_HW_ROCKCHIP_RK3588 */
|
#endif /* CUSTOMER_HW_ROCKCHIP && CONFIG_PCIEASPM_ROCKCHIP_WIFI_EXTENSION */
|
||||||
|
|
||||||
/* RC Extendend Capacility */
|
/* RC Extendend Capacility */
|
||||||
rc_l1ss_cap = dhdpcie_access_cap(bus->rc_dev, PCIE_EXTCAP_ID_L1SS,
|
rc_l1ss_cap = dhdpcie_access_cap(bus->rc_dev, PCIE_EXTCAP_ID_L1SS,
|
||||||
|
|
@ -750,7 +788,8 @@ static int dhdpcie_pci_suspend(struct device *dev)
|
||||||
if ((timeleft == 0) || (timeleft == 1)) {
|
if ((timeleft == 0) || (timeleft == 1)) {
|
||||||
DHD_ERROR(("%s: Timed out dhd_bus_busy_state=0x%x\n",
|
DHD_ERROR(("%s: Timed out dhd_bus_busy_state=0x%x\n",
|
||||||
__FUNCTION__, bus->dhd->dhd_bus_busy_state));
|
__FUNCTION__, bus->dhd->dhd_bus_busy_state));
|
||||||
return -EBUSY;
|
ret = -EBUSY;
|
||||||
|
goto exit;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DHD_BUS_BUSY_SET_SUSPEND_IN_PROGRESS(bus->dhd);
|
DHD_BUS_BUSY_SET_SUSPEND_IN_PROGRESS(bus->dhd);
|
||||||
|
|
@ -764,6 +803,7 @@ static int dhdpcie_pci_suspend(struct device *dev)
|
||||||
if (!bus->dhd->dongle_reset)
|
if (!bus->dhd->dongle_reset)
|
||||||
ret = dhdpcie_set_suspend_resume(bus, TRUE);
|
ret = dhdpcie_set_suspend_resume(bus, TRUE);
|
||||||
|
|
||||||
|
exit:
|
||||||
DHD_GENERAL_LOCK(bus->dhd, flags);
|
DHD_GENERAL_LOCK(bus->dhd, flags);
|
||||||
DHD_BUS_BUSY_CLEAR_SUSPEND_IN_PROGRESS(bus->dhd);
|
DHD_BUS_BUSY_CLEAR_SUSPEND_IN_PROGRESS(bus->dhd);
|
||||||
dhd_os_busbusy_wake(bus->dhd);
|
dhd_os_busbusy_wake(bus->dhd);
|
||||||
|
|
@ -1427,13 +1467,13 @@ static int dhdpcie_device_scan(struct device *dev, void *data)
|
||||||
pcidev = container_of(dev, struct pci_dev, dev);
|
pcidev = container_of(dev, struct pci_dev, dev);
|
||||||
GCC_DIAGNOSTIC_POP();
|
GCC_DIAGNOSTIC_POP();
|
||||||
|
|
||||||
if (pcidev->vendor != 0x14e4)
|
if ((pcidev->vendor != VENDOR_BROADCOM) && (pcidev->vendor != VENDOR_SYNAPTICS))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
DHD_INFO(("Found Broadcom PCI device 0x%04x\n", pcidev->device));
|
DHD_INFO(("Found Broadcom or Synaptics PCI device 0x%04x\n", pcidev->device));
|
||||||
*cnt += 1;
|
*cnt += 1;
|
||||||
if (pcidev->driver && strcmp(pcidev->driver->name, dhdpcie_driver.name))
|
if (pcidev->driver && strcmp(pcidev->driver->name, dhdpcie_driver.name))
|
||||||
DHD_ERROR(("Broadcom PCI Device 0x%04x has allocated with driver %s\n",
|
DHD_ERROR(("Broadcom or Synaptics PCI Device 0x%04x has allocated with driver %s\n",
|
||||||
pcidev->device, pcidev->driver->name));
|
pcidev->device, pcidev->driver->name));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -1447,7 +1487,7 @@ dhdpcie_bus_register(void)
|
||||||
if (!(error = pci_register_driver(&dhdpcie_driver))) {
|
if (!(error = pci_register_driver(&dhdpcie_driver))) {
|
||||||
bus_for_each_dev(dhdpcie_driver.driver.bus, NULL, &error, dhdpcie_device_scan);
|
bus_for_each_dev(dhdpcie_driver.driver.bus, NULL, &error, dhdpcie_device_scan);
|
||||||
if (!error) {
|
if (!error) {
|
||||||
DHD_ERROR(("No Broadcom PCI device enumerated!\n"));
|
DHD_ERROR(("No Broadcom or Synaptics PCI device enumerated!\n"));
|
||||||
#ifdef DHD_PRELOAD
|
#ifdef DHD_PRELOAD
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -2382,11 +2422,10 @@ dhdpcie_start_host_dev(dhd_bus_t *bus)
|
||||||
ret = msm_pcie_pm_control(MSM_PCIE_RESUME, bus->dev->bus->number,
|
ret = msm_pcie_pm_control(MSM_PCIE_RESUME, bus->dev->bus->number,
|
||||||
bus->dev, NULL, 0);
|
bus->dev, NULL, 0);
|
||||||
#endif /* CONFIG_ARCH_MSM */
|
#endif /* CONFIG_ARCH_MSM */
|
||||||
#ifdef CONFIG_ARCH_TEGRA
|
#if defined(CUSTOMER_HW_ROCKCHIP) && defined(CONFIG_ARCH_ROCKCHIP)
|
||||||
#ifndef CONFIG_ARCH_TEGRA_210_SOC
|
if (bus->rc_dev)
|
||||||
ret = tegra_pcie_pm_resume();
|
ret = rockchip_dw_pcie_pm_ctrl_for_user(bus->rc_dev, ROCKCHIP_PCIE_PM_CTRL_RESET);
|
||||||
#endif /* CONFIG_ARCH_TEGRA_210_SOC */
|
#endif /* CUSTOMER_HW_ROCKCHIP && CONFIG_ARCH_ROCKCHIP */
|
||||||
#endif /* CONFIG_ARCH_TEGRA */
|
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
DHD_ERROR(("%s Failed to bring up PCIe link\n", __FUNCTION__));
|
DHD_ERROR(("%s Failed to bring up PCIe link\n", __FUNCTION__));
|
||||||
|
|
@ -2421,11 +2460,6 @@ dhdpcie_stop_host_dev(dhd_bus_t *bus)
|
||||||
ret = msm_pcie_pm_control(MSM_PCIE_SUSPEND, bus->dev->bus->number,
|
ret = msm_pcie_pm_control(MSM_PCIE_SUSPEND, bus->dev->bus->number,
|
||||||
bus->dev, NULL, 0);
|
bus->dev, NULL, 0);
|
||||||
#endif /* CONFIG_ARCH_MSM */
|
#endif /* CONFIG_ARCH_MSM */
|
||||||
#ifdef CONFIG_ARCH_TEGRA
|
|
||||||
#ifndef CONFIG_ARCH_TEGRA_210_SOC
|
|
||||||
ret = tegra_pcie_pm_suspend();
|
|
||||||
#endif /* CONFIG_ARCH_TEGRA_210_SOC */
|
|
||||||
#endif /* CONFIG_ARCH_TEGRA */
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
DHD_ERROR(("Failed to stop PCIe link\n"));
|
DHD_ERROR(("Failed to stop PCIe link\n"));
|
||||||
goto done;
|
goto done;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* DHD debugability packet logging support
|
* DHD debugability packet logging support
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -33,6 +52,9 @@
|
||||||
#include <dhd_pktlog.h>
|
#include <dhd_pktlog.h>
|
||||||
#include <dhd_wlfc.h>
|
#include <dhd_wlfc.h>
|
||||||
#include <dhd_debug.h>
|
#include <dhd_debug.h>
|
||||||
|
#ifdef LINUX
|
||||||
|
#include <linux/vmalloc.h>
|
||||||
|
#endif /* LINUX */
|
||||||
|
|
||||||
#ifdef DHD_COMPACT_PKT_LOG
|
#ifdef DHD_COMPACT_PKT_LOG
|
||||||
#include <bcmip.h>
|
#include <bcmip.h>
|
||||||
|
|
@ -871,10 +893,12 @@ dhd_pktlog_filter_add(dhd_pktlog_filter_t *filter, char *arg)
|
||||||
return BCME_ERROR;
|
return BCME_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
prhex("mask", (char *)&filter->info[filter->list_cnt].mask[0],
|
if (dhd_msg_level & DHD_INFO_VAL) {
|
||||||
mask_size);
|
prhex("mask", (char *)&filter->info[filter->list_cnt].mask[0],
|
||||||
prhex("pattern", (char *)&filter->info[filter->list_cnt].pattern[0],
|
mask_size);
|
||||||
pattern_size);
|
prhex("pattern", (char *)&filter->info[filter->list_cnt].pattern[0],
|
||||||
|
pattern_size);
|
||||||
|
}
|
||||||
|
|
||||||
if (mask_size != pattern_size) {
|
if (mask_size != pattern_size) {
|
||||||
DHD_ERROR(("%s(): Mask and pattern not the same size\n", __FUNCTION__));
|
DHD_ERROR(("%s(): Mask and pattern not the same size\n", __FUNCTION__));
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* DHD debugability packet logging header file
|
* DHD debugability packet logging header file
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* DHD Linux platform header file
|
* DHD Linux platform header file
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,26 @@
|
||||||
* Broadcom Dongle Host Driver (DHD)
|
* Broadcom Dongle Host Driver (DHD)
|
||||||
* Prefered Network Offload and Wi-Fi Location Service(WLS) code.
|
* Prefered Network Offload and Wi-Fi Location Service(WLS) code.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -803,7 +822,7 @@ _dhd_pno_get_channels(dhd_pub_t *dhd, uint16 *d_chan_list,
|
||||||
}
|
}
|
||||||
for (i = 0, j = 0; i < dtoh32(list->count) && i < *nchan; i++) {
|
for (i = 0, j = 0; i < dtoh32(list->count) && i < *nchan; i++) {
|
||||||
if (IS_2G_CHANNEL(dtoh32(list->element[i]))) {
|
if (IS_2G_CHANNEL(dtoh32(list->element[i]))) {
|
||||||
if (!(band & WLC_BAND_2G)) {
|
if (!(band & WLC_BAND_2G) && !(band & WLC_BAND_AUTO)) {
|
||||||
/* Skip, if not 2g */
|
/* Skip, if not 2g */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -811,7 +830,7 @@ _dhd_pno_get_channels(dhd_pub_t *dhd, uint16 *d_chan_list,
|
||||||
} else if (IS_5G_CHANNEL(dtoh32(list->element[i]))) {
|
} else if (IS_5G_CHANNEL(dtoh32(list->element[i]))) {
|
||||||
bool dfs_channel = is_dfs(dhd, dtoh32(list->element[i]));
|
bool dfs_channel = is_dfs(dhd, dtoh32(list->element[i]));
|
||||||
if ((skip_dfs && dfs_channel) ||
|
if ((skip_dfs && dfs_channel) ||
|
||||||
(!(band & WLC_BAND_5G) && !dfs_channel)) {
|
(!(band & WLC_BAND_5G) && !(band & WLC_BAND_AUTO) && !dfs_channel)) {
|
||||||
/* Skip the channel if:
|
/* Skip the channel if:
|
||||||
* the DFS bit is NOT set & the channel is a dfs channel
|
* the DFS bit is NOT set & the channel is a dfs channel
|
||||||
* the band 5G is not set & the channel is a non DFS 5G channel
|
* the band 5G is not set & the channel is a non DFS 5G channel
|
||||||
|
|
@ -1021,13 +1040,13 @@ _dhd_pno_cfg(dhd_pub_t *dhd, uint16 *channel_list, int nchan)
|
||||||
int i = 0;
|
int i = 0;
|
||||||
wl_pfn_cfg_t pfncfg_param;
|
wl_pfn_cfg_t pfncfg_param;
|
||||||
bool use_chanspec = FALSE;
|
bool use_chanspec = FALSE;
|
||||||
|
struct bcm_cfg80211 *cfg = wl_get_cfg(dhd_linux_get_primary_netdev(dhd));
|
||||||
|
|
||||||
#if defined(WL_6G_BAND) || defined(CFG80211_6G_SUPPORT)
|
|
||||||
/* When enable 6G, force to use chanspec list */
|
/* When enable 6G, force to use chanspec list */
|
||||||
if (FW_SUPPORTED((dhd), 6g)) {
|
if (FW_SUPPORTED((dhd), 6g) ||
|
||||||
|
(cfg && FW_MAJOR_VER_PNO_CHSPEC_BACK_PORTED(cfg->wlc_ver))) {
|
||||||
use_chanspec = TRUE;
|
use_chanspec = TRUE;
|
||||||
}
|
}
|
||||||
#endif /* WL_6G_BAND || CFG80211_6G_SUPPORT */
|
|
||||||
|
|
||||||
NULL_CHECK(dhd, "dhd is NULL", err);
|
NULL_CHECK(dhd, "dhd is NULL", err);
|
||||||
if (nchan) {
|
if (nchan) {
|
||||||
|
|
@ -3086,7 +3105,8 @@ dhd_pno_get_gscan(dhd_pub_t *dhd, dhd_pno_gscan_cmd_cfg_t type,
|
||||||
for (i = 0; i < nchan; i++) {
|
for (i = 0; i < nchan; i++) {
|
||||||
p[i] = wl_channel_to_frequency(
|
p[i] = wl_channel_to_frequency(
|
||||||
(ch_list[i]),
|
(ch_list[i]),
|
||||||
CHSPEC_BAND(ch_list[i]));
|
(ch_list[i] <= CH_MAX_2G_CHANNEL?
|
||||||
|
WL_CHANSPEC_BAND_2G : WL_CHANSPEC_BAND_5G));
|
||||||
}
|
}
|
||||||
ret = p;
|
ret = p;
|
||||||
*len = mem_needed;
|
*len = mem_needed;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,26 @@
|
||||||
* Header file of Broadcom Dongle Host Driver (DHD)
|
* Header file of Broadcom Dongle Host Driver (DHD)
|
||||||
* Prefered Network Offload code and Wi-Fi Location Service(WLS) code.
|
* Prefered Network Offload code and Wi-Fi Location Service(WLS) code.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -578,4 +597,8 @@ extern int dhd_pno_enable(dhd_pub_t *dhd, int pfn_enabled);
|
||||||
extern int dhd_pno_clean(dhd_pub_t *dhd);
|
extern int dhd_pno_clean(dhd_pub_t *dhd);
|
||||||
#endif /* #if defined(PNO_SUPPORT) */
|
#endif /* #if defined(PNO_SUPPORT) */
|
||||||
#endif /* #if defined(NDIS) */
|
#endif /* #if defined(NDIS) */
|
||||||
|
|
||||||
|
#define FW_MAJOR_VER_PNO_CHSPEC_BACK_PORTED(ver) \
|
||||||
|
((ver.wlc_ver_major >= 12) && (ver.wlc_ver_minor >= 3))
|
||||||
|
|
||||||
#endif /* __DHD_PNO_H__ */
|
#endif /* __DHD_PNO_H__ */
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,26 @@
|
||||||
* Provides type definitions and function prototypes used to link the
|
* Provides type definitions and function prototypes used to link the
|
||||||
* DHD OS, bus, and protocol modules.
|
* DHD OS, bus, and protocol modules.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Broadcom Dongle Host Driver (DHD), RTT
|
* Broadcom Dongle Host Driver (DHD), RTT
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -124,7 +143,7 @@ static DEFINE_SPINLOCK(noti_list_lock);
|
||||||
* Parallel RTT Sessions are supported
|
* Parallel RTT Sessions are supported
|
||||||
* with this major and minor verion onwards
|
* with this major and minor verion onwards
|
||||||
*/
|
*/
|
||||||
#define RTT_PARALLEL_SSNS_SUPPORTED_MAJ_VER 14
|
#define RTT_PARALLEL_SSNS_SUPPORTED_MAJ_VER 12
|
||||||
#define RTT_PARALLEL_SSNS_SUPPORTED_MIN_VER 2
|
#define RTT_PARALLEL_SSNS_SUPPORTED_MIN_VER 2
|
||||||
|
|
||||||
/* PROXD TIMEOUT */
|
/* PROXD TIMEOUT */
|
||||||
|
|
@ -716,7 +735,7 @@ rtt_alloc_getset_buf(dhd_pub_t *dhd, wl_proxd_method_t method, wl_proxd_session_
|
||||||
|
|
||||||
*p_out_bufsize = 0; /* init */
|
*p_out_bufsize = 0; /* init */
|
||||||
/* calculate the whole buffer size, including one reserve-tlv entry in the header */
|
/* calculate the whole buffer size, including one reserve-tlv entry in the header */
|
||||||
proxd_iovsize = sizeof(wl_proxd_iov_t) + tlvs_bufsize;
|
proxd_iovsize = sizeof(wl_proxd_iov_t) + sizeof(wl_proxd_tlv_t) + tlvs_bufsize;
|
||||||
|
|
||||||
p_proxd_iov = (wl_proxd_iov_t *)MALLOCZ(dhd->osh, proxd_iovsize);
|
p_proxd_iov = (wl_proxd_iov_t *)MALLOCZ(dhd->osh, proxd_iovsize);
|
||||||
if (p_proxd_iov == NULL) {
|
if (p_proxd_iov == NULL) {
|
||||||
|
|
@ -1494,6 +1513,7 @@ dhd_rtt_nan_start_session(dhd_pub_t *dhd, rtt_target_info_t *rtt_target)
|
||||||
rtt_status_info_t *rtt_status = GET_RTTSTATE(dhd);
|
rtt_status_info_t *rtt_status = GET_RTTSTATE(dhd);
|
||||||
ftm_config_param_info_t ftm_params[FTM_MAX_PARAMS];
|
ftm_config_param_info_t ftm_params[FTM_MAX_PARAMS];
|
||||||
int ftm_param_cnt = 0;
|
int ftm_param_cnt = 0;
|
||||||
|
nan_svc_info_t svc = {0, };
|
||||||
|
|
||||||
memset(ftm_params, 0, sizeof(ftm_params));
|
memset(ftm_params, 0, sizeof(ftm_params));
|
||||||
|
|
||||||
|
|
@ -1532,14 +1552,17 @@ dhd_rtt_nan_start_session(dhd_pub_t *dhd, rtt_target_info_t *rtt_target)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Other fields are 0 per on-stack initialization */
|
||||||
|
svc.num_ftm = rtt_target->num_frames_per_burst;
|
||||||
|
|
||||||
/* apply event mask */
|
/* apply event mask */
|
||||||
dhd_rtt_set_ftm_config_param(ftm_params, &ftm_param_cnt, rtt_target,
|
dhd_rtt_set_ftm_config_param(ftm_params, &ftm_param_cnt, rtt_target,
|
||||||
WL_PROXD_TLV_ID_EVENT_MASK);
|
WL_PROXD_TLV_ID_EVENT_MASK);
|
||||||
dhd_rtt_ftm_config(dhd, 0, NULL, 0, ftm_params, ftm_param_cnt);
|
dhd_rtt_ftm_config(dhd, 0, NULL, 0, ftm_params, ftm_param_cnt);
|
||||||
|
|
||||||
DHD_RTT(("Trigger nan based range request\n"));
|
DHD_RTT_ERR(("Trigger nan based range request - n:%d\n", svc.num_ftm));
|
||||||
err = wl_cfgnan_trigger_ranging(bcmcfg_to_prmry_ndev(cfg),
|
err = wl_cfgnan_trigger_ranging(bcmcfg_to_prmry_ndev(cfg),
|
||||||
cfg, ranging_inst, NULL, NAN_RANGE_REQ_CMD, TRUE);
|
cfg, ranging_inst, &svc, NAN_RANGE_REQ_CMD, TRUE);
|
||||||
if (unlikely(err)) {
|
if (unlikely(err)) {
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
@ -4970,6 +4993,7 @@ dhd_rtt_event_handler(dhd_pub_t *dhd, wl_event_msg_t *event, void *event_data)
|
||||||
MFREE(dhd->osh, buffer, tlvs_len);
|
MFREE(dhd->osh, buffer, tlvs_len);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
#ifdef WL_CFG80211
|
||||||
if (event_type == WL_PROXD_EVENT_LCI_MEAS_REP) {
|
if (event_type == WL_PROXD_EVENT_LCI_MEAS_REP) {
|
||||||
/* free previous one and update it */
|
/* free previous one and update it */
|
||||||
if (target->LCI) {
|
if (target->LCI) {
|
||||||
|
|
@ -4987,6 +5011,7 @@ dhd_rtt_event_handler(dhd_pub_t *dhd, wl_event_msg_t *event, void *event_data)
|
||||||
DHD_RTT(("WL_PROXD_EVENT_CIVIC_MEAS_REP: cache the LCR tlv\n"));
|
DHD_RTT(("WL_PROXD_EVENT_CIVIC_MEAS_REP: cache the LCR tlv\n"));
|
||||||
target->LCR = (bcm_xtlv_t *)buffer;
|
target->LCR = (bcm_xtlv_t *)buffer;
|
||||||
}
|
}
|
||||||
|
#endif /* WL_CFG80211 */
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif /* WL_RTT_LCI */
|
#endif /* WL_RTT_LCI */
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Broadcom Dongle Host Driver (DHD), RTT
|
* Broadcom Dongle Host Driver (DHD), RTT
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* DHD Bus Module for SDIO
|
* DHD Bus Module for SDIO
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -164,9 +183,15 @@ static int dhdsdio_resume(void *context);
|
||||||
|
|
||||||
#define MAX_RX_DATASZ 2048 /* XXX Should be based on PKTGET limits? */
|
#define MAX_RX_DATASZ 2048 /* XXX Should be based on PKTGET limits? */
|
||||||
|
|
||||||
|
/* Maximum milliseconds to wait for firmware to come up */
|
||||||
|
#ifdef BCMQT
|
||||||
|
#define DHD_WAIT_READSHARED 30000
|
||||||
|
#endif /* BCMQT */
|
||||||
|
|
||||||
/* Maximum milliseconds to wait for F2 to come up */
|
/* Maximum milliseconds to wait for F2 to come up */
|
||||||
#ifdef BCMQT
|
#ifdef BCMQT
|
||||||
#define DHD_WAIT_F2RDY 30000
|
#define DHD_WAIT_F2RDY 30000
|
||||||
|
#define CONS_ADDR_SIGNATURE 0xac0ffee
|
||||||
#else
|
#else
|
||||||
#define DHD_WAIT_F2RDY 3000
|
#define DHD_WAIT_F2RDY 3000
|
||||||
#endif /* BCMQT */
|
#endif /* BCMQT */
|
||||||
|
|
@ -560,6 +585,12 @@ extern uint *dhd_spi_lockcount;
|
||||||
|
|
||||||
extern void dhd_os_wd_timer(void *bus, uint wdtick);
|
extern void dhd_os_wd_timer(void *bus, uint wdtick);
|
||||||
int dhd_enableOOB(dhd_pub_t *dhd, bool sleep);
|
int dhd_enableOOB(dhd_pub_t *dhd, bool sleep);
|
||||||
|
#ifdef DHD_DEBUG
|
||||||
|
static int dhdsdio_readconsole(dhd_bus_t *bus);
|
||||||
|
#ifdef BCMQT
|
||||||
|
static bool dhdsdio_force_console_dump(dhd_bus_t *bus);
|
||||||
|
#endif /* BCMQT */
|
||||||
|
#endif /* DHD_DEBUG */
|
||||||
|
|
||||||
#ifdef DHD_PM_CONTROL_FROM_FILE
|
#ifdef DHD_PM_CONTROL_FROM_FILE
|
||||||
extern bool g_pm_control;
|
extern bool g_pm_control;
|
||||||
|
|
@ -651,27 +682,10 @@ static const uint max_roundup = 512;
|
||||||
/* Try doing readahead */
|
/* Try doing readahead */
|
||||||
static bool dhd_readahead;
|
static bool dhd_readahead;
|
||||||
|
|
||||||
#if defined(BCMSDIOH_TXGLOM_EXT)
|
|
||||||
bool
|
|
||||||
dhdsdio_is_dataok(dhd_bus_t *bus) {
|
|
||||||
return (((uint8)(bus->tx_max - bus->tx_seq) - bus->dhd->conf->tx_max_offset > 1) && \
|
|
||||||
(((uint8)(bus->tx_max - bus->tx_seq) & 0x80) == 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8
|
|
||||||
dhdsdio_get_databufcnt(dhd_bus_t *bus) {
|
|
||||||
return ((uint8)(bus->tx_max - bus->tx_seq) - 1 - bus->dhd->conf->tx_max_offset);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* To check if there's window offered */
|
/* To check if there's window offered */
|
||||||
#if defined(BCMSDIOH_TXGLOM_EXT)
|
|
||||||
#define DATAOK(bus) dhdsdio_is_dataok(bus)
|
|
||||||
#else
|
|
||||||
#define DATAOK(bus) \
|
#define DATAOK(bus) \
|
||||||
(((uint8)(bus->tx_max - bus->tx_seq) > 1) && \
|
(((uint8)(bus->tx_max - bus->tx_seq) > 1) && \
|
||||||
(((uint8)(bus->tx_max - bus->tx_seq) & 0x80) == 0))
|
(((uint8)(bus->tx_max - bus->tx_seq) & 0x80) == 0))
|
||||||
#endif
|
|
||||||
|
|
||||||
/* To check if there's window offered for ctrl frame */
|
/* To check if there's window offered for ctrl frame */
|
||||||
#define TXCTLOK(bus) \
|
#define TXCTLOK(bus) \
|
||||||
|
|
@ -679,12 +693,8 @@ dhdsdio_get_databufcnt(dhd_bus_t *bus) {
|
||||||
(((uint8)(bus->tx_max - bus->tx_seq) & 0x80) == 0))
|
(((uint8)(bus->tx_max - bus->tx_seq) & 0x80) == 0))
|
||||||
|
|
||||||
/* Number of pkts available in dongle for data RX */
|
/* Number of pkts available in dongle for data RX */
|
||||||
#if defined(BCMSDIOH_TXGLOM_EXT)
|
|
||||||
#define DATABUFCNT(bus) dhdsdio_get_databufcnt(bus)
|
|
||||||
#else
|
|
||||||
#define DATABUFCNT(bus) \
|
#define DATABUFCNT(bus) \
|
||||||
((uint8)(bus->tx_max - bus->tx_seq) - 1)
|
((uint8)(bus->tx_max - bus->tx_seq) - 1)
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Macros to get register read/write status */
|
/* Macros to get register read/write status */
|
||||||
/* NOTE: these assume a local dhdsdio_bus_t *bus! */
|
/* NOTE: these assume a local dhdsdio_bus_t *bus! */
|
||||||
|
|
@ -826,11 +836,7 @@ static int dhd_bcmsdh_send_buf(dhd_bus_t *bus, uint32 addr, uint fn, uint flags,
|
||||||
static int dhdsdio_txpkt(dhd_bus_t *bus, uint chan, void** pkts, int num_pkt, bool free_pkt);
|
static int dhdsdio_txpkt(dhd_bus_t *bus, uint chan, void** pkts, int num_pkt, bool free_pkt);
|
||||||
static int dhdsdio_txpkt_preprocess(dhd_bus_t *bus, void *pkt, int chan, int txseq,
|
static int dhdsdio_txpkt_preprocess(dhd_bus_t *bus, void *pkt, int chan, int txseq,
|
||||||
int prev_chain_total_len, bool last_chained_pkt,
|
int prev_chain_total_len, bool last_chained_pkt,
|
||||||
int *pad_pkt_len, void **new_pkt
|
int *pad_pkt_len, void **new_pkt);
|
||||||
#if defined(BCMSDIOH_TXGLOM_EXT)
|
|
||||||
, int first_frame
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
static int dhdsdio_txpkt_postprocess(dhd_bus_t *bus, void *pkt);
|
static int dhdsdio_txpkt_postprocess(dhd_bus_t *bus, void *pkt);
|
||||||
|
|
||||||
static int dhdsdio_download_firmware(dhd_bus_t *bus, osl_t *osh, void *sdh);
|
static int dhdsdio_download_firmware(dhd_bus_t *bus, osl_t *osh, void *sdh);
|
||||||
|
|
@ -1025,17 +1031,13 @@ dhdsdio_sr_cap(dhd_bus_t *bus)
|
||||||
if (
|
if (
|
||||||
0) {
|
0) {
|
||||||
core_capext = FALSE;
|
core_capext = FALSE;
|
||||||
} else if ((bus->sih->chip == BCM4330_CHIP_ID) ||
|
|
||||||
(bus->sih->chip == BCM43362_CHIP_ID) ||
|
|
||||||
(BCM4347_CHIP(bus->sih->chip))) {
|
|
||||||
core_capext = FALSE;
|
|
||||||
} else if ((bus->sih->chip == BCM4335_CHIP_ID) ||
|
} else if ((bus->sih->chip == BCM4335_CHIP_ID) ||
|
||||||
(bus->sih->chip == BCM4339_CHIP_ID) ||
|
(bus->sih->chip == BCM4339_CHIP_ID) ||
|
||||||
BCM4345_CHIP(bus->sih->chip) ||
|
BCM4345_CHIP(bus->sih->chip) ||
|
||||||
(bus->sih->chip == BCM4354_CHIP_ID) ||
|
(bus->sih->chip == BCM4354_CHIP_ID) ||
|
||||||
|
(bus->sih->chip == BCM4356_CHIP_ID) ||
|
||||||
(bus->sih->chip == BCM4358_CHIP_ID) ||
|
(bus->sih->chip == BCM4358_CHIP_ID) ||
|
||||||
(bus->sih->chip == BCM43569_CHIP_ID) ||
|
(bus->sih->chip == BCM43569_CHIP_ID) ||
|
||||||
(bus->sih->chip == BCM4371_CHIP_ID) ||
|
|
||||||
(BCM4349_CHIP(bus->sih->chip)) ||
|
(BCM4349_CHIP(bus->sih->chip)) ||
|
||||||
(bus->sih->chip == BCM4350_CHIP_ID) ||
|
(bus->sih->chip == BCM4350_CHIP_ID) ||
|
||||||
(bus->sih->chip == BCM4362_CHIP_ID) ||
|
(bus->sih->chip == BCM4362_CHIP_ID) ||
|
||||||
|
|
@ -1064,9 +1066,9 @@ dhdsdio_sr_cap(dhd_bus_t *bus)
|
||||||
(bus->sih->chip == BCM4339_CHIP_ID) ||
|
(bus->sih->chip == BCM4339_CHIP_ID) ||
|
||||||
BCM4345_CHIP(bus->sih->chip) ||
|
BCM4345_CHIP(bus->sih->chip) ||
|
||||||
(bus->sih->chip == BCM4354_CHIP_ID) ||
|
(bus->sih->chip == BCM4354_CHIP_ID) ||
|
||||||
|
(bus->sih->chip == BCM4356_CHIP_ID) ||
|
||||||
(bus->sih->chip == BCM4358_CHIP_ID) ||
|
(bus->sih->chip == BCM4358_CHIP_ID) ||
|
||||||
(bus->sih->chip == BCM43569_CHIP_ID) ||
|
(bus->sih->chip == BCM43569_CHIP_ID) ||
|
||||||
(bus->sih->chip == BCM4371_CHIP_ID) ||
|
|
||||||
(bus->sih->chip == BCM4350_CHIP_ID)) {
|
(bus->sih->chip == BCM4350_CHIP_ID)) {
|
||||||
uint32 enabval = 0;
|
uint32 enabval = 0;
|
||||||
addr = SI_ENUM_BASE(bus->sih) + OFFSETOF(chipcregs_t, chipcontrol_addr);
|
addr = SI_ENUM_BASE(bus->sih) + OFFSETOF(chipcregs_t, chipcontrol_addr);
|
||||||
|
|
@ -1082,9 +1084,9 @@ dhdsdio_sr_cap(dhd_bus_t *bus)
|
||||||
if ((bus->sih->chip == BCM4350_CHIP_ID) ||
|
if ((bus->sih->chip == BCM4350_CHIP_ID) ||
|
||||||
BCM4345_CHIP(bus->sih->chip) ||
|
BCM4345_CHIP(bus->sih->chip) ||
|
||||||
(bus->sih->chip == BCM4354_CHIP_ID) ||
|
(bus->sih->chip == BCM4354_CHIP_ID) ||
|
||||||
|
(bus->sih->chip == BCM4356_CHIP_ID) ||
|
||||||
(bus->sih->chip == BCM4358_CHIP_ID) ||
|
(bus->sih->chip == BCM4358_CHIP_ID) ||
|
||||||
(bus->sih->chip == BCM43569_CHIP_ID) ||
|
(bus->sih->chip == BCM43569_CHIP_ID))
|
||||||
(bus->sih->chip == BCM4371_CHIP_ID))
|
|
||||||
enabval &= CC_CHIPCTRL3_SR_ENG_ENABLE;
|
enabval &= CC_CHIPCTRL3_SR_ENG_ENABLE;
|
||||||
|
|
||||||
/* XXX: not checking the CC_PMUCC3_SRCC_SR_ENG_ENAB bit [val 4], but
|
/* XXX: not checking the CC_PMUCC3_SRCC_SR_ENG_ENAB bit [val 4], but
|
||||||
|
|
@ -1237,10 +1239,10 @@ dhdsdio_clk_kso_enab(dhd_bus_t *bus, bool on)
|
||||||
int err = 0;
|
int err = 0;
|
||||||
int try_cnt = 0, try_max = CUSTOM_MAX_KSO_ATTEMPTS;
|
int try_cnt = 0, try_max = CUSTOM_MAX_KSO_ATTEMPTS;
|
||||||
struct dhd_conf *conf = bus->dhd->conf;
|
struct dhd_conf *conf = bus->dhd->conf;
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)) && !defined(ANDROID13_KERNEL515_BKPORT)
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
|
||||||
wifi_adapter_info_t *adapter = NULL;
|
wifi_adapter_info_t *adapter = NULL;
|
||||||
uint32 bus_type = -1, bus_num = -1, slot_num = -1;
|
uint32 bus_type = -1, bus_num = -1, slot_num = -1;
|
||||||
#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 2, 0))
|
#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 20, 0))
|
||||||
struct mmc_host *host;
|
struct mmc_host *host;
|
||||||
struct sdioh_info *sd = (struct sdioh_info *)(bus->sdh->sdioh);
|
struct sdioh_info *sd = (struct sdioh_info *)(bus->sdh->sdioh);
|
||||||
struct sdio_func *func = sd->func[SDIO_FUNC_0];
|
struct sdio_func *func = sd->func[SDIO_FUNC_0];
|
||||||
|
|
@ -1248,13 +1250,13 @@ dhdsdio_clk_kso_enab(dhd_bus_t *bus, bool on)
|
||||||
|
|
||||||
KSO_DBG(("%s> op:%s\n", __FUNCTION__, (on ? "KSO_SET" : "KSO_CLR")));
|
KSO_DBG(("%s> op:%s\n", __FUNCTION__, (on ? "KSO_SET" : "KSO_CLR")));
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)) && !defined(ANDROID13_KERNEL515_BKPORT)
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
|
||||||
dhd_bus_get_ids(bus, &bus_type, &bus_num, &slot_num);
|
dhd_bus_get_ids(bus, &bus_type, &bus_num, &slot_num);
|
||||||
adapter = dhd_wifi_platform_get_adapter(bus_type, bus_num, slot_num);
|
adapter = dhd_wifi_platform_get_adapter(bus_type, bus_num, slot_num);
|
||||||
sdio_retune_crc_disable(adapter->sdio_func);
|
sdio_retune_crc_disable(adapter->sdio_func);
|
||||||
if (on)
|
if (on)
|
||||||
sdio_retune_hold_now(adapter->sdio_func);
|
sdio_retune_hold_now(adapter->sdio_func);
|
||||||
#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 2, 0))
|
#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 20, 0))
|
||||||
host = func->card->host;
|
host = func->card->host;
|
||||||
mmc_retune_disable(host);
|
mmc_retune_disable(host);
|
||||||
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) */
|
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) */
|
||||||
|
|
@ -1382,11 +1384,11 @@ dhdsdio_clk_kso_enab(dhd_bus_t *bus, bool on)
|
||||||
#endif /* !defined(NDIS) */
|
#endif /* !defined(NDIS) */
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)) && !defined(ANDROID13_KERNEL515_BKPORT)
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
|
||||||
if (on)
|
if (on)
|
||||||
sdio_retune_release(adapter->sdio_func);
|
sdio_retune_release(adapter->sdio_func);
|
||||||
sdio_retune_crc_enable(adapter->sdio_func);
|
sdio_retune_crc_enable(adapter->sdio_func);
|
||||||
#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 2, 0))
|
#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 20, 0))
|
||||||
mmc_retune_enable(host);
|
mmc_retune_enable(host);
|
||||||
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) */
|
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) */
|
||||||
|
|
||||||
|
|
@ -1983,9 +1985,6 @@ dhdsdio_clkctl(dhd_bus_t *bus, uint target, bool pendok)
|
||||||
ret = dhdsdio_htclk(bus, FALSE, FALSE);
|
ret = dhdsdio_htclk(bus, FALSE, FALSE);
|
||||||
/* Now remove the SD clock */
|
/* Now remove the SD clock */
|
||||||
ret = dhdsdio_sdclk(bus, FALSE);
|
ret = dhdsdio_sdclk(bus, FALSE);
|
||||||
#ifdef DHD_DEBUG
|
|
||||||
if (bus->dhd->dhd_console_ms == 0)
|
|
||||||
#endif /* DHD_DEBUG */
|
|
||||||
if (bus->poll == 0)
|
if (bus->poll == 0)
|
||||||
dhd_os_wd_timer(bus->dhd, 0);
|
dhd_os_wd_timer(bus->dhd, 0);
|
||||||
break;
|
break;
|
||||||
|
|
@ -2483,11 +2482,7 @@ dhd_bus_txdata(struct dhd_bus *bus, void *pkt)
|
||||||
*/
|
*/
|
||||||
static int dhdsdio_txpkt_preprocess(dhd_bus_t *bus, void *pkt, int chan, int txseq,
|
static int dhdsdio_txpkt_preprocess(dhd_bus_t *bus, void *pkt, int chan, int txseq,
|
||||||
int prev_chain_total_len, bool last_chained_pkt,
|
int prev_chain_total_len, bool last_chained_pkt,
|
||||||
int *pad_pkt_len, void **new_pkt
|
int *pad_pkt_len, void **new_pkt)
|
||||||
#if defined(BCMSDIOH_TXGLOM_EXT)
|
|
||||||
, int first_frame
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
osl_t *osh;
|
osl_t *osh;
|
||||||
uint8 *frame;
|
uint8 *frame;
|
||||||
|
|
@ -2688,10 +2683,6 @@ static int dhdsdio_txpkt_preprocess(dhd_bus_t *bus, void *pkt, int chan, int txs
|
||||||
* referred to in sdioh_request_buffer(). The tail length will be excluded in
|
* referred to in sdioh_request_buffer(). The tail length will be excluded in
|
||||||
* dhdsdio_txpkt_postprocess().
|
* dhdsdio_txpkt_postprocess().
|
||||||
*/
|
*/
|
||||||
#if defined(BCMSDIOH_TXGLOM_EXT)
|
|
||||||
if (bus->dhd->conf->txglom_bucket_size)
|
|
||||||
tail_padding = 0;
|
|
||||||
#endif
|
|
||||||
*(uint16*)frame = (uint16)htol16(pkt_len);
|
*(uint16*)frame = (uint16)htol16(pkt_len);
|
||||||
*(((uint16*)frame) + 1) = (uint16)htol16(~pkt_len);
|
*(((uint16*)frame) + 1) = (uint16)htol16(~pkt_len);
|
||||||
pkt_len += tail_padding;
|
pkt_len += tail_padding;
|
||||||
|
|
@ -2700,43 +2691,13 @@ static int dhdsdio_txpkt_preprocess(dhd_bus_t *bus, void *pkt, int chan, int txs
|
||||||
if (bus->txglom_enable) {
|
if (bus->txglom_enable) {
|
||||||
uint32 hwheader1;
|
uint32 hwheader1;
|
||||||
uint32 hwheader2;
|
uint32 hwheader2;
|
||||||
#ifdef BCMSDIOH_TXGLOM_EXT
|
|
||||||
uint32 act_len = pkt_len - tail_padding;
|
|
||||||
uint32 real_pad = 0;
|
|
||||||
if(bus->dhd->conf->txglom_ext && !last_chained_pkt) {
|
|
||||||
tail_padding = 0;
|
|
||||||
if(first_frame == 0) {
|
|
||||||
// first pkt, add pad to bucket size - recv offset
|
|
||||||
pkt_len = bus->dhd->conf->txglom_bucket_size - TXGLOM_RECV_OFFSET;
|
|
||||||
} else {
|
|
||||||
// add pad to bucket size
|
|
||||||
pkt_len = bus->dhd->conf->txglom_bucket_size;
|
|
||||||
}
|
|
||||||
swhdr_offset += SDPCM_HWEXT_LEN;
|
|
||||||
hwheader1 = (act_len - SDPCM_FRAMETAG_LEN) | (last_chained_pkt << 24);
|
|
||||||
hwheader2 = (pkt_len - act_len) << 16;
|
|
||||||
htol32_ua_store(hwheader1, frame + SDPCM_FRAMETAG_LEN);
|
|
||||||
htol32_ua_store(hwheader2, frame + SDPCM_FRAMETAG_LEN + 4);
|
|
||||||
real_pad = pkt_len - act_len;
|
|
||||||
|
|
||||||
if (PKTTAILROOM(osh, pkt) < real_pad) {
|
swhdr_offset += SDPCM_HWEXT_LEN;
|
||||||
DHD_INFO(("%s : insufficient tailroom %d for %d real_pad\n",
|
hwheader1 = (pkt_len - SDPCM_FRAMETAG_LEN - tail_padding) |
|
||||||
__func__, (int)PKTTAILROOM(osh, pkt), real_pad));
|
(last_chained_pkt << 24);
|
||||||
if (PKTPADTAILROOM(osh, pkt, real_pad)) {
|
hwheader2 = (tail_padding) << 16;
|
||||||
DHD_ERROR(("CHK1: padding error size %d\n", real_pad));
|
htol32_ua_store(hwheader1, frame + SDPCM_FRAMETAG_LEN);
|
||||||
} else
|
htol32_ua_store(hwheader2, frame + SDPCM_FRAMETAG_LEN + 4);
|
||||||
frame = (uint8 *)PKTDATA(osh, pkt);
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
swhdr_offset += SDPCM_HWEXT_LEN;
|
|
||||||
hwheader1 = (pkt_len - SDPCM_FRAMETAG_LEN - tail_padding) |
|
|
||||||
(last_chained_pkt << 24);
|
|
||||||
hwheader2 = (tail_padding) << 16;
|
|
||||||
htol32_ua_store(hwheader1, frame + SDPCM_FRAMETAG_LEN);
|
|
||||||
htol32_ua_store(hwheader2, frame + SDPCM_FRAMETAG_LEN + 4);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
PKTSETLEN((osh), (pkt), (pkt_len));
|
PKTSETLEN((osh), (pkt), (pkt_len));
|
||||||
|
|
||||||
|
|
@ -2833,13 +2794,12 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, uint chan, void** pkts, int num_pkt, bo
|
||||||
ASSERT(pkt);
|
ASSERT(pkt);
|
||||||
last_pkt = (i == num_pkt - 1);
|
last_pkt = (i == num_pkt - 1);
|
||||||
pkt_len = dhdsdio_txpkt_preprocess(bus, pkt, chan, bus->tx_seq + i,
|
pkt_len = dhdsdio_txpkt_preprocess(bus, pkt, chan, bus->tx_seq + i,
|
||||||
total_len, last_pkt, &pad_pkt_len, &new_pkt
|
total_len, last_pkt, &pad_pkt_len, &new_pkt);
|
||||||
#if defined(BCMSDIOH_TXGLOM_EXT)
|
if (pkt_len <= 0) {
|
||||||
, i
|
if (new_pkt)
|
||||||
#endif
|
PKTFREE(osh, new_pkt, TRUE);
|
||||||
);
|
|
||||||
if (pkt_len <= 0)
|
|
||||||
goto done;
|
goto done;
|
||||||
|
}
|
||||||
if (new_pkt) {
|
if (new_pkt) {
|
||||||
pkt = new_pkt;
|
pkt = new_pkt;
|
||||||
new_pkts[new_pkt_num++] = new_pkt;
|
new_pkts[new_pkt_num++] = new_pkt;
|
||||||
|
|
@ -2877,11 +2837,6 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, uint chan, void** pkts, int num_pkt, bo
|
||||||
* so it will take the aligned length and buffer pointer.
|
* so it will take the aligned length and buffer pointer.
|
||||||
*/
|
*/
|
||||||
pkt_chain = PKTNEXT(osh, head_pkt) ? head_pkt : NULL;
|
pkt_chain = PKTNEXT(osh, head_pkt) ? head_pkt : NULL;
|
||||||
#ifdef TPUT_MONITOR
|
|
||||||
if ((bus->dhd->conf->data_drop_mode == TXPKT_DROP) && (total_len > 500))
|
|
||||||
ret = BCME_OK;
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
ret = dhd_bcmsdh_send_buf(bus, bcmsdh_cur_sbwad(sdh), SDIO_FUNC_2, F2SYNC,
|
ret = dhd_bcmsdh_send_buf(bus, bcmsdh_cur_sbwad(sdh), SDIO_FUNC_2, F2SYNC,
|
||||||
PKTDATA(osh, head_pkt), total_len, pkt_chain, NULL, NULL, TXRETRIES);
|
PKTDATA(osh, head_pkt), total_len, pkt_chain, NULL, NULL, TXRETRIES);
|
||||||
if (ret == BCME_OK)
|
if (ret == BCME_OK)
|
||||||
|
|
@ -3012,8 +2967,8 @@ dhdsdio_sendfromq(dhd_bus_t *bus, uint maxframes)
|
||||||
#ifdef DHD_PKTDUMP_TOFW
|
#ifdef DHD_PKTDUMP_TOFW
|
||||||
dhd_dump_pkt(bus->dhd, BDC_GET_IF_IDX(bdc_header), pktdata,
|
dhd_dump_pkt(bus->dhd, BDC_GET_IF_IDX(bdc_header), pktdata,
|
||||||
(uint32)PKTLEN(bus->dhd->osh, pkts[i]), TRUE, NULL, NULL);
|
(uint32)PKTLEN(bus->dhd->osh, pkts[i]), TRUE, NULL, NULL);
|
||||||
#endif
|
#endif /* DHD_PKTDUMP_TOFW */
|
||||||
#endif /* DHD_LOSSLESS_ROAMING || DHD_8021X_DUMP */
|
#endif /* DHD_LOSSLESS_ROAMING || DHD_PKTDUMP_TOFW */
|
||||||
if (!bus->dhd->conf->orphan_move)
|
if (!bus->dhd->conf->orphan_move)
|
||||||
PKTORPHAN(pkts[i], bus->dhd->conf->tsq);
|
PKTORPHAN(pkts[i], bus->dhd->conf->tsq);
|
||||||
datalen += PKTLEN(osh, pkts[i]);
|
datalen += PKTLEN(osh, pkts[i]);
|
||||||
|
|
@ -3166,6 +3121,23 @@ dhd_bus_txctl(struct dhd_bus *bus, uchar *msg, uint msglen)
|
||||||
|
|
||||||
BUS_WAKE(bus);
|
BUS_WAKE(bus);
|
||||||
|
|
||||||
|
#ifdef BCMQT
|
||||||
|
/* Make sure firmware is ready before request HT clock for PMU maximum resource setting */
|
||||||
|
dhd_timeout_start(&tmo, DHD_WAIT_READSHARED * 1000);
|
||||||
|
ready = 0;
|
||||||
|
while (!ready && !dhd_timeout_expired(&tmo)) {
|
||||||
|
sdpcm_shared_t shared;
|
||||||
|
ready = (dhdsdio_readshared(bus, &shared) == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Readshared fail, shared memory wasn't update by firmware initialization */
|
||||||
|
if (!ready) {
|
||||||
|
DHD_ERROR(("%s: Readshared timeout, firmware up fail.\n", __FUNCTION__));
|
||||||
|
ret = -1;
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
#endif /* BCMQT */
|
||||||
|
|
||||||
/* Make sure backplane clock is on */
|
/* Make sure backplane clock is on */
|
||||||
dhdsdio_clkctl(bus, CLK_AVAIL, FALSE);
|
dhdsdio_clkctl(bus, CLK_AVAIL, FALSE);
|
||||||
|
|
||||||
|
|
@ -3940,6 +3912,17 @@ dhdsdio_readshared(dhd_bus_t *bus, sdpcm_shared_t *sh)
|
||||||
CHIPID(bus->sih->chip) == BCM43018_CHIP_ID) && !dhdsdio_sr_cap(bus))
|
CHIPID(bus->sih->chip) == BCM43018_CHIP_ID) && !dhdsdio_sr_cap(bus))
|
||||||
bus->srmemsize = 0;
|
bus->srmemsize = 0;
|
||||||
|
|
||||||
|
/* Fix first time get console address failed issue */
|
||||||
|
if ((CHIPID(bus->sih->chip) == BCM43430_CHIP_ID) && dhdsdio_sr_cap(bus) &&
|
||||||
|
(bus->srmemsize == 0)) {
|
||||||
|
if (dhd_srmem) {
|
||||||
|
bus->srmemsize = dhd_srmem;
|
||||||
|
} else {
|
||||||
|
/* 43436/8 default sr size is 64K */
|
||||||
|
bus->srmemsize = 0x10000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
shaddr = bus->dongle_ram_base + bus->ramsize - 4;
|
shaddr = bus->dongle_ram_base + bus->ramsize - 4;
|
||||||
i = 0;
|
i = 0;
|
||||||
do {
|
do {
|
||||||
|
|
@ -3959,6 +3942,15 @@ dhdsdio_readshared(dhd_bus_t *bus, sdpcm_shared_t *sh)
|
||||||
if ((bus->srmemsize > 0) && (i++ == 0)) {
|
if ((bus->srmemsize > 0) && (i++ == 0)) {
|
||||||
shaddr -= bus->srmemsize;
|
shaddr -= bus->srmemsize;
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef BCMQT
|
||||||
|
if (bus->console_addr) {
|
||||||
|
dhdsdio_readconsole(bus);
|
||||||
|
} else {
|
||||||
|
if (dhdsdio_force_console_dump(bus))
|
||||||
|
DHD_ERROR(("%s: FW console has been initialized\n",
|
||||||
|
__func__));
|
||||||
|
}
|
||||||
|
#endif /* BCMQT */
|
||||||
DHD_ERROR(("%s: address (0x%08x) of sdpcm_shared invalid\n",
|
DHD_ERROR(("%s: address (0x%08x) of sdpcm_shared invalid\n",
|
||||||
__FUNCTION__, addr));
|
__FUNCTION__, addr));
|
||||||
return BCME_ERROR;
|
return BCME_ERROR;
|
||||||
|
|
@ -4039,10 +4031,20 @@ dhdsdio_readshared(dhd_bus_t *bus, sdpcm_shared_t *sh)
|
||||||
void
|
void
|
||||||
dhd_bus_check_srmemsize(dhd_pub_t *dhdp)
|
dhd_bus_check_srmemsize(dhd_pub_t *dhdp)
|
||||||
{
|
{
|
||||||
dhd_bus_t *dhd = dhdp->bus;
|
dhd_bus_t *bus = dhdp->bus;
|
||||||
uint32 srmem_size = 0;
|
uint32 srmem_size = 0;
|
||||||
int err = BCME_OK;
|
int err = BCME_OK;
|
||||||
|
|
||||||
|
if ((CHIPID(bus->sih->chip) == BCM43430_CHIP_ID) && dhdsdio_sr_cap(bus)) {
|
||||||
|
if (dhd_srmem) {
|
||||||
|
bus->srmemsize = dhd_srmem;
|
||||||
|
} else {
|
||||||
|
/* 43436/8 default sr size is 64K */
|
||||||
|
bus->srmemsize = 0x10000;
|
||||||
|
}
|
||||||
|
DHD_ERROR(("%s srmem size is set %x\n", __func__, bus->srmemsize));
|
||||||
|
}
|
||||||
|
|
||||||
err = dhd_iovar(dhdp, 0, "bus:srmem_size", NULL, 0,
|
err = dhd_iovar(dhdp, 0, "bus:srmem_size", NULL, 0,
|
||||||
(char *)&srmem_size, sizeof(srmem_size), FALSE);
|
(char *)&srmem_size, sizeof(srmem_size), FALSE);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
@ -4050,11 +4052,14 @@ dhd_bus_check_srmemsize(dhd_pub_t *dhdp)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (srmem_size != dhd->srmemsize) {
|
if (srmem_size != bus->srmemsize) {
|
||||||
sdpcm_shared_t shared;
|
sdpcm_shared_t shared;
|
||||||
dhd->srmemsize = srmem_size;
|
if (err == BCME_OK)
|
||||||
if (dhdsdio_readshared(dhd, &shared) == 0)
|
bus->srmemsize = srmem_size;
|
||||||
dhd->console_addr = shared.console_addr;
|
dhd_os_sdlock(dhdp);
|
||||||
|
if (dhdsdio_readshared(bus, &shared) == 0)
|
||||||
|
bus->console_addr = shared.console_addr;
|
||||||
|
dhd_os_sdunlock(dhdp);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
@ -4063,6 +4068,49 @@ dhd_bus_check_srmemsize(dhd_pub_t *dhdp)
|
||||||
#define CONSOLE_LINE_MAX 192
|
#define CONSOLE_LINE_MAX 192
|
||||||
|
|
||||||
#ifdef DHD_DEBUG
|
#ifdef DHD_DEBUG
|
||||||
|
#ifdef BCMQT
|
||||||
|
static bool dhdsdio_force_console_dump(dhd_bus_t *bus)
|
||||||
|
{
|
||||||
|
uint32 cons_sign = 0;
|
||||||
|
uint32 cons_addr = 0;
|
||||||
|
uint32 val = 0;
|
||||||
|
|
||||||
|
cons_sign = bus->dongle_ram_base + bus->ramsize - 12;
|
||||||
|
|
||||||
|
/* Read last word in memory to determine address of sdpcm_shared structure */
|
||||||
|
if (dhdsdio_membytes(bus, FALSE, cons_sign, (uint8 *)&val, 4) < 0)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
val = ltoh32(val);
|
||||||
|
|
||||||
|
/* try again if srmemsize is set */
|
||||||
|
if (val != CONS_ADDR_SIGNATURE) {
|
||||||
|
if (bus->srmemsize > 0) {
|
||||||
|
cons_sign -= bus->srmemsize;
|
||||||
|
if (dhdsdio_membytes(bus, FALSE, cons_sign, (uint8 *)&val, 4) < 0) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
val = ltoh32(val);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (val == CONS_ADDR_SIGNATURE) {
|
||||||
|
cons_addr = cons_sign + 4;
|
||||||
|
DHD_ERROR(("%s: Got correct console address signature\n", __func__));
|
||||||
|
|
||||||
|
/* Read last word in memory to determine address of sdpcm_shared structure */
|
||||||
|
if (dhdsdio_membytes(bus, FALSE, cons_addr, (uint8 *)&val, 4) < 0)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
bus->console_addr = ltoh32(val);
|
||||||
|
dhd_msg_level |= DHD_FWLOG_VAL;
|
||||||
|
dhdsdio_readconsole(bus);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
#endif /* BCMQT */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
dhdsdio_readconsole(dhd_bus_t *bus)
|
dhdsdio_readconsole(dhd_bus_t *bus)
|
||||||
{
|
{
|
||||||
|
|
@ -4616,7 +4664,7 @@ dhdsdio_doiovar(dhd_bus_t *bus, const bcm_iovar_t *vi, uint32 actionid, const ch
|
||||||
if (bus->dhd->up) {
|
if (bus->dhd->up) {
|
||||||
if (bus->intr) {
|
if (bus->intr) {
|
||||||
DHD_INTR(("%s: enable SDIO device interrupts\n", __FUNCTION__));
|
DHD_INTR(("%s: enable SDIO device interrupts\n", __FUNCTION__));
|
||||||
// terence 20141207: enbale intdis
|
// terence 20141207: enable intdis
|
||||||
bus->intdis = TRUE;
|
bus->intdis = TRUE;
|
||||||
bcmsdh_intr_enable(bus->sdh);
|
bcmsdh_intr_enable(bus->sdh);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -5200,13 +5248,6 @@ dhdsdio_write_vars(dhd_bus_t *bus)
|
||||||
varsize = bus->varsz ? ROUNDUP(bus->varsz, 4) : 0;
|
varsize = bus->varsz ? ROUNDUP(bus->varsz, 4) : 0;
|
||||||
varaddr = (bus->ramsize - 4) - varsize;
|
varaddr = (bus->ramsize - 4) - varsize;
|
||||||
|
|
||||||
// terence 20150412: fix for nvram failed to download
|
|
||||||
if (bus->dhd->conf->chip == BCM43340_CHIP_ID ||
|
|
||||||
bus->dhd->conf->chip == BCM43341_CHIP_ID) {
|
|
||||||
varsize = varsize ? ROUNDUP(varsize, 64) : 0;
|
|
||||||
varaddr = (bus->ramsize - 64) - varsize;
|
|
||||||
}
|
|
||||||
|
|
||||||
varaddr += bus->dongle_ram_base;
|
varaddr += bus->dongle_ram_base;
|
||||||
bus->ramtop_addr = varaddr;
|
bus->ramtop_addr = varaddr;
|
||||||
|
|
||||||
|
|
@ -6199,28 +6240,38 @@ dhd_bus_stop(struct dhd_bus *bus, bool enforce_mutex)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
BUS_WAKE(bus);
|
BUS_WAKE(bus);
|
||||||
|
|
||||||
if (KSO_ENAB(bus)) {
|
if (KSO_ENAB(bus)) {
|
||||||
|
|
||||||
/* Enable clock for device interrupts */
|
/* Enable clock for device interrupts */
|
||||||
dhdsdio_clkctl(bus, CLK_AVAIL, FALSE);
|
dhdsdio_clkctl(bus, CLK_AVAIL, FALSE);
|
||||||
|
|
||||||
/* Disable and clear interrupts at the chip level also */
|
/* Disable and clear interrupts at the chip level also */
|
||||||
W_SDREG(0, &bus->regs->hostintmask, retries);
|
#ifdef DHD_SI_WD_RESET
|
||||||
|
if (!bus->dhd->si_wd)
|
||||||
|
#endif
|
||||||
|
W_SDREG(0, &bus->regs->hostintmask, retries);
|
||||||
|
|
||||||
local_hostintmask = bus->hostintmask;
|
local_hostintmask = bus->hostintmask;
|
||||||
bus->hostintmask = 0;
|
bus->hostintmask = 0;
|
||||||
|
|
||||||
/* Force clocks on backplane to be sure F2 interrupt propagates */
|
/* Force clocks on backplane to be sure F2 interrupt propagates */
|
||||||
saveclk = bcmsdh_cfg_read(bus->sdh, SDIO_FUNC_1, SBSDIO_FUNC1_CHIPCLKCSR, &err);
|
#ifdef DHD_SI_WD_RESET
|
||||||
if (!err) {
|
if (!bus->dhd->si_wd)
|
||||||
bcmsdh_cfg_write(bus->sdh, SDIO_FUNC_1, SBSDIO_FUNC1_CHIPCLKCSR,
|
#else
|
||||||
(saveclk | SBSDIO_FORCE_HT), &err);
|
if (1)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
saveclk = bcmsdh_cfg_read(bus->sdh, SDIO_FUNC_1,
|
||||||
|
SBSDIO_FUNC1_CHIPCLKCSR, &err);
|
||||||
|
if (!err) {
|
||||||
|
bcmsdh_cfg_write(bus->sdh, SDIO_FUNC_1, SBSDIO_FUNC1_CHIPCLKCSR,
|
||||||
|
(saveclk | SBSDIO_FORCE_HT), &err);
|
||||||
|
}
|
||||||
|
if (err) {
|
||||||
|
DHD_ERROR(("%s: Failed to force clock for F2: err %d\n",
|
||||||
|
__FUNCTION__, err));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (err) {
|
|
||||||
DHD_ERROR(("%s: Failed to force clock for F2: err %d\n",
|
|
||||||
__FUNCTION__, err));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Turn off the bus (F2), free any pending packets */
|
/* Turn off the bus (F2), free any pending packets */
|
||||||
/* XXX How to wake up any waiting processes? */
|
/* XXX How to wake up any waiting processes? */
|
||||||
/* XXX New API: bcmsdh_fn_set(bus->sdh, SDIO_FUNC_2, FALSE); */
|
/* XXX New API: bcmsdh_fn_set(bus->sdh, SDIO_FUNC_2, FALSE); */
|
||||||
|
|
@ -6229,15 +6280,24 @@ dhd_bus_stop(struct dhd_bus *bus, bool enforce_mutex)
|
||||||
bcmsdh_intr_disable(bus->sdh); /* XXX bcmsdh_intr_mask(bus->sdh); */
|
bcmsdh_intr_disable(bus->sdh); /* XXX bcmsdh_intr_mask(bus->sdh); */
|
||||||
#endif /* !defined(NDIS) */
|
#endif /* !defined(NDIS) */
|
||||||
#ifndef BCMSPI
|
#ifndef BCMSPI
|
||||||
bcmsdh_cfg_write(bus->sdh, SDIO_FUNC_0, SDIOD_CCCR_IOEN, SDIO_FUNC_ENABLE_1, NULL);
|
#ifdef DHD_SI_WD_RESET
|
||||||
|
if (!bus->dhd->si_wd)
|
||||||
|
#endif
|
||||||
|
bcmsdh_cfg_write(bus->sdh, SDIO_FUNC_0, SDIOD_CCCR_IOEN,
|
||||||
|
SDIO_FUNC_ENABLE_1, NULL);
|
||||||
#endif /* !BCMSPI */
|
#endif /* !BCMSPI */
|
||||||
|
|
||||||
/* Clear any pending interrupts now that F2 is disabled */
|
/* Clear any pending interrupts now that F2 is disabled */
|
||||||
W_SDREG(local_hostintmask, &bus->regs->intstatus, retries);
|
#ifdef DHD_SI_WD_RESET
|
||||||
|
if (!bus->dhd->si_wd)
|
||||||
|
#endif
|
||||||
|
W_SDREG(local_hostintmask, &bus->regs->intstatus, retries);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Turn off the backplane clock (only) */
|
/* Turn off the backplane clock (only) */
|
||||||
dhdsdio_clkctl(bus, CLK_SDONLY, FALSE);
|
#ifdef DHD_SI_WD_RESET
|
||||||
|
if (!bus->dhd->si_wd)
|
||||||
|
#endif
|
||||||
|
dhdsdio_clkctl(bus, CLK_SDONLY, FALSE);
|
||||||
|
|
||||||
/* Change our idea of bus state */
|
/* Change our idea of bus state */
|
||||||
DHD_LINUX_GENERAL_LOCK(bus->dhd, flags);
|
DHD_LINUX_GENERAL_LOCK(bus->dhd, flags);
|
||||||
|
|
@ -6360,11 +6420,6 @@ dhd_bus_init(dhd_pub_t *dhdp, bool enforce_mutex)
|
||||||
if (enforce_mutex)
|
if (enforce_mutex)
|
||||||
dhd_os_sdlock(bus->dhd);
|
dhd_os_sdlock(bus->dhd);
|
||||||
|
|
||||||
if (bus->sih->chip == BCM43362_CHIP_ID) {
|
|
||||||
printf("%s: delay 100ms for BCM43362\n", __FUNCTION__);
|
|
||||||
OSL_DELAY(100000); // terence 20131209: delay for 43362
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Make sure backplane clock is on, needed to generate F2 interrupt */
|
/* Make sure backplane clock is on, needed to generate F2 interrupt */
|
||||||
dhdsdio_clkctl(bus, CLK_AVAIL, FALSE);
|
dhdsdio_clkctl(bus, CLK_AVAIL, FALSE);
|
||||||
if (bus->clkstate != CLK_AVAIL) {
|
if (bus->clkstate != CLK_AVAIL) {
|
||||||
|
|
@ -6561,10 +6616,6 @@ dhd_bus_init(dhd_pub_t *dhdp, bool enforce_mutex)
|
||||||
#ifndef BCMSPI
|
#ifndef BCMSPI
|
||||||
|
|
||||||
else {
|
else {
|
||||||
if (dhdp->conf->chip == BCM4354_CHIP_ID) {
|
|
||||||
ret = -1;
|
|
||||||
goto exit;
|
|
||||||
}
|
|
||||||
/* Disable F2 again */
|
/* Disable F2 again */
|
||||||
enable = SDIO_FUNC_ENABLE_1;
|
enable = SDIO_FUNC_ENABLE_1;
|
||||||
bcmsdh_cfg_write(bus->sdh, SDIO_FUNC_0, SDIOD_CCCR_IOEN, enable, NULL);
|
bcmsdh_cfg_write(bus->sdh, SDIO_FUNC_0, SDIOD_CCCR_IOEN, enable, NULL);
|
||||||
|
|
@ -8516,10 +8567,6 @@ exit:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TPUT_MONITOR
|
|
||||||
dhd_conf_tput_monitor(bus->dhd);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (bus->ctrl_wait && TXCTLOK(bus))
|
if (bus->ctrl_wait && TXCTLOK(bus))
|
||||||
wake_up_interruptible(&bus->ctrl_tx_wait);
|
wake_up_interruptible(&bus->ctrl_tx_wait);
|
||||||
dhd_os_sdunlock(bus->dhd);
|
dhd_os_sdunlock(bus->dhd);
|
||||||
|
|
@ -8627,7 +8674,7 @@ dhdsdio_isr(void *arg)
|
||||||
dhd_sched_dpc(bus->dhd);
|
dhd_sched_dpc(bus->dhd);
|
||||||
}
|
}
|
||||||
DHD_OS_WAKE_UNLOCK(bus->dhd);
|
DHD_OS_WAKE_UNLOCK(bus->dhd);
|
||||||
#else
|
#else // SDIO_ISR_THREAD
|
||||||
#if !defined(NDIS)
|
#if !defined(NDIS)
|
||||||
bus->dpc_sched = TRUE;
|
bus->dpc_sched = TRUE;
|
||||||
dhd_sched_dpc(bus->dhd);
|
dhd_sched_dpc(bus->dhd);
|
||||||
|
|
@ -9452,18 +9499,6 @@ dhd_dump_cis(uint fn, uint8 *cis)
|
||||||
static bool
|
static bool
|
||||||
dhdsdio_chipmatch(uint16 chipid)
|
dhdsdio_chipmatch(uint16 chipid)
|
||||||
{
|
{
|
||||||
if (chipid == BCM4330_CHIP_ID)
|
|
||||||
return TRUE;
|
|
||||||
if (chipid == BCM43362_CHIP_ID)
|
|
||||||
return TRUE;
|
|
||||||
if (chipid == BCM43340_CHIP_ID)
|
|
||||||
return TRUE;
|
|
||||||
if (chipid == BCM43341_CHIP_ID)
|
|
||||||
return TRUE;
|
|
||||||
if (chipid == BCM4334_CHIP_ID)
|
|
||||||
return TRUE;
|
|
||||||
if (chipid == BCM4324_CHIP_ID)
|
|
||||||
return TRUE;
|
|
||||||
if (chipid == BCM4335_CHIP_ID)
|
if (chipid == BCM4335_CHIP_ID)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
if (chipid == BCM4339_CHIP_ID)
|
if (chipid == BCM4339_CHIP_ID)
|
||||||
|
|
@ -9474,12 +9509,12 @@ dhdsdio_chipmatch(uint16 chipid)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
if (chipid == BCM4354_CHIP_ID)
|
if (chipid == BCM4354_CHIP_ID)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
if (chipid == BCM4356_CHIP_ID)
|
||||||
|
return TRUE;
|
||||||
if (chipid == BCM4358_CHIP_ID)
|
if (chipid == BCM4358_CHIP_ID)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
if (chipid == BCM43569_CHIP_ID)
|
if (chipid == BCM43569_CHIP_ID)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
if (chipid == BCM4371_CHIP_ID)
|
|
||||||
return TRUE;
|
|
||||||
if (chipid == BCM43430_CHIP_ID)
|
if (chipid == BCM43430_CHIP_ID)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
if (chipid == BCM43018_CHIP_ID)
|
if (chipid == BCM43018_CHIP_ID)
|
||||||
|
|
@ -9849,6 +9884,10 @@ dhdsdio_probe_attach(struct dhd_bus *bus, osl_t *osh, void *sdh, void *regsva,
|
||||||
#ifdef DHD_DEBUG
|
#ifdef DHD_DEBUG
|
||||||
DHD_ERROR(("F1 signature OK, socitype:0x%x chip:0x%4x rev:0x%x pkg:0x%x\n",
|
DHD_ERROR(("F1 signature OK, socitype:0x%x chip:0x%4x rev:0x%x pkg:0x%x\n",
|
||||||
bus->sih->socitype, bus->sih->chip, bus->sih->chiprev, bus->sih->chippkg));
|
bus->sih->socitype, bus->sih->chip, bus->sih->chiprev, bus->sih->chippkg));
|
||||||
|
if (CHIPID(bus->sih->chip) == BCM4381_CHIP_GRPID ||
|
||||||
|
CHIPID(bus->sih->chip) == BCM4382_CHIP_GRPID) {
|
||||||
|
bcmsdh_reg_write(bus->sdh, 0x18010040, 2, 0x7);
|
||||||
|
}
|
||||||
#endif /* DHD_DEBUG */
|
#endif /* DHD_DEBUG */
|
||||||
|
|
||||||
/* XXX Let the layers below dhd know the chipid and chiprev for
|
/* XXX Let the layers below dhd know the chipid and chiprev for
|
||||||
|
|
@ -9904,9 +9943,9 @@ dhdsdio_probe_attach(struct dhd_bus *bus, osl_t *osh, void *sdh, void *regsva,
|
||||||
break;
|
break;
|
||||||
case BCM4350_CHIP_ID:
|
case BCM4350_CHIP_ID:
|
||||||
case BCM4354_CHIP_ID:
|
case BCM4354_CHIP_ID:
|
||||||
|
case BCM4356_CHIP_ID:
|
||||||
case BCM4358_CHIP_ID:
|
case BCM4358_CHIP_ID:
|
||||||
case BCM43569_CHIP_ID:
|
case BCM43569_CHIP_ID:
|
||||||
case BCM4371_CHIP_ID:
|
|
||||||
bus->dongle_ram_base = CR4_4350_RAM_BASE;
|
bus->dongle_ram_base = CR4_4350_RAM_BASE;
|
||||||
break;
|
break;
|
||||||
case BCM4360_CHIP_ID:
|
case BCM4360_CHIP_ID:
|
||||||
|
|
@ -9967,16 +10006,6 @@ dhdsdio_probe_attach(struct dhd_bus *bus, osl_t *osh, void *sdh, void *regsva,
|
||||||
bus->srmemsize = si_socram_srmem_size(bus->sih);
|
bus->srmemsize = si_socram_srmem_size(bus->sih);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((CHIPID(bus->sih->chip) == BCM43430_CHIP_ID) && dhdsdio_sr_cap(bus)) {
|
|
||||||
if (dhd_srmem) {
|
|
||||||
bus->srmemsize = dhd_srmem;
|
|
||||||
} else {
|
|
||||||
/* 43436/8 default sr size is 64K */
|
|
||||||
bus->srmemsize = 0x10000;
|
|
||||||
}
|
|
||||||
DHD_ERROR(("%s srmem size is set %x\n", __func__, bus->srmemsize));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ...but normally deal with the SDPCMDEV core */
|
/* ...but normally deal with the SDPCMDEV core */
|
||||||
#ifdef BCMSDIOLITE
|
#ifdef BCMSDIOLITE
|
||||||
if (!(bus->regs = si_setcore(bus->sih, CC_CORE_ID, 0))) {
|
if (!(bus->regs = si_setcore(bus->sih, CC_CORE_ID, 0))) {
|
||||||
|
|
@ -10230,6 +10259,7 @@ dhd_set_bus_params(struct dhd_bus *bus)
|
||||||
if (bus->dhd->conf->txglomsize >= 0) {
|
if (bus->dhd->conf->txglomsize >= 0) {
|
||||||
bus->txglomsize = bus->dhd->conf->txglomsize;
|
bus->txglomsize = bus->dhd->conf->txglomsize;
|
||||||
}
|
}
|
||||||
|
bus->idletime = dhd_idletime;
|
||||||
#ifdef MINIME
|
#ifdef MINIME
|
||||||
if (bus->dhd->conf->fw_type == FW_TYPE_MINIME) {
|
if (bus->dhd->conf->fw_type == FW_TYPE_MINIME) {
|
||||||
bus->ramsize = bus->dhd->conf->ramsize;
|
bus->ramsize = bus->dhd->conf->ramsize;
|
||||||
|
|
@ -10395,17 +10425,28 @@ dhdsdio_release_dongle(dhd_bus_t *bus, osl_t *osh, bool dongle_isolation, bool r
|
||||||
if (bus->sih) {
|
if (bus->sih) {
|
||||||
/* In Win10, system will be BSOD if using "sysprep" to do OS image */
|
/* In Win10, system will be BSOD if using "sysprep" to do OS image */
|
||||||
/* Skip this will not cause the BSOD. */
|
/* Skip this will not cause the BSOD. */
|
||||||
#if !defined(BCMLXSDMMC) && !defined(NDIS)
|
#if defined(DHD_SI_WD_RESET) || (!defined(BCMLXSDMMC) && !defined(NDIS))
|
||||||
/* XXX - Using the watchdog to reset the chip does not allow
|
if (CHIPID(bus->sih->chip) == BCM4381_CHIP_GRPID ||
|
||||||
* further SDIO communication. For the SDMMC Driver, this
|
CHIPID(bus->sih->chip) == BCM4382_CHIP_GRPID) {
|
||||||
* causes interrupt to not be de-registered properly.
|
/* XXX - Using the watchdog to reset the chip does not allow
|
||||||
*/
|
* further SDIO communication. For the SDMMC Driver, this
|
||||||
/* XXX: dongle isolation mode is on don't reset the chip */
|
* causes interrupt to not be de-registered properly.
|
||||||
if (bus->dhd) {
|
*/
|
||||||
dhdsdio_clkctl(bus, CLK_AVAIL, FALSE);
|
/* XXX: dongle isolation mode is on don't reset the chip */
|
||||||
|
if (bus->dhd) {
|
||||||
|
dhdsdio_clkctl(bus, CLK_AVAIL, FALSE);
|
||||||
|
}
|
||||||
|
if (KSO_ENAB(bus) && (dongle_isolation == FALSE)) {
|
||||||
|
si_watchdog(bus->sih, 4);
|
||||||
|
DHD_ERROR(("%s: after si_watchdog, "
|
||||||
|
"dongle is going to be released\n",
|
||||||
|
__FUNCTION__));
|
||||||
|
#if defined(DHD_SI_WD_RESET)
|
||||||
|
DHD_ERROR(("%s: set si_wd TRUE\n", __FUNCTION__));
|
||||||
|
bus->dhd->si_wd = TRUE;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (KSO_ENAB(bus) && (dongle_isolation == FALSE))
|
|
||||||
si_watchdog(bus->sih, 4);
|
|
||||||
#endif /* !defined(BCMLXSDMMC) */
|
#endif /* !defined(BCMLXSDMMC) */
|
||||||
if (bus->dhd) {
|
if (bus->dhd) {
|
||||||
dhdsdio_clkctl(bus, CLK_NONE, FALSE);
|
dhdsdio_clkctl(bus, CLK_NONE, FALSE);
|
||||||
|
|
@ -10569,6 +10610,32 @@ dhdsdio_resume(void *context)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DEVICE_PM_CALLBACK
|
||||||
|
static int
|
||||||
|
dhdsdio_prepare(void *context)
|
||||||
|
{
|
||||||
|
int err = 0;
|
||||||
|
#if defined(LINUX)
|
||||||
|
dhd_bus_t *bus = (dhd_bus_t*)context;
|
||||||
|
err = dhd_pm_callback(bus->dhd, 1, NULL);
|
||||||
|
#endif /* LINUX */
|
||||||
|
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
dhdsdio_complete(void *context)
|
||||||
|
{
|
||||||
|
int err = 0;
|
||||||
|
#if defined(LINUX)
|
||||||
|
dhd_bus_t *bus = (dhd_bus_t*)context;
|
||||||
|
err = dhd_pm_callback(bus->dhd, 0, NULL);
|
||||||
|
#endif /* LINUX */
|
||||||
|
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
#endif /* DEVICE_PM_CALLBACK */
|
||||||
|
|
||||||
/* Register/Unregister functions are called by the main DHD entry
|
/* Register/Unregister functions are called by the main DHD entry
|
||||||
* point (e.g. module insertion) to link with the bus driver, in
|
* point (e.g. module insertion) to link with the bus driver, in
|
||||||
* order to look for or await the device.
|
* order to look for or await the device.
|
||||||
|
|
@ -10578,7 +10645,11 @@ static bcmsdh_driver_t dhd_sdio = {
|
||||||
dhdsdio_probe,
|
dhdsdio_probe,
|
||||||
dhdsdio_disconnect,
|
dhdsdio_disconnect,
|
||||||
dhdsdio_suspend,
|
dhdsdio_suspend,
|
||||||
dhdsdio_resume
|
dhdsdio_resume,
|
||||||
|
#ifdef DEVICE_PM_CALLBACK
|
||||||
|
dhdsdio_prepare,
|
||||||
|
dhdsdio_complete,
|
||||||
|
#endif /* DEVICE_PM_CALLBACK */
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
@ -10923,14 +10994,6 @@ dhdsdio_download_code_file(struct dhd_bus *bus, char *pfw_path)
|
||||||
|
|
||||||
/* Download image */
|
/* Download image */
|
||||||
while ((len = dhd_os_get_image_block((char*)memptr, memblock_size, image))) {
|
while ((len = dhd_os_get_image_block((char*)memptr, memblock_size, image))) {
|
||||||
// terence 20150412: fix for firmware failed to download
|
|
||||||
if (bus->dhd->conf->chip == BCM43340_CHIP_ID ||
|
|
||||||
bus->dhd->conf->chip == BCM43341_CHIP_ID) {
|
|
||||||
if (len % 64 != 0) {
|
|
||||||
memset(memptr+len, 0, len%64);
|
|
||||||
len += (64 - len%64);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (len < 0) {
|
if (len < 0) {
|
||||||
DHD_ERROR(("%s: dhd_os_get_image_block failed (%d)\n", __FUNCTION__, len));
|
DHD_ERROR(("%s: dhd_os_get_image_block failed (%d)\n", __FUNCTION__, len));
|
||||||
bcmerror = BCME_ERROR;
|
bcmerror = BCME_ERROR;
|
||||||
|
|
@ -11245,10 +11308,6 @@ _dhdsdio_download_firmware(struct dhd_bus *bus)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CHIPID(bus->sih->chip) == BCM43711_CHIP_ID) {
|
|
||||||
si_pmu_43711a0_pll_war(bus->sih);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Take arm out of reset */
|
/* Take arm out of reset */
|
||||||
if (dhdsdio_download_state(bus, FALSE)) {
|
if (dhdsdio_download_state(bus, FALSE)) {
|
||||||
DHD_ERROR(("%s: error getting out of ARM core reset\n", __FUNCTION__));
|
DHD_ERROR(("%s: error getting out of ARM core reset\n", __FUNCTION__));
|
||||||
|
|
@ -11452,6 +11511,14 @@ dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag)
|
||||||
if (flag == TRUE) {
|
if (flag == TRUE) {
|
||||||
if (!bus->dhd->dongle_reset) {
|
if (!bus->dhd->dongle_reset) {
|
||||||
DHD_ERROR(("%s: == Power OFF ==\n", __FUNCTION__));
|
DHD_ERROR(("%s: == Power OFF ==\n", __FUNCTION__));
|
||||||
|
#ifdef DHD_SI_WD_RESET
|
||||||
|
if (CHIPID(bus->sih->chip) == BCM4381_CHIP_GRPID ||
|
||||||
|
CHIPID(bus->sih->chip) == BCM4382_CHIP_GRPID) {
|
||||||
|
DHD_ERROR(("%s: RESET PMU status\n", __FUNCTION__));
|
||||||
|
bcmsdh_reg_write(bus->sdh, 0x18012618, 4, 0x64fffff);
|
||||||
|
OSL_DELAY(100);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
dhdsdio_advertise_bus_cleanup(bus->dhd);
|
dhdsdio_advertise_bus_cleanup(bus->dhd);
|
||||||
dhd_os_sdlock(dhdp);
|
dhd_os_sdlock(dhdp);
|
||||||
dhd_os_wd_timer(dhdp, 0);
|
dhd_os_wd_timer(dhdp, 0);
|
||||||
|
|
@ -11473,8 +11540,11 @@ dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag)
|
||||||
#endif /* defined(OOB_INTR_ONLY) || defined(BCMSPI_ANDROID) */
|
#endif /* defined(OOB_INTR_ONLY) || defined(BCMSPI_ANDROID) */
|
||||||
|
|
||||||
/* Clean tx/rx buffer pointers, detach from the dongle */
|
/* Clean tx/rx buffer pointers, detach from the dongle */
|
||||||
|
#ifdef DHD_SI_WD_RESET
|
||||||
|
dhdsdio_release_dongle(bus, bus->dhd->osh, FALSE, TRUE);
|
||||||
|
#else
|
||||||
dhdsdio_release_dongle(bus, bus->dhd->osh, TRUE, TRUE);
|
dhdsdio_release_dongle(bus, bus->dhd->osh, TRUE, TRUE);
|
||||||
|
#endif
|
||||||
bus->dhd->dongle_reset = TRUE;
|
bus->dhd->dongle_reset = TRUE;
|
||||||
DHD_ERROR(("%s: making dhdpub up FALSE\n", __FUNCTION__));
|
DHD_ERROR(("%s: making dhdpub up FALSE\n", __FUNCTION__));
|
||||||
bus->dhd->up = FALSE;
|
bus->dhd->up = FALSE;
|
||||||
|
|
@ -11495,6 +11565,10 @@ dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag)
|
||||||
|
|
||||||
printf("%s: == Power ON ==\n", __FUNCTION__);
|
printf("%s: == Power ON ==\n", __FUNCTION__);
|
||||||
|
|
||||||
|
#ifdef DHD_SI_WD_RESET
|
||||||
|
DHD_ERROR(("%s: set si_wd FALSE\n", __FUNCTION__));
|
||||||
|
bus->dhd->si_wd = FALSE;
|
||||||
|
#endif
|
||||||
if (bus->dhd->dongle_reset) {
|
if (bus->dhd->dongle_reset) {
|
||||||
/* Turn on WLAN */
|
/* Turn on WLAN */
|
||||||
dhd_os_sdlock(dhdp);
|
dhd_os_sdlock(dhdp);
|
||||||
|
|
@ -11559,10 +11633,9 @@ dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag)
|
||||||
__FUNCTION__));
|
__FUNCTION__));
|
||||||
#if defined(OEM_ANDROID)
|
#if defined(OEM_ANDROID)
|
||||||
DHD_INFO(("Will call dhd_bus_start instead\n"));
|
DHD_INFO(("Will call dhd_bus_start instead\n"));
|
||||||
dhd_bus_resume(dhdp, 1);
|
bcmerror = dhd_bus_resume(dhdp, 1);
|
||||||
#if defined(HW_OOB) || defined(FORCE_WOWLAN)
|
if (bcmerror)
|
||||||
dhd_conf_set_hw_oob_intr(bus->sdh, bus->sih); // terence 20120615: fix for OOB initial issue
|
return bcmerror;
|
||||||
#endif
|
|
||||||
if ((bcmerror = dhd_bus_start(dhdp)) != 0)
|
if ((bcmerror = dhd_bus_start(dhdp)) != 0)
|
||||||
DHD_ERROR(("%s: dhd_bus_start fail with %d\n",
|
DHD_ERROR(("%s: dhd_bus_start fail with %d\n",
|
||||||
__FUNCTION__, bcmerror));
|
__FUNCTION__, bcmerror));
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
#include <linux/skbuff.h>
|
#include <linux/skbuff.h>
|
||||||
|
|
||||||
#define DHD_STATIC_VERSION_STR "101.10.361.31 (wlan=r892223-20230427-1)"
|
#define DHD_STATIC_VERSION_STR "101.10.361.36 (wlan=r892223-20231107-1)"
|
||||||
#define STATIC_ERROR_LEVEL BIT(0)
|
#define STATIC_ERROR_LEVEL BIT(0)
|
||||||
#define STATIC_TRACE_LEVEL BIT(1)
|
#define STATIC_TRACE_LEVEL BIT(1)
|
||||||
#define STATIC_MSG_LEVEL BIT(0)
|
#define STATIC_MSG_LEVEL BIT(0)
|
||||||
|
|
@ -106,8 +106,8 @@ enum dhd_prealloc_index {
|
||||||
#define DHD_PREALLOC_DATABUF_SIZE (64 * 1024)
|
#define DHD_PREALLOC_DATABUF_SIZE (64 * 1024)
|
||||||
#define DHD_PREALLOC_OSL_BUF_SIZE (STATIC_BUF_MAX_NUM * STATIC_BUF_SIZE)
|
#define DHD_PREALLOC_OSL_BUF_SIZE (STATIC_BUF_MAX_NUM * STATIC_BUF_SIZE)
|
||||||
#define DHD_PREALLOC_WIPHY_ESCAN0_SIZE (64 * 1024)
|
#define DHD_PREALLOC_WIPHY_ESCAN0_SIZE (64 * 1024)
|
||||||
#define DHD_PREALLOC_DHD_INFO_SIZE (44 * 1024)
|
#define DHD_PREALLOC_DHD_INFO_SIZE (46 * 1024)
|
||||||
#define DHD_PREALLOC_MEMDUMP_RAM_SIZE (1290 * 1024)
|
#define DHD_PREALLOC_MEMDUMP_RAM_SIZE (1600 * 1024)
|
||||||
#define DHD_PREALLOC_DHD_WLFC_HANGER_SIZE (73 * 1024)
|
#define DHD_PREALLOC_DHD_WLFC_HANGER_SIZE (73 * 1024)
|
||||||
#ifdef DHD_USE_STATIC_MEMDUMP
|
#ifdef DHD_USE_STATIC_MEMDUMP
|
||||||
#define DHD_PREALLOC_DHD_LOG_DUMP_BUF_SIZE \
|
#define DHD_PREALLOC_DHD_LOG_DUMP_BUF_SIZE \
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* DHD debugability: Status Information Logging support
|
* DHD debugability: Status Information Logging support
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* DHD debugability: Header file for the Status Information Logging
|
* DHD debugability: Header file for the Status Information Logging
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -171,7 +190,26 @@ typedef enum stat_log_stat {
|
||||||
ST(ASSOC_NO_NETWORKS) = 86, /* association failure due to no networks */
|
ST(ASSOC_NO_NETWORKS) = 86, /* association failure due to no networks */
|
||||||
ST(ASSOC_OTHERS) = 87, /* association failure due to no networks */
|
ST(ASSOC_OTHERS) = 87, /* association failure due to no networks */
|
||||||
ST(REASSOC_DONE_OTHERS) = 88, /* complete to reassoc with other reason */
|
ST(REASSOC_DONE_OTHERS) = 88, /* complete to reassoc with other reason */
|
||||||
ST(MAX) = 89 /* Max Status */
|
ST(SOLICIT) = 89, /* DHCPv6 Solicit */
|
||||||
|
ST(ADVERTISE) = 90, /* DHCPv6 Advertise */
|
||||||
|
ST(REQUEST) = 91, /* DHCPv6 Request */
|
||||||
|
ST(CONFIRM) = 92, /* DHCPv6 Confirm */
|
||||||
|
ST(RENEW) = 93, /* DHCPv6 Renew */
|
||||||
|
ST(REBIND) = 94, /* DHCPv6 Rebind */
|
||||||
|
ST(REPLY) = 95, /* DHCPv6 Reply */
|
||||||
|
ST(RELEASE) = 96, /* DHCPv6 Release */
|
||||||
|
ST(DECLINE) = 97, /* DHCPv6 Decline */
|
||||||
|
ST(RECONFIGURE) = 98, /* ICMPv6 Reconfigure */
|
||||||
|
ST(ECHO_REQ) = 99, /* ICMPv6 Echo Req */
|
||||||
|
ST(ECHO_REPLY) = 100, /* ICMPv6 Echo Reply */
|
||||||
|
ST(MULTI_QUERY) = 101, /* ICMPv6 Multi Query */
|
||||||
|
ST(MULTI_REPORT) = 102, /* ICMPv6 Multi Report */
|
||||||
|
ST(MULTI_DONE) = 103, /* ICMPv6 Multi Done */
|
||||||
|
ST(ROUTER_SOLIC) = 104, /* ICMPv6 Router Solic */
|
||||||
|
ST(ROUTER_ADV) = 105, /* ICMPv6 Router Adv */
|
||||||
|
ST(NEIGHBOR_SOLIC) = 106, /* ICMPv6 Neighbor Solic */
|
||||||
|
ST(NEIGHBOR_ADV) = 107, /* ICMPv6 Neighbor Adv */
|
||||||
|
ST(MAX) = 108 /* Max Status */
|
||||||
} stat_log_stat_t;
|
} stat_log_stat_t;
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* DHD PROP_TXSTATUS Module.
|
* DHD PROP_TXSTATUS Module.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -470,9 +489,9 @@ _dhd_wlfc_deque_afq(athost_wl_status_info_t* ctx, uint16 hslot, uint8 hcnt, uint
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
/* none is matched */
|
/* none is matched */
|
||||||
if (b) {
|
if (b) {
|
||||||
DHD_ERROR(("%s: can't find matching seq(%d)\n", __FUNCTION__, hcnt));
|
DHD_INFO(("%s: can't find matching seq(%d)\n", __FUNCTION__, hcnt));
|
||||||
} else {
|
} else {
|
||||||
DHD_ERROR(("%s: queue is empty\n", __FUNCTION__));
|
DHD_INFO(("%s: queue is empty\n", __FUNCTION__));
|
||||||
}
|
}
|
||||||
|
|
||||||
return BCME_ERROR;
|
return BCME_ERROR;
|
||||||
|
|
@ -506,6 +525,35 @@ _dhd_wlfc_deque_afq(athost_wl_status_info_t* ctx, uint16 hslot, uint8 hcnt, uint
|
||||||
PKTSETLINK(p, NULL);
|
PKTSETLINK(p, NULL);
|
||||||
|
|
||||||
if (pktout) {
|
if (pktout) {
|
||||||
|
#ifdef DHD_HWTSTAMP
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))
|
||||||
|
uint8 freeruncnt;
|
||||||
|
|
||||||
|
freeruncnt = WL_TXSTATUS_GET_FREERUNCTR(DHD_PKTTAG_H2DTAG(PKTTAG(p)));
|
||||||
|
DHD_INFO(("%s: htod_tag:%x, hslot:%x, entry:%p freeruncnt:%d, tsf:%08x%08x\n",
|
||||||
|
__func__, DHD_PKTTAG_H2DTAG(PKTTAG(p)), hslot, entry,
|
||||||
|
freeruncnt, entry->tsf[freeruncnt][0], entry->tsf[freeruncnt][1]));
|
||||||
|
|
||||||
|
if (dhd_hwtstamp_txtype((dhd_pub_t *)ctx->dhdp) &&
|
||||||
|
(skb_shinfo((struct sk_buff*)p)->tx_flags & SKBTX_HW_TSTAMP)) {
|
||||||
|
ktime_t tsf;
|
||||||
|
struct skb_shared_hwtstamps timestamp;
|
||||||
|
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0))
|
||||||
|
tsf = (s64)entry->tsf[freeruncnt][0];
|
||||||
|
tsf = tsf << 32 | entry->tsf[freeruncnt][1];
|
||||||
|
/* Convert micro sec tsf to nano sec kernel hw timestamp */
|
||||||
|
timestamp.hwtstamp = tsf * 1000;
|
||||||
|
#else
|
||||||
|
tsf.tv64 = (s64)entry->tsf[freeruncnt][0];
|
||||||
|
tsf.tv64 = tsf.tv64 << 32 | entry->tsf[freeruncnt][1];
|
||||||
|
/* Convert micro sec tsf to nano sec kernel hw timestamp */
|
||||||
|
timestamp.hwtstamp.tv64 = tsf.tv64 * 1000;
|
||||||
|
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)) */
|
||||||
|
skb_tstamp_tx((struct sk_buff*)p, ×tamp);
|
||||||
|
}
|
||||||
|
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)) */
|
||||||
|
#endif /* DHD_HWTSTAMP */
|
||||||
*pktout = p;
|
*pktout = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -668,7 +716,8 @@ _dhd_wlfc_find_table_entry(athost_wl_status_info_t* ctx, void* p)
|
||||||
|
|
||||||
for (i = 0; i < WLFC_MAC_DESC_TABLE_SIZE; i++) {
|
for (i = 0; i < WLFC_MAC_DESC_TABLE_SIZE; i++) {
|
||||||
if (table[i].occupied) {
|
if (table[i].occupied) {
|
||||||
if (table[i].interface_id == ifid) {
|
if (table[i].interface_id == ifid ||
|
||||||
|
iftype == WLC_E_IF_ROLE_WDS) {
|
||||||
if (!memcmp(table[i].ea, dstn, ETHER_ADDR_LEN)) {
|
if (!memcmp(table[i].ea, dstn, ETHER_ADDR_LEN)) {
|
||||||
entry = &table[i];
|
entry = &table[i];
|
||||||
break;
|
break;
|
||||||
|
|
@ -946,7 +995,8 @@ _dhd_wlfc_flow_control_check(athost_wl_status_info_t* ctx, struct pktq* pq, uint
|
||||||
|
|
||||||
/* Return for the bc/mc and unknown destinations configured by
|
/* Return for the bc/mc and unknown destinations configured by
|
||||||
* &wlfc->destination_entries.other to prevent from out-of-boundary access
|
* &wlfc->destination_entries.other to prevent from out-of-boundary access
|
||||||
* in array (BRK exception) kernel panic issue. */
|
* in array (BRK exception) kernel panic issue.
|
||||||
|
*/
|
||||||
if (if_id >= WLFC_MAX_IFNUM)
|
if (if_id >= WLFC_MAX_IFNUM)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -1482,6 +1532,50 @@ static bool _dhd_wlfc_entrypkt_fn(void* p, void *entry)
|
||||||
return (DHD_PKTTAG_WLFCPKT(PKTTAG(p))&& (entry == DHD_PKTTAG_ENTRY(PKTTAG(p))));
|
return (DHD_PKTTAG_WLFCPKT(PKTTAG(p))&& (entry == DHD_PKTTAG_ENTRY(PKTTAG(p))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_dhd_wlfc_return_explicit_credit(athost_wl_status_info_t* wlfc, void* pkt)
|
||||||
|
{
|
||||||
|
dhd_pub_t *dhdp;
|
||||||
|
bool credit_return = FALSE;
|
||||||
|
|
||||||
|
if (!wlfc || !pkt) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
dhdp = (dhd_pub_t *)(wlfc->dhdp);
|
||||||
|
if (dhdp && (dhdp->proptxstatus_mode == WLFC_FCMODE_EXPLICIT_CREDIT) &&
|
||||||
|
DHD_PKTTAG_CREDITCHECK(PKTTAG(pkt))) {
|
||||||
|
int lender, credit_returned = 0;
|
||||||
|
uint8 fifo_id = DHD_PKTTAG_FIFO(PKTTAG(pkt));
|
||||||
|
|
||||||
|
/* Note that borrower is fifo_id */
|
||||||
|
/* Return credits to highest priority lender first */
|
||||||
|
for (lender = AC_COUNT; lender >= 0; lender--) {
|
||||||
|
if (wlfc->credits_borrowed[fifo_id][lender] > 0) {
|
||||||
|
wlfc->FIFO_credit[lender]++;
|
||||||
|
if (wlfc->credits_borrowed[fifo_id][lender])
|
||||||
|
wlfc->credits_borrowed[fifo_id][lender]--;
|
||||||
|
credit_returned = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!credit_returned) {
|
||||||
|
wlfc->FIFO_credit[fifo_id]++;
|
||||||
|
}
|
||||||
|
if (wlfc->FIFO_credit[fifo_id] > wlfc->Init_FIFO_credit[fifo_id]) {
|
||||||
|
wlfc->FIFO_credit[fifo_id] = wlfc->Init_FIFO_credit[fifo_id];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BCM_REFERENCE(credit_return);
|
||||||
|
#if defined(DHD_WLFC_THREAD)
|
||||||
|
if (credit_return) {
|
||||||
|
_dhd_wlfc_thread_wakeup(dhdp);
|
||||||
|
}
|
||||||
|
#endif /* defined(DHD_WLFC_THREAD) */
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_dhd_wlfc_return_implied_credit(athost_wl_status_info_t* wlfc, void* pkt)
|
_dhd_wlfc_return_implied_credit(athost_wl_status_info_t* wlfc, void* pkt)
|
||||||
{
|
{
|
||||||
|
|
@ -1608,8 +1702,14 @@ _dhd_wlfc_pktq_flush(athost_wl_status_info_t* ctx, struct pktq *pq,
|
||||||
bool head = (p == q->head);
|
bool head = (p == q->head);
|
||||||
if (head)
|
if (head)
|
||||||
q->head = PKTLINK(p);
|
q->head = PKTLINK(p);
|
||||||
else
|
else {
|
||||||
PKTSETLINK(prev, PKTLINK(p));
|
if (prev)
|
||||||
|
PKTSETLINK(prev, PKTLINK(p));
|
||||||
|
if (PKTLINK(p) == NULL) {
|
||||||
|
q->tail = prev;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (q_type == Q_TYPE_PSQ) {
|
if (q_type == Q_TYPE_PSQ) {
|
||||||
if (!WLFC_GET_AFQ(dhdp->wlfc_mode) && (prec & 1)) {
|
if (!WLFC_GET_AFQ(dhdp->wlfc_mode) && (prec & 1)) {
|
||||||
_dhd_wlfc_hanger_remove_reference(ctx->hanger, p);
|
_dhd_wlfc_hanger_remove_reference(ctx->hanger, p);
|
||||||
|
|
@ -1646,7 +1746,10 @@ _dhd_wlfc_pktq_flush(athost_wl_status_info_t* ctx, struct pktq *pq,
|
||||||
(!entry->suppr_transit_count))
|
(!entry->suppr_transit_count))
|
||||||
entry->suppressed = FALSE;
|
entry->suppressed = FALSE;
|
||||||
}
|
}
|
||||||
_dhd_wlfc_return_implied_credit(ctx, p);
|
if (dhdp->proptxstatus_mode == WLFC_FCMODE_EXPLICIT_CREDIT)
|
||||||
|
_dhd_wlfc_return_explicit_credit(ctx, p);
|
||||||
|
else if (dhdp->proptxstatus_mode == WLFC_FCMODE_IMPLIED_CREDIT)
|
||||||
|
_dhd_wlfc_return_implied_credit(ctx, p);
|
||||||
ctx->stats.cleanup_fw_cnt++;
|
ctx->stats.cleanup_fw_cnt++;
|
||||||
}
|
}
|
||||||
PKTSETLINK(p, NULL);
|
PKTSETLINK(p, NULL);
|
||||||
|
|
@ -1774,6 +1877,8 @@ _dhd_wlfc_cleanup_txq(dhd_pub_t *dhd, f_processpkt_t fn, void *arg)
|
||||||
DHD_ERROR(("%s: can't find pkt(%p) in hanger, free it anyway\n",
|
DHD_ERROR(("%s: can't find pkt(%p) in hanger, free it anyway\n",
|
||||||
__FUNCTION__, pkt));
|
__FUNCTION__, pkt));
|
||||||
}
|
}
|
||||||
|
if (entry->onbus_pkts_count > 0)
|
||||||
|
entry->onbus_pkts_count--;
|
||||||
if (entry->transit_count)
|
if (entry->transit_count)
|
||||||
entry->transit_count--;
|
entry->transit_count--;
|
||||||
if (entry->suppr_transit_count) {
|
if (entry->suppr_transit_count) {
|
||||||
|
|
@ -1783,7 +1888,10 @@ _dhd_wlfc_cleanup_txq(dhd_pub_t *dhd, f_processpkt_t fn, void *arg)
|
||||||
(!entry->suppr_transit_count))
|
(!entry->suppr_transit_count))
|
||||||
entry->suppressed = FALSE;
|
entry->suppressed = FALSE;
|
||||||
}
|
}
|
||||||
_dhd_wlfc_return_implied_credit(wlfc, pkt);
|
if (dhd->proptxstatus_mode == WLFC_FCMODE_EXPLICIT_CREDIT)
|
||||||
|
_dhd_wlfc_return_explicit_credit(wlfc, pkt);
|
||||||
|
else if (dhd->proptxstatus_mode == WLFC_FCMODE_IMPLIED_CREDIT)
|
||||||
|
_dhd_wlfc_return_implied_credit(wlfc, pkt);
|
||||||
wlfc->pkt_cnt_in_drv[DHD_PKTTAG_IF(PKTTAG(pkt))][DHD_PKTTAG_FIFO(PKTTAG(pkt))]--;
|
wlfc->pkt_cnt_in_drv[DHD_PKTTAG_IF(PKTTAG(pkt))][DHD_PKTTAG_FIFO(PKTTAG(pkt))]--;
|
||||||
wlfc->stats.pktout++;
|
wlfc->stats.pktout++;
|
||||||
wlfc->stats.cleanup_txq_cnt++;
|
wlfc->stats.cleanup_txq_cnt++;
|
||||||
|
|
@ -1905,7 +2013,6 @@ _dhd_wlfc_mac_entry_update(athost_wl_status_info_t* ctx, wlfc_mac_descriptor_t*
|
||||||
entry->transit_maxcount = wl_ext_get_wlfc_maxcount(ctx->dhdp, ifid);
|
entry->transit_maxcount = wl_ext_get_wlfc_maxcount(ctx->dhdp, ifid);
|
||||||
#endif /* PROPTX_MAXCOUNT */
|
#endif /* PROPTX_MAXCOUNT */
|
||||||
entry->suppr_transit_count = 0;
|
entry->suppr_transit_count = 0;
|
||||||
entry->onbus_pkts_count = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action == eWLFC_MAC_ENTRY_ACTION_ADD) {
|
if (action == eWLFC_MAC_ENTRY_ACTION_ADD) {
|
||||||
|
|
@ -3042,7 +3149,8 @@ int dhd_wlfc_enable(dhd_pub_t *dhd)
|
||||||
wlfc->single_ac_timestamp = 0;
|
wlfc->single_ac_timestamp = 0;
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
DHD_ERROR(("%s: ret=%d\n", __FUNCTION__, rc));
|
DHD_ERROR(("%s: proptx=%d, ptxmode=%d, ret=%d\n", __FUNCTION__,
|
||||||
|
dhd->wlfc_enabled, dhd->wlfc_state ? dhd->proptxstatus_mode : 0, rc));
|
||||||
dhd_os_wlfc_unblock(dhd);
|
dhd_os_wlfc_unblock(dhd);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
|
@ -3113,6 +3221,12 @@ dhd_wlfc_parse_header_info(dhd_pub_t *dhd, void* pktbuf, int tlv_hdr_len, uchar
|
||||||
uint16 processed = 0;
|
uint16 processed = 0;
|
||||||
athost_wl_status_info_t* wlfc = NULL;
|
athost_wl_status_info_t* wlfc = NULL;
|
||||||
void* entry;
|
void* entry;
|
||||||
|
#ifdef DHD_HWTSTAMP
|
||||||
|
uint16 hslot;
|
||||||
|
uint8 freeruncnt;
|
||||||
|
uint32 pktdata = 0;
|
||||||
|
wlfc_mac_descriptor_t *node;
|
||||||
|
#endif /* DHD_HWTSTAMP */
|
||||||
|
|
||||||
if ((dhd == NULL) || (pktbuf == NULL)) {
|
if ((dhd == NULL) || (pktbuf == NULL)) {
|
||||||
DHD_ERROR(("Error: %s():%d\n", __FUNCTION__, __LINE__));
|
DHD_ERROR(("Error: %s():%d\n", __FUNCTION__, __LINE__));
|
||||||
|
|
@ -3152,6 +3266,26 @@ dhd_wlfc_parse_header_info(dhd_pub_t *dhd, void* pktbuf, int tlv_hdr_len, uchar
|
||||||
|
|
||||||
DHD_INFO(("%s():%d type %d remainder %d processed %d\n",
|
DHD_INFO(("%s():%d type %d remainder %d processed %d\n",
|
||||||
__FUNCTION__, __LINE__, type, remainder, processed));
|
__FUNCTION__, __LINE__, type, remainder, processed));
|
||||||
|
#ifdef DHD_HWTSTAMP
|
||||||
|
if (type == WLFC_CTL_TYPE_TX_ENTRY_STAMP) {
|
||||||
|
memcpy(&pktdata, value, sizeof(uint32));
|
||||||
|
hslot = WL_TXSTATUS_GET_HSLOT(pktdata);
|
||||||
|
freeruncnt = WL_TXSTATUS_GET_FREERUNCTR(pktdata);
|
||||||
|
if (hslot < WLFC_MAC_DESC_TABLE_SIZE) {
|
||||||
|
node = &wlfc->destination_entries.nodes[hslot];
|
||||||
|
} else if (hslot < (WLFC_MAC_DESC_TABLE_SIZE + WLFC_MAX_IFNUM)) {
|
||||||
|
hslot = hslot - WLFC_MAC_DESC_TABLE_SIZE;
|
||||||
|
node = &wlfc->destination_entries.interfaces[hslot];
|
||||||
|
} else {
|
||||||
|
node = &wlfc->destination_entries.other;
|
||||||
|
}
|
||||||
|
memcpy(&node->tsf[freeruncnt][0], (value+4), sizeof(uint32));
|
||||||
|
memcpy(&node->tsf[freeruncnt][1], (value+8), sizeof(uint32));
|
||||||
|
DHD_INFO(("%s():%d, freeruncnt:%d, tsf:%08x%08x\n",
|
||||||
|
__func__, __LINE__, freeruncnt, node->tsf[freeruncnt][0],
|
||||||
|
node->tsf[freeruncnt][1]));
|
||||||
|
}
|
||||||
|
#endif /* DHD_HWTSTAMP */
|
||||||
|
|
||||||
if (type == WLFC_CTL_TYPE_HOST_REORDER_RXPKTS)
|
if (type == WLFC_CTL_TYPE_HOST_REORDER_RXPKTS)
|
||||||
_dhd_wlfc_reorderinfo_indicate(value, len, reorder_info_buf,
|
_dhd_wlfc_reorderinfo_indicate(value, len, reorder_info_buf,
|
||||||
|
|
@ -3705,12 +3839,16 @@ int
|
||||||
dhd_wlfc_init(dhd_pub_t *dhd)
|
dhd_wlfc_init(dhd_pub_t *dhd)
|
||||||
{
|
{
|
||||||
/* enable all signals & indicate host proptxstatus logic is active */
|
/* enable all signals & indicate host proptxstatus logic is active */
|
||||||
uint32 tlv, mode, fw_caps;
|
uint32 tlv, flags, mode, fw_caps;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (dhd == NULL) {
|
if (dhd == NULL) {
|
||||||
DHD_ERROR(("Error: %s():%d\n", __FUNCTION__, __LINE__));
|
DHD_ERROR(("Error: %s():%d\n", __FUNCTION__, __LINE__));
|
||||||
return BCME_BADARG;
|
return BCME_BADARG;
|
||||||
|
} else if (!FW_SUPPORTED(dhd, proptxstatus)) {
|
||||||
|
DHD_ERROR(("%s-%d: *Error, PROPTXSTATUS not supported\n",
|
||||||
|
__func__, __LINE__));
|
||||||
|
return BCME_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
dhd_os_wlfc_block(dhd);
|
dhd_os_wlfc_block(dhd);
|
||||||
|
|
@ -3722,28 +3860,48 @@ dhd_wlfc_init(dhd_pub_t *dhd)
|
||||||
dhd->wlfc_enabled = TRUE;
|
dhd->wlfc_enabled = TRUE;
|
||||||
dhd_os_wlfc_unblock(dhd);
|
dhd_os_wlfc_unblock(dhd);
|
||||||
|
|
||||||
tlv = WLFC_FLAGS_RSSI_SIGNALS |
|
/* XXX dhd->wlfc_state = NULL; */
|
||||||
|
/* XXX ANDREY:may erase pointer to already created wlfc_state, PR#97824 */
|
||||||
|
|
||||||
|
ret = dhd_wl_ioctl_get_intiovar(dhd, "tlv", &tlv,
|
||||||
|
WLC_GET_VAR, FALSE, 0);
|
||||||
|
if (ret) {
|
||||||
|
DHD_ERROR(("%s-%d: *fail to get TLV, ret=%d\n",
|
||||||
|
__func__, __LINE__, ret));
|
||||||
|
}
|
||||||
|
|
||||||
|
flags = WLFC_FLAGS_RSSI_SIGNALS |
|
||||||
WLFC_FLAGS_XONXOFF_SIGNALS |
|
WLFC_FLAGS_XONXOFF_SIGNALS |
|
||||||
WLFC_FLAGS_CREDIT_STATUS_SIGNALS |
|
WLFC_FLAGS_CREDIT_STATUS_SIGNALS |
|
||||||
WLFC_FLAGS_HOST_PROPTXSTATUS_ACTIVE |
|
WLFC_FLAGS_HOST_PROPTXSTATUS_ACTIVE |
|
||||||
WLFC_FLAGS_HOST_RXRERODER_ACTIVE;
|
WLFC_FLAGS_HOST_RXRERODER_ACTIVE;
|
||||||
|
|
||||||
/* XXX dhd->wlfc_state = NULL; */
|
/* reset first to get credit map later */
|
||||||
/* XXX ANDREY:may erase pointer to already created wlfc_state, PR#97824 */
|
tlv &= ~flags;
|
||||||
|
ret = dhd_wl_ioctl_set_intiovar(dhd, "tlv", tlv,
|
||||||
|
WLC_SET_VAR, TRUE, 0);
|
||||||
|
if (ret) {
|
||||||
|
DHD_ERROR(("%s-%d: *fail to reset TLV=0x%X, ret=%d\n",
|
||||||
|
__func__, __LINE__, tlv, ret));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
tlv |= flags;
|
||||||
try to enable/disable signaling by sending "tlv" iovar. if that fails,
|
|
||||||
fallback to no flow control? Print a message for now.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* enable proptxtstatus signaling by default */
|
/* enable proptxtstatus signaling by default */
|
||||||
if (!dhd_wl_ioctl_set_intiovar(dhd, "tlv", tlv, WLC_SET_VAR, TRUE, 0)) {
|
ret = dhd_wl_ioctl_set_intiovar(dhd, "tlv", tlv,
|
||||||
/*
|
WLC_SET_VAR, TRUE, 0);
|
||||||
Leaving the message for now, it should be removed after a while; once
|
if (ret) {
|
||||||
the tlv situation is stable.
|
DHD_ERROR(("%s-%d: *fail to set TLV=0x%X, ret=%d\n",
|
||||||
*/
|
__func__, __LINE__, tlv, ret));
|
||||||
DHD_INFO(("dhd_wlfc_init(): successfully %s bdcv2 tlv signaling, %d\n",
|
} else {
|
||||||
dhd->wlfc_enabled?"enabled":"disabled", tlv));
|
/* Leaving the message for now, it should be removed
|
||||||
|
* after a while; once the tlv situation is stable.
|
||||||
|
*/
|
||||||
|
DHD_INFO(("%s: successfully %s bdcv2 "
|
||||||
|
"tlv signaling, %d\n",
|
||||||
|
__func__,
|
||||||
|
dhd->wlfc_enabled?"enabled":"disabled",
|
||||||
|
tlv));
|
||||||
}
|
}
|
||||||
|
|
||||||
mode = 0;
|
mode = 0;
|
||||||
|
|
@ -3800,7 +3958,7 @@ int
|
||||||
dhd_wlfc_hostreorder_init(dhd_pub_t *dhd)
|
dhd_wlfc_hostreorder_init(dhd_pub_t *dhd)
|
||||||
{
|
{
|
||||||
/* enable only ampdu hostreorder here */
|
/* enable only ampdu hostreorder here */
|
||||||
uint32 tlv;
|
uint32 tlv = 0x0;
|
||||||
|
|
||||||
if (dhd == NULL) {
|
if (dhd == NULL) {
|
||||||
DHD_ERROR(("Error: %s():%d\n", __FUNCTION__, __LINE__));
|
DHD_ERROR(("Error: %s():%d\n", __FUNCTION__, __LINE__));
|
||||||
|
|
@ -3809,7 +3967,13 @@ dhd_wlfc_hostreorder_init(dhd_pub_t *dhd)
|
||||||
|
|
||||||
DHD_TRACE(("%s():%d Enter\n", __FUNCTION__, __LINE__));
|
DHD_TRACE(("%s():%d Enter\n", __FUNCTION__, __LINE__));
|
||||||
|
|
||||||
tlv = WLFC_FLAGS_HOST_RXRERODER_ACTIVE;
|
if (dhd_wl_ioctl_get_intiovar(dhd, "tlv", &tlv,
|
||||||
|
WLC_GET_VAR, FALSE, 0)) {
|
||||||
|
DHD_ERROR(("%s-%d: fail to get TLV\n",
|
||||||
|
__func__, __LINE__));
|
||||||
|
}
|
||||||
|
|
||||||
|
tlv |= WLFC_FLAGS_HOST_RXRERODER_ACTIVE;
|
||||||
|
|
||||||
/* enable proptxtstatus signaling by default */
|
/* enable proptxtstatus signaling by default */
|
||||||
if (dhd_wl_ioctl_set_intiovar(dhd, "tlv", tlv, WLC_SET_VAR, TRUE, 0)) {
|
if (dhd_wl_ioctl_set_intiovar(dhd, "tlv", tlv, WLC_SET_VAR, TRUE, 0)) {
|
||||||
|
|
@ -4056,6 +4220,7 @@ dhd_wlfc_dump(dhd_pub_t *dhdp, struct bcmstrbuf *strbuf)
|
||||||
wlfc_hanger_t* h;
|
wlfc_hanger_t* h;
|
||||||
wlfc_mac_descriptor_t* mac_table;
|
wlfc_mac_descriptor_t* mac_table;
|
||||||
wlfc_mac_descriptor_t* interfaces;
|
wlfc_mac_descriptor_t* interfaces;
|
||||||
|
wlfc_mac_descriptor_t* other;
|
||||||
char* iftypes[] = {"STA", "AP", "WDS", "p2pGO", "p2pCL"};
|
char* iftypes[] = {"STA", "AP", "WDS", "p2pGO", "p2pCL"};
|
||||||
|
|
||||||
if (!dhdp || !strbuf) {
|
if (!dhdp || !strbuf) {
|
||||||
|
|
@ -4079,6 +4244,7 @@ dhd_wlfc_dump(dhd_pub_t *dhdp, struct bcmstrbuf *strbuf)
|
||||||
|
|
||||||
mac_table = wlfc->destination_entries.nodes;
|
mac_table = wlfc->destination_entries.nodes;
|
||||||
interfaces = wlfc->destination_entries.interfaces;
|
interfaces = wlfc->destination_entries.interfaces;
|
||||||
|
other = &wlfc->destination_entries.other;
|
||||||
bcm_bprintf(strbuf, "---- wlfc stats ----\n");
|
bcm_bprintf(strbuf, "---- wlfc stats ----\n");
|
||||||
|
|
||||||
if (!WLFC_GET_AFQ(dhdp->wlfc_mode)) {
|
if (!WLFC_GET_AFQ(dhdp->wlfc_mode)) {
|
||||||
|
|
@ -4219,6 +4385,39 @@ dhd_wlfc_dump(dhd_pub_t *dhdp, struct bcmstrbuf *strbuf)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
bcm_bprintf(strbuf, "\n");
|
||||||
|
|
||||||
|
if (other->occupied) {
|
||||||
|
bcm_bprintf(strbuf, "OTHER.PSQ(len,state,credit),"
|
||||||
|
"(trans,supp_trans,onbus)"
|
||||||
|
"= (%d,%s,%d),(%d,%d,%d)\n",
|
||||||
|
other->psq.n_pkts_tot,
|
||||||
|
((other->state ==
|
||||||
|
WLFC_STATE_OPEN) ? " OPEN":"CLOSE"),
|
||||||
|
other->requested_credit,
|
||||||
|
other->transit_count,
|
||||||
|
other->suppr_transit_count,
|
||||||
|
other->onbus_pkts_count);
|
||||||
|
bcm_bprintf(strbuf, "OTHER.PSQ"
|
||||||
|
"(delay0,sup0,afq0),(delay1,sup1,afq1),(delay2,sup2,afq2),"
|
||||||
|
"(delay3,sup3,afq3),(delay4,sup4,afq4) =(%d,%d,%d),"
|
||||||
|
"(%d,%d,%d),(%d,%d,%d),(%d,%d,%d),(%d,%d,%d)\n",
|
||||||
|
other->psq.q[0].n_pkts,
|
||||||
|
other->psq.q[1].n_pkts,
|
||||||
|
other->afq.q[0].n_pkts,
|
||||||
|
other->psq.q[2].n_pkts,
|
||||||
|
other->psq.q[3].n_pkts,
|
||||||
|
other->afq.q[1].n_pkts,
|
||||||
|
other->psq.q[4].n_pkts,
|
||||||
|
other->psq.q[5].n_pkts,
|
||||||
|
other->afq.q[2].n_pkts,
|
||||||
|
other->psq.q[6].n_pkts,
|
||||||
|
other->psq.q[7].n_pkts,
|
||||||
|
other->afq.q[3].n_pkts,
|
||||||
|
other->psq.q[8].n_pkts,
|
||||||
|
other->psq.q[9].n_pkts,
|
||||||
|
other->afq.q[4].n_pkts);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef PROP_TXSTATUS_DEBUG
|
#ifdef PROP_TXSTATUS_DEBUG
|
||||||
{
|
{
|
||||||
|
|
@ -4454,7 +4653,6 @@ int dhd_wlfc_set_mode(dhd_pub_t *dhd, int val)
|
||||||
/** Called when rx frame is received from the dongle */
|
/** Called when rx frame is received from the dongle */
|
||||||
bool dhd_wlfc_is_header_only_pkt(dhd_pub_t * dhd, void *pktbuf)
|
bool dhd_wlfc_is_header_only_pkt(dhd_pub_t * dhd, void *pktbuf)
|
||||||
{
|
{
|
||||||
athost_wl_status_info_t* wlfc;
|
|
||||||
bool rc = FALSE;
|
bool rc = FALSE;
|
||||||
|
|
||||||
if (dhd == NULL) {
|
if (dhd == NULL) {
|
||||||
|
|
@ -4464,16 +4662,18 @@ bool dhd_wlfc_is_header_only_pkt(dhd_pub_t * dhd, void *pktbuf)
|
||||||
|
|
||||||
dhd_os_wlfc_block(dhd);
|
dhd_os_wlfc_block(dhd);
|
||||||
|
|
||||||
if (!dhd->wlfc_state || (dhd->proptxstatus_mode == WLFC_FCMODE_NONE)) {
|
// process for both wlfc or hostreorder case
|
||||||
dhd_os_wlfc_unblock(dhd);
|
if (PKTLEN(dhd->osh, pktbuf) == 0) {
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
wlfc = (athost_wl_status_info_t*)dhd->wlfc_state;
|
|
||||||
|
|
||||||
if (PKTLEN(wlfc->osh, pktbuf) == 0) {
|
|
||||||
wlfc->stats.wlfc_header_only_pkt++;
|
|
||||||
rc = TRUE;
|
rc = TRUE;
|
||||||
|
|
||||||
|
if ((dhd->wlfc_state) &&
|
||||||
|
((WLFC_FCMODE_IMPLIED_CREDIT == dhd->proptxstatus_mode) ||
|
||||||
|
(WLFC_FCMODE_EXPLICIT_CREDIT == dhd->proptxstatus_mode))) {
|
||||||
|
athost_wl_status_info_t* wlfc;
|
||||||
|
|
||||||
|
wlfc = (athost_wl_status_info_t*)dhd->wlfc_state;
|
||||||
|
wlfc->stats.wlfc_header_only_pkt++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dhd_os_wlfc_unblock(dhd);
|
dhd_os_wlfc_unblock(dhd);
|
||||||
|
|
@ -4724,10 +4924,6 @@ int dhd_txpkt_log_and_dump(dhd_pub_t *dhdp, void* pkt, uint16 *pktfate_status)
|
||||||
uint8 hcnt = WL_TXSTATUS_GET_FREERUNCTR(DHD_PKTTAG_H2DTAG(PKTTAG(pkt)));
|
uint8 hcnt = WL_TXSTATUS_GET_FREERUNCTR(DHD_PKTTAG_H2DTAG(PKTTAG(pkt)));
|
||||||
uint8 fifo_id = DHD_PKTTAG_FIFO(PKTTAG(pkt));
|
uint8 fifo_id = DHD_PKTTAG_FIFO(PKTTAG(pkt));
|
||||||
|
|
||||||
if (!pkt) {
|
|
||||||
DHD_ERROR(("Error: %s():%d\n", __FUNCTION__, __LINE__));
|
|
||||||
return BCME_BADARG;
|
|
||||||
}
|
|
||||||
pktid = (ifidx << DHD_PKTID_IF_SHIFT) | (fifo_id << DHD_PKTID_FIFO_SHIFT) | hcnt;
|
pktid = (ifidx << DHD_PKTID_IF_SHIFT) | (fifo_id << DHD_PKTID_FIFO_SHIFT) | hcnt;
|
||||||
#ifdef BDC
|
#ifdef BDC
|
||||||
bdch = (struct bdc_header *)pktdata;
|
bdch = (struct bdc_header *)pktdata;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,24 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -160,7 +179,9 @@ typedef struct wlfc_mac_descriptor {
|
||||||
int onbus_pkts_count;
|
int onbus_pkts_count;
|
||||||
/** flag. TRUE when remote MAC is in suppressed state */
|
/** flag. TRUE when remote MAC is in suppressed state */
|
||||||
uint8 suppressed;
|
uint8 suppressed;
|
||||||
|
#ifdef DHD_HWTSTAMP
|
||||||
|
uint32 tsf[WL_TXSTATUS_FREERUNCTR_MAXNUM][2];
|
||||||
|
#endif /* DHD_HWTSTAMP */
|
||||||
#ifdef QMONITOR
|
#ifdef QMONITOR
|
||||||
dhd_qmon_t qmon;
|
dhd_qmon_t qmon;
|
||||||
#endif /* QMONITOR */
|
#endif /* QMONITOR */
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,26 @@
|
||||||
* IE/TLV fragmentation/defragmentation support for
|
* IE/TLV fragmentation/defragmentation support for
|
||||||
* Broadcom 802.11bang Networking Device Driver
|
* Broadcom 802.11bang Networking Device Driver
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -56,7 +75,7 @@ bcm_tlv_dot11_defrag(const void *buf, uint buf_len, uint8 id, bool id_ext,
|
||||||
tot_data_len = tot_len;
|
tot_data_len = tot_len;
|
||||||
|
|
||||||
/* copy out if output space permits */
|
/* copy out if output space permits */
|
||||||
if (out_left < tot_len) {
|
if ((out == NULL) || (out_left < tot_len)) {
|
||||||
err = BCME_BUFTOOSHORT;
|
err = BCME_BUFTOOSHORT;
|
||||||
out_left = 0; /* prevent further copy */
|
out_left = 0; /* prevent further copy */
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -82,7 +101,7 @@ bcm_tlv_dot11_defrag(const void *buf, uint buf_len, uint8 id, bool id_ext,
|
||||||
while ((ie = bcm_next_tlv(ie, &buf_len)) &&
|
while ((ie = bcm_next_tlv(ie, &buf_len)) &&
|
||||||
(ie->id == DOT11_MNG_FRAGMENT_ID)) {
|
(ie->id == DOT11_MNG_FRAGMENT_ID)) {
|
||||||
/* note: buf_len starts at next ie and last frag may be partial */
|
/* note: buf_len starts at next ie and last frag may be partial */
|
||||||
if (out_left < ie->len) {
|
if ((out == NULL) || (out_left < ie->len)) {
|
||||||
err = BCME_BUFTOOSHORT;
|
err = BCME_BUFTOOSHORT;
|
||||||
out_left = 0;
|
out_left = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Firmware package functionality
|
* Firmware package functionality
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* HND generic packet pool operation primitives
|
* HND generic packet pool operation primitives
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* HND generic pktq operation primitives
|
* HND generic pktq operation primitives
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,26 @@
|
||||||
* Misc utility routines for accessing PMU corerev specific features
|
* Misc utility routines for accessing PMU corerev specific features
|
||||||
* of the SiliconBackplane-based Broadcom chips.
|
* of the SiliconBackplane-based Broadcom chips.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
@ -9943,13 +9962,3 @@ si_pmu_res_state_wait(si_t *sih, uint rsrc)
|
||||||
SPINWAIT(!(PMU_REG(sih, res_state, 0, 0) & PMURES_BIT(rsrc)), PMU_MAX_TRANSITION_DLY);
|
SPINWAIT(!(PMU_REG(sih, res_state, 0, 0) & PMURES_BIT(rsrc)), PMU_MAX_TRANSITION_DLY);
|
||||||
ASSERT(PMU_REG(sih, res_state, 0, 0) & PMURES_BIT(rsrc));
|
ASSERT(PMU_REG(sih, res_state, 0, 0) & PMURES_BIT(rsrc));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
si_pmu_43711a0_pll_war(si_t *sih)
|
|
||||||
{
|
|
||||||
uint32 ndiv_int = 0x022;
|
|
||||||
|
|
||||||
pmu_corereg(sih, SI_CC_IDX, pllcontrol_addr, ~0, PMU_PLL_CTRL_REG6);
|
|
||||||
pmu_corereg(sih, SI_CC_IDX, pllcontrol_data, PMU4369_PLL1_PC6_NDIV_INT_MASK,
|
|
||||||
ndiv_int << PMU4369_PLL1_PC6_NDIV_INT_SHIFT);
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,26 @@
|
||||||
* WFA related work should be placed in 802.11wfa.h.
|
* WFA related work should be placed in 802.11wfa.h.
|
||||||
* Broadcom specific work should be placed in 802.11brcm.h.
|
* Broadcom specific work should be placed in 802.11brcm.h.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,26 @@
|
||||||
* VHT - Very High Throughput
|
* VHT - Very High Throughput
|
||||||
* OPER_MODE - Operating Mode
|
* OPER_MODE - Operating Mode
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
21
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/802.11ah.h
Normal file → Executable file
21
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/802.11ah.h
Normal file → Executable file
|
|
@ -2,7 +2,26 @@
|
||||||
* Basic types and constants relating to 802.11ah standard.
|
* Basic types and constants relating to 802.11ah standard.
|
||||||
* This is a portion of 802.11ah definition. The rest are in 802.11.h.
|
* This is a portion of 802.11ah definition. The rest are in 802.11.h.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
21
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/802.11ax.h
Normal file → Executable file
21
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/802.11ax.h
Normal file → Executable file
|
|
@ -2,7 +2,26 @@
|
||||||
* Basic types and constants relating to 802.11ax/HE STA
|
* Basic types and constants relating to 802.11ax/HE STA
|
||||||
* This is a portion of 802.11ax definition. The rest are in 802.11.h.
|
* This is a portion of 802.11ax definition. The rest are in 802.11.h.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,26 @@
|
||||||
* FTM - Fine Timing Measuremant
|
* FTM - Fine Timing Measuremant
|
||||||
* PASN - Preassociation security negotiation
|
* PASN - Preassociation security negotiation
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Broadcom proprietary types and constants relating to 802.11
|
* Broadcom proprietary types and constants relating to 802.11
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,26 @@
|
||||||
/*
|
/*
|
||||||
* Customer specific types and constants relating to 802.11
|
* Customer specific types and constants relating to 802.11
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,26 @@
|
||||||
* RM - same as RRM?
|
* RM - same as RRM?
|
||||||
* NGBR - Neighbor Report
|
* NGBR - Neighbor Report
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,26 @@
|
||||||
* OBSS - Overlapping BSS
|
* OBSS - Overlapping BSS
|
||||||
* EXTCH/EXT_CH - Extension Channel
|
* EXTCH/EXT_CH - Extension Channel
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022, Broadcom.
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed to you under the terms of the
|
||||||
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
||||||
|
*
|
||||||
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
||||||
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
||||||
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
||||||
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
||||||
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
||||||
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
||||||
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024, Broadcom.
|
||||||
*
|
*
|
||||||
* Unless you and Broadcom execute a separate written software license
|
* Unless you and Broadcom execute a separate written software license
|
||||||
* agreement governing use of this software, this software is licensed to you
|
* agreement governing use of this software, this software is licensed to you
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue