<commit_before>#
# Copyright (C) 2012 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:=8192cu
PKG_RELEASE:=1

PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk

define KernelPackage/8192cu
  SUBMENU:=Wireless Drivers
  TITLE:=Realtek 8192cu WiFi
  FILES:= \
	$(LINUX_DIR)/net/wireless/cfg80211.ko \
	$(PKG_BUILD_DIR)/8192cu.ko
  MAINTAINER:=<NAME> <<EMAIL>>
  DEPENDS:=+@DRIVER_11N_SUPPORT
  KCONFIG:=CONFIG_CFG80211
  AUTOLOAD:=$(call AutoLoad,50, cfg80211 8192cu)
endef

define KernelPackage/8192cu/description
  Updated blob driver for Realtek 8192cu wireless devices.
  This driver also includes a non 'compat-wireless' built version
  of cfg80211.ko so do not build with the kmod-cfg80211 or kmod-mac80211
  packages built into the image (they'll still have to be compiled as
  modules though).
endef

MAKE_OPTS:= \
	ARCH="$(LINUX_KARCH)" \
	CROSS_COMPILE="$(TARGET_CROSS)" \
	USER_EXTRA_CFLAGS="-DCONFIG_LITTLE_ENDIAN" \
	KSRC=$(LINUX_DIR)

define Build/Prepare
	mkdir -p $(PKG_BUILD_DIR)
	$(CP) ./src/* $(PKG_BUILD_DIR)/
	$(Build/Patch)
endef

define Build/Compile
	$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(MAKE_OPTS)
endef

$(eval $(call KernelPackage,8192cu))
<commit_msg>[wrt] Add kernel config silencing options I'm not sure I'm doing this right but this prevents the build process from asking additional questions about things enabled by the cfg80211 module<commit_after>#
# Copyright (C) 2012 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:=8192cu
PKG_RELEASE:=1

PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk

define KernelPackage/8192cu
  SUBMENU:=Wireless Drivers
  TITLE:=Realtek 8192cu WiFi
  FILES:= \
	$(LINUX_DIR)/net/wireless/cfg80211.ko \
	$(PKG_BUILD_DIR)/8192cu.ko
  MAINTAINER:=<NAME> <<EMAIL>>
  DEPENDS:=+@DRIVER_11N_SUPPORT
  KCONFIG:=CONFIG_CFG80211 \
	CONFIG_NL80211_TESTMODE=n CONFIG_CFG80211_REG_DEBUG=n \
	CONFIG_CFG80211_DEVELOPER_WARNINGS=n \
	CONFIG_CFG80211_DEFAULT_PS=y \
	CONFIG_CFG80211_DEBUGFS=n CONFIG_CFG80211_INTERNAL_REGDB=n \
	CONFIG_CFG80211_WEXT=y \
	CONFIG_ATH_COMMON=n CONFIG_IWM=n CONFIG_MWIFIEX=n
  AUTOLOAD:=$(call AutoLoad,50, cfg80211 8192cu)
endef

define KernelPackage/8192cu/description
  Updated blob driver for Realtek 8192cu wireless devices.
  This driver also includes a non 'compat-wireless' built version
  of cfg80211.ko so do not build with the kmod-cfg80211 or kmod-mac80211
  packages built into the image (they'll still have to be compiled as
  modules though).
endef

MAKE_OPTS:= \
	ARCH="$(LINUX_KARCH)" \
	CROSS_COMPILE="$(TARGET_CROSS)" \
	USER_EXTRA_CFLAGS="-DCONFIG_LITTLE_ENDIAN" \
	KSRC=$(LINUX_DIR)

define Build/Prepare
	mkdir -p $(PKG_BUILD_DIR)
	$(CP) ./src/* $(PKG_BUILD_DIR)/
	$(Build/Patch)
endef

define Build/Compile
	$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(MAKE_OPTS)
endef

define KernelPackage/8192cu/install
	mkdir -p $(1)/lib/wifi
	# compat-wireless, I hate your bastard kernel module but I need your script
	$(INSTALL_DATA) $(TOPDIR)/package/mac80211/files/lib/wifi/mac80211.sh $(1)/lib/wifi/.
endef

$(eval $(call KernelPackage,8192cu))

{'fraction_non_alphanumeric': 0.1099523241954708, 'fraction_numerical': 0.06019070321811681, 'mean_word_length': 5.274766355140187, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4128537', 'n_tokens_mistral': 1430, 'n_tokens_neox': 1219, 'n_words': 302}