This is a note to let you know that I've just added the patch titled

    brcmfmac: Fix ifidx for rx data by msgbuf.

to the 3.18-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     brcmfmac-fix-ifidx-for-rx-data-by-msgbuf.patch
and it can be found in the queue-3.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 94a612086f5e78272e831c04b673778f8546ea73 Mon Sep 17 00:00:00 2001
From: Hante Meuleman <[email protected]>
Date: Wed, 3 Dec 2014 21:05:28 +0100
Subject: brcmfmac: Fix ifidx for rx data by msgbuf.

From: Hante Meuleman <[email protected]>

commit 94a612086f5e78272e831c04b673778f8546ea73 upstream.

The ifidx provided by FW needs to be offsetted when receiving data
packets.

Reviewed-by: Arend Van Spriel <[email protected]>
Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Signed-off-by: Hante Meuleman <[email protected]>
Signed-off-by: Arend van Spriel <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- a/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c
@@ -1081,8 +1081,17 @@ brcmf_msgbuf_rx_skb(struct brcmf_msgbuf
 {
        struct brcmf_if *ifp;
 
+       /* The ifidx is the idx to map to matching netdev/ifp. When receiving
+        * events this is easy because it contains the bssidx which maps
+        * 1-on-1 to the netdev/ifp. But for data frames the ifidx is rcvd.
+        * bssidx 1 is used for p2p0 and no data can be received or
+        * transmitted on it. Therefor bssidx is ifidx + 1 if ifidx > 0
+        */
+       if (ifidx)
+               (ifidx)++;
        ifp = msgbuf->drvr->iflist[ifidx];
        if (!ifp || !ifp->ndev) {
+               brcmf_err("Received pkt for invalid ifidx %d\n", ifidx);
                brcmu_pkt_buf_free_skb(skb);
                return;
        }


Patches currently in stable-queue which might be from [email protected] are

queue-3.18/brcmfmac-fix-ifidx-for-rx-data-by-msgbuf.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to