Skip to content

Commit

Permalink
Add support to kernel 6.6.y (#604)
Browse files Browse the repository at this point in the history
* Added brcmfmac for kernel 6.6.y

* Unload all brcmfmac* modules
  • Loading branch information
DrSchottky authored Mar 16, 2024
1 parent 6f7c8e8 commit 5432ea1
Show file tree
Hide file tree
Showing 72 changed files with 38,647 additions and 32 deletions.
8 changes: 4 additions & 4 deletions patches/bcm43430a1/7_45_41_26/nexmon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ ifeq ($(shell uname -m),$(filter $(shell uname -m), armv6l armv7l aarch64))
@printf "\033[0;31m COPYING\033[0m brcmfmac43430-sdio.bin => /lib/firmware/brcm/brcmfmac43430-sdio.bin\n"
$(Q)cp brcmfmac43430-sdio.bin /lib/firmware/brcm/brcmfmac43430-sdio.bin
ifneq ("$(wildcard $(DRIVER_FOLDER_NAME)/brcmfmac.ko)", "")
ifeq ($(shell lsmod | grep "^brcmfmac" | wc -l), 1)
@printf "\033[0;31m UNLOADING\033[0m brcmfmac\n"
$(Q)rmmod brcmfmac
endif
@for module in $$(lsmod | grep "^brcmfmac" | awk '{print $$1}'); do \
printf "\033[0;31m UNLOADING\033[0m $$module\n"; \
rmmod $$module; \
done
$(Q)modprobe brcmutil
@printf "\033[0;31m RELOADING\033[0m brcmfmac\n"
$(Q)insmod $(DRIVER_FOLDER_NAME)/brcmfmac.ko
Expand Down
8 changes: 4 additions & 4 deletions patches/bcm43430a1/7_45_41_46/nexmon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ ifeq ($(shell uname -m),$(filter $(shell uname -m), armv6l armv7l aarch64))
$(Q)rm -rf /lib/firmware/brcm/brcmfmac43430-sdio.clm_blob
$(Q)rm -rf /lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.clm_blob
ifneq ("$(wildcard $(DRIVER_FOLDER_NAME)/brcmfmac.ko)", "")
ifeq ($(shell lsmod | grep "^brcmfmac" | wc -l), 1)
@printf "\033[0;31m UNLOADING\033[0m brcmfmac\n"
$(Q)rmmod brcmfmac
endif
@for module in $$(lsmod | grep "^brcmfmac" | awk '{print $$1}'); do \
printf "\033[0;31m UNLOADING\033[0m $$module\n"; \
rmmod $$module; \
done
$(Q)modprobe brcmutil
@printf "\033[0;31m RELOADING\033[0m brcmfmac\n"
$(Q)insmod $(DRIVER_FOLDER_NAME)/brcmfmac.ko
Expand Down
8 changes: 4 additions & 4 deletions patches/bcm43436b0/9_88_4_65/nexmon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ ifeq ($(shell uname -m),$(filter $(shell uname -m), armv6l armv7l aarch64))
@printf "\033[0;31m COPYING\033[0m $(RAM_FILE) => /lib/firmware/brcm/$(RAM_FILE)\n"
$(Q)cp $(RAM_FILE) /lib/firmware/brcm/$(RAM_FILE)
ifneq ("$(wildcard $(DRIVER_FOLDER_NAME)/brcmfmac.ko)", "")
ifeq ($(shell lsmod | grep "^brcmfmac" | wc -l), 1)
@printf "\033[0;31m UNLOADING\033[0m brcmfmac\n"
$(Q)rmmod brcmfmac
endif
@for module in $$(lsmod | grep "^brcmfmac" | awk '{print $$1}'); do \
printf "\033[0;31m UNLOADING\033[0m $$module\n"; \
rmmod $$module; \
done
$(Q)modprobe brcmutil
@printf "\033[0;31m RELOADING\033[0m brcmfmac\n"
$(Q)insmod $(DRIVER_FOLDER_NAME)/brcmfmac.ko
Expand Down
8 changes: 4 additions & 4 deletions patches/bcm43455c0/7_45_154/nexmon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ ifeq ($(shell uname -m),$(filter $(shell uname -m), armv6l armv7l aarch64))
@printf "\033[0;31m COPYING\033[0m $(RAM_FILE) => /lib/firmware/brcm/$(RAM_FILE)\n"
$(Q)cp $(RAM_FILE) /lib/firmware/brcm/$(RAM_FILE)
ifneq ("$(wildcard $(DRIVER_FOLDER_NAME)/brcmfmac.ko)", "")
ifeq ($(shell lsmod | grep "^brcmfmac" | wc -l), 1)
@printf "\033[0;31m UNLOADING\033[0m brcmfmac\n"
$(Q)rmmod brcmfmac
endif
@for module in $$(lsmod | grep "^brcmfmac" | awk '{print $$1}'); do \
printf "\033[0;31m UNLOADING\033[0m $$module\n"; \
rmmod $$module; \
done
$(Q)modprobe brcmutil
@printf "\033[0;31m RELOADING\033[0m brcmfmac\n"
$(Q)insmod $(DRIVER_FOLDER_NAME)/brcmfmac.ko
Expand Down
8 changes: 4 additions & 4 deletions patches/bcm43455c0/7_45_189/nexmon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ ifeq ($(shell uname -m),$(filter $(shell uname -m), armv6l armv7l aarch64))
@printf "\033[0;31m COPYING\033[0m $(RAM_FILE) => /lib/firmware/brcm/$(RAM_FILE)\n"
$(Q)cp $(RAM_FILE) /lib/firmware/brcm/$(RAM_FILE)
ifneq ("$(wildcard $(DRIVER_FOLDER_NAME)/brcmfmac.ko)", "")
ifeq ($(shell lsmod | grep "^brcmfmac" | wc -l), 1)
@printf "\033[0;31m UNLOADING\033[0m brcmfmac\n"
$(Q)rmmod brcmfmac
endif
@for module in $$(lsmod | grep "^brcmfmac" | awk '{print $$1}'); do \
printf "\033[0;31m UNLOADING\033[0m $$module\n"; \
rmmod $$module; \
done
$(Q)modprobe brcmutil
@printf "\033[0;31m RELOADING\033[0m brcmfmac\n"
$(Q)insmod $(DRIVER_FOLDER_NAME)/brcmfmac.ko
Expand Down
8 changes: 4 additions & 4 deletions patches/bcm43455c0/7_45_189/nexmon_simplified/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ ifeq ($(shell uname -m),$(filter $(shell uname -m), armv6l armv7l aarch64))
@printf "\033[0;31m COPYING\033[0m $(RAM_FILE) => /lib/firmware/brcm/$(RAM_FILE)\n"
$(Q)cp $(RAM_FILE) /lib/firmware/brcm/$(RAM_FILE)
ifneq ("$(wildcard $(DRIVER_FOLDER_NAME)/brcmfmac.ko)", "")
ifeq ($(shell lsmod | grep "^brcmfmac" | wc -l), 1)
@printf "\033[0;31m UNLOADING\033[0m brcmfmac\n"
$(Q)rmmod brcmfmac
endif
@for module in $$(lsmod | grep "^brcmfmac" | awk '{print $$1}'); do \
printf "\033[0;31m UNLOADING\033[0m $$module\n"; \
rmmod $$module; \
done
$(Q)modprobe brcmutil
@printf "\033[0;31m RELOADING\033[0m brcmfmac\n"
$(Q)insmod $(DRIVER_FOLDER_NAME)/brcmfmac.ko
Expand Down
8 changes: 4 additions & 4 deletions patches/bcm43455c0/7_45_206/nexmon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ ifeq ($(shell uname -m),$(filter $(shell uname -m), armv6l armv7l aarch64))
@printf "\033[0;31m COPYING\033[0m $(RAM_FILE) => /lib/firmware/brcm/$(RAM_FILE)\n"
$(Q)cp $(RAM_FILE) /lib/firmware/brcm/$(RAM_FILE)
ifneq ("$(wildcard $(DRIVER_FOLDER_NAME)/brcmfmac.ko)", "")
ifeq ($(shell lsmod | grep "^brcmfmac" | wc -l), 1)
@printf "\033[0;31m UNLOADING\033[0m brcmfmac\n"
$(Q)rmmod brcmfmac
endif
@for module in $$(lsmod | grep "^brcmfmac" | awk '{print $$1}'); do \
printf "\033[0;31m UNLOADING\033[0m $$module\n"; \
rmmod $$module; \
done
$(Q)modprobe brcmutil
@printf "\033[0;31m RELOADING\033[0m brcmfmac\n"
$(Q)insmod $(DRIVER_FOLDER_NAME)/brcmfmac.ko
Expand Down
8 changes: 4 additions & 4 deletions patches/bcm43455c0/7_45_234_4ca95bb_CY/nexmon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ ifeq ($(shell uname -m),$(filter $(shell uname -m), armv6l armv7l aarch64))
$(Q)update-alternatives --install /lib/firmware/cypress/cyfmac43455-sdio.bin cyfmac43455-sdio.bin /lib/firmware/nexmon/$(RAM_FILE) 30
$(Q)update-alternatives --set cyfmac43455-sdio.bin /lib/firmware/nexmon/$(RAM_FILE)
ifneq ("$(wildcard $(DRIVER_FOLDER_NAME)/brcmfmac.ko)", "")
ifeq ($(shell lsmod | grep "^brcmfmac" | wc -l), 1)
@printf "\033[0;31m UNLOADING\033[0m brcmfmac\n"
$(Q)rmmod brcmfmac
endif
@for module in $$(lsmod | grep "^brcmfmac" | awk '{print $$1}'); do \
printf "\033[0;31m UNLOADING\033[0m $$module\n"; \
rmmod $$module; \
done
$(Q)modprobe brcmutil
@printf "\033[0;31m RELOADING\033[0m brcmfmac\n"
$(Q)insmod $(DRIVER_FOLDER_NAME)/brcmfmac.ko
Expand Down
50 changes: 50 additions & 0 deletions patches/driver/brcmfmac_6.6.y-nexmon/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
config BRCMFMAC
tristate "Broadcom FullMAC WLAN driver"
depends on CFG80211
select BRCMUTIL
help
This module adds support for wireless adapters based on Broadcom
FullMAC chipsets. It has to work with at least one of the bus
interface support. If you choose to build a module, it'll be called
brcmfmac.ko.

config BRCMFMAC_PROTO_BCDC
bool

config BRCMFMAC_PROTO_MSGBUF
bool

config BRCMFMAC_SDIO
bool "SDIO bus interface support for FullMAC driver"
depends on (MMC = y || MMC = BRCMFMAC)
depends on BRCMFMAC
select BRCMFMAC_PROTO_BCDC
select FW_LOADER
default y
help
This option enables the SDIO bus interface support for Broadcom
IEEE802.11n embedded FullMAC WLAN driver. Say Y if you want to
use the driver for a SDIO wireless card.

config BRCMFMAC_USB
bool "USB bus interface support for FullMAC driver"
depends on (USB = y || USB = BRCMFMAC)
depends on BRCMFMAC
select BRCMFMAC_PROTO_BCDC
select FW_LOADER
help
This option enables the USB bus interface support for Broadcom
IEEE802.11n embedded FullMAC WLAN driver. Say Y if you want to
use the driver for an USB wireless card.

config BRCMFMAC_PCIE
bool "PCIE bus interface support for FullMAC driver"
depends on BRCMFMAC
depends on PCI
select BRCMFMAC_PROTO_MSGBUF
select FW_LOADER
help
This option enables the PCIE bus interface support for Broadcom
IEEE802.11ac embedded FullMAC WLAN driver. Say Y if you want to
use the driver for an PCIE wireless card.

50 changes: 50 additions & 0 deletions patches/driver/brcmfmac_6.6.y-nexmon/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# SPDX-License-Identifier: ISC
#
# Makefile fragment for Broadcom 802.11 Networking Device Driver
#
# Copyright (c) 2010 Broadcom Corporation
#

ccflags-y += \
-I$(NEXMON_ROOT)/patches/driver/brcmfmac_6.6.y-nexmon \
-I$(NEXMON_ROOT)/patches/driver/brcmfmac_6.6.y-nexmon/include \
-DDEBUG

obj-$(CONFIG_BRCMFMAC) += brcmfmac.o
brcmfmac-objs += \
cfg80211.o \
chip.o \
fwil.o \
fweh.o \
p2p.o \
proto.o \
common.o \
core.o \
firmware.o \
feature.o \
btcoex.o \
vendor.o \
pno.o \
xtlv.o
brcmfmac-$(CONFIG_BRCMFMAC_PROTO_BCDC) += \
bcdc.o \
fwsignal.o
brcmfmac-$(CONFIG_BRCMFMAC_PROTO_MSGBUF) += \
commonring.o \
flowring.o \
msgbuf.o
brcmfmac-$(CONFIG_BRCMFMAC_SDIO) += \
sdio.o \
bcmsdh.o
brcmfmac-$(CONFIG_BRCMFMAC_USB) += \
usb.o
brcmfmac-$(CONFIG_BRCMFMAC_PCIE) += \
pcie.o
brcmfmac-$(CONFIG_BRCMDBG) += \
debug.o
brcmfmac-$(CONFIG_BRCM_TRACING) += \
tracepoint.o
brcmfmac-$(CONFIG_OF) += \
of.o
brcmfmac-$(CONFIG_DMI) += \
dmi.o
Loading

0 comments on commit 5432ea1

Please sign in to comment.