diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-02-29 17:19:04 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-02-29 17:19:04 +0000 |
commit | f3a1db04f0ebba577598f1577d3c8c756c8bf757 (patch) | |
tree | eecfe6c9154a9e0717573daba16d1c58bd674d2e /package/kernel/mac80211/patches/372-0011-brcmfmac-Properly-set-carrier-state-of-netdev.patch | |
parent | 5db86ba649298bef0066cac8e4d0e17834f6b7b0 (diff) | |
download | upstream-f3a1db04f0ebba577598f1577d3c8c756c8bf757.tar.gz upstream-f3a1db04f0ebba577598f1577d3c8c756c8bf757.tar.bz2 upstream-f3a1db04f0ebba577598f1577d3c8c756c8bf757.zip |
mac80211: backport from trunk r48782 + required kernel patches and mt76, mwlwifi
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@48822 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211/patches/372-0011-brcmfmac-Properly-set-carrier-state-of-netdev.patch')
-rw-r--r-- | package/kernel/mac80211/patches/372-0011-brcmfmac-Properly-set-carrier-state-of-netdev.patch | 122 |
1 files changed, 0 insertions, 122 deletions
diff --git a/package/kernel/mac80211/patches/372-0011-brcmfmac-Properly-set-carrier-state-of-netdev.patch b/package/kernel/mac80211/patches/372-0011-brcmfmac-Properly-set-carrier-state-of-netdev.patch deleted file mode 100644 index c0948ded40..0000000000 --- a/package/kernel/mac80211/patches/372-0011-brcmfmac-Properly-set-carrier-state-of-netdev.patch +++ /dev/null @@ -1,122 +0,0 @@ -From: Hante Meuleman <meuleman@broadcom.com> -Date: Thu, 8 Oct 2015 20:33:21 +0200 -Subject: [PATCH] brcmfmac: Properly set carrier state of netdev. - -Use the netif_carrier api to correctly set carrier state on the -different modes. - -Reviewed-by: Arend Van Spriel <arend@broadcom.com> -Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> -Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> -Signed-off-by: Hante Meuleman <meuleman@broadcom.com> -Signed-off-by: Arend van Spriel <arend@broadcom.com> -Signed-off-by: Kalle Valo <kvalo@codeaurora.org> ---- - ---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c -@@ -4250,6 +4250,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi - brcmf_dbg(TRACE, "GO mode configuration complete\n"); - } - set_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state); -+ brcmf_net_setcarrier(ifp, true); - - exit: - if ((err) && (!mbss)) { -@@ -4314,6 +4315,7 @@ static int brcmf_cfg80211_stop_ap(struct - brcmf_set_mpc(ifp, 1); - brcmf_configure_arp_offload(ifp, true); - clear_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state); -+ brcmf_net_setcarrier(ifp, false); - - return err; - } -@@ -5023,6 +5025,7 @@ brcmf_notify_connect_status(struct brcmf - &ifp->vif->sme_state); - } else - brcmf_bss_connect_done(cfg, ndev, e, true); -+ brcmf_net_setcarrier(ifp, true); - } else if (brcmf_is_linkdown(e)) { - brcmf_dbg(CONN, "Linkdown\n"); - if (!brcmf_is_ibssmode(ifp->vif)) { -@@ -5032,6 +5035,7 @@ brcmf_notify_connect_status(struct brcmf - brcmf_init_prof(ndev_to_prof(ndev)); - if (ndev != cfg_to_ndev(cfg)) - complete(&cfg->vif_disabled); -+ brcmf_net_setcarrier(ifp, false); - } else if (brcmf_is_nonetwork(cfg, e)) { - if (brcmf_is_ibssmode(ifp->vif)) - clear_bit(BRCMF_VIF_STATUS_CONNECTING, ---- a/drivers/net/wireless/brcm80211/brcmfmac/core.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c -@@ -635,8 +635,7 @@ static int brcmf_netdev_stop(struct net_ - - brcmf_cfg80211_down(ndev); - -- /* Set state and stop OS transmissions */ -- netif_stop_queue(ndev); -+ brcmf_net_setcarrier(ifp, false); - - return 0; - } -@@ -670,8 +669,8 @@ static int brcmf_netdev_open(struct net_ - return -EIO; - } - -- /* Allow transmit calls */ -- netif_start_queue(ndev); -+ /* Clear, carrier, set when connected or AP mode. */ -+ netif_carrier_off(ndev); - return 0; - } - -@@ -736,6 +735,24 @@ static void brcmf_net_detach(struct net_ - brcmf_cfg80211_free_netdev(ndev); - } - -+void brcmf_net_setcarrier(struct brcmf_if *ifp, bool on) -+{ -+ struct net_device *ndev; -+ -+ brcmf_dbg(TRACE, "Enter, idx=%d carrier=%d\n", ifp->bssidx, on); -+ -+ ndev = ifp->ndev; -+ brcmf_txflowblock_if(ifp, BRCMF_NETIF_STOP_REASON_DISCONNECTED, !on); -+ if (on) { -+ if (!netif_carrier_ok(ndev)) -+ netif_carrier_on(ndev); -+ -+ } else { -+ if (netif_carrier_ok(ndev)) -+ netif_carrier_off(ndev); -+ } -+} -+ - static int brcmf_net_p2p_open(struct net_device *ndev) - { - brcmf_dbg(TRACE, "Enter\n"); ---- a/drivers/net/wireless/brcm80211/brcmfmac/core.h -+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.h -@@ -154,10 +154,13 @@ struct brcmf_fws_mac_descriptor; - * netif stopped due to firmware signalling flow control. - * @BRCMF_NETIF_STOP_REASON_FLOW: - * netif stopped due to flowring full. -+ * @BRCMF_NETIF_STOP_REASON_DISCONNECTED: -+ * netif stopped due to not being connected (STA mode). - */ - enum brcmf_netif_stop_reason { -- BRCMF_NETIF_STOP_REASON_FWS_FC = 1, -- BRCMF_NETIF_STOP_REASON_FLOW = 2 -+ BRCMF_NETIF_STOP_REASON_FWS_FC = BIT(0), -+ BRCMF_NETIF_STOP_REASON_FLOW = BIT(1), -+ BRCMF_NETIF_STOP_REASON_DISCONNECTED = BIT(2) - }; - - /** -@@ -213,5 +216,6 @@ void brcmf_txflowblock_if(struct brcmf_i - enum brcmf_netif_stop_reason reason, bool state); - void brcmf_txfinalize(struct brcmf_if *ifp, struct sk_buff *txp, bool success); - void brcmf_netif_rx(struct brcmf_if *ifp, struct sk_buff *skb); -+void brcmf_net_setcarrier(struct brcmf_if *ifp, bool on); - - #endif /* BRCMFMAC_CORE_H */ |