aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/326-brcmfmac-add-mapping-for-interface-index-to-bsscfg-i.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-10-30 15:17:56 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-10-30 15:17:56 +0000
commitec3ee0969e6ecf49a2c98ce96f6977906ada0553 (patch)
tree29f379f37176d854bf3d91746b6e9e683590c6ea /package/kernel/mac80211/patches/326-brcmfmac-add-mapping-for-interface-index-to-bsscfg-i.patch
parentf79bae2fc011c8ea553c878dc3f0e09ef9b0217a (diff)
downloadupstream-ec3ee0969e6ecf49a2c98ce96f6977906ada0553.tar.gz
upstream-ec3ee0969e6ecf49a2c98ce96f6977906ada0553.tar.bz2
upstream-ec3ee0969e6ecf49a2c98ce96f6977906ada0553.zip
mac80211: update to wireless-testing 2015-10-26
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 47286
Diffstat (limited to 'package/kernel/mac80211/patches/326-brcmfmac-add-mapping-for-interface-index-to-bsscfg-i.patch')
-rw-r--r--package/kernel/mac80211/patches/326-brcmfmac-add-mapping-for-interface-index-to-bsscfg-i.patch92
1 files changed, 0 insertions, 92 deletions
diff --git a/package/kernel/mac80211/patches/326-brcmfmac-add-mapping-for-interface-index-to-bsscfg-i.patch b/package/kernel/mac80211/patches/326-brcmfmac-add-mapping-for-interface-index-to-bsscfg-i.patch
deleted file mode 100644
index 8ddc0a6eef..0000000000
--- a/package/kernel/mac80211/patches/326-brcmfmac-add-mapping-for-interface-index-to-bsscfg-i.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From: Arend van Spriel <arend@broadcom.com>
-Date: Wed, 26 Aug 2015 22:15:00 +0200
-Subject: [PATCH] brcmfmac: add mapping for interface index to bsscfg
- index
-
-Because the P2P Device interface in firmware uses the same interface
-index as the primary interface we use the bsscfg index as index in the
-struct brcmf_pub::iflist. However, in the data path we get the interface
-index and not the bsscfg index. So we need a mapping of interface index
-to bsscfg index, which can be determined upon handle adding the interface.
-
-Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
-Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
-Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
-Signed-off-by: Arend van Spriel <arend@broadcom.com>
----
-
---- a/drivers/net/wireless/brcm80211/brcmfmac/core.c
-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c
-@@ -85,21 +85,20 @@ char *brcmf_ifname(struct brcmf_pub *drv
-
- struct brcmf_if *brcmf_get_ifp(struct brcmf_pub *drvr, int ifidx)
- {
-+ struct brcmf_if *ifp;
-+ s32 bssidx;
-+
- if (ifidx < 0 || ifidx >= BRCMF_MAX_IFS) {
- brcmf_err("ifidx %d out of range\n", ifidx);
- return NULL;
- }
-
-- /* 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 = NULL;
-+ bssidx = drvr->if2bss[ifidx];
-+ if (bssidx >= 0)
-+ ifp = drvr->iflist[bssidx];
-
-- return drvr->iflist[ifidx];
-+ return ifp;
- }
-
- static void _brcmf_set_multicast_list(struct work_struct *work)
-@@ -831,6 +830,8 @@ struct brcmf_if *brcmf_add_if(struct brc
-
- ifp = netdev_priv(ndev);
- ifp->ndev = ndev;
-+ /* store mapping ifidx to bssidx */
-+ drvr->if2bss[ifidx] = bssidx;
- }
-
- ifp->drvr = drvr;
-@@ -855,6 +856,7 @@ static void brcmf_del_if(struct brcmf_pu
- struct brcmf_if *ifp;
-
- ifp = drvr->iflist[bssidx];
-+ drvr->if2bss[ifp->ifidx] = -1;
- drvr->iflist[bssidx] = NULL;
- if (!ifp) {
- brcmf_err("Null interface, idx=%d\n", bssidx);
-@@ -862,6 +864,7 @@ static void brcmf_del_if(struct brcmf_pu
- }
- brcmf_dbg(TRACE, "Enter, idx=%d, ifidx=%d\n", bssidx, ifp->ifidx);
- if (ifp->ndev) {
-+ drvr->if2bss[ifp->ifidx] = -1;
- if (bssidx == 0) {
- if (ifp->ndev->netdev_ops == &brcmf_netdev_ops_pri) {
- rtnl_lock();
-@@ -926,6 +929,7 @@ int brcmf_attach(struct device *dev)
- if (!drvr)
- return -ENOMEM;
-
-+ memset(drvr->if2bss, 0xFF, sizeof(drvr->if2bss));
- mutex_init(&drvr->proto_block);
-
- /* Link to bus module */
---- a/drivers/net/wireless/brcm80211/brcmfmac/core.h
-+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.h
-@@ -122,6 +122,7 @@ struct brcmf_pub {
- struct mac_address addresses[BRCMF_MAX_IFS];
-
- struct brcmf_if *iflist[BRCMF_MAX_IFS];
-+ s32 if2bss[BRCMF_MAX_IFS];
-
- struct mutex proto_block;
- unsigned char proto_buf[BRCMF_DCMD_MAXLEN];