From: Felix Fietkau Date: Fri, 26 Jan 2024 19:16:32 +0000 (+0100) Subject: broadcom-wl: remove package X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e772b75d5d50be4d541751a871057186439c25c2;p=openwrt%2Fstaging%2Fthess.git 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 --- 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 <