summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/cfg80211.c
diff options
context:
space:
mode:
authorMarty Faltesek <mfaltesek@google.com>2015-10-26 06:54:01 +0100
committerKalle Valo <kvalo@codeaurora.org>2015-10-28 20:00:01 +0100
commit0117e78aec73f1c0869e50d11a255b28aa4db8f0 (patch)
treeb667a7027e03c5aaa62e87105235dd16ae05fb15 /drivers/net/wireless/mwifiex/cfg80211.c
parentwcn36xx: Remove warning message when dev is NULL for arm64 dma_alloc. (diff)
downloadlinux-0117e78aec73f1c0869e50d11a255b28aa4db8f0.tar.xz
linux-0117e78aec73f1c0869e50d11a255b28aa4db8f0.zip
mwifiex: toggle carrier state in start_ap/stop_ap.
In uap mode the carrier is not enabled until after the first STA joins. The carrier triggers the bridge to start its state machine, and if STP is enabled, it takes 4 seconds as it transitions from disabled to forwarding. During this time the bridge drops all traffic, and the EAPOL handshake times out after 3 seconds, preventing stations from joining. Follow the logic used in mac80211 and start the carrier in start_ap and disable it in stop_ap. This has a nice benefit of allowing the first station connection time to be reduced by up to 75% when STP is in use. Signed-off-by: Martin Faltesek <mfaltesek@google.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mwifiex/cfg80211.c')
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index b7ac45f324d7..4073116e6e9f 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -1821,6 +1821,10 @@ static int mwifiex_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
return -1;
}
+ if (netif_carrier_ok(priv->netdev))
+ netif_carrier_off(priv->netdev);
+ mwifiex_stop_net_dev_queue(priv->netdev, priv->adapter);
+
return 0;
}
@@ -1925,6 +1929,10 @@ static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy,
if (mwifiex_set_mgmt_ies(priv, &params->beacon))
return -1;
+ if (!netif_carrier_ok(priv->netdev))
+ netif_carrier_on(priv->netdev);
+ mwifiex_wake_up_net_dev_queue(priv->netdev, priv->adapter);
+
memcpy(&priv->bss_cfg, bss_cfg, sizeof(priv->bss_cfg));
kfree(bss_cfg);
return 0;