From ada978b1ca20f1661391335dced62d2663f6d788 Mon Sep 17 00:00:00 2001 From: Bing Zhao Date: Fri, 19 Apr 2013 21:00:44 -0700 Subject: [PATCH] --- yaml --- r: 369647 b: refs/heads/master c: 8bc77a4d2c8ca3c07d74465a3738bf60a4e5de41 h: refs/heads/master i: 369645: dae74e5ae0629bb3344287e9dae9d29e612ce885 369643: f5a47858148e64734858925bb89fc833a38ea298 369639: 5c0a1a0326a0c6a505549ca40687e2c535ab1bc7 369631: fab699e31c90b8fc5fa0a0a6503ae42c02ef555b v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/mwifiex/cfg80211.c | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 6d35255a166c..9c6c93ab1f9e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4587eea5b787b8373c72791a92084010f79443d0 +refs/heads/master: 8bc77a4d2c8ca3c07d74465a3738bf60a4e5de41 diff --git a/trunk/drivers/net/wireless/mwifiex/cfg80211.c b/trunk/drivers/net/wireless/mwifiex/cfg80211.c index 2a604eb0fd1d..a0cb0770d319 100644 --- a/trunk/drivers/net/wireless/mwifiex/cfg80211.c +++ b/trunk/drivers/net/wireless/mwifiex/cfg80211.c @@ -1666,17 +1666,13 @@ mwifiex_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_connect_params *sme) { struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); - int ret = 0; - - if (priv->bss_mode == NL80211_IFTYPE_ADHOC) { - wiphy_err(wiphy, "received infra assoc request " - "when station is in ibss mode\n"); - goto done; - } + int ret; - if (priv->bss_mode == NL80211_IFTYPE_AP) { - wiphy_err(wiphy, "skip association request for AP interface\n"); - goto done; + if (priv->bss_mode != NL80211_IFTYPE_STATION) { + wiphy_err(wiphy, + "%s: reject infra assoc request in non-STA mode\n", + dev->name); + return -EINVAL; } wiphy_dbg(wiphy, "info: Trying to associate to %s and bssid %pM\n", @@ -1684,7 +1680,6 @@ mwifiex_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, ret = mwifiex_cfg80211_assoc(priv, sme->ssid_len, sme->ssid, sme->bssid, priv->bss_mode, sme->channel, sme, 0); -done: if (!ret) { cfg80211_connect_result(priv->netdev, priv->cfg_bssid, NULL, 0, NULL, 0, WLAN_STATUS_SUCCESS,