From 7a68c31a819ee640e529b629f1457ab0b87add6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 25 Aug 2015 15:20:48 +0000 Subject: mac80211: backport latest patches except for NVRAM support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We sill don't use kernel 4.2 which is required for backporting using upstream NVRAM support patch. Signed-off-by: Rafał Miłecki SVN-Revision: 46724 --- ...ock-the-correct-flowring-when-backup-queu.patch | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 package/kernel/mac80211/patches/316-brcmfmac-block-the-correct-flowring-when-backup-queu.patch (limited to 'package/kernel/mac80211/patches/316-brcmfmac-block-the-correct-flowring-when-backup-queu.patch') diff --git a/package/kernel/mac80211/patches/316-brcmfmac-block-the-correct-flowring-when-backup-queu.patch b/package/kernel/mac80211/patches/316-brcmfmac-block-the-correct-flowring-when-backup-queu.patch new file mode 100644 index 0000000000..2d5f7b9be7 --- /dev/null +++ b/package/kernel/mac80211/patches/316-brcmfmac-block-the-correct-flowring-when-backup-queu.patch @@ -0,0 +1,48 @@ +From: Franky Lin +Date: Thu, 20 Aug 2015 22:06:06 +0200 +Subject: [PATCH] brcmfmac: block the correct flowring when backup queue + overflow + +brcmf_flowring_block blocks the last active flowring under the same +interface instead of the one provided by caller. This could lead to a +dead lock of netif stop if there are more than one flowring under the +interface and the traffic is high enough so brcmf_flowring_enqueue can +not unblock the ring right away. + +Reviewed-by: Pieter-Paul Giesberts +Reviewed-by: Hante Meuleman +Signed-off-by: Franky Lin +Signed-off-by: Arend van Spriel +Signed-off-by: Kalle Valo +--- + +--- a/drivers/net/wireless/brcm80211/brcmfmac/flowring.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/flowring.c +@@ -194,11 +194,15 @@ static void brcmf_flowring_block(struct + spin_lock_irqsave(&flow->block_lock, flags); + + ring = flow->rings[flowid]; ++ if (ring->blocked == blocked) { ++ spin_unlock_irqrestore(&flow->block_lock, flags); ++ return; ++ } + ifidx = brcmf_flowring_ifidx_get(flow, flowid); + + currently_blocked = false; + for (i = 0; i < flow->nrofrings; i++) { +- if (flow->rings[i]) { ++ if ((flow->rings[i]) && (i != flowid)) { + ring = flow->rings[i]; + if ((ring->status == RING_OPEN) && + (brcmf_flowring_ifidx_get(flow, i) == ifidx)) { +@@ -209,8 +213,8 @@ static void brcmf_flowring_block(struct + } + } + } +- ring->blocked = blocked; +- if (currently_blocked == blocked) { ++ flow->rings[flowid]->blocked = blocked; ++ if (currently_blocked) { + spin_unlock_irqrestore(&flow->block_lock, flags); + return; + } -- cgit v1.2.3