The removed patches are all integrated in the upstream version now. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>master
parent
3212290a3b
commit
f84981f6f8
@ -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,
|
@ -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);
|
@ -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);
|
@ -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
|
@ -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)
|
||||
}
|
||||
};
|
||||
|
@ -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])
|
@ -1,31 +0,0 @@ |
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Sat, 10 Feb 2018 13:43:07 +0100
|
||||
Subject: [PATCH] mac80211: minstrel: fix using short preamble CCK rates on
|
||||
HT clients
|
||||
|
||||
mi->supported[MINSTREL_CCK_GROUP] needs to be updated
|
||||
|
||||
Fixes: 782dda00ab8e ("mac80211: minstrel_ht: move short preamble check out of get_rate")
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/rc80211_minstrel_ht.c
|
||||
+++ b/net/mac80211/rc80211_minstrel_ht.c
|
||||
@@ -1135,7 +1135,6 @@ minstrel_ht_update_caps(void *priv, stru
|
||||
struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs;
|
||||
u16 ht_cap = sta->ht_cap.cap;
|
||||
struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap;
|
||||
- struct sta_info *sinfo = container_of(sta, struct sta_info, sta);
|
||||
int use_vht;
|
||||
int n_supported = 0;
|
||||
int ack_dur;
|
||||
@@ -1267,8 +1266,7 @@ minstrel_ht_update_caps(void *priv, stru
|
||||
if (!n_supported)
|
||||
goto use_legacy;
|
||||
|
||||
- if (test_sta_flag(sinfo, WLAN_STA_SHORT_PREAMBLE))
|
||||
- mi->cck_supported_short |= mi->cck_supported_short << 4;
|
||||
+ mi->supported[MINSTREL_CCK_GROUP] |= mi->cck_supported_short << 4;
|
||||
|
||||
/* create an initial rate table with the lowest supported rates */
|
||||
minstrel_ht_update_stats(mp, mi);
|
@ -1,20 +0,0 @@ |
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Thu, 1 Mar 2018 13:27:54 +0100
|
||||
Subject: [PATCH] mac80211: minstrel: fix CCK rate group streams value
|
||||
|
||||
Fixes a harmless underflow issue when CCK rates are actively being used
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/rc80211_minstrel_ht.c
|
||||
+++ b/net/mac80211/rc80211_minstrel_ht.c
|
||||
@@ -131,7 +131,7 @@
|
||||
|
||||
#define CCK_GROUP(_s) \
|
||||
[MINSTREL_CCK_GROUP] = { \
|
||||
- .streams = 0, \
|
||||
+ .streams = 1, \
|
||||
.flags = 0, \
|
||||
.shift = _s, \
|
||||
.duration = { \
|
@ -1,58 +0,0 @@ |
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Thu, 1 Mar 2018 13:28:48 +0100
|
||||
Subject: [PATCH] mac80211: minstrel: fix sampling/reporting of CCK rates
|
||||
in HT mode
|
||||
|
||||
Long/short preamble selection cannot be sampled separately, since it
|
||||
depends on the BSS state. Because of that, sampling attempts to
|
||||
currently not used preamble modes are not counted in the statistics,
|
||||
which leads to CCK rates being sampled too often.
|
||||
|
||||
Fix statistics accounting for long/short preamble by increasing the
|
||||
index where necessary.
|
||||
Fix excessive CCK rate sampling by dropping unsupported sample attempts.
|
||||
|
||||
This improves throughput on 2.4 GHz channels
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/rc80211_minstrel_ht.c
|
||||
+++ b/net/mac80211/rc80211_minstrel_ht.c
|
||||
@@ -281,7 +281,8 @@ minstrel_ht_get_stats(struct minstrel_pr
|
||||
break;
|
||||
|
||||
/* short preamble */
|
||||
- if (!(mi->supported[group] & BIT(idx)))
|
||||
+ if ((mi->supported[group] & BIT(idx + 4)) &&
|
||||
+ (rate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE))
|
||||
idx += 4;
|
||||
}
|
||||
return &mi->groups[group].rates[idx];
|
||||
@@ -1080,18 +1081,23 @@ minstrel_ht_get_rate(void *priv, struct
|
||||
return;
|
||||
|
||||
sample_group = &minstrel_mcs_groups[sample_idx / MCS_GROUP_RATES];
|
||||
+ sample_idx %= MCS_GROUP_RATES;
|
||||
+
|
||||
+ if (sample_group == &minstrel_mcs_groups[MINSTREL_CCK_GROUP] &&
|
||||
+ (sample_idx >= 4) != txrc->short_preamble)
|
||||
+ return;
|
||||
+
|
||||
info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE;
|
||||
rate->count = 1;
|
||||
|
||||
- if (sample_idx / MCS_GROUP_RATES == MINSTREL_CCK_GROUP) {
|
||||
+ if (sample_group == &minstrel_mcs_groups[MINSTREL_CCK_GROUP]) {
|
||||
int idx = sample_idx % ARRAY_SIZE(mp->cck_rates);
|
||||
rate->idx = mp->cck_rates[idx];
|
||||
} else if (sample_group->flags & IEEE80211_TX_RC_VHT_MCS) {
|
||||
ieee80211_rate_set_vht(rate, sample_idx % MCS_GROUP_RATES,
|
||||
sample_group->streams);
|
||||
} else {
|
||||
- rate->idx = sample_idx % MCS_GROUP_RATES +
|
||||
- (sample_group->streams - 1) * 8;
|
||||
+ rate->idx = sample_idx + (sample_group->streams - 1) * 8;
|
||||
}
|
||||
|
||||
rate->flags = sample_group->flags;
|
@ -1,21 +0,0 @@ |
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Wed, 8 Jan 2020 18:03:04 +0100
|
||||
Subject: [PATCH] cfg80211: fix memory leak in cfg80211_cqm_rssi_update
|
||||
|
||||
The per-tid statistics need to be released after the call to rdev_get_station
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Fixes: 8689c051a201 ("cfg80211: dynamically allocate per-tid stats for station info")
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -10346,6 +10346,7 @@ static int cfg80211_cqm_rssi_update(stru
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
+ cfg80211_sinfo_release_content(&sinfo);
|
||||
if (sinfo.filled & BIT_ULL(NL80211_STA_INFO_BEACON_SIGNAL_AVG))
|
||||
wdev->cqm_config->last_rssi_event_value =
|
||||
(s8) sinfo.rx_beacon_signal_avg;
|
@ -1,25 +0,0 @@ |
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Mon, 13 Jan 2020 18:34:31 +0100
|
||||
Subject: [PATCH] cfg80211: fix page refcount issue in A-MSDU decap
|
||||
|
||||
The fragments attached to a skb can be part of a compound page. In that case,
|
||||
page_ref_inc will increment the refcount for the wrong page. Fix this by
|
||||
using get_page instead, which calls page_ref_inc on the compound head and
|
||||
also checks for overflow.
|
||||
|
||||
Fixes: 2b67f944f88c ("cfg80211: reuse existing page fragments in A-MSDU rx")
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/wireless/util.c
|
||||
+++ b/net/wireless/util.c
|
||||
@@ -537,7 +537,7 @@ __frame_add_frag(struct sk_buff *skb, st
|
||||
struct skb_shared_info *sh = skb_shinfo(skb);
|
||||
int page_offset;
|
||||
|
||||
- page_ref_inc(page);
|
||||
+ get_page(page);
|
||||
page_offset = ptr - page_address(page);
|
||||
skb_add_rx_frag(skb, sh->nr_frags, page, page_offset, len, size);
|
||||
}
|
Loading…
Reference in new issue