diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2015-08-26 22:10:14 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2015-08-26 22:10:14 +0000 |
commit | e53ef786554097f42856e9ade31fd9f0845177c2 (patch) | |
tree | 78f49ecbea2439aa2978c2b2a57c22f775b42d70 /package/kernel/mac80211/patches/321-brcmfmac-change-parameters-for-brcmf_remove_interfac.patch | |
parent | 7d148608f341c5e53f7b000a58191389a0d2955e (diff) | |
download | master-187ad058-e53ef786554097f42856e9ade31fd9f0845177c2.tar.gz master-187ad058-e53ef786554097f42856e9ade31fd9f0845177c2.tar.bz2 master-187ad058-e53ef786554097f42856e9ade31fd9f0845177c2.zip |
mac80211: add pending brcmfmac patches fixing multiple interfaces
So far support for multiple interface was somehow broken in brcmfmac.
Driver couldn't correctly match firmware and system interfaces resulting
in not working APs and WARNINGs. This pending patches fixes that :)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46734 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211/patches/321-brcmfmac-change-parameters-for-brcmf_remove_interfac.patch')
-rw-r--r-- | package/kernel/mac80211/patches/321-brcmfmac-change-parameters-for-brcmf_remove_interfac.patch | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/321-brcmfmac-change-parameters-for-brcmf_remove_interfac.patch b/package/kernel/mac80211/patches/321-brcmfmac-change-parameters-for-brcmf_remove_interfac.patch new file mode 100644 index 0000000000..3360cbca82 --- /dev/null +++ b/package/kernel/mac80211/patches/321-brcmfmac-change-parameters-for-brcmf_remove_interfac.patch @@ -0,0 +1,87 @@ +From: Arend van Spriel <arend@broadcom.com> +Date: Wed, 26 Aug 2015 22:14:55 +0200 +Subject: [PATCH] brcmfmac: change parameters for + brcmf_remove_interface() + +Just pass the interface to be removed, ie. the struct brcmf_if instance. + +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/cfg80211.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +@@ -4983,7 +4983,7 @@ brcmf_notify_connect_status_ap(struct br + brcmf_dbg(CONN, "AP mode link down\n"); + complete(&cfg->vif_disabled); + if (ifp->vif->mbss) +- brcmf_remove_interface(ifp->drvr, ifp->bssidx); ++ brcmf_remove_interface(ifp); + return 0; + } + +--- a/drivers/net/wireless/brcm80211/brcmfmac/core.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c +@@ -887,12 +887,13 @@ static void brcmf_del_if(struct brcmf_pu + } + } + +-void brcmf_remove_interface(struct brcmf_pub *drvr, u32 bssidx) ++void brcmf_remove_interface(struct brcmf_if *ifp) + { +- if (drvr->iflist[bssidx]) { +- brcmf_fws_del_interface(drvr->iflist[bssidx]); +- brcmf_del_if(drvr, bssidx); +- } ++ if (!ifp || WARN_ON(ifp->drvr->iflist[ifp->bssidx] != ifp)) ++ return; ++ ++ brcmf_fws_del_interface(ifp); ++ brcmf_del_if(ifp->drvr, ifp->bssidx); + } + + int brcmf_get_next_free_bsscfgidx(struct brcmf_pub *drvr) +@@ -1122,7 +1123,7 @@ void brcmf_detach(struct device *dev) + + /* make sure primary interface removed last */ + for (i = BRCMF_MAX_IFS-1; i > -1; i--) +- brcmf_remove_interface(drvr, i); ++ brcmf_remove_interface(drvr->iflist[i]); + + brcmf_cfg80211_detach(drvr->config); + +--- a/drivers/net/wireless/brcm80211/brcmfmac/core.h ++++ b/drivers/net/wireless/brcm80211/brcmfmac/core.h +@@ -206,7 +206,7 @@ struct brcmf_if *brcmf_get_ifp(struct br + int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked); + struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bssidx, s32 ifidx, + char *name, u8 *mac_addr); +-void brcmf_remove_interface(struct brcmf_pub *drvr, u32 bssidx); ++void brcmf_remove_interface(struct brcmf_if *ifp); + int brcmf_get_next_free_bsscfgidx(struct brcmf_pub *drvr); + void brcmf_txflowblock_if(struct brcmf_if *ifp, + enum brcmf_netif_stop_reason reason, bool state); +--- a/drivers/net/wireless/brcm80211/brcmfmac/fweh.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/fweh.c +@@ -222,7 +222,7 @@ static void brcmf_fweh_handle_if_event(s + err = brcmf_fweh_call_event_handler(ifp, emsg->event_code, emsg, data); + + if (ifp && ifevent->action == BRCMF_E_IF_DEL) +- brcmf_remove_interface(drvr, ifevent->bssidx); ++ brcmf_remove_interface(ifp); + } + + /** +--- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +@@ -2140,7 +2140,7 @@ static void brcmf_p2p_delete_p2pdev(stru + { + cfg80211_unregister_wdev(&vif->wdev); + p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif = NULL; +- brcmf_remove_interface(vif->ifp->drvr, vif->ifp->bssidx); ++ brcmf_remove_interface(vif->ifp); + brcmf_free_vif(vif); + } + |