diff options
Diffstat (limited to 'package/kernel/mac80211/patches/brcm')
14 files changed, 30 insertions, 370 deletions
diff --git a/package/kernel/mac80211/patches/brcm/305-v4.20-0001-brcmfmac-remove-set-but-not-used-variables-sfdoff-an.patch b/package/kernel/mac80211/patches/brcm/305-v4.20-0001-brcmfmac-remove-set-but-not-used-variables-sfdoff-an.patch index c4b67863a0..659cdabd84 100644 --- a/package/kernel/mac80211/patches/brcm/305-v4.20-0001-brcmfmac-remove-set-but-not-used-variables-sfdoff-an.patch +++ b/package/kernel/mac80211/patches/brcm/305-v4.20-0001-brcmfmac-remove-set-but-not-used-variables-sfdoff-an.patch @@ -22,7 +22,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -@@ -1474,7 +1474,7 @@ static u8 brcmf_sdio_rxglom(struct brcmf +@@ -1480,7 +1480,7 @@ static u8 brcmf_sdio_rxglom(struct brcmf struct sk_buff *pfirst, *pnext; int errcode; @@ -31,7 +31,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org> struct brcmf_sdio_hdrinfo rd_new; -@@ -1608,7 +1608,6 @@ static u8 brcmf_sdio_rxglom(struct brcmf +@@ -1614,7 +1614,6 @@ static u8 brcmf_sdio_rxglom(struct brcmf /* Remove superframe header, remember offset */ skb_pull(pfirst, rd_new.dat_offset); @@ -39,7 +39,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org> num = 0; /* Validate all the subframe headers */ -@@ -3416,7 +3415,6 @@ static int brcmf_sdio_bus_preinit(struct +@@ -3422,7 +3421,6 @@ static int brcmf_sdio_bus_preinit(struct struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio; struct brcmf_sdio *bus = sdiodev->bus; struct brcmf_core *core = bus->sdio_core; @@ -47,7 +47,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org> u32 value; int err; -@@ -3459,7 +3457,6 @@ static int brcmf_sdio_bus_preinit(struct +@@ -3465,7 +3463,6 @@ static int brcmf_sdio_bus_preinit(struct if (sdiodev->sg_support) { bus->txglom = false; value = 1; diff --git a/package/kernel/mac80211/patches/brcm/306-v4.20-0001-brcmfmac-reduce-timeout-for-action-frame-scan.patch b/package/kernel/mac80211/patches/brcm/306-v4.20-0001-brcmfmac-reduce-timeout-for-action-frame-scan.patch deleted file mode 100644 index a71c1aee03..0000000000 --- a/package/kernel/mac80211/patches/brcm/306-v4.20-0001-brcmfmac-reduce-timeout-for-action-frame-scan.patch +++ /dev/null @@ -1,67 +0,0 @@ -From edb6d6885bef82d1eac432dbeca9fbf4ec349d7e Mon Sep 17 00:00:00 2001 -From: Chung-Hsien Hsu <stanley.hsu@cypress.com> -Date: Thu, 27 Sep 2018 14:59:44 +0000 -Subject: [PATCH] brcmfmac: reduce timeout for action frame scan - -Finding a common channel to send an action frame out is required for -some action types. Since a loop with several scan retry is used to find -the channel, a short wait time could be considered for each attempt. -This patch reduces the wait time from 1500 to 450 msec for each action -frame scan. - -This patch fixes the WFA p2p certification 5.1.20 failure caused by the -long action frame send time. - -Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com> -Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com> -Signed-off-by: Kalle Valo <kvalo@codeaurora.org> ---- - drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c -@@ -74,7 +74,7 @@ - #define P2P_AF_MAX_WAIT_TIME msecs_to_jiffies(2000) - #define P2P_INVALID_CHANNEL -1 - #define P2P_CHANNEL_SYNC_RETRY 5 --#define P2P_AF_FRM_SCAN_MAX_WAIT msecs_to_jiffies(1500) -+#define P2P_AF_FRM_SCAN_MAX_WAIT msecs_to_jiffies(450) - #define P2P_DEFAULT_SLEEP_TIME_VSDB 200 - - /* WiFi P2P Public Action Frame OUI Subtypes */ -@@ -1134,7 +1134,6 @@ static s32 brcmf_p2p_af_searching_channe - { - struct afx_hdl *afx_hdl = &p2p->afx_hdl; - struct brcmf_cfg80211_vif *pri_vif; -- unsigned long duration; - s32 retry; - - brcmf_dbg(TRACE, "Enter\n"); -@@ -1150,7 +1149,6 @@ static s32 brcmf_p2p_af_searching_channe - * pending action frame tx is cancelled. - */ - retry = 0; -- duration = msecs_to_jiffies(P2P_AF_FRM_SCAN_MAX_WAIT); - while ((retry < P2P_CHANNEL_SYNC_RETRY) && - (afx_hdl->peer_chan == P2P_INVALID_CHANNEL)) { - afx_hdl->is_listen = false; -@@ -1158,7 +1156,8 @@ static s32 brcmf_p2p_af_searching_channe - retry); - /* search peer on peer's listen channel */ - schedule_work(&afx_hdl->afx_work); -- wait_for_completion_timeout(&afx_hdl->act_frm_scan, duration); -+ wait_for_completion_timeout(&afx_hdl->act_frm_scan, -+ P2P_AF_FRM_SCAN_MAX_WAIT); - if ((afx_hdl->peer_chan != P2P_INVALID_CHANNEL) || - (!test_bit(BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL, - &p2p->status))) -@@ -1171,7 +1170,7 @@ static s32 brcmf_p2p_af_searching_channe - afx_hdl->is_listen = true; - schedule_work(&afx_hdl->afx_work); - wait_for_completion_timeout(&afx_hdl->act_frm_scan, -- duration); -+ P2P_AF_FRM_SCAN_MAX_WAIT); - } - if ((afx_hdl->peer_chan != P2P_INVALID_CHANNEL) || - (!test_bit(BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL, diff --git a/package/kernel/mac80211/patches/brcm/306-v4.20-0002-brcmfmac-fix-full-timeout-waiting-for-action-frame-o.patch b/package/kernel/mac80211/patches/brcm/306-v4.20-0002-brcmfmac-fix-full-timeout-waiting-for-action-frame-o.patch deleted file mode 100644 index ef2d0934fc..0000000000 --- a/package/kernel/mac80211/patches/brcm/306-v4.20-0002-brcmfmac-fix-full-timeout-waiting-for-action-frame-o.patch +++ /dev/null @@ -1,79 +0,0 @@ -From fbf07000960d9c8a13fdc17c6de0230d681c7543 Mon Sep 17 00:00:00 2001 -From: Chung-Hsien Hsu <stanley.hsu@cypress.com> -Date: Thu, 27 Sep 2018 14:59:49 +0000 -Subject: [PATCH] brcmfmac: fix full timeout waiting for action frame - on-channel tx - -The driver sends an action frame down and waits for a completion signal -triggered by the received BRCMF_E_ACTION_FRAME_OFF_CHAN_COMPLETE event -to continue the process. However, the action frame could be transmitted -either on the current channel or on an off channel. For the on-channel -case, only BRCMF_E_ACTION_FRAME_COMPLETE event will be received when -the frame is transmitted, which make the driver always wait a full -timeout duration. This patch has the completion signal be triggered by -receiving the BRCMF_E_ACTION_FRAME_COMPLETE event for the on-channel -case. - -This change fixes WFA p2p certification 5.1.19 failure. - -Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com> -Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com> -Signed-off-by: Kalle Valo <kvalo@codeaurora.org> ---- - drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 17 +++++++++++++++-- - drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h | 2 ++ - 2 files changed, 17 insertions(+), 2 deletions(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c -@@ -1457,10 +1457,12 @@ int brcmf_p2p_notify_action_tx_complete( - return 0; - - if (e->event_code == BRCMF_E_ACTION_FRAME_COMPLETE) { -- if (e->status == BRCMF_E_STATUS_SUCCESS) -+ if (e->status == BRCMF_E_STATUS_SUCCESS) { - set_bit(BRCMF_P2P_STATUS_ACTION_TX_COMPLETED, - &p2p->status); -- else { -+ if (!p2p->wait_for_offchan_complete) -+ complete(&p2p->send_af_done); -+ } else { - set_bit(BRCMF_P2P_STATUS_ACTION_TX_NOACK, &p2p->status); - /* If there is no ack, we don't need to wait for - * WLC_E_ACTION_FRAME_OFFCHAN_COMPLETE event -@@ -1511,6 +1513,17 @@ static s32 brcmf_p2p_tx_action_frame(str - p2p->af_sent_channel = le32_to_cpu(af_params->channel); - p2p->af_tx_sent_jiffies = jiffies; - -+ if (test_bit(BRCMF_P2P_STATUS_DISCOVER_LISTEN, &p2p->status) && -+ p2p->af_sent_channel == -+ ieee80211_frequency_to_channel(p2p->remain_on_channel.center_freq)) -+ p2p->wait_for_offchan_complete = false; -+ else -+ p2p->wait_for_offchan_complete = true; -+ -+ brcmf_dbg(TRACE, "Waiting for %s tx completion event\n", -+ (p2p->wait_for_offchan_complete) ? -+ "off-channel" : "on-channel"); -+ - timeout = wait_for_completion_timeout(&p2p->send_af_done, - P2P_AF_MAX_WAIT_TIME); - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h -@@ -124,6 +124,7 @@ struct afx_hdl { - * @gon_req_action: about to send go negotiation requets frame. - * @block_gon_req_tx: drop tx go negotiation requets frame. - * @p2pdev_dynamically: is p2p device if created by module param or supplicant. -+ * @wait_for_offchan_complete: wait for off-channel tx completion event. - */ - struct brcmf_p2p_info { - struct brcmf_cfg80211_info *cfg; -@@ -144,6 +145,7 @@ struct brcmf_p2p_info { - bool gon_req_action; - bool block_gon_req_tx; - bool p2pdev_dynamically; -+ bool wait_for_offchan_complete; - }; - - s32 brcmf_p2p_attach(struct brcmf_cfg80211_info *cfg, bool p2pdev_forced); diff --git a/package/kernel/mac80211/patches/brcm/320-v5.0-0004-brcmfmac-Set-board_type-used-for-nvram-file-selectio.patch b/package/kernel/mac80211/patches/brcm/320-v5.0-0004-brcmfmac-Set-board_type-used-for-nvram-file-selectio.patch index f7c2c0ff48..fe930508b6 100644 --- a/package/kernel/mac80211/patches/brcm/320-v5.0-0004-brcmfmac-Set-board_type-used-for-nvram-file-selectio.patch +++ b/package/kernel/mac80211/patches/brcm/320-v5.0-0004-brcmfmac-Set-board_type-used-for-nvram-file-selectio.patch @@ -67,7 +67,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org> fwreq->bus_nr = devinfo->pdev->bus->number; --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -@@ -4185,6 +4185,7 @@ brcmf_sdio_prepare_fw_request(struct brc +@@ -4210,6 +4210,7 @@ brcmf_sdio_prepare_fw_request(struct brc fwreq->items[BRCMF_SDIO_FW_CODE].type = BRCMF_FW_TYPE_BINARY; fwreq->items[BRCMF_SDIO_FW_NVRAM].type = BRCMF_FW_TYPE_NVRAM; diff --git a/package/kernel/mac80211/patches/brcm/328-v5.0-0002-brcmfmac-enable-frameburst-mode-in-default-firmware-.patch b/package/kernel/mac80211/patches/brcm/328-v5.0-0002-brcmfmac-enable-frameburst-mode-in-default-firmware-.patch index 3ae36890ce..3464839a2b 100644 --- a/package/kernel/mac80211/patches/brcm/328-v5.0-0002-brcmfmac-enable-frameburst-mode-in-default-firmware-.patch +++ b/package/kernel/mac80211/patches/brcm/328-v5.0-0002-brcmfmac-enable-frameburst-mode-in-default-firmware-.patch @@ -17,7 +17,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -6644,6 +6644,12 @@ static s32 brcmf_config_dongle(struct br +@@ -6654,6 +6654,12 @@ static s32 brcmf_config_dongle(struct br brcmf_configure_arp_nd_offload(ifp, true); diff --git a/package/kernel/mac80211/patches/brcm/329-v5.0-0002-brcmfmac-set-F2-watermark-to-256-for-4373.patch b/package/kernel/mac80211/patches/brcm/329-v5.0-0002-brcmfmac-set-F2-watermark-to-256-for-4373.patch deleted file mode 100644 index bf35c4587e..0000000000 --- a/package/kernel/mac80211/patches/brcm/329-v5.0-0002-brcmfmac-set-F2-watermark-to-256-for-4373.patch +++ /dev/null @@ -1,73 +0,0 @@ -From e1a08730eeb0bad4d82c3bc40e74854872de618d Mon Sep 17 00:00:00 2001 -From: Wright Feng <wright.feng@cypress.com> -Date: Wed, 21 Nov 2018 07:53:44 +0000 -Subject: [PATCH] brcmfmac: set F2 watermark to 256 for 4373 - -We got SDIO_CRC_ERROR with 4373 on SDR104 when doing bi-directional -throughput test. Enable watermark to 256 to guarantee the operation -stability. - -Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com> -Signed-off-by: Wright Feng <wright.feng@cypress.com> -Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com> -Signed-off-by: Kalle Valo <kvalo@codeaurora.org> ---- - .../broadcom/brcm80211/brcmfmac/sdio.c | 26 +++++++++++++++++-- - 1 file changed, 24 insertions(+), 2 deletions(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -@@ -49,6 +49,10 @@ - #define DCMD_RESP_TIMEOUT msecs_to_jiffies(2500) - #define CTL_DONE_TIMEOUT msecs_to_jiffies(2500) - -+/* watermark expressed in number of words */ -+#define DEFAULT_F2_WATERMARK 0x8 -+#define CY_4373_F2_WATERMARK 0x40 -+ - #ifdef DEBUG - - #define BRCMF_TRAP_INFO_SIZE 80 -@@ -138,6 +142,8 @@ struct rte_console { - /* 1: isolate internal sdio signals, put external pads in tri-state; requires - * sdio bus power cycle to clear (rev 9) */ - #define SBSDIO_DEVCTL_PADS_ISO 0x08 -+/* 1: enable F2 Watermark */ -+#define SBSDIO_DEVCTL_F2WM_ENAB 0x10 - /* Force SD->SB reset mapping (rev 11) */ - #define SBSDIO_DEVCTL_SB_RST_CTL 0x30 - /* Determined by CoreControl bit */ -@@ -4057,6 +4063,7 @@ static void brcmf_sdio_firmware_callback - void *nvram; - u32 nvram_len; - u8 saveclk; -+ u8 devctl; - - brcmf_dbg(TRACE, "Enter: dev=%s, err=%d\n", dev_name(dev), err); - -@@ -4112,8 +4119,23 @@ static void brcmf_sdio_firmware_callback - brcmf_sdiod_writel(sdiod, core->base + SD_REG(hostintmask), - bus->hostintmask, NULL); - -- -- brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, 8, &err); -+ switch (sdiod->func1->device) { -+ case SDIO_DEVICE_ID_CYPRESS_4373: -+ brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes\n", -+ CY_4373_F2_WATERMARK); -+ brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, -+ CY_4373_F2_WATERMARK, &err); -+ devctl = brcmf_sdiod_readb(sdiod, SBSDIO_DEVICE_CTL, -+ &err); -+ devctl |= SBSDIO_DEVCTL_F2WM_ENAB; -+ brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl, -+ &err); -+ break; -+ default: -+ brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, -+ DEFAULT_F2_WATERMARK, &err); -+ break; -+ } - } else { - /* Disable F2 again */ - sdio_disable_func(sdiod->func2); diff --git a/package/kernel/mac80211/patches/brcm/329-v5.0-0003-brcmfmac-set-SDIO-F1-MesBusyCtrl-for-CYW4373.patch b/package/kernel/mac80211/patches/brcm/329-v5.0-0003-brcmfmac-set-SDIO-F1-MesBusyCtrl-for-CYW4373.patch deleted file mode 100644 index 9ba6931f8d..0000000000 --- a/package/kernel/mac80211/patches/brcm/329-v5.0-0003-brcmfmac-set-SDIO-F1-MesBusyCtrl-for-CYW4373.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 58e4bbea0c1d9b5ace11df968c5dc096ce052a73 Mon Sep 17 00:00:00 2001 -From: Madhan Mohan R <MadhanMohan.R@cypress.com> -Date: Wed, 21 Nov 2018 07:53:45 +0000 -Subject: [PATCH] brcmfmac: set SDIO F1 MesBusyCtrl for CYW4373 - -Along with F2 watermark (existing) configuration, F1 MesBusyCtrl -should be enabled & sdio device RX FIFO watermark should be -configured to avoid overflow errors. - -Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com> -Signed-off-by: Madhan Mohan R <madhanmohan.r@cypress.com> -Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com> -Signed-off-by: Kalle Valo <kvalo@codeaurora.org> ---- - drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 3 +++ - drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h | 9 ++++++++- - 2 files changed, 11 insertions(+), 1 deletion(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -@@ -4130,6 +4130,9 @@ static void brcmf_sdio_firmware_callback - devctl |= SBSDIO_DEVCTL_F2WM_ENAB; - brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl, - &err); -+ brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_MESBUSYCTRL, -+ CY_4373_F2_WATERMARK | -+ SBSDIO_MESBUSYCTRL_ENAB, &err); - break; - default: - brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h -@@ -77,7 +77,7 @@ - #define SBSDIO_GPIO_OUT 0x10006 - /* gpio enable */ - #define SBSDIO_GPIO_EN 0x10007 --/* rev < 7, watermark for sdio device */ -+/* rev < 7, watermark for sdio device TX path */ - #define SBSDIO_WATERMARK 0x10008 - /* control busy signal generation */ - #define SBSDIO_DEVICE_CTL 0x10009 -@@ -104,6 +104,13 @@ - #define SBSDIO_FUNC1_RFRAMEBCHI 0x1001C - /* MesBusyCtl (rev 11) */ - #define SBSDIO_FUNC1_MESBUSYCTRL 0x1001D -+/* Watermark for sdio device RX path */ -+#define SBSDIO_MESBUSY_RXFIFO_WM_MASK 0x7F -+#define SBSDIO_MESBUSY_RXFIFO_WM_SHIFT 0 -+/* Enable busy capability for MES access */ -+#define SBSDIO_MESBUSYCTRL_ENAB 0x80 -+#define SBSDIO_MESBUSYCTRL_ENAB_SHIFT 7 -+ - /* Sdio Core Rev 12 */ - #define SBSDIO_FUNC1_WAKEUPCTRL 0x1001E - #define SBSDIO_FUNC1_WCTRL_ALPWAIT_MASK 0x1 diff --git a/package/kernel/mac80211/patches/brcm/332-v5.0-0001-brcmfmac-Fix-access-point-mode.patch b/package/kernel/mac80211/patches/brcm/332-v5.0-0001-brcmfmac-Fix-access-point-mode.patch deleted file mode 100644 index f5f45c8d3e..0000000000 --- a/package/kernel/mac80211/patches/brcm/332-v5.0-0001-brcmfmac-Fix-access-point-mode.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 861cb5eb467f5e38dce1aabe4e8db379255bd89b Mon Sep 17 00:00:00 2001 -From: Stefan Wahren <stefan.wahren@i2se.com> -Date: Wed, 12 Dec 2018 20:20:06 +0100 -Subject: [PATCH] brcmfmac: Fix access point mode - -Since commit 1204aa17f3b4 ("brcmfmac: set WIPHY_FLAG_HAVE_AP_SME flag") -the Raspberry Pi 3 A+ (BCM43455) isn't able to operate in AP mode with -hostapd (device_ap_sme=1 use_monitor=0): - -brcmfmac: brcmf_cfg80211_stop_ap: setting AP mode failed -52 - -So add the missing mgmt_stypes for AP mode to fix this. - -Fixes: 1204aa17f3b4 ("brcmfmac: set WIPHY_FLAG_HAVE_AP_SME flag") -Suggested-by: Arend van Spriel <arend.vanspriel@broadcom.com> -Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> -Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> -Signed-off-by: Kalle Valo <kvalo@codeaurora.org> ---- - .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -6314,6 +6314,16 @@ brcmf_txrx_stypes[NUM_NL80211_IFTYPES] = - .tx = 0xffff, - .rx = BIT(IEEE80211_STYPE_ACTION >> 4) | - BIT(IEEE80211_STYPE_PROBE_REQ >> 4) -+ }, -+ [NL80211_IFTYPE_AP] = { -+ .tx = 0xffff, -+ .rx = BIT(IEEE80211_STYPE_ASSOC_REQ >> 4) | -+ BIT(IEEE80211_STYPE_REASSOC_REQ >> 4) | -+ BIT(IEEE80211_STYPE_PROBE_REQ >> 4) | -+ BIT(IEEE80211_STYPE_DISASSOC >> 4) | -+ BIT(IEEE80211_STYPE_AUTH >> 4) | -+ BIT(IEEE80211_STYPE_DEAUTH >> 4) | -+ BIT(IEEE80211_STYPE_ACTION >> 4) - } - }; - diff --git a/package/kernel/mac80211/patches/brcm/354-v5.1-brcmfmac-use-bphy_err-in-all-wiphy-related-code.patch b/package/kernel/mac80211/patches/brcm/354-v5.1-brcmfmac-use-bphy_err-in-all-wiphy-related-code.patch index 5eaf511868..3d1bcd3d6c 100644 --- a/package/kernel/mac80211/patches/brcm/354-v5.1-brcmfmac-use-bphy_err-in-all-wiphy-related-code.patch +++ b/package/kernel/mac80211/patches/brcm/354-v5.1-brcmfmac-use-bphy_err-in-all-wiphy-related-code.patch @@ -503,7 +503,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org> goto fail; } -@@ -1353,6 +1356,7 @@ static int brcmf_get_pend_8021x_cnt(stru +@@ -1358,6 +1361,7 @@ static int brcmf_get_pend_8021x_cnt(stru int brcmf_netdev_wait_pend8021x(struct brcmf_if *ifp) { @@ -511,7 +511,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org> int err; err = wait_event_timeout(ifp->pend_8021x_wait, -@@ -1360,7 +1364,7 @@ int brcmf_netdev_wait_pend8021x(struct b +@@ -1365,7 +1369,7 @@ int brcmf_netdev_wait_pend8021x(struct b MAX_WAIT_FOR_8021X_TX); if (!err) diff --git a/package/kernel/mac80211/patches/brcm/384-v5.4-0001-Revert-brcmfmac-fix-NULL-pointer-derefence-during-US.patch b/package/kernel/mac80211/patches/brcm/384-v5.4-0001-Revert-brcmfmac-fix-NULL-pointer-derefence-during-US.patch index 45a9a339fa..b01db877bb 100644 --- a/package/kernel/mac80211/patches/brcm/384-v5.4-0001-Revert-brcmfmac-fix-NULL-pointer-derefence-during-US.patch +++ b/package/kernel/mac80211/patches/brcm/384-v5.4-0001-Revert-brcmfmac-fix-NULL-pointer-derefence-during-US.patch @@ -71,10 +71,10 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org> - brcmf_proto_detach_pre_delif(drvr); - - /* make sure primary interface removed last */ - for (i = BRCMF_MAX_IFS-1; i > -1; i--) - brcmf_remove_interface(drvr->iflist[i], false); -@@ -1346,7 +1344,7 @@ void brcmf_detach(struct device *dev) + if (drvr->mon_if) { + brcmf_net_detach(drvr->mon_if->ndev, false); + drvr->mon_if = NULL; +@@ -1351,7 +1349,7 @@ void brcmf_detach(struct device *dev) brcmf_bus_stop(drvr->bus_if); diff --git a/package/kernel/mac80211/patches/brcm/384-v5.4-0002-brcmfmac-change-the-order-of-things-in-brcmf_detach.patch b/package/kernel/mac80211/patches/brcm/384-v5.4-0002-brcmfmac-change-the-order-of-things-in-brcmf_detach.patch index d40bf031b8..4385dc730e 100644 --- a/package/kernel/mac80211/patches/brcm/384-v5.4-0002-brcmfmac-change-the-order-of-things-in-brcmf_detach.patch +++ b/package/kernel/mac80211/patches/brcm/384-v5.4-0002-brcmfmac-change-the-order-of-things-in-brcmf_detach.patch @@ -25,7 +25,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c -@@ -1328,25 +1328,26 @@ void brcmf_detach(struct device *dev) +@@ -1328,12 +1328,11 @@ void brcmf_detach(struct device *dev) unregister_inet6addr_notifier(&drvr->inet6addr_notifier); #endif @@ -35,31 +35,36 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org> - brcmf_p2p_detach(&drvr->config->p2p); - brcmf_bus_change_state(bus_if, BRCMF_BUS_DOWN); -- -- /* make sure primary interface removed last */ ++ brcmf_bus_stop(drvr->bus_if); ++ ++ brcmf_fweh_detach(drvr); ++ brcmf_proto_detach(drvr); + + if (drvr->mon_if) { + brcmf_net_detach(drvr->mon_if->ndev, false); +@@ -1341,17 +1340,19 @@ void brcmf_detach(struct device *dev) + } + + /* make sure primary interface removed last */ - for (i = BRCMF_MAX_IFS-1; i > -1; i--) - brcmf_remove_interface(drvr->iflist[i], false); - - brcmf_cfg80211_detach(drvr->config); - drvr->config = NULL; - - brcmf_bus_stop(drvr->bus_if); - -+ brcmf_fweh_detach(drvr); - brcmf_proto_detach(drvr); - -+ /* make sure primary interface removed last */ +- brcmf_bus_stop(drvr->bus_if); + for (i = BRCMF_MAX_IFS - 1; i > -1; i--) { + if (drvr->iflist[i]) + brcmf_del_if(drvr, drvr->iflist[i]->bsscfgidx, false); + } -+ + +- brcmf_proto_detach(drvr); + if (drvr->config) { + brcmf_p2p_detach(&drvr->config->p2p); + brcmf_cfg80211_detach(drvr->config); + drvr->config = NULL; + } -+ + bus_if->drvr = NULL; + wiphy_free(drvr->wiphy); diff --git a/package/kernel/mac80211/patches/brcm/392-v5.4-0001-brcmfmac-move-cfg80211_ops-pointer-to-another-struct.patch b/package/kernel/mac80211/patches/brcm/392-v5.4-0001-brcmfmac-move-cfg80211_ops-pointer-to-another-struct.patch index b45c6fd2db..a56be4d35c 100644 --- a/package/kernel/mac80211/patches/brcm/392-v5.4-0001-brcmfmac-move-cfg80211_ops-pointer-to-another-struct.patch +++ b/package/kernel/mac80211/patches/brcm/392-v5.4-0001-brcmfmac-move-cfg80211_ops-pointer-to-another-struct.patch @@ -74,7 +74,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org> return ret; } -@@ -1374,6 +1375,8 @@ void brcmf_detach(struct device *dev) +@@ -1379,6 +1380,8 @@ void brcmf_detach(struct device *dev) bus_if->drvr = NULL; diff --git a/package/kernel/mac80211/patches/brcm/392-v5.4-0002-brcmfmac-split-brcmf_attach-and-brcmf_detach-functio.patch b/package/kernel/mac80211/patches/brcm/392-v5.4-0002-brcmfmac-split-brcmf_attach-and-brcmf_detach-functio.patch index 827178b466..e0211fadbd 100644 --- a/package/kernel/mac80211/patches/brcm/392-v5.4-0002-brcmfmac-split-brcmf_attach-and-brcmf_detach-functio.patch +++ b/package/kernel/mac80211/patches/brcm/392-v5.4-0002-brcmfmac-split-brcmf_attach-and-brcmf_detach-functio.patch @@ -96,7 +96,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org> if (ret != 0) { bphy_err(drvr, "dongle is not responding: err=%d\n", ret); goto fail; -@@ -1372,6 +1382,15 @@ void brcmf_detach(struct device *dev) +@@ -1377,6 +1387,15 @@ void brcmf_detach(struct device *dev) brcmf_cfg80211_detach(drvr->config); drvr->config = NULL; } diff --git a/package/kernel/mac80211/patches/brcm/405-v5.5-brcmfmac-remove-monitor-interface-when-detaching.patch b/package/kernel/mac80211/patches/brcm/405-v5.5-brcmfmac-remove-monitor-interface-when-detaching.patch deleted file mode 100644 index 6c325ee844..0000000000 --- a/package/kernel/mac80211/patches/brcm/405-v5.5-brcmfmac-remove-monitor-interface-when-detaching.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl> -Date: Mon, 18 Nov 2019 13:35:20 +0100 -Subject: [PATCH 5.5] brcmfmac: remove monitor interface when detaching -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This fixes a minor WARNING in the cfg80211: -[ 130.658034] ------------[ cut here ]------------ -[ 130.662805] WARNING: CPU: 1 PID: 610 at net/wireless/core.c:954 wiphy_unregister+0xb4/0x198 [cfg80211] - -Signed-off-by: Rafał Miłecki <rafal@milecki.pl> ---- - drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 5 +++++ - 1 file changed, 5 insertions(+) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c -@@ -1371,6 +1371,11 @@ void brcmf_detach(struct device *dev) - brcmf_fweh_detach(drvr); - brcmf_proto_detach(drvr); - -+ if (drvr->mon_if) { -+ brcmf_net_detach(drvr->mon_if->ndev, false); -+ drvr->mon_if = NULL; -+ } -+ - /* make sure primary interface removed last */ - for (i = BRCMF_MAX_IFS - 1; i > -1; i--) { - if (drvr->iflist[i]) |