From e772b75d5d50be4d541751a871057186439c25c2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 26 Jan 2024 20:16:32 +0100 Subject: [PATCH] broadcom-wl: remove package Also remove remaining wireless extension support, since this package was the only in-tree user of it Signed-off-by: Felix Fietkau --- config/Config-kernel.in | 15 - package/kernel/broadcom-wl/Makefile | 192 --- .../etc/hotplug.d/net/00-broadcom-wifi-detect | 5 - .../files/etc/hotplug.d/net/20-broadcom_wds | 61 - .../broadcom-wl/files/etc/init.d/wlunbind | 29 - .../broadcom-wl/files/lib/wifi/broadcom.sh | 480 ------- .../patches/003-compat-2.6.35.patch | 39 - .../patches/004-remove-pcmcia.patch | 22 - .../patches/005-fix-mem-leak-on-unload.patch | 31 - .../patches/006-generic-dma-api.patch | 88 -- .../patches/007-use-glue-driver.patch | 188 --- .../patches/008-fix_virtual_interfaces.patch | 132 -- .../patches/009-fix_compile_3_2.patch | 27 - .../010-remove_irqf_samble_random.patch | 11 - .../patches/011-fix_compile_3_4.patch | 12 - .../broadcom-wl/patches/012-compat-3.10.patch | 47 - .../patches/013-interface-name.patch | 11 - .../patches/014-fix-band-reporting.patch | 41 - .../015-support-probe-of-wds-interfaces.patch | 11 - .../broadcom-wl/patches/020-musl-fixes.patch | 75 -- .../patches/030-remove_devinit_devexit.patch | 74 -- .../patches/040-remove_last_rx_usage.patch | 10 - .../patches/100-fix_nvram_two_devices.patch | 32 - ...ompilation-warning-if-does-not-guard.patch | 15 - .../patches/110-add_number_to_dev_name.patch | 11 - .../patches/120-fixup-mac-addresses.patch | 93 -- .../patches/200-add_bcm_a8xx_support.patch | 12 - .../patches/910-fallback-sprom.patch | 78 -- .../patches/912-pci-bus-nvram-hack.patch | 11 - .../913-avoid-dbe-on-ifs_ctl-readw-hack.patch | 12 - .../914-eliminate-date-time-error.patch | 21 - .../patches/915-fix-wl_timer-for-4_15.patch | 55 - .../patches/916-fix-compilation-for-5_4.patch | 18 - .../917-fix-compilation-for-5_10.patch | 42 - ...918-fix-warning-compilation-for-5_15.patch | 27 - ...-compilation-warning-for-stack-limit.patch | 297 ----- .../920-aiutils-fix-wrong-misleading-if.patch | 14 - .../921-fix-simple-compilation-warning.patch | 63 - ...linux-set-module-license-Proprietary.patch | 10 - package/kernel/broadcom-wl/src/glue/Makefile | 17 - package/kernel/broadcom-wl/src/glue/wl_glue.c | 315 ----- package/kernel/broadcom-wl/src/glue/wl_glue.h | 22 - package/kernel/broadcom-wl/src/wlc.c | 1181 ----------------- .../linux/generic/hack-5.15/251-kconfig.patch | 53 - .../linux/generic/hack-6.1/251-kconfig.patch | 53 - 45 files changed, 4053 deletions(-) delete mode 100644 package/kernel/broadcom-wl/Makefile delete mode 100644 package/kernel/broadcom-wl/files/etc/hotplug.d/net/00-broadcom-wifi-detect delete mode 100644 package/kernel/broadcom-wl/files/etc/hotplug.d/net/20-broadcom_wds delete mode 100755 package/kernel/broadcom-wl/files/etc/init.d/wlunbind delete mode 100644 package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh delete mode 100644 package/kernel/broadcom-wl/patches/003-compat-2.6.35.patch delete mode 100644 package/kernel/broadcom-wl/patches/004-remove-pcmcia.patch delete mode 100644 package/kernel/broadcom-wl/patches/005-fix-mem-leak-on-unload.patch delete mode 100644 package/kernel/broadcom-wl/patches/006-generic-dma-api.patch delete mode 100644 package/kernel/broadcom-wl/patches/007-use-glue-driver.patch delete mode 100644 package/kernel/broadcom-wl/patches/008-fix_virtual_interfaces.patch delete mode 100644 package/kernel/broadcom-wl/patches/009-fix_compile_3_2.patch delete mode 100644 package/kernel/broadcom-wl/patches/010-remove_irqf_samble_random.patch delete mode 100644 package/kernel/broadcom-wl/patches/011-fix_compile_3_4.patch delete mode 100644 package/kernel/broadcom-wl/patches/012-compat-3.10.patch delete mode 100644 package/kernel/broadcom-wl/patches/013-interface-name.patch delete mode 100644 package/kernel/broadcom-wl/patches/014-fix-band-reporting.patch delete mode 100644 package/kernel/broadcom-wl/patches/015-support-probe-of-wds-interfaces.patch delete mode 100644 package/kernel/broadcom-wl/patches/020-musl-fixes.patch delete mode 100644 package/kernel/broadcom-wl/patches/030-remove_devinit_devexit.patch delete mode 100644 package/kernel/broadcom-wl/patches/040-remove_last_rx_usage.patch delete mode 100644 package/kernel/broadcom-wl/patches/100-fix_nvram_two_devices.patch delete mode 100644 package/kernel/broadcom-wl/patches/101-wl_id-fix-compilation-warning-if-does-not-guard.patch delete mode 100644 package/kernel/broadcom-wl/patches/110-add_number_to_dev_name.patch delete mode 100644 package/kernel/broadcom-wl/patches/120-fixup-mac-addresses.patch delete mode 100644 package/kernel/broadcom-wl/patches/200-add_bcm_a8xx_support.patch delete mode 100644 package/kernel/broadcom-wl/patches/910-fallback-sprom.patch delete mode 100644 package/kernel/broadcom-wl/patches/912-pci-bus-nvram-hack.patch delete mode 100644 package/kernel/broadcom-wl/patches/913-avoid-dbe-on-ifs_ctl-readw-hack.patch delete mode 100644 package/kernel/broadcom-wl/patches/914-eliminate-date-time-error.patch delete mode 100644 package/kernel/broadcom-wl/patches/915-fix-wl_timer-for-4_15.patch delete mode 100644 package/kernel/broadcom-wl/patches/916-fix-compilation-for-5_4.patch delete mode 100644 package/kernel/broadcom-wl/patches/917-fix-compilation-for-5_10.patch delete mode 100644 package/kernel/broadcom-wl/patches/918-fix-warning-compilation-for-5_15.patch delete mode 100644 package/kernel/broadcom-wl/patches/919-fix-compilation-warning-for-stack-limit.patch delete mode 100644 package/kernel/broadcom-wl/patches/920-aiutils-fix-wrong-misleading-if.patch delete mode 100644 package/kernel/broadcom-wl/patches/921-fix-simple-compilation-warning.patch delete mode 100644 package/kernel/broadcom-wl/patches/930-wl_linux-set-module-license-Proprietary.patch delete mode 100644 package/kernel/broadcom-wl/src/glue/Makefile delete mode 100644 package/kernel/broadcom-wl/src/glue/wl_glue.c delete mode 100644 package/kernel/broadcom-wl/src/glue/wl_glue.h delete mode 100644 package/kernel/broadcom-wl/src/wlc.c diff --git a/config/Config-kernel.in b/config/Config-kernel.in index 4c43190e40..78155eb592 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -1184,21 +1184,6 @@ config KERNEL_XDP_SOCKETS XDP sockets allows a channel between XDP programs and userspace applications. -config KERNEL_WIRELESS_EXT - def_bool n - -config KERNEL_WEXT_CORE - def_bool KERNEL_WIRELESS_EXT - -config KERNEL_WEXT_PRIV - def_bool KERNEL_WIRELESS_EXT - -config KERNEL_WEXT_PROC - def_bool KERNEL_WIRELESS_EXT - -config KERNEL_WEXT_SPY - def_bool KERNEL_WIRELESS_EXT - config KERNEL_PAGE_POOL def_bool n diff --git a/package/kernel/broadcom-wl/Makefile b/package/kernel/broadcom-wl/Makefile deleted file mode 100644 index 101dbccbb5..0000000000 --- a/package/kernel/broadcom-wl/Makefile +++ /dev/null @@ -1,192 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=broadcom-wl -PKG_VERSION:=5.10.56.27.3 -PKG_RELEASE:=10 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(ARCH).tar.bz2 -PKG_SOURCE_URL:=@OPENWRT - -ifeq ($(ARCH),mipsel) -PKG_HASH:=26a8c370f48fc129d0731cfd751c36cae1419b0bc8ca35781126744e60eae009 -endif -ifeq ($(ARCH),mips) -PKG_HASH:=ca6a86ca3e3e9c85b6dbb665b35bcbf338c37829c1b2f1994487d55664886045 -endif - -PKG_EXTMOD_SUBDIRS:=driver driver-mini glue - -PKG_BUILD_FLAGS:=no-mips16 -PKG_FLAGS:=nonshared - -include $(INCLUDE_DIR)/package.mk - -define Package/broadcom-wl/Default - SECTION:=kernel - CATEGORY:=Kernel modules - DEPENDS:=@(PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mini) - SUBMENU:=Proprietary BCM43xx WiFi driver - SUBMENUDEP:=(TARGET_bcm47xx||TARGET_bcm63xx) -endef - -define KernelPackage/brcm-wl/Default - $(call Package/broadcom-wl/Default) - SECTION:=kernel - DEPENDS:=@(TARGET_bcm47xx||TARGET_bcm63xx) +wireless-tools +wifi-scripts +@KERNEL_WIRELESS_EXT - TITLE:=Kernel driver for BCM43xx chipsets - FILES:=$(PKG_BUILD_DIR)/driver$(1)/wl.ko $(PKG_BUILD_DIR)/glue/wl_glue.ko - AUTOLOAD:=$(call AutoProbe,wl) -endef - -define KernelPackage/brcm-wl/Default/description - This package contains the proprietary wireless driver for the Broadcom - BCM43xx chipset. -endef - -define KernelPackage/brcm-wl -$(call KernelPackage/brcm-wl/Default,) - TITLE+= (normal version) -endef - -define KernelPackage/brcm-wl/description -$(call KernelPackage/brcm-wl/Default/description) -endef - -define KernelPackage/brcm-wl-mini -$(call KernelPackage/brcm-wl/Default,-mini) - TITLE+= (Legacy version) -endef - -define KernelPackage/brcm-wl-mini/description -$(call KernelPackage/brcm-wl/Default/description) -endef - -define Package/wlc -$(call Package/broadcom-wl/Default) - TITLE:=wl driver setup utility -endef - -define Package/wlc/description - This package contains an utility for initializing the proprietary Broadcom - wl driver. -endef - -define Package/wl -$(call Package/broadcom-wl/Default) - TITLE:=Proprietary Broadcom wl driver config utility -endef - -define Package/wl/description - This package contains the proprietary utility (wl) for configuring the - proprietary Broadcom wl driver. -endef - -define Package/nas -$(call Package/broadcom-wl/Default) - TITLE:=Proprietary Broadcom WPA/WPA2 authenticator -endef - -define Package/nas/description - This package contains the proprietary WPA/WPA2 authenticator (nas) for the - proprietary Broadcom wl driver. -endef - -MAKE_KMOD := $(KERNEL_MAKE) \ - PATH="$(TARGET_PATH)" \ - M="$(PKG_BUILD_DIR)/kmod" \ - -define Build/Prepare - $(call Build/Prepare/Default) - - # New kernel version changed the sysmbol exported from printk to _printk - # The object file provided by broadcom require modification to correctly - # modprobe and generate a .ko - $(TARGET_CROSS)objcopy $(PKG_BUILD_DIR)/driver/wl_apsta/wl_prebuilt.o \ - --redefine-sym printk=_printk - $(TARGET_CROSS)objcopy $(PKG_BUILD_DIR)/driver/wl_apsta_mini/wl_prebuilt.o \ - --redefine-sym printk=_printk - - $(CP) $(PKG_BUILD_DIR)/driver $(PKG_BUILD_DIR)/driver-mini - $(CP) ./src/glue $(PKG_BUILD_DIR)/glue -endef - -define Build/Compile - # Compile glue driver - $(MAKE_KMOD) -C "$(LINUX_DIR)" \ - M="$(PKG_BUILD_DIR)/glue" \ - modules - - # Compile the kernel part - $(MAKE_KMOD) \ - M="$(PKG_BUILD_DIR)/driver" \ - MODFLAGS="-DMODULE -mlong-calls" \ - KBUILD_EXTRA_SYMBOLS="$(PKG_BUILD_DIR)/glue/Module.symvers" \ - modules - - $(MAKE_KMOD) \ - M="$(PKG_BUILD_DIR)/driver-mini" \ - MODFLAGS="-DMODULE -mlong-calls" \ - BUILD_TYPE="wl_apsta_mini" \ - KBUILD_EXTRA_SYMBOLS="$(PKG_BUILD_DIR)/glue/Module.symvers" \ - modules - - # Compile libshared - $(MAKE) -C $(PKG_BUILD_DIR)/shared \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -I. -I$(PKG_BUILD_DIR)/driver/include" \ - all - - $(TARGET_CC) -o $(PKG_BUILD_DIR)/wlc \ - -I$(PKG_BUILD_DIR)/shared -I$(PKG_BUILD_DIR)/driver/include \ - ./src/wlc.c $(PKG_BUILD_DIR)/shared/libshared.a - - $(TARGET_CC) -o $(PKG_BUILD_DIR)/nas \ - $(PKG_BUILD_DIR)/nas_exe.o \ - $(PKG_BUILD_DIR)/shared/libshared.a - - $(TARGET_CC) -o $(PKG_BUILD_DIR)/wl \ - $(PKG_BUILD_DIR)/wl_exe.o \ - $(PKG_BUILD_DIR)/shared/libshared.a -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/shared/libshared.a $(1)/usr/lib/ -endef - -define Package/wlc/install - $(CP) ./files/* $(1)/ - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlc $(1)/sbin/ -endef - -define Package/wlc/postinst -#!/bin/sh -[ -n "$${IPKG_INSTROOT}" ] || /etc/init.d/wlunbind enable || true -endef - -define Package/wl/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/wl $(1)/usr/sbin/ -endef - -define Package/nas/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/nas $(1)/usr/sbin/ - $(LN) nas $(1)/usr/sbin/nas4not - $(LN) nas $(1)/usr/sbin/nas4wds -endef - -$(eval $(call KernelPackage,brcm-wl)) -$(eval $(call KernelPackage,brcm-wl-mini)) -$(eval $(call BuildPackage,wlc)) -$(eval $(call BuildPackage,wl)) -$(eval $(call BuildPackage,nas)) diff --git a/package/kernel/broadcom-wl/files/etc/hotplug.d/net/00-broadcom-wifi-detect b/package/kernel/broadcom-wl/files/etc/hotplug.d/net/00-broadcom-wifi-detect deleted file mode 100644 index a63d6bce60..0000000000 --- a/package/kernel/broadcom-wl/files/etc/hotplug.d/net/00-broadcom-wifi-detect +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -[ "${ACTION}" = "add" ] && [ "${INTERFACE%%[0-9]}" = "wl" ] && { - /sbin/wifi config -} diff --git a/package/kernel/broadcom-wl/files/etc/hotplug.d/net/20-broadcom_wds b/package/kernel/broadcom-wl/files/etc/hotplug.d/net/20-broadcom_wds deleted file mode 100644 index 35c4218e03..0000000000 --- a/package/kernel/broadcom-wl/files/etc/hotplug.d/net/20-broadcom_wds +++ /dev/null @@ -1,61 +0,0 @@ -include /lib/wifi - -setup_broadcom_wds() { - local iface="$1" - local remote="$(wlc ifname "$iface" wdsmac)" - - [ -z "$remote" ] && return - - config_cb() { - [ -z "$CONFIG_SECTION" ] && return - - config_get type "$CONFIG_SECTION" TYPE - [ "$type" = "wifi-iface" ] || return - - config_get network "$CONFIG_SECTION" network - [ -z "$network" ] && return - - config_get addr "$CONFIG_SECTION" bssid - addr=$(echo "$addr" | tr 'A-F' 'a-f') - [ "$addr" = "$remote" ] && { - local cfg="$CONFIG_SECTION" - - include /lib/network - scan_interfaces - - for network in $network; do - setup_interface "$iface" "$network" - done - - config_get encryption "$cfg" encryption - config_get key "$cfg" key - config_get ssid "$cfg" ssid - - [ "$encryption" != "none" ] && { - sleep 5 - case "$encryption" in - psk|PSK) - nas4not "$network" "$iface" up auto tkip psk "$key" "$ssid" - ;; - psk2|PSK2) - nas4not "$network" "$iface" up auto aes psk "$key" "$ssid" - ;; - psk+psk2|psk2+psk|PSK+PSK2|PSK2+PSK) - nas4not "$network" "$iface" up auto aes+tkip psk "$key" "$ssid" - ;; - *) - nas4not lan "$iface" up auto aes "$encryption" "$key" "$ssid" - ;; - esac - } - } - } - - config_load wireless -} - -case "$ACTION" in - add|register) - [ "${INTERFACE%%[0-1]-*}" = wds ] && setup_broadcom_wds "$INTERFACE" - ;; -esac diff --git a/package/kernel/broadcom-wl/files/etc/init.d/wlunbind b/package/kernel/broadcom-wl/files/etc/init.d/wlunbind deleted file mode 100755 index 0a29db565f..0000000000 --- a/package/kernel/broadcom-wl/files/etc/init.d/wlunbind +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2010-2011 OpenWrt.org - -START=09 - -unbind_driver() { - local driver="$1" - local sysfs="/sys/bus/pci/drivers/$driver" - if [ -d "$sysfs" ]; then - local lnk - for lnk in $sysfs/*; do - [ -h "$lnk" ] || continue - case "${lnk##*/}" in - *:*:*.*) - logger "Unbinding WL PCI device ${lnk##*/} from $driver" - echo -n "${lnk##*/}" > "$sysfs/unbind" - ;; - esac - done - fi -} - -boot() { - unbind_driver b43-pci-bridge - unbind_driver bcma-pci-bridge -} - -start() { :; } -stop() { :; } diff --git a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh deleted file mode 100644 index 352c365f27..0000000000 --- a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh +++ /dev/null @@ -1,480 +0,0 @@ -append DRIVERS "broadcom" - -scan_broadcom() { - local device="$1" - local vif vifs wds - local adhoc sta apmode mon disabled - local adhoc_if sta_if ap_if mon_if - - config_get vifs "$device" vifs - for vif in $vifs; do - config_get_bool disabled "$vif" disabled 0 - [ $disabled -eq 0 ] || continue - - local mode - config_get mode "$vif" mode - case "$mode" in - adhoc) - adhoc=1 - adhoc_if="$vif" - ;; - sta) - sta=1 - sta_if="$vif" - ;; - ap) - apmode=1 - ap_if="${ap_if:+$ap_if }$vif" - ;; - wds) - local addr - config_get addr "$vif" bssid - [ -z "$addr" ] || { - addr=$(echo "$addr" | tr 'A-F' 'a-f') - append wds "$addr" - } - ;; - monitor) - mon=1 - mon_if="$vif" - ;; - *) echo "$device($vif): Invalid mode";; - esac - done - config_set "$device" wds "$wds" - - local _c= - for vif in ${adhoc_if:-$sta_if $ap_if $mon_if}; do - config_set "$vif" ifname "${device}${_c:+-$_c}" - _c=$((${_c:-0} + 1)) - done - config_set "$device" vifs "${adhoc_if:-$sta_if $ap_if $mon_if}" - - ap=1 - infra=1 - if [ "$_c" -gt 1 ]; then - mssid=1 - else - mssid= - fi - apsta=0 - radio=1 - monitor=0 - case "$adhoc:$sta:$apmode:$mon" in - 1*) - ap=0 - mssid= - infra=0 - ;; - :1:1:) - apsta=1 - wet=1 - ;; - :1::) - wet=1 - ap=0 - mssid= - ;; - :::1) - wet=1 - ap=0 - mssid= - monitor=1 - ;; - ::) - radio=0 - ;; - esac -} - -disable_broadcom() { - local device="$1" - set_wifi_down "$device" - ( - include /lib/network - - local pid_file=/var/run/nas.$device.pid - [ -e $pid_file ] && start-stop-daemon -K -q -s SIGKILL -p $pid_file && rm $pid_file - - # make sure the interfaces are down and removed from all bridges - local dev ifname - for dev in /sys/class/net/wds${device##wl}-* /sys/class/net/${device}-* /sys/class/net/${device}; do - if [ -e "$dev" ]; then - ifname=${dev##/sys/class/net/} - ip link set dev "$ifname" down - unbridge "$ifname" - fi - done - - # make sure all of the devices are disabled in the driver - local ifdown= - local bssmax=$(wlc ifname "$device" bssmax) - local vif=$((${bssmax:-4} - 1)) - append ifdown "down" "$N" - append ifdown "wds none" "$N" - while [ $vif -ge 0 ]; do - append ifdown "vif $vif" "$N" - append ifdown "enabled 0" "$N" - vif=$(($vif - 1)) - done - - wlc ifname "$device" stdin <