and removed b43 and brcmfmac patches kicking around in the tree.
LINUX_RELEASE?=1
-LINUX_VERSION-3.18 = .21
+LINUX_VERSION-3.18 = .23
-LINUX_KERNEL_MD5SUM-3.18.21 = 04509a4f48afc4afde3d3fabc74f08a3
+LINUX_KERNEL_MD5SUM-3.18.23 = 2f21bceed1899da5708a151f5ec68aae
ifdef KERNEL_PATCHVER
LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
+++ /dev/null
---- a/drivers/net/wireless/brcm80211/Kconfig
-+++ b/drivers/net/wireless/brcm80211/Kconfig
-@@ -1,5 +1,5 @@
- config BRCMUTIL
-- tristate
-+ tristate "Broadcom 802.11 driver utility functions"
- depends on m
-
- config BRCMSMAC
+++ /dev/null
---- a/drivers/net/wireless/b43/b43.h
-+++ b/drivers/net/wireless/b43/b43.h
-@@ -839,6 +839,7 @@ struct b43_wldev {
- bool qos_enabled; /* TRUE, if QoS is used. */
- bool hwcrypto_enabled; /* TRUE, if HW crypto acceleration is enabled. */
- bool use_pio; /* TRUE if next init should use PIO */
-+ int gpiomask; /* GPIO LED mask as a module parameter */
-
- /* PHY/Radio device. */
- struct b43_phy phy;
---- a/drivers/net/wireless/b43/main.c
-+++ b/drivers/net/wireless/b43/main.c
-@@ -76,6 +76,11 @@ MODULE_FIRMWARE("b43/ucode16_mimo.fw");
- MODULE_FIRMWARE("b43/ucode5.fw");
- MODULE_FIRMWARE("b43/ucode9.fw");
-
-+static int modparam_gpiomask = 0x000F;
-+module_param_named(gpiomask, modparam_gpiomask, int, 0444);
-+MODULE_PARM_DESC(gpiomask,
-+ "GPIO mask for LED control (default 0x000F)");
-+
- static int modparam_bad_frames_preempt;
- module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, 0444);
- MODULE_PARM_DESC(bad_frames_preempt,
-@@ -2882,10 +2887,10 @@ static int b43_gpio_init(struct b43_wlde
- u32 mask, set;
-
- b43_maskset32(dev, B43_MMIO_MACCTL, ~B43_MACCTL_GPOUTSMSK, 0);
-- b43_maskset16(dev, B43_MMIO_GPIO_MASK, ~0, 0xF);
-+ b43_maskset16(dev, B43_MMIO_GPIO_MASK, ~0, modparam_gpiomask);
-
- mask = 0x0000001F;
-- set = 0x0000000F;
-+ set = modparam_gpiomask;
- if (dev->dev->chip_id == 0x4301) {
- mask |= 0x0060;
- set |= 0x0060;
+++ /dev/null
---- a/drivers/net/wireless/b43/Makefile
-+++ b/drivers/net/wireless/b43/Makefile
-@@ -17,7 +17,7 @@ b43-$(CPTCFG_B43_PHY_AC) += phy_ac.o
- b43-y += sysfs.o
- b43-y += xmit.o
- b43-y += dma.o
--b43-y += pio.o
-+b43-$(CPTCFG_B43_PIO) += pio.o
- b43-y += rfkill.o
- b43-y += ppr.o
- b43-$(CPTCFG_B43_LEDS) += leds.o
---- a/drivers/net/wireless/b43/main.c
-+++ b/drivers/net/wireless/b43/main.c
-@@ -2008,10 +2008,12 @@ static void b43_do_interrupt_thread(stru
- dma_reason[0], dma_reason[1],
- dma_reason[2], dma_reason[3],
- dma_reason[4], dma_reason[5]);
-+#ifdef CPTCFG_B43_PIO
- b43err(dev->wl, "This device does not support DMA "
- "on your system. It will now be switched to PIO.\n");
- /* Fall back to PIO transfers if we get fatal DMA errors! */
- dev->use_pio = true;
-+#endif
- b43_controller_restart(dev, "DMA error");
- return;
- }
---- a/drivers/net/wireless/b43/pio.h
-+++ b/drivers/net/wireless/b43/pio.h
-@@ -150,7 +150,7 @@ static inline void b43_piorx_write32(str
- b43_write32(q->dev, q->mmio_base + offset, value);
- }
-
--
-+#ifdef CPTCFG_B43_PIO
- int b43_pio_init(struct b43_wldev *dev);
- void b43_pio_free(struct b43_wldev *dev);
-
-@@ -161,5 +161,37 @@ void b43_pio_rx(struct b43_pio_rxqueue *
-
- void b43_pio_tx_suspend(struct b43_wldev *dev);
- void b43_pio_tx_resume(struct b43_wldev *dev);
-+#else
-+static inline int b43_pio_init(struct b43_wldev *dev)
-+{
-+ return 0;
-+}
-+
-+static inline void b43_pio_free(struct b43_wldev *dev)
-+{
-+}
-+
-+static inline int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb)
-+{
-+ return 0;
-+}
-+
-+static inline void b43_pio_handle_txstatus(struct b43_wldev *dev,
-+ const struct b43_txstatus *status)
-+{
-+}
-+
-+static inline void b43_pio_rx(struct b43_pio_rxqueue *q)
-+{
-+}
-+
-+static inline void b43_pio_tx_suspend(struct b43_wldev *dev)
-+{
-+}
-+
-+static inline void b43_pio_tx_resume(struct b43_wldev *dev)
-+{
-+}
-+#endif /* CPTCFG_B43_PIO */
-
- #endif /* B43_PIO_H_ */
---- a/drivers/net/wireless/b43/Kconfig
-+++ b/drivers/net/wireless/b43/Kconfig
-@@ -118,7 +118,7 @@ config B43_BCMA_PIO
- default y
-
- config B43_PIO
-- bool
-+ bool "Broadcom 43xx PIO support"
- depends on B43 && B43_SSB
- select SSB_BLOCKIO
- default y
+++ /dev/null
---- a/drivers/net/wireless/b43/main.c
-+++ b/drivers/net/wireless/b43/main.c
-@@ -1648,7 +1648,7 @@ static void b43_write_beacon_template(st
- len, ram_offset, shm_size_offset, rate);
-
- /* Write the PHY TX control parameters. */
-- antenna = B43_ANTENNA_DEFAULT;
-+ antenna = dev->tx_antenna;
- antenna = b43_antenna_to_phyctl(antenna);
- ctl = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_BEACPHYCTL);
- /* We can't send beacons with short preamble. Would get PHY errors. */
-@@ -3300,8 +3300,8 @@ static int b43_chip_init(struct b43_wlde
-
- /* Select the antennae */
- if (phy->ops->set_rx_antenna)
-- phy->ops->set_rx_antenna(dev, B43_ANTENNA_DEFAULT);
-- b43_mgmtframe_txantenna(dev, B43_ANTENNA_DEFAULT);
-+ phy->ops->set_rx_antenna(dev, dev->rx_antenna);
-+ b43_mgmtframe_txantenna(dev, dev->tx_antenna);
-
- if (phy->type == B43_PHYTYPE_B) {
- value16 = b43_read16(dev, 0x005E);
-@@ -4001,7 +4001,6 @@ static int b43_op_config(struct ieee8021
- struct b43_wldev *dev = wl->current_dev;
- struct b43_phy *phy = &dev->phy;
- struct ieee80211_conf *conf = &hw->conf;
-- int antenna;
- int err = 0;
-
- mutex_lock(&wl->mutex);
-@@ -4044,11 +4043,9 @@ static int b43_op_config(struct ieee8021
- }
-
- /* Antennas for RX and management frame TX. */
-- antenna = B43_ANTENNA_DEFAULT;
-- b43_mgmtframe_txantenna(dev, antenna);
-- antenna = B43_ANTENNA_DEFAULT;
-+ b43_mgmtframe_txantenna(dev, dev->tx_antenna);
- if (phy->ops->set_rx_antenna)
-- phy->ops->set_rx_antenna(dev, antenna);
-+ phy->ops->set_rx_antenna(dev, dev->rx_antenna);
-
- if (wl->radio_enabled != phy->radio_on) {
- if (wl->radio_enabled) {
-@@ -5209,6 +5206,47 @@ static int b43_op_get_survey(struct ieee
- return 0;
- }
-
-+static int b43_op_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
-+{
-+ struct b43_wl *wl = hw_to_b43_wl(hw);
-+ struct b43_wldev *dev = wl->current_dev;
-+
-+ if (tx_ant == 1 && rx_ant == 1) {
-+ dev->tx_antenna = B43_ANTENNA0;
-+ dev->rx_antenna = B43_ANTENNA0;
-+ }
-+ else if (tx_ant == 2 && rx_ant == 2) {
-+ dev->tx_antenna = B43_ANTENNA1;
-+ dev->rx_antenna = B43_ANTENNA1;
-+ }
-+ else if ((tx_ant & 3) == 3 && (rx_ant & 3) == 3) {
-+ dev->tx_antenna = B43_ANTENNA_DEFAULT;
-+ dev->rx_antenna = B43_ANTENNA_DEFAULT;
-+ }
-+ else {
-+ return -EINVAL;
-+ }
-+
-+ return 0;
-+}
-+
-+
-+static int b43_op_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
-+{
-+ struct b43_wl *wl = hw_to_b43_wl(hw);
-+ struct b43_wldev *dev = wl->current_dev;
-+
-+ switch (dev->tx_antenna) {
-+ case B43_ANTENNA0:
-+ *tx_ant = 1; *rx_ant = 1; break;
-+ case B43_ANTENNA1:
-+ *tx_ant = 2; *rx_ant = 2; break;
-+ case B43_ANTENNA_DEFAULT:
-+ *tx_ant = 3; *rx_ant = 3; break;
-+ }
-+ return 0;
-+}
-+
- static const struct ieee80211_ops b43_hw_ops = {
- .tx = b43_op_tx,
- .conf_tx = b43_op_conf_tx,
-@@ -5230,6 +5268,8 @@ static const struct ieee80211_ops b43_hw
- .sw_scan_complete = b43_op_sw_scan_complete_notifier,
- .get_survey = b43_op_get_survey,
- .rfkill_poll = b43_rfkill_poll,
-+ .set_antenna = b43_op_set_antenna,
-+ .get_antenna = b43_op_get_antenna,
- };
-
- /* Hard-reset the chip. Do not call this directly.
-@@ -5538,6 +5578,8 @@ static int b43_one_core_attach(struct b4
- if (!wldev)
- goto out;
-
-+ wldev->rx_antenna = B43_ANTENNA_DEFAULT;
-+ wldev->tx_antenna = B43_ANTENNA_DEFAULT;
- wldev->use_pio = b43_modparam_pio;
- wldev->dev = dev;
- wldev->wl = wl;
-@@ -5628,6 +5670,9 @@ static struct b43_wl *b43_wireless_init(
-
- hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
-
-+ hw->wiphy->available_antennas_rx = 0x3;
-+ hw->wiphy->available_antennas_tx = 0x3;
-+
- wl->hw_registred = false;
- hw->max_rates = 2;
- SET_IEEE80211_DEV(hw, dev->dev);
---- a/drivers/net/wireless/b43/b43.h
-+++ b/drivers/net/wireless/b43/b43.h
-@@ -840,6 +840,8 @@ struct b43_wldev {
- bool hwcrypto_enabled; /* TRUE, if HW crypto acceleration is enabled. */
- bool use_pio; /* TRUE if next init should use PIO */
- int gpiomask; /* GPIO LED mask as a module parameter */
-+ int rx_antenna; /* Used RX antenna (B43_ANTENNAxxx) */
-+ int tx_antenna; /* Used TX antenna (B43_ANTENNAxxx) */
-
- /* PHY/Radio device. */
- struct b43_phy phy;
+++ /dev/null
---- a/drivers/net/wireless/b43/dma.h
-+++ b/drivers/net/wireless/b43/dma.h
-@@ -169,7 +169,7 @@ struct b43_dmadesc_generic {
-
- /* DMA engine tuning knobs */
- #define B43_TXRING_SLOTS 256
--#define B43_RXRING_SLOTS 256
-+#define B43_RXRING_SLOTS 32
- #define B43_DMA0_RX_FW598_BUFSIZE (B43_DMA0_RX_FW598_FO + IEEE80211_MAX_FRAME_LEN)
- #define B43_DMA0_RX_FW351_BUFSIZE (B43_DMA0_RX_FW351_FO + IEEE80211_MAX_FRAME_LEN)
-
+++ /dev/null
---- a/drivers/net/wireless/b43/main.c
-+++ b/drivers/net/wireless/b43/main.c
-@@ -2899,6 +2899,14 @@ static int b43_gpio_init(struct b43_wlde
- } else if (dev->dev->chip_id == 0x5354) {
- /* Don't allow overtaking buttons GPIOs */
- set &= 0x2; /* 0x2 is LED GPIO on BCM5354 */
-+ } else if (dev->dev->chip_id == BCMA_CHIP_ID_BCM4716 ||
-+ dev->dev->chip_id == BCMA_CHIP_ID_BCM47162 ||
-+ dev->dev->chip_id == BCMA_CHIP_ID_BCM5356 ||
-+ dev->dev->chip_id == BCMA_CHIP_ID_BCM5357 ||
-+ dev->dev->chip_id == BCMA_CHIP_ID_BCM53572) {
-+ /* just use gpio 0 and 1 for 2.4 GHz wifi led */
-+ set &= 0x3;
-+ mask &= 0x3;
- }
-
- if (0 /* FIXME: conditional unknown */ ) {
+++ /dev/null
---- a/drivers/net/wireless/b43/main.c
-+++ b/drivers/net/wireless/b43/main.c
-@@ -118,7 +118,7 @@ static int b43_modparam_pio = 0;
- module_param_named(pio, b43_modparam_pio, int, 0644);
- MODULE_PARM_DESC(pio, "Use PIO accesses by default: 0=DMA, 1=PIO");
-
--static int modparam_allhwsupport = !IS_ENABLED(CPTCFG_BRCMSMAC);
-+static int modparam_allhwsupport = 1;
- module_param_named(allhwsupport, modparam_allhwsupport, int, 0444);
- MODULE_PARM_DESC(allhwsupport, "Enable support for all hardware (even it if overlaps with the brcmsmac driver)");
-
+++ /dev/null
---- a/drivers/net/wireless/brcm80211/brcmsmac/channel.c
-+++ b/drivers/net/wireless/brcm80211/brcmsmac/channel.c
-@@ -58,19 +58,12 @@
- (((c) < 149) ? 3 : 4))))
-
- #define BRCM_2GHZ_2412_2462 REG_RULE(2412-10, 2462+10, 40, 0, 19, 0)
--#define BRCM_2GHZ_2467_2472 REG_RULE(2467-10, 2472+10, 20, 0, 19, \
-- NL80211_RRF_NO_IR)
-+#define BRCM_2GHZ_2467_2472 REG_RULE(2467-10, 2472+10, 20, 0, 19, 0)
-
--#define BRCM_5GHZ_5180_5240 REG_RULE(5180-10, 5240+10, 40, 0, 21, \
-- NL80211_RRF_NO_IR)
--#define BRCM_5GHZ_5260_5320 REG_RULE(5260-10, 5320+10, 40, 0, 21, \
-- NL80211_RRF_DFS | \
-- NL80211_RRF_NO_IR)
--#define BRCM_5GHZ_5500_5700 REG_RULE(5500-10, 5700+10, 40, 0, 21, \
-- NL80211_RRF_DFS | \
-- NL80211_RRF_NO_IR)
--#define BRCM_5GHZ_5745_5825 REG_RULE(5745-10, 5825+10, 40, 0, 21, \
-- NL80211_RRF_NO_IR)
-+#define BRCM_5GHZ_5180_5240 REG_RULE(5180-10, 5240+10, 40, 0, 21, 0)
-+#define BRCM_5GHZ_5260_5320 REG_RULE(5260-10, 5320+10, 40, 0, 21, 0)
-+#define BRCM_5GHZ_5500_5700 REG_RULE(5500-10, 5700+10, 40, 0, 21, 0)
-+#define BRCM_5GHZ_5745_5825 REG_RULE(5745-10, 5825+10, 40, 0, 21, 0)
-
- static const struct ieee80211_regdomain brcms_regdom_x2 = {
- .n_reg_rules = 6,
+++ /dev/null
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Mon, 8 Jun 2015 16:59:31 +0200
-Subject: [PATCH] brcmfmac: use bcm47xx platform NVRAM as fallback
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
----
-
---- a/drivers/net/wireless/brcm80211/brcmfmac/firmware.c
-+++ b/drivers/net/wireless/brcm80211/brcmfmac/firmware.c
-@@ -19,6 +19,9 @@
- #include <linux/device.h>
- #include <linux/firmware.h>
- #include <linux/module.h>
-+#if IS_ENABLED(CONFIG_BCM47XX_NVRAM)
-+#include <linux/bcm47xx_nvram.h>
-+#endif
-
- #include "debug.h"
- #include "firmware.h"
-@@ -424,17 +427,42 @@ struct brcmf_fw {
- static void brcmf_fw_request_nvram_done(const struct firmware *fw, void *ctx)
- {
- struct brcmf_fw *fwctx = ctx;
-+#if IS_ENABLED(CONFIG_BCM47XX_NVRAM)
-+ const u8 *bcm47xx_nvram = NULL;
-+ size_t bcm47xx_nvram_len;
-+#endif
-+ const u8 *data = NULL;
-+ size_t data_len;
- u32 nvram_length = 0;
- void *nvram = NULL;
-
- brcmf_dbg(TRACE, "enter: dev=%s\n", dev_name(fwctx->dev));
-- if (!fw && !(fwctx->flags & BRCMF_FW_REQ_NV_OPTIONAL))
-+ if (fw) {
-+ data = fw->data;
-+ data_len = fw->size;
-+ }
-+#if IS_ENABLED(CONFIG_BCM47XX_NVRAM)
-+ else {
-+ bcm47xx_nvram = bcm47xx_nvram_get_contents(&bcm47xx_nvram_len);
-+ if (bcm47xx_nvram) {
-+ data = bcm47xx_nvram;
-+ data_len = bcm47xx_nvram_len;
-+ brcmf_err("Found platform NVRAM (%zu B)\n", data_len);
-+ }
-+ }
-+#endif
-+ if (!data && !(fwctx->flags & BRCMF_FW_REQ_NV_OPTIONAL))
- goto fail;
-
-- if (fw) {
-- nvram = brcmf_fw_nvram_strip(fw->data, fw->size, &nvram_length,
-+ if (data) {
-+ nvram = brcmf_fw_nvram_strip(data, data_len, &nvram_length,
- fwctx->domain_nr, fwctx->bus_nr);
-- release_firmware(fw);
-+ if (fw)
-+ release_firmware(fw);
-+#if IS_ENABLED(CONFIG_BCM47XX_NVRAM)
-+ if (bcm47xx_nvram)
-+ bcm47xx_nvram_release_contents(bcm47xx_nvram);
-+#endif
- if (!nvram && !(fwctx->flags & BRCMF_FW_REQ_NV_OPTIONAL))
- goto fail;
- }
---- a/drivers/net/wireless/brcm80211/brcmfmac/debug.h
-+++ b/drivers/net/wireless/brcm80211/brcmfmac/debug.h
-@@ -17,6 +17,8 @@
- #ifndef BRCMFMAC_DEBUG_H
- #define BRCMFMAC_DEBUG_H
-
-+#include <linux/net.h>
-+
- /* message levels */
- #define BRCMF_TRACE_VAL 0x00000002
- #define BRCMF_INFO_VAL 0x00000004
+++ /dev/null
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Mon, 8 Jun 2015 16:11:40 +0200
-Subject: [PATCH] brcmfmac: register wiphy(s) during module_init
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This is needed by libreCMC which expects all PHYs to be created after
-module loads successfully.
-
-Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
----
-
---- a/drivers/net/wireless/brcm80211/brcmfmac/core.c
-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c
-@@ -1189,6 +1189,7 @@ static int __init brcmfmac_module_init(v
- #endif
- if (!schedule_work(&brcmf_driver_work))
- return -EBUSY;
-+ flush_work(&brcmf_driver_work);
-
- return 0;
- }
---- a/drivers/net/wireless/brcm80211/brcmfmac/firmware.c
-+++ b/drivers/net/wireless/brcm80211/brcmfmac/firmware.c
-@@ -422,13 +422,14 @@ struct brcmf_fw {
- u16 bus_nr;
- void (*done)(struct device *dev, const struct firmware *fw,
- void *nvram_image, u32 nvram_len);
-+ struct completion *completion;
- };
-
- static void brcmf_fw_request_nvram_done(const struct firmware *fw, void *ctx)
- {
- struct brcmf_fw *fwctx = ctx;
- #if IS_ENABLED(CONFIG_BCM47XX_NVRAM)
-- const u8 *bcm47xx_nvram = NULL;
-+ u8 *bcm47xx_nvram = NULL;
- size_t bcm47xx_nvram_len;
- #endif
- const u8 *data = NULL;
-@@ -468,6 +469,8 @@ static void brcmf_fw_request_nvram_done(
- }
-
- fwctx->done(fwctx->dev, fwctx->code, nvram, nvram_length);
-+ if (fwctx->completion)
-+ complete(fwctx->completion);
- kfree(fwctx);
- return;
-
-@@ -475,6 +478,8 @@ fail:
- brcmf_dbg(TRACE, "failed: dev=%s\n", dev_name(fwctx->dev));
- release_firmware(fwctx->code);
- device_release_driver(fwctx->dev);
-+ if (fwctx->completion)
-+ complete(fwctx->completion);
- kfree(fwctx);
- }
-
-@@ -490,6 +495,8 @@ static void brcmf_fw_request_code_done(c
- /* only requested code so done here */
- if (!(fwctx->flags & BRCMF_FW_REQUEST_NVRAM)) {
- fwctx->done(fwctx->dev, fw, NULL, 0);
-+ if (fwctx->completion)
-+ complete(fwctx->completion);
- kfree(fwctx);
- return;
- }
-@@ -504,6 +511,8 @@ static void brcmf_fw_request_code_done(c
- /* when nvram is optional call .done() callback here */
- if (fwctx->flags & BRCMF_FW_REQ_NV_OPTIONAL) {
- fwctx->done(fwctx->dev, fw, NULL, 0);
-+ if (fwctx->completion)
-+ complete(fwctx->completion);
- kfree(fwctx);
- return;
- }
-@@ -513,6 +522,8 @@ static void brcmf_fw_request_code_done(c
- fail:
- brcmf_dbg(TRACE, "failed: dev=%s\n", dev_name(fwctx->dev));
- device_release_driver(fwctx->dev);
-+ if (fwctx->completion)
-+ complete(fwctx->completion);
- kfree(fwctx);
- }
-
-@@ -524,6 +535,8 @@ int brcmf_fw_get_firmwares_pcie(struct d
- u16 domain_nr, u16 bus_nr)
- {
- struct brcmf_fw *fwctx;
-+ struct completion completion;
-+ int err;
-
- brcmf_dbg(TRACE, "enter: dev=%s\n", dev_name(dev));
- if (!fw_cb || !code)
-@@ -544,9 +557,17 @@ int brcmf_fw_get_firmwares_pcie(struct d
- fwctx->domain_nr = domain_nr;
- fwctx->bus_nr = bus_nr;
-
-- return request_firmware_nowait(THIS_MODULE, true, code, dev,
-+ init_completion(&completion);
-+ fwctx->completion = &completion;
-+
-+ err = request_firmware_nowait(THIS_MODULE, true, code, dev,
- GFP_KERNEL, fwctx,
- brcmf_fw_request_code_done);
-+ if (!err)
-+ wait_for_completion_timeout(fwctx->completion,
-+ msecs_to_jiffies(5000));
-+ fwctx->completion = NULL;
-+ return err;
- }
-
- int brcmf_fw_get_firmwares(struct device *dev, u16 flags,
+++ /dev/null
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Thu, 9 Jul 2015 00:07:59 +0200
-Subject: [PATCH] brcmfmac: workaround bug with some inconsistent BSSes state
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
----
-
---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
-+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
-@@ -662,8 +662,36 @@ static struct wireless_dev *brcmf_cfg802
- u32 *flags,
- struct vif_params *params)
- {
-+ struct net_device *dev;
- struct wireless_dev *wdev;
-
-+ /*
-+ * There is a bug with in-firmware BSS management. When adding virtual
-+ * interface brcmfmac first tells firmware to create new BSS and then
-+ * it creates new struct net_device.
-+ *
-+ * If creating/registering netdev(ice) fails, BSS remains in some bugged
-+ * state. It conflicts with existing BSSes by overtaking their auth
-+ * requests.
-+ *
-+ * It results in one BSS (addresss X) sending beacons and another BSS
-+ * (address Y) replying to authentication requests. This makes interface
-+ * unusable as AP.
-+ *
-+ * To workaround this bug we may try to guess if register_netdev(ice)
-+ * will fail. The most obvious case is using interface name that already
-+ * exists. This is actually quite likely with brcmfmac & some user space
-+ * scripts as brcmfmac doesn't allow deleting virtual interfaces.
-+ * So this bug can be triggered even by something trivial like:
-+ * iw dev wlan0 delete
-+ * iw phy phy0 interface add wlan0 type __ap
-+ */
-+ dev = dev_get_by_name(&init_net, name);
-+ if (dev) {
-+ dev_put(dev);
-+ return ERR_PTR(-EEXIST);
-+ }
-+
- brcmf_dbg(TRACE, "enter: %s type %d\n", name, type);
- switch (type) {
- case NL80211_IFTYPE_ADHOC:
+++ /dev/null
-From fc300dc3733fdc328e6e10c7b8379b60c26cd648 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Fri, 20 Mar 2015 23:14:32 +0100
-Subject: [PATCH] bgmac: allow enabling on ARCH_BCM_5301X
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Home routers based on ARM SoCs like BCM4708 also have bcma bus with core
-supported by bgmac.
-
-Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
----
- drivers/net/ethernet/broadcom/Kconfig | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/net/ethernet/broadcom/Kconfig
-+++ b/drivers/net/ethernet/broadcom/Kconfig
-@@ -143,7 +143,7 @@ config BNX2X_SRIOV
-
- config BGMAC
- tristate "BCMA bus GBit core support"
-- depends on BCMA_HOST_SOC && HAS_DMA && BCM47XX
-+ depends on BCMA_HOST_SOC && HAS_DMA && (BCM47XX || ARCH_BCM_5301X)
- select PHYLIB
- ---help---
- This driver supports GBit MAC and BCM4706 GBit MAC cores on BCMA bus.
err = PTR_ERR(opaquedir);
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
-@@ -740,9 +740,15 @@ static int ovl_fill_super(struct super_b
+@@ -741,9 +741,15 @@ static int ovl_fill_super(struct super_b
ufs->workdir = ovl_workdir_create(ufs->upper_mnt, workpath.dentry);
err = PTR_ERR(ufs->workdir);
if (IS_ERR(ufs->workdir)) {
if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop;
-@@ -2809,6 +2811,7 @@ static int packet_create(struct net *net
+@@ -2807,6 +2809,7 @@ static int packet_create(struct net *net
spin_lock_init(&po->bind_lock);
mutex_init(&po->pg_vec_lock);
po->prot_hook.func = packet_rcv;
if (sock->type == SOCK_PACKET)
po->prot_hook.func = packet_rcv_spkt;
-@@ -3389,6 +3392,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3387,6 +3390,16 @@ packet_setsockopt(struct socket *sock, i
po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
return 0;
}
default:
return -ENOPROTOOPT;
}
-@@ -3440,6 +3453,13 @@ static int packet_getsockopt(struct sock
+@@ -3438,6 +3451,13 @@ static int packet_getsockopt(struct sock
case PACKET_VNET_HDR:
val = po->has_vnet_hdr;
break;
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
-@@ -1690,27 +1690,7 @@ void netlink_detachskb(struct sock *sk,
+@@ -1721,27 +1721,7 @@ void netlink_detachskb(struct sock *sk,
static struct sk_buff *netlink_trim(struct sk_buff *skb, gfp_t allocation)
{
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -4001,6 +4001,9 @@ static enum gro_result dev_gro_receive(s
+@@ -4002,6 +4002,9 @@ static enum gro_result dev_gro_receive(s
enum gro_result ret;
int grow;
if (!(skb->dev->features & NETIF_F_GRO))
goto normal;
-@@ -5064,6 +5067,48 @@ static void __netdev_adjacent_dev_unlink
+@@ -5067,6 +5070,48 @@ static void __netdev_adjacent_dev_unlink
&upper_dev->adj_list.lower);
}
static int __netdev_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev, bool master,
void *private)
-@@ -5124,6 +5169,7 @@ static int __netdev_upper_dev_link(struc
+@@ -5127,6 +5172,7 @@ static int __netdev_upper_dev_link(struc
goto rollback_lower_mesh;
}
call_netdevice_notifiers(NETDEV_CHANGEUPPER, dev);
return 0;
-@@ -5241,6 +5287,7 @@ void netdev_upper_dev_unlink(struct net_
+@@ -5244,6 +5290,7 @@ void netdev_upper_dev_unlink(struct net_
list_for_each_entry(i, &upper_dev->all_adj_list.upper, list)
__netdev_adjacent_dev_unlink(dev, i->dev);
call_netdevice_notifiers(NETDEV_CHANGEUPPER, dev);
}
EXPORT_SYMBOL(netdev_upper_dev_unlink);
-@@ -5760,6 +5807,7 @@ int dev_set_mac_address(struct net_devic
+@@ -5763,6 +5810,7 @@ int dev_set_mac_address(struct net_devic
if (err)
return err;
dev->addr_assign_type = NET_ADDR_SET;
return 0;
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -1548,6 +1548,8 @@ struct net_device {
+@@ -1556,6 +1556,8 @@ struct net_device {
struct netdev_hw_addr_list mc;
struct netdev_hw_addr_list dev_addrs;
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -1220,6 +1220,7 @@ enum netdev_priv_flags {
+@@ -1228,6 +1228,7 @@ enum netdev_priv_flags {
IFF_LIVE_ADDR_CHANGE = 1<<20,
IFF_MACVLAN = 1<<21,
IFF_XMIT_DST_RELEASE_PERM = 1<<22,
};
#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
-@@ -1245,6 +1246,7 @@ enum netdev_priv_flags {
+@@ -1253,6 +1254,7 @@ enum netdev_priv_flags {
#define IFF_LIVE_ADDR_CHANGE IFF_LIVE_ADDR_CHANGE
#define IFF_MACVLAN IFF_MACVLAN
#define IFF_XMIT_DST_RELEASE_PERM IFF_XMIT_DST_RELEASE_PERM
/**
* struct net_device - The DEVICE structure.
-@@ -1515,6 +1517,11 @@ struct net_device {
+@@ -1523,6 +1525,11 @@ struct net_device {
const struct ethtool_ops *ethtool_ops;
const struct forwarding_accel_ops *fwd_ops;
const struct header_ops *header_ops;
unsigned int flags;
-@@ -1579,6 +1586,10 @@ struct net_device {
+@@ -1587,6 +1594,10 @@ struct net_device {
void *ax25_ptr;
struct wireless_dev *ieee80211_ptr;
/* The Mellanox Tavor device gives false positive parity errors
* Mark this device with a broken_parity_status, to allow
* PCI scanning code to "skip" this now blacklisted device.
-@@ -2905,6 +2906,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
+@@ -2908,6 +2909,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata);
/*
* Ivytown NTB BAR sizes are misreported by the hardware due to an erratum. To
-@@ -2961,6 +2963,8 @@ static void fixup_debug_report(struct pc
+@@ -2964,6 +2966,8 @@ static void fixup_debug_report(struct pc
}
}
/*
* Some BIOS implementations leave the Intel GPU interrupts enabled,
* even though no one is handling them (f.e. i915 driver is never loaded).
-@@ -2995,6 +2999,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
+@@ -2998,6 +3002,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq);
/**
* ata_build_rw_tf - Build ATA taskfile for given read/write request
* @tf: Target ATA taskfile
-@@ -4798,6 +4811,9 @@ static struct ata_queued_cmd *ata_qc_new
+@@ -4800,6 +4813,9 @@ static struct ata_queued_cmd *ata_qc_new
break;
}
}
return qc;
}
-@@ -5708,6 +5724,9 @@ struct ata_port *ata_port_alloc(struct a
+@@ -5710,6 +5726,9 @@ struct ata_port *ata_port_alloc(struct a
ap->stats.unhandled_irq = 1;
ap->stats.idle_irq = 1;
#endif
ata_sff_port_init(ap);
return ap;
-@@ -5729,6 +5748,12 @@ static void ata_host_release(struct devi
+@@ -5731,6 +5750,12 @@ static void ata_host_release(struct devi
kfree(ap->pmp_link);
kfree(ap->slave_link);
kfree(ap);
host->ports[i] = NULL;
}
-@@ -6175,7 +6200,23 @@ int ata_host_register(struct ata_host *h
+@@ -6177,7 +6202,23 @@ int ata_host_register(struct ata_host *h
host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
host->ports[i]->local_port_no = i + 1;
}
}
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
-@@ -328,6 +328,9 @@ void register_irq_proc(unsigned int irq,
- {
+@@ -330,6 +330,9 @@ void register_irq_proc(unsigned int irq,
+ static DEFINE_MUTEX(register_lock);
char name [MAX_NAMELEN];
+ if (IS_ENABLED(CONFIG_PROC_STRIPPED) && !IS_ENABLED(CONFIG_SMP))
+ return;
+
- if (!root_irq_dir || (desc->irq_data.chip == &no_irq_chip) || desc->dir)
+ if (!root_irq_dir || (desc->irq_data.chip == &no_irq_chip))
return;
-@@ -364,6 +367,9 @@ void unregister_irq_proc(unsigned int ir
+@@ -379,6 +382,9 @@ void unregister_irq_proc(unsigned int ir
{
char name [MAX_NAMELEN];
if (!root_irq_dir || !desc->dir)
return;
#ifdef CONFIG_SMP
-@@ -399,6 +405,9 @@ void init_irq_proc(void)
+@@ -414,6 +420,9 @@ void init_irq_proc(void)
unsigned int irq;
struct irq_desc *desc;
endif
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
-@@ -2530,12 +2530,25 @@ enum {
+@@ -2528,12 +2528,25 @@ enum {
DIO_ASYNC_EXTEND = 0x04,
};