From: "Franky Lin" <frankyl@broadcom.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 5/7] brcmfmac: set dongle mode accordingly when interface up
Date: Wed, 10 Oct 2012 11:13:10 -0700 [thread overview]
Message-ID: <1349892792-4792-6-git-send-email-frankyl@broadcom.com> (raw)
In-Reply-To: <1349892792-4792-1-git-send-email-frankyl@broadcom.com>
The mode of WiFi dongle should be initialized in brcmf_cfg80211_up
which get called when network interface is brought up. Otherwise
brcmf_cfg80211_get_station would return error.
Signed-off-by: Franky Lin <frankyl@broadcom.com>
---
.../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 38 ++------------------
1 file changed, 2 insertions(+), 36 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index a39925a..5e51f15 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -5199,41 +5199,6 @@ brcmf_cfg80211_event(struct net_device *ndev,
schedule_work(&cfg->event_work);
}
-static s32 brcmf_dongle_mode(struct net_device *ndev, s32 iftype)
-{
- s32 infra = 0;
- s32 err = 0;
-
- switch (iftype) {
- case NL80211_IFTYPE_MONITOR:
- case NL80211_IFTYPE_WDS:
- WL_ERR("type (%d) : currently we do not support this mode\n",
- iftype);
- err = -EINVAL;
- return err;
- case NL80211_IFTYPE_ADHOC:
- infra = 0;
- break;
- case NL80211_IFTYPE_STATION:
- infra = 1;
- break;
- case NL80211_IFTYPE_AP:
- infra = 1;
- break;
- default:
- err = -EINVAL;
- WL_ERR("invalid type (%d)\n", iftype);
- return err;
- }
- err = brcmf_exec_dcmd_u32(ndev, BRCMF_C_SET_INFRA, &infra);
- if (err) {
- WL_ERR("WLC_SET_INFRA error (%d)\n", err);
- return err;
- }
-
- return 0;
-}
-
static s32 brcmf_dongle_eventmsg(struct net_device *ndev)
{
/* Room for "event_msgs" + '\0' + bitvec */
@@ -5452,7 +5417,8 @@ static s32 brcmf_config_dongle(struct brcmf_cfg80211_info *cfg)
WL_BEACON_TIMEOUT);
if (err)
goto default_conf_out;
- err = brcmf_dongle_mode(ndev, wdev->iftype);
+ err = brcmf_cfg80211_change_iface(wdev->wiphy, ndev, wdev->iftype,
+ NULL, NULL);
if (err && err != -EINPROGRESS)
goto default_conf_out;
err = brcmf_dongle_probecap(cfg);
--
1.7.9.5
next prev parent reply other threads:[~2012-10-10 18:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-10 18:13 [PATCH 0/7] miscellaneous fixes intended for 3.7 Franky Lin
2012-10-10 18:13 ` [PATCH 1/7] brcmfmac: handle all exceptions as an error Franky Lin
2012-10-10 18:13 ` [PATCH 2/7] brcmfmac: Using zero instead of NULL Franky Lin
2012-10-10 18:13 ` [PATCH 3/7] brcmfmac: fix sparse warnings Franky Lin
2012-10-10 18:13 ` [PATCH 4/7] brcmfmac: use control channel in roamed status reporting Franky Lin
2012-10-10 18:13 ` Franky Lin [this message]
2012-10-10 18:13 ` [PATCH 6/7] brcmfmac: remove 'always false' condition from brcmf_c_mkiovar_bsscfg Franky Lin
2012-10-10 18:13 ` [PATCH 7/7] brcmfmac: fix end of loop check (signedness bug) Franky Lin
2012-10-15 18:27 ` [PATCH 0/7] miscellaneous fixes intended for 3.7 John W. Linville
2012-10-15 19:06 ` Franky Lin
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=1349892792-4792-6-git-send-email-frankyl@broadcom.com \
--to=frankyl@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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).