From: Arend van Spriel <arend@broadcom.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Hante Meuleman <meuleman@broadcom.com>,
Arend van Spriel <arend@broadcom.com>
Subject: [PATCH V2 08/13] brcmfmac: Fix IBSS setup
Date: Thu, 10 Dec 2015 13:43:07 +0100 [thread overview]
Message-ID: <1449751392-32569-9-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1449751392-32569-1-git-send-email-arend@broadcom.com>
From: Hante Meuleman <meuleman@broadcom.com>
IBSS got broken over time. Disconnect events should not be given
for IBSS mode and connect events for IBSS need to have channel
information.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
.../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 3ac5cf7..17658b3 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -1273,17 +1273,17 @@ static void brcmf_link_down(struct brcmf_cfg80211_vif *vif, u16 reason)
brcmf_dbg(TRACE, "Enter\n");
- if (test_bit(BRCMF_VIF_STATUS_CONNECTED, &vif->sme_state)) {
+ if (test_and_clear_bit(BRCMF_VIF_STATUS_CONNECTED, &vif->sme_state)) {
brcmf_dbg(INFO, "Call WLC_DISASSOC to stop excess roaming\n ");
err = brcmf_fil_cmd_data_set(vif->ifp,
BRCMF_C_DISASSOC, NULL, 0);
if (err) {
brcmf_err("WLC_DISASSOC failed (%d)\n", err);
}
- clear_bit(BRCMF_VIF_STATUS_CONNECTED, &vif->sme_state);
- cfg80211_disconnected(vif->wdev.netdev, reason, NULL, 0,
- true, GFP_KERNEL);
-
+ if ((vif->wdev.iftype == NL80211_IFTYPE_STATION) ||
+ (vif->wdev.iftype == NL80211_IFTYPE_P2P_CLIENT))
+ cfg80211_disconnected(vif->wdev.netdev, reason, NULL, 0,
+ true, GFP_KERNEL);
}
clear_bit(BRCMF_VIF_STATUS_CONNECTING, &vif->sme_state);
clear_bit(BRCMF_SCAN_STATUS_SUPPRESS, &cfg->scan_status);
@@ -2697,8 +2697,8 @@ static s32 brcmf_inform_bss(struct brcmf_cfg80211_info *cfg)
return err;
}
-static s32 wl_inform_ibss(struct brcmf_cfg80211_info *cfg,
- struct net_device *ndev, const u8 *bssid)
+static s32 brcmf_inform_ibss(struct brcmf_cfg80211_info *cfg,
+ struct net_device *ndev, const u8 *bssid)
{
struct wiphy *wiphy = cfg_to_wiphy(cfg);
struct ieee80211_channel *notify_channel;
@@ -2743,6 +2743,7 @@ static s32 wl_inform_ibss(struct brcmf_cfg80211_info *cfg,
band = wiphy->bands[IEEE80211_BAND_5GHZ];
freq = ieee80211_channel_to_frequency(ch.chnum, band->band);
+ cfg->channel = freq;
notify_channel = ieee80211_get_channel(wiphy, freq);
notify_capability = le16_to_cpu(bi->capability);
@@ -5071,9 +5072,9 @@ brcmf_notify_connect_status(struct brcmf_if *ifp,
} else if (brcmf_is_linkup(e)) {
brcmf_dbg(CONN, "Linkup\n");
if (brcmf_is_ibssmode(ifp->vif)) {
+ brcmf_inform_ibss(cfg, ndev, e->addr);
chan = ieee80211_get_channel(cfg->wiphy, cfg->channel);
memcpy(profile->bssid, e->addr, ETH_ALEN);
- wl_inform_ibss(cfg, ndev, e->addr);
cfg80211_ibss_joined(ndev, e->addr, chan, GFP_KERNEL);
clear_bit(BRCMF_VIF_STATUS_CONNECTING,
&ifp->vif->sme_state);
--
1.9.1
next prev parent reply other threads:[~2015-12-10 12:43 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 12:42 [PATCH V2 00/13] brcmfmac: IBSS fix and cleanup Arend van Spriel
2015-12-10 12:43 ` [PATCH V2 01/13] brcmfmac: Simplify scan timing configuration Arend van Spriel
2015-12-11 11:54 ` [V2,01/13] " Kalle Valo
2015-12-10 12:43 ` [PATCH V2 02/13] brcmfmac: Use local storage for ssid iovar Arend van Spriel
2015-12-10 12:43 ` [PATCH V2 03/13] brcmfmac: Remove some redundant cfg80211 data Arend van Spriel
2015-12-10 12:43 ` [PATCH V2 04/13] brcmfmac: Cleanup pmksa cache handling code Arend van Spriel
2015-12-10 12:43 ` [PATCH V2 05/13] brcmfmac: Make TDLS a detectable feature Arend van Spriel
2015-12-10 12:43 ` [PATCH V2 06/13] brcmfmac: Add support for PCIE 4350 revision 5 device Arend van Spriel
2015-12-11 8:38 ` Kalle Valo
2015-12-10 12:43 ` [PATCH V2 07/13] brcmfmac: no interface combination check for single interface Arend van Spriel
2015-12-10 12:43 ` Arend van Spriel [this message]
2015-12-10 12:43 ` [PATCH V2 09/13] brcmfmac: fix waitqueue_active without memory barrier in brcmfmac driver Arend van Spriel
2015-12-10 12:43 ` [PATCH V2 10/13] brcmfmac: add 43242 device id for LG dongle Arend van Spriel
2015-12-10 12:43 ` [PATCH V2 11/13] brcmfmac: Change error print in debug print Arend van Spriel
2015-12-11 8:40 ` Kalle Valo
2015-12-11 9:09 ` Arend van Spriel
2015-12-10 12:43 ` [PATCH V2 12/13] brcmfmac: Move scheduled scan related interface layer structs Arend van Spriel
2015-12-10 12:43 ` [PATCH V2 13/13] brcmfmac: add arp offload ip address table configuration support Arend van Spriel
2015-12-11 9:12 ` Arend van Spriel
2015-12-11 9:29 ` Kalle Valo
2015-12-11 9:42 ` Arend van Spriel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1449751392-32569-9-git-send-email-arend@broadcom.com \
--to=arend@broadcom.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=meuleman@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).