From 6671a881fdb69c650ab2f44ef1ae899b53537895 Mon Sep 17 00:00:00 2001 From: Alexandros Couloumbis Date: Fri, 2 Jun 2017 18:03:45 +0300 Subject: [PATCH] package/mac80211: nuke some crypto bloat --- .../mac80211/patches/999-nuke_debugfs.patch | 726 ++++++++++++++++++ .../generic/patches-4.4/999-nuke_crypto.patch | 95 +++ 2 files changed, 821 insertions(+) create mode 100644 package/kernel/mac80211/patches/999-nuke_debugfs.patch create mode 100644 target/linux/generic/patches-4.4/999-nuke_crypto.patch diff --git a/package/kernel/mac80211/patches/999-nuke_debugfs.patch b/package/kernel/mac80211/patches/999-nuke_debugfs.patch new file mode 100644 index 0000000000..2ca8cd086b --- /dev/null +++ b/package/kernel/mac80211/patches/999-nuke_debugfs.patch @@ -0,0 +1,726 @@ +--- a/net/mac80211/Makefile 2017-05-24 22:58:02.718873832 +0300 ++++ b/net/mac80211/Makefile 2017-05-24 23:02:50.419878338 +0300 +@@ -31,13 +31,6 @@ mac80211-y := \ + tdls.o \ + ocb.o + +-mac80211-$(CPTCFG_MAC80211_LEDS) += led.o +-mac80211-$(CPTCFG_MAC80211_DEBUGFS) += \ +- debugfs.o \ +- debugfs_sta.o \ +- debugfs_netdev.o \ +- debugfs_key.o +- + mac80211-$(CPTCFG_MAC80211_MESH) += \ + mesh.o \ + mesh_pathtbl.o \ +@@ -51,12 +44,10 @@ mac80211-$(CONFIG_PM) += pm.o + CFLAGS_trace.o := -I$(src) + + rc80211_minstrel-y := rc80211_minstrel.o +-rc80211_minstrel-$(CPTCFG_MAC80211_DEBUGFS) += rc80211_minstrel_debugfs.o + + rc80211_minstrel_ht-y := rc80211_minstrel_ht.o +-rc80211_minstrel_ht-$(CPTCFG_MAC80211_DEBUGFS) += rc80211_minstrel_ht_debugfs.o + + mac80211-$(CPTCFG_MAC80211_RC_MINSTREL) += $(rc80211_minstrel-y) + mac80211-$(CPTCFG_MAC80211_RC_MINSTREL_HT) += $(rc80211_minstrel_ht-y) + +-ccflags-y += -DDEBUG ++# ccflags-y += -DDEBUG +--- a/net/wireless/Makefile 2017-02-02 13:15:24.000000000 +0200 ++++ b/net/wireless/Makefile 2017-05-24 23:13:05.343887968 +0300 +@@ -12,7 +12,6 @@ obj-$(CONFIG_WEXT_PRIV) += wext-priv.o + cfg80211-y += core.o sysfs.o radiotap.o util.o reg.o scan.o nl80211.o + cfg80211-y += mlme.o ibss.o sme.o chan.o ethtool.o mesh.o ap.o trace.o ocb.o + cfg80211-$(CONFIG_OF) += of.o +-cfg80211-$(CPTCFG_CFG80211_DEBUGFS) += debugfs.o + cfg80211-$(CPTCFG_CFG80211_WEXT) += wext-compat.o wext-sme.o + cfg80211-$(CPTCFG_CFG80211_INTERNAL_REGDB) += regdb.o + +--- a/net/wireless/core.c 2017-02-02 13:15:24.000000000 +0200 ++++ b/net/wireless/core.c 2017-05-24 23:25:10.491899324 +0300 +@@ -14,7 +14,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -25,7 +24,6 @@ + #include "nl80211.h" + #include "core.h" + #include "sysfs.h" +-#include "debugfs.h" + #include "wext-compat.h" + #include "rdev-ops.h" + +@@ -41,9 +39,6 @@ MODULE_ALIAS_GENL_FAMILY(NL80211_GENL_NA + LIST_HEAD(cfg80211_rdev_list); + int cfg80211_rdev_list_generation; + +-/* for debugfs */ +-static struct dentry *ieee80211_debugfs_dir; +- + /* for the cleanup, scan and event works */ + struct workqueue_struct *cfg80211_wq; + +@@ -137,13 +132,6 @@ int cfg80211_dev_rename(struct cfg80211_ + if (result) + return result; + +- if (rdev->wiphy.debugfsdir && +- !debugfs_rename(rdev->wiphy.debugfsdir->d_parent, +- rdev->wiphy.debugfsdir, +- rdev->wiphy.debugfsdir->d_parent, +- newname)) +- pr_err("failed to rename debugfs dir to %s!\n", newname); +- + nl80211_notify_wiphy(rdev, NL80211_CMD_NEW_WIPHY); + + return 0; +@@ -790,14 +778,6 @@ int wiphy_register(struct wiphy *wiphy) + list_add_rcu(&rdev->list, &cfg80211_rdev_list); + cfg80211_rdev_list_generation++; + +- /* add to debugfs */ +- rdev->wiphy.debugfsdir = +- debugfs_create_dir(wiphy_name(&rdev->wiphy), +- ieee80211_debugfs_dir); +- if (IS_ERR(rdev->wiphy.debugfsdir)) +- rdev->wiphy.debugfsdir = NULL; +- +- cfg80211_debugfs_rdev_add(rdev); + nl80211_notify_wiphy(rdev, NL80211_CMD_NEW_WIPHY); + + if (wiphy->regulatory_flags & REGULATORY_CUSTOM_REG) { +@@ -899,7 +879,6 @@ void wiphy_unregister(struct wiphy *wiph + * First remove the hardware from everywhere, this makes + * it impossible to find from userspace. + */ +- debugfs_remove_recursive(rdev->wiphy.debugfsdir); + list_del_rcu(&rdev->list); + synchronize_rcu(); + +@@ -1325,8 +1304,6 @@ static int __init cfg80211_init(void) + if (err) + goto out_fail_nl80211; + +- ieee80211_debugfs_dir = debugfs_create_dir("ieee80211", NULL); +- + err = regulatory_init(); + if (err) + goto out_fail_reg; +@@ -1342,7 +1319,6 @@ static int __init cfg80211_init(void) + out_fail_wq: + regulatory_exit(); + out_fail_reg: +- debugfs_remove(ieee80211_debugfs_dir); + nl80211_exit(); + out_fail_nl80211: + unregister_netdevice_notifier(&cfg80211_netdev_notifier); +@@ -1357,7 +1333,6 @@ subsys_initcall(cfg80211_init); + + static void __exit cfg80211_exit(void) + { +- debugfs_remove(ieee80211_debugfs_dir); + nl80211_exit(); + unregister_netdevice_notifier(&cfg80211_netdev_notifier); + wiphy_sysfs_exit(); +--- a/drivers/net/wireless/ath/ath5k/Makefile 2017-02-02 13:15:24.000000000 +0200 ++++ b/drivers/net/wireless/ath/ath5k/Makefile 2017-05-24 23:36:31.590909991 +0300 +@@ -11,12 +11,10 @@ ath5k-y += reset.o + ath5k-y += attach.o + ath5k-y += base.o + CFLAGS_base.o += -I$(src) +-ath5k-y += led.o + ath5k-y += rfkill.o + ath5k-y += ani.o + ath5k-y += sysfs.o + ath5k-y += mac80211-ops.o +-ath5k-$(CPTCFG_ATH5K_DEBUG) += debug.o + ath5k-$(CPTCFG_ATH5K_AHB) += ahb.o + ath5k-$(CPTCFG_ATH5K_PCI) += pci.o + obj-$(CPTCFG_ATH5K) += ath5k.o +--- a/drivers/net/wireless/ath/ath9k/Makefile 2017-05-24 23:28:08.424902111 +0300 ++++ b/drivers/net/wireless/ath/ath9k/Makefile 2017-05-24 23:39:19.749912624 +0300 +@@ -11,15 +11,12 @@ ath9k-y += beacon.o \ + ath9k-$(CPTCFG_ATH9K_BTCOEX_SUPPORT) += mci.o + ath9k-$(CPTCFG_ATH9K_PCI) += pci.o + ath9k-$(CPTCFG_ATH9K_AHB) += ahb.o +-ath9k-$(CPTCFG_ATH9K_DFS_DEBUGFS) += dfs_debug.o + ath9k-$(CPTCFG_ATH9K_DFS_CERTIFIED) += dfs.o + ath9k-$(CPTCFG_ATH9K_TX99) += tx99.o + ath9k-$(CPTCFG_ATH9K_WOW) += wow.o + ath9k-$(CPTCFG_ATH9K_HWRNG) += rng.o + ath9k-$(CPTCFG_ATH9K_UBNTHSR) += hsr.o + +-ath9k-$(CPTCFG_ATH9K_DEBUGFS) += debug.o +- + ath9k-$(CPTCFG_ATH9K_STATION_STATISTICS) += debug_sta.o + + obj-$(CPTCFG_ATH9K) += ath9k.o +--- a/drivers/net/wireless/ath/ath5k/base.c 2017-05-24 23:41:34.992914742 +0300 ++++ b/drivers/net/wireless/ath/ath5k/base.c 2017-05-24 23:47:21.698920172 +0300 +@@ -2712,7 +2712,6 @@ ath5k_stop_locked(struct ath5k_hw *ah) + ieee80211_stop_queues(ah->hw); + + if (!test_bit(ATH_STAT_INVALID, ah->status)) { +- ath5k_led_off(ah); + ath5k_hw_set_imr(ah, 0); + synchronize_irq(ah->irq); + ath5k_rx_stop(ah); +@@ -3110,8 +3109,6 @@ ath5k_init(struct ieee80211_hw *hw) + if (!ath_is_world_regd(regulatory)) + regulatory_hint(hw->wiphy, regulatory->alpha2); + +- ath5k_init_leds(ah); +- + ath5k_sysfs_register(ah); + + return 0; +@@ -3147,7 +3144,6 @@ ath5k_deinit_ah(struct ath5k_hw *ah) + ath5k_desc_free(ah); + ath5k_txq_release(ah); + ath5k_hw_release_tx_queue(ah, ah->bhalq); +- ath5k_unregister_leds(ah); + + ath5k_sysfs_unregister(ah); + /* +--- a/drivers/net/wireless/ath/ath5k/attach.c 2017-02-02 13:15:22.000000000 +0200 ++++ b/drivers/net/wireless/ath/ath5k/attach.c 2017-05-24 23:59:36.445931679 +0300 +@@ -335,9 +335,6 @@ int ath5k_hw_init(struct ath5k_hw *ah) + + ath5k_hw_init_nfcal_hist(ah); + +- /* turn on HW LEDs */ +- ath5k_hw_set_ledstate(ah, AR5K_LED_INIT); +- + return 0; + err: + return ret; +--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c 2017-05-24 23:49:17.218921981 +0300 ++++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c 2017-05-24 23:59:07.757931229 +0300 +@@ -282,8 +282,6 @@ ath5k_bss_info_changed(struct ieee80211_ + + if (ah->opmode == NL80211_IFTYPE_STATION) + ath5k_set_beacon_filter(hw, ah->assoc); +- ath5k_hw_set_ledstate(ah, ah->assoc ? +- AR5K_LED_ASSOC : AR5K_LED_INIT); + if (bss_conf->assoc) { + ATH5K_DBG(ah, ATH5K_DEBUG_ANY, + "Bss Info ASSOC %d, bssid: %pM\n", +@@ -535,8 +533,6 @@ ath5k_sw_scan_start(struct ieee80211_hw + const u8 *mac_addr) + { + struct ath5k_hw *ah = hw->priv; +- if (!ah->assoc) +- ath5k_hw_set_ledstate(ah, AR5K_LED_SCAN); + } + + +@@ -544,8 +540,6 @@ static void + ath5k_sw_scan_complete(struct ieee80211_hw *hw, struct ieee80211_vif *vif) + { + struct ath5k_hw *ah = hw->priv; +- ath5k_hw_set_ledstate(ah, ah->assoc ? +- AR5K_LED_ASSOC : AR5K_LED_INIT); + } + + +--- a/drivers/net/wireless/ath/ath5k/gpio.c 2017-02-02 13:15:22.000000000 +0200 ++++ b/drivers/net/wireless/ath/ath5k/gpio.c 2017-05-24 23:57:04.654929302 +0300 +@@ -26,78 +26,6 @@ + + + /** +- * DOC: GPIO/LED functions +- * +- * Here we control the 6 bidirectional GPIO pins provided by the hw. +- * We can set a GPIO pin to be an input or an output pin on GPIO control +- * register and then read or set its status from GPIO data input/output +- * registers. +- * +- * We also control the two LED pins provided by the hw, LED_0 is our +- * "power" LED and LED_1 is our "network activity" LED but many scenarios +- * are available from hw. Vendors might also provide LEDs connected to the +- * GPIO pins, we handle them through the LED subsystem on led.c +- */ +- +- +-/** +- * ath5k_hw_set_ledstate() - Set led state +- * @ah: The &struct ath5k_hw +- * @state: One of AR5K_LED_* +- * +- * Used to set the LED blinking state. This only +- * works for the LED connected to the LED_0, LED_1 pins, +- * not the GPIO based. +- */ +-void +-ath5k_hw_set_ledstate(struct ath5k_hw *ah, unsigned int state) +-{ +- u32 led; +- /*5210 has different led mode handling*/ +- u32 led_5210; +- +- /*Reset led status*/ +- if (ah->ah_version != AR5K_AR5210) +- AR5K_REG_DISABLE_BITS(ah, AR5K_PCICFG, +- AR5K_PCICFG_LEDMODE | AR5K_PCICFG_LED); +- else +- AR5K_REG_DISABLE_BITS(ah, AR5K_PCICFG, AR5K_PCICFG_LED); +- +- /* +- * Some blinking values, define at your wish +- */ +- switch (state) { +- case AR5K_LED_SCAN: +- case AR5K_LED_AUTH: +- led = AR5K_PCICFG_LEDMODE_PROP | AR5K_PCICFG_LED_PEND; +- led_5210 = AR5K_PCICFG_LED_PEND | AR5K_PCICFG_LED_BCTL; +- break; +- +- case AR5K_LED_INIT: +- led = AR5K_PCICFG_LEDMODE_PROP | AR5K_PCICFG_LED_NONE; +- led_5210 = AR5K_PCICFG_LED_PEND; +- break; +- +- case AR5K_LED_ASSOC: +- case AR5K_LED_RUN: +- led = AR5K_PCICFG_LEDMODE_PROP | AR5K_PCICFG_LED_ASSOC; +- led_5210 = AR5K_PCICFG_LED_ASSOC; +- break; +- +- default: +- led = AR5K_PCICFG_LEDMODE_PROM | AR5K_PCICFG_LED_NONE; +- led_5210 = AR5K_PCICFG_LED_PEND; +- break; +- } +- +- /*Write new status to the register*/ +- if (ah->ah_version != AR5K_AR5210) +- AR5K_REG_ENABLE_BITS(ah, AR5K_PCICFG, led); +- else +- AR5K_REG_ENABLE_BITS(ah, AR5K_PCICFG, led_5210); +-} +- +-/** + * ath5k_hw_set_gpio_input() - Set GPIO inputs + * @ah: The &struct ath5k_hw + * @gpio: GPIO pin to set as input +--- a/drivers/net/wireless/ath/ath9k/init.c 2017-05-25 00:02:46.979934663 +0300 ++++ b/drivers/net/wireless/ath/ath9k/init.c 2017-05-25 00:07:20.426938945 +0300 +@@ -47,14 +47,6 @@ int ath9k_modparam_nohwcrypt; + module_param_named(nohwcrypt, ath9k_modparam_nohwcrypt, int, 0444); + MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption"); + +-int ath9k_led_blink = 1; +-module_param_named(blink, ath9k_led_blink, int, 0444); +-MODULE_PARM_DESC(blink, "Enable LED blink on activity"); +- +-static int ath9k_led_active_high = -1; +-module_param_named(led_active_high, ath9k_led_active_high, int, 0444); +-MODULE_PARM_DESC(led_active_high, "Invert LED polarity"); +- + static int ath9k_btcoex_enable; + module_param_named(btcoex_enable, ath9k_btcoex_enable, int, 0444); + MODULE_PARM_DESC(btcoex_enable, "Enable wifi-BT coexistence"); +@@ -463,9 +455,6 @@ static void ath9k_init_pcoem_platform(st + ah->config.pll_pwrsave = 0; + ath_info(common, "Disable PLL PowerSave\n"); + } +- +- if (sc->driver_data & ATH9K_PCI_LED_ACT_HI) +- ah->config.led_active_high = true; + } + + static void ath9k_eeprom_request_cb(const struct firmware *eeprom_blob, +@@ -527,7 +516,6 @@ static int ath9k_init_platform(struct at + ah->ah_flags &= ~AH_USE_EEPROM; + ah->gpio_mask = pdata->gpio_mask; + ah->gpio_val = pdata->gpio_val; +- ah->led_pin = pdata->led_pin; + ah->is_clk_25mhz = pdata->is_clk_25mhz; + ah->get_mac_revision = pdata->get_mac_revision; + ah->external_reset = pdata->external_reset; +@@ -544,9 +532,6 @@ static int ath9k_init_platform(struct at + return ret; + } + +- if (pdata->led_active_high) +- ah->config.led_active_high = true; +- + if (pdata->tx_gain_buffalo) + ah->config.tx_gain_buffalo = true; + +@@ -615,7 +600,6 @@ static int ath9k_init_softc(u16 devid, s + ah->hw = sc->hw; + ah->hw_version.devid = devid; + ah->ah_flags |= AH_USE_EEPROM; +- ah->led_pin = -1; + ah->reg_ops.read = ath9k_ioread32; + ah->reg_ops.multi_read = ath9k_multi_ioread32; + ah->reg_ops.write = ath9k_iowrite32; +@@ -660,9 +644,6 @@ static int ath9k_init_softc(u16 devid, s + if (ret) + return ret; + +- if (ath9k_led_active_high != -1) +- ah->config.led_active_high = ath9k_led_active_high == 1; +- + /* + * Enable WLAN/BT RX Antenna diversity only when: + * +@@ -1088,7 +1069,6 @@ void ath9k_deinit_device(struct ath_soft + ath9k_ps_wakeup(sc); + + wiphy_rfkill_stop_polling(sc->hw->wiphy); +- ath_deinit_leds(sc); + + ath9k_ps_restore(sc); + +--- a/drivers/net/wireless/ath/ath9k/gpio.c 2017-05-25 00:02:46.978934663 +0300 ++++ b/drivers/net/wireless/ath/ath9k/gpio.c 2017-05-25 00:14:24.919945593 +0300 +@@ -209,192 +209,6 @@ static inline void ath9k_deinit_buttons( + + #endif /* CONFIG_GPIOLIB */ + +-/********************************/ +-/* LED functions */ +-/********************************/ +- +-static void ath_fill_led_pin(struct ath_softc *sc) +-{ +- struct ath_hw *ah = sc->sc_ah; +- +- /* Set default led pin if invalid */ +- if (ah->led_pin < 0) { +- if (AR_SREV_9287(ah)) +- ah->led_pin = ATH_LED_PIN_9287; +- else if (AR_SREV_9485(ah)) +- ah->led_pin = ATH_LED_PIN_9485; +- else if (AR_SREV_9300(ah)) +- ah->led_pin = ATH_LED_PIN_9300; +- else if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) +- ah->led_pin = ATH_LED_PIN_9462; +- else +- ah->led_pin = ATH_LED_PIN_DEF; +- } +-} +- +-static void ath_led_brightness(struct led_classdev *led_cdev, +- enum led_brightness brightness) +-{ +- struct ath_led *led = container_of(led_cdev, struct ath_led, cdev); +- struct ath_softc *sc = led->sc; +- +- ath9k_ps_wakeup(sc); +- ath9k_hw_set_gpio(sc->sc_ah, led->gpio->gpio, +- (brightness != LED_OFF) ^ led->gpio->active_low); +- ath9k_ps_restore(sc); +-} +- +-static int ath_add_led(struct ath_softc *sc, struct ath_led *led) +-{ +- const struct gpio_led *gpio = led->gpio; +- int ret; +- +- led->cdev.name = gpio->name; +- led->cdev.default_trigger = gpio->default_trigger; +- led->cdev.brightness_set = ath_led_brightness; +- +- ret = led_classdev_register(wiphy_dev(sc->hw->wiphy), &led->cdev); +- if (ret < 0) +- return ret; +- +- led->sc = sc; +- list_add(&led->list, &sc->leds); +- +- /* Configure gpio for output */ +- ath9k_hw_gpio_request_out(sc->sc_ah, gpio->gpio, gpio->name, +- AR_GPIO_OUTPUT_MUX_AS_OUTPUT); +- +- /* Set default LED state */ +- if (gpio->default_state == LEDS_GPIO_DEFSTATE_ON) +- ath9k_hw_set_gpio(sc->sc_ah, gpio->gpio, !gpio->active_low); +- else +- ath9k_hw_set_gpio(sc->sc_ah, gpio->gpio, gpio->active_low); +- +-#ifdef CONFIG_GPIOLIB +- /* If there is GPIO chip configured, reserve LED pin */ +- if (sc->gpiochip) +- gpio_request(sc->gpiochip->gchip.base + gpio->gpio, gpio->name); +-#endif +- +- return 0; +-} +- +-int ath_create_gpio_led(struct ath_softc *sc, int gpio_num, const char *name, +- const char *trigger, bool active_low) +-{ +- struct ath_led *led; +- struct gpio_led *gpio; +- char *_name; +- int ret; +- +- led = kzalloc(sizeof(*led) + sizeof(*gpio) + strlen(name) + 1, +- GFP_KERNEL); +- if (!led) +- return -ENOMEM; +- +- led->gpio = gpio = (struct gpio_led *) (led + 1); +- _name = (char *) (led->gpio + 1); +- +- strcpy(_name, name); +- gpio->name = _name; +- gpio->gpio = gpio_num; +- gpio->active_low = active_low; +- gpio->default_trigger = trigger; +- +- ret = ath_add_led(sc, led); +- if (unlikely(ret < 0)) +- kfree(led); +- +- return ret; +-} +- +-static int ath_create_platform_led(struct ath_softc *sc, +- const struct gpio_led *gpio) +-{ +- struct ath_led *led; +- int ret; +- +- led = kzalloc(sizeof(*led), GFP_KERNEL); +- if (!led) +- return -ENOMEM; +- +- led->gpio = gpio; +- ret = ath_add_led(sc, led); +- if (ret < 0) +- kfree(led); +- +- return ret; +-} +- +-void ath_deinit_leds(struct ath_softc *sc) +-{ +- struct ath_led *led; +- +- ath9k_deinit_buttons(sc); +- while (!list_empty(&sc->leds)) { +- led = list_first_entry(&sc->leds, struct ath_led, list); +-#ifdef CONFIG_GPIOLIB +- /* If there is GPIO chip configured, free LED pin */ +- if (sc->gpiochip) +- gpio_free(sc->gpiochip->gchip.base + led->gpio->gpio); +-#endif +- list_del(&led->list); +- ath_led_brightness(&led->cdev, LED_OFF); +- led_classdev_unregister(&led->cdev); +- ath9k_hw_gpio_free(sc->sc_ah, led->gpio->gpio); +- kfree(led); +- } +- ath9k_unregister_gpio_chip(sc); +-} +- +-void ath_init_leds(struct ath_softc *sc) +-{ +- struct ath9k_platform_data *pdata = sc->dev->platform_data; +- struct device_node *np = sc->dev->of_node; +- char led_name[32]; +- const char *trigger; +- int i; +- +- INIT_LIST_HEAD(&sc->leds); +- +- if (AR_SREV_9100(sc->sc_ah)) +- return; +- +- if (!np) +- ath9k_register_gpio_chip(sc); +- +- /* setup gpio controller only if requested and skip the led_pin setup */ +- if (of_property_read_bool(np, "gpio-controller")) { +- ath9k_register_gpio_chip(sc); +- return; +- } +- +- ath_fill_led_pin(sc); +- ath9k_init_buttons(sc); +- +- if (pdata && pdata->leds && pdata->num_leds) +- for (i = 0; i < pdata->num_leds; i++) { +- if (pdata->leds[i].gpio == sc->sc_ah->led_pin) +- sc->sc_ah->led_pin = -1; +- +- ath_create_platform_led(sc, &pdata->leds[i]); +- } +- +- if (sc->sc_ah->led_pin < 0) +- return; +- +- snprintf(led_name, sizeof(led_name), "ath9k-%s", +- wiphy_name(sc->hw->wiphy)); +- +- if (ath9k_led_blink) +- trigger = sc->led_default_trigger; +- else +- trigger = ieee80211_get_radio_led_name(sc->hw); +- +- ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger, +- !sc->sc_ah->config.led_active_high); +-} +- + #endif + + /*******************/ +--- a/compat/Makefile 2017-06-02 16:16:21.236674194 +0300 ++++ b/compat/Makefile 2017-06-02 16:20:07.004677729 +0300 +@@ -32,13 +32,3 @@ compat-$(CPTCFG_KERNEL_4_3) += backport- + compat-$(CPTCFG_KERNEL_4_4) += backport-4.4.o + compat-$(CPTCFG_KERNEL_4_5) += backport-4.5.o + compat-$(CPTCFG_KERNEL_4_6) += backport-4.6.o +- +-compat-$(CPTCFG_BPAUTO_BUILD_CRYPTO_CCM) += crypto-ccm.o +-compat-$(CPTCFG_BPAUTO_CRYPTO_SKCIPHER) += crypto-skcipher.o +-compat-$(CPTCFG_BPAUTO_BUILD_WANT_DEV_COREDUMP) += drivers-base-devcoredump.o +-compat-$(CPTCFG_BPAUTO_RHASHTABLE) += lib-rhashtable.o +-cordic-objs += lib-cordic.o +-obj-$(CPTCFG_BPAUTO_BUILD_CORDIC) += cordic.o +-compat-$(CPTCFG_BPAUTO_BUILD_CRYPTO_CCM) += crypto-ccm.o +-compat-$(CPTCFG_BPAUTO_BUILD_FRAME_VECTOR) += mm-frame_vector.o +-compat-$(CPTCFG_BPAUTO_BUILD_HDMI) += drivers-video-hdmi.o +--- a/compat/Kconfig 2017-02-02 13:15:24.000000000 +0200 ++++ b/compat/Kconfig 2017-06-02 16:37:44.054694283 +0300 +@@ -103,28 +103,6 @@ config BPAUTO_USERSEL_BUILD_ALL + It's only really useful for compat testing, so + you probably shouldn't enable it. + +-config BPAUTO_CRYPTO_CCM +- depends on CRYPTO_AEAD +- depends on CRYPTO_CTR +- bool +- +-config BPAUTO_BUILD_CRYPTO_CCM +- bool +- default n if CRYPTO_CCM +- default y if BPAUTO_CRYPTO_CCM +- #c-file crypto/ccm.c +- +-config BPAUTO_CRYPTO_SKCIPHER +- tristate +- depends on m +- depends on KERNEL_4_3 +- default y if MAC802154 +- default y if LIB80211_CRYPT_WEP +- default y if LIB80211_CRYPT_TKIP +- default y if BT +- #c-file crypto/skcipher.c +- #module-name skcipher +- + config BPAUTO_WANT_DEV_COREDUMP + bool + +diff --git a/net/mac80211/Kconfig b/net/mac80211/Kconfig +index bb46e8d..5edaeb4 100644 +--- a/net/mac80211/Kconfig ++++ b/net/mac80211/Kconfig +@@ -2,9 +2,6 @@ config MAC80211 + tristate "Generic IEEE 802.11 Networking Stack (mac80211)" + depends on m + depends on CFG80211 +- depends on CRYPTO +- depends on CRYPTO_ARC4 +- depends on CRYPTO_AES + depends on CRC32 + ---help--- + This option enables the hardware independent IEEE 802.11 +@@ -72,6 +69,7 @@ comment "Some wireless drivers require a rate control algorithm" + config MAC80211_MESH + bool "Enable mac80211 mesh networking (pre-802.11s) support" + depends on MAC80211 ++ default n + ---help--- + This options enables support of Draft 802.11s mesh networking. + The implementation is based on Draft 2.08 of the Mesh Networking +@@ -83,6 +81,7 @@ config MAC80211_LEDS + bool "Enable LED triggers" + depends on MAC80211 + depends on LEDS_CLASS ++ default n + select BPAUTO_LEDS_TRIGGERS + ---help--- + This option enables a few LED triggers for different +@@ -91,6 +90,7 @@ config MAC80211_LEDS + config MAC80211_DEBUGFS + bool "Export mac80211 internals in DebugFS" + depends on MAC80211 && DEBUG_FS ++ default n + ---help--- + Select this to see extensive information about + the internal state of mac80211 in debugfs. +diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig +index a02025c..878419c 100644 +--- a/net/wireless/Kconfig ++++ b/net/wireless/Kconfig +@@ -183,14 +183,17 @@ config LIB80211 + config LIB80211_CRYPT_WEP + tristate "lib80211 WEP support" + depends on m ++ default n + + config LIB80211_CRYPT_CCMP + tristate "lib80211 CCMP support" + depends on m ++ default n + + config LIB80211_CRYPT_TKIP + tristate "lib80211 TKIP support" + depends on m ++ default n + + config LIB80211_DEBUG + bool "lib80211 debugging messages" +diff --git a/net/wireless/Makefile b/net/wireless/Makefile +index 6e1a82d..1368667 100644 +--- a/net/wireless/Makefile ++++ b/net/wireless/Makefile +@@ -1,8 +1,5 @@ + obj-$(CPTCFG_CFG80211) += cfg80211.o + obj-$(CPTCFG_LIB80211) += lib80211.o +-obj-$(CPTCFG_LIB80211_CRYPT_WEP) += lib80211_crypt_wep.o +-obj-$(CPTCFG_LIB80211_CRYPT_CCMP) += lib80211_crypt_ccmp.o +-obj-$(CPTCFG_LIB80211_CRYPT_TKIP) += lib80211_crypt_tkip.o + + obj-$(CONFIG_WEXT_CORE) += wext-core.o + obj-$(CONFIG_WEXT_PROC) += wext-proc.o +--- a/drivers/net/wireless/intersil/hostap/Kconfig 2017-06-02 17:52:03.067764115 +0300 ++++ b/drivers/net/wireless/intersil/hostap/Kconfig 2017-06-02 17:53:11.035765179 +0300 +@@ -5,17 +5,7 @@ config HOSTAP + depends on WIRELESS_EXT + depends on WEXT_SPY + depends on WEXT_PRIV +- depends on CRYPTO +- depends on CRYPTO_ARC4 +- depends on CRYPTO_ECB +- depends on CRYPTO_AES +- depends on CRYPTO_MICHAEL_MIC +- depends on CRYPTO_ECB +- depends on CRC32 + select LIB80211 +- select LIB80211_CRYPT_WEP +- select LIB80211_CRYPT_TKIP +- select LIB80211_CRYPT_CCMP + ---help--- + Shared driver code for IEEE 802.11b wireless cards based on + Intersil Prism2/2.5/3 chipset. This driver supports so called +@@ -37,6 +27,7 @@ config HOSTAP + config HOSTAP_FIRMWARE + bool "Support downloading firmware images with Host AP driver" + depends on HOSTAP ++ default y + ---help--- + Configure Host AP driver to include support for firmware image + download. This option by itself only enables downloading to the diff --git a/target/linux/generic/patches-4.4/999-nuke_crypto.patch b/target/linux/generic/patches-4.4/999-nuke_crypto.patch new file mode 100644 index 0000000000..f0091e7345 --- /dev/null +++ b/target/linux/generic/patches-4.4/999-nuke_crypto.patch @@ -0,0 +1,95 @@ +diff --git a/net/mac80211/Kconfig b/net/mac80211/Kconfig +index 3891cbd..0243fd3 100644 +--- a/net/mac80211/Kconfig ++++ b/net/mac80211/Kconfig +@@ -1,11 +1,6 @@ + config MAC80211 + tristate "Generic IEEE 802.11 Networking Stack (mac80211)" + depends on CFG80211 +- select CRYPTO +- select CRYPTO_ARC4 +- select CRYPTO_AES +- select CRYPTO_CCM +- select CRYPTO_GCM + select CRC32 + ---help--- + This option enables the hardware independent IEEE 802.11 +@@ -84,6 +79,7 @@ config MAC80211_LEDS + bool "Enable LED triggers" + depends on MAC80211 + depends on LEDS_CLASS ++ default n + select LEDS_TRIGGERS + ---help--- + This option enables a few LED triggers for different +@@ -92,6 +88,7 @@ config MAC80211_LEDS + config MAC80211_DEBUGFS + bool "Export mac80211 internals in DebugFS" + depends on MAC80211 && DEBUG_FS ++ default n + ---help--- + Select this to see extensive information about + the internal state of mac80211 in debugfs. +@@ -101,6 +98,7 @@ config MAC80211_DEBUGFS + config MAC80211_MESSAGE_TRACING + bool "Trace all mac80211 debug messages" + depends on MAC80211 ++ default n + ---help--- + Select this option to have mac80211 register the + mac80211_msg trace subsystem with tracepoints to +diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig +index 3c06fa9..1937b0e 100644 +--- a/net/wireless/Kconfig ++++ b/net/wireless/Kconfig +@@ -145,6 +145,7 @@ config CFG80211_DEFAULT_PS + + config CFG80211_DEBUGFS + bool "cfg80211 DebugFS entries" ++ default n + depends on CFG80211 + depends on DEBUG_FS + ---help--- +@@ -211,18 +212,22 @@ config LIB80211 + + config LIB80211_CRYPT_WEP + tristate "LIB80211_CRYPT_WEP" ++ default n + select LIB80211 + + config LIB80211_CRYPT_CCMP + tristate "LIB80211_CRYPT_CCMP" ++ default n + select LIB80211 + + config LIB80211_CRYPT_TKIP + tristate "LIB80211_CRYPT_TKIP" ++ default n + select LIB80211 + + config LIB80211_DEBUG + bool "lib80211 debugging messages" ++ default n + depends on LIB80211 + default n + ---help--- +--- a/drivers/net/wireless/hostap/Kconfig 2017-05-25 15:50:50.000000000 +0300 ++++ b/drivers/net/wireless/hostap/Kconfig 2017-06-02 17:48:55.613761179 +0300 +@@ -3,17 +3,7 @@ config HOSTAP + select WIRELESS_EXT + select WEXT_SPY + select WEXT_PRIV +- select CRYPTO +- select CRYPTO_ARC4 +- select CRYPTO_ECB +- select CRYPTO_AES +- select CRYPTO_MICHAEL_MIC +- select CRYPTO_ECB +- select CRC32 + select LIB80211 +- select LIB80211_CRYPT_WEP +- select LIB80211_CRYPT_TKIP +- select LIB80211_CRYPT_CCMP + ---help--- + Shared driver code for IEEE 802.11b wireless cards based on + Intersil Prism2/2.5/3 chipset. This driver supports so called -- 2.35.1