aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/349-0008-brcmfmac-create-common-function-for-handling-brcmf_p.patch
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2016-04-16 08:48:43 +0000
committerRafał Miłecki <zajec5@gmail.com>2016-04-16 08:48:43 +0000
commit7918cdee1c29cccfd47894438a73f9a922307a1e (patch)
tree6dd4598e4d4c826099fe492aed7dfea7730bd3e6 /package/kernel/mac80211/patches/349-0008-brcmfmac-create-common-function-for-handling-brcmf_p.patch
parente1968dc0f0a965bc01a5ae0f4fb6ca5b8d528eda (diff)
downloadmaster-187ad058-7918cdee1c29cccfd47894438a73f9a922307a1e.tar.gz
master-187ad058-7918cdee1c29cccfd47894438a73f9a922307a1e.tar.bz2
master-187ad058-7918cdee1c29cccfd47894438a73f9a922307a1e.zip
mac80211: update brcmfmac including missing boardrev workaround
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49174 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211/patches/349-0008-brcmfmac-create-common-function-for-handling-brcmf_p.patch')
-rw-r--r--package/kernel/mac80211/patches/349-0008-brcmfmac-create-common-function-for-handling-brcmf_p.patch88
1 files changed, 88 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/349-0008-brcmfmac-create-common-function-for-handling-brcmf_p.patch b/package/kernel/mac80211/patches/349-0008-brcmfmac-create-common-function-for-handling-brcmf_p.patch
new file mode 100644
index 0000000000..08ea235fdd
--- /dev/null
+++ b/package/kernel/mac80211/patches/349-0008-brcmfmac-create-common-function-for-handling-brcmf_p.patch
@@ -0,0 +1,88 @@
+From: Arend van Spriel <arend@broadcom.com>
+Date: Mon, 11 Apr 2016 11:35:28 +0200
+Subject: [PATCH] brcmfmac: create common function for handling
+ brcmf_proto_hdrpull()
+
+In receive path brcmf_proto_hdrpull() needs to be called and handled
+similar in brcmf_rx_frame() and brcmf_rx_event(). Move that duplicated
+code in separate function.
+
+Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
+Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
+Reviewed-by: Franky Lin <franky.lin@broadcom.com>
+Signed-off-by: Arend van Spriel <arend@broadcom.com>
+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
+@@ -322,26 +322,35 @@ void brcmf_netif_rx(struct brcmf_if *ifp
+ netif_rx_ni(skb);
+ }
+
+-void brcmf_rx_frame(struct device *dev, struct sk_buff *skb, bool handle_event)
++static int brcmf_rx_hdrpull(struct brcmf_pub *drvr, struct sk_buff *skb,
++ struct brcmf_if **ifp)
+ {
+- struct brcmf_if *ifp;
+- struct brcmf_bus *bus_if = dev_get_drvdata(dev);
+- struct brcmf_pub *drvr = bus_if->drvr;
+ int ret;
+
+- brcmf_dbg(DATA, "Enter: %s: rxp=%p\n", dev_name(dev), skb);
+-
+ /* process and remove protocol-specific header */
+- ret = brcmf_proto_hdrpull(drvr, true, skb, &ifp);
++ ret = brcmf_proto_hdrpull(drvr, true, skb, ifp);
+
+- if (ret || !ifp || !ifp->ndev) {
++ if (ret || !(*ifp) || !(*ifp)->ndev) {
+ if (ret != -ENODATA && ifp)
+- ifp->stats.rx_errors++;
++ (*ifp)->stats.rx_errors++;
+ brcmu_pkt_buf_free_skb(skb);
+- return;
++ return -ENODATA;
+ }
+
+- skb->protocol = eth_type_trans(skb, ifp->ndev);
++ skb->protocol = eth_type_trans(skb, (*ifp)->ndev);
++ return 0;
++}
++
++void brcmf_rx_frame(struct device *dev, struct sk_buff *skb, bool handle_event)
++{
++ struct brcmf_if *ifp;
++ struct brcmf_bus *bus_if = dev_get_drvdata(dev);
++ struct brcmf_pub *drvr = bus_if->drvr;
++
++ brcmf_dbg(DATA, "Enter: %s: rxp=%p\n", dev_name(dev), skb);
++
++ if (brcmf_rx_hdrpull(drvr, skb, &ifp))
++ return;
+
+ if (brcmf_proto_is_reorder_skb(skb)) {
+ brcmf_proto_rxreorder(ifp, skb);
+@@ -359,21 +368,11 @@ void brcmf_rx_event(struct device *dev,
+ struct brcmf_if *ifp;
+ struct brcmf_bus *bus_if = dev_get_drvdata(dev);
+ struct brcmf_pub *drvr = bus_if->drvr;
+- int ret;
+
+ brcmf_dbg(EVENT, "Enter: %s: rxp=%p\n", dev_name(dev), skb);
+
+- /* process and remove protocol-specific header */
+- ret = brcmf_proto_hdrpull(drvr, true, skb, &ifp);
+-
+- if (ret || !ifp || !ifp->ndev) {
+- if (ret != -ENODATA && ifp)
+- ifp->stats.rx_errors++;
+- brcmu_pkt_buf_free_skb(skb);
++ if (brcmf_rx_hdrpull(drvr, skb, &ifp))
+ return;
+- }
+-
+- skb->protocol = eth_type_trans(skb, ifp->ndev);
+
+ brcmf_fweh_process_skb(ifp->drvr, skb);
+ brcmu_pkt_buf_free_skb(skb);