* [PATCH 3.11 1/3] mwifiex: check for bss_role instead of bss_mode for STA operations
@ 2013-07-29 23:32 Bing Zhao
2013-07-29 23:32 ` [PATCH 3.11 2/3] mwifiex: fix wrong data rates in P2P client Bing Zhao
2013-07-29 23:32 ` [PATCH 3.11 3/3] mwifiex: fix command 0x2c timeout during p2p_find or p2p_connect Bing Zhao
0 siblings, 2 replies; 3+ messages in thread
From: Bing Zhao @ 2013-07-29 23:32 UTC (permalink / raw)
To: linux-wireless
Cc: John W. Linville, Avinash Patil, Stone Piao, Amitkumar Karwar,
Nishant Sarmukadam, Frank Huang, Bing Zhao
From: Avinash Patil <patila@marvell.com>
This patch fixes an issue wherein association would fail on P2P
interfaces. This happened because we are checking priv->mode
against NL80211_IFTYPE_STATION. While this check is correct for
infrastructure stations, it would fail P2P clients for which mode
is NL80211_IFTYPE_P2P_CLIENT.
Better check would be bss_role which has only 2 values: STA/AP.
Cc: <stable@vger.kernel.org> # 3.10.y
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
---
drivers/net/wireless/mwifiex/cfg80211.c | 4 ++--
drivers/net/wireless/mwifiex/join.c | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index cc334d5..d1e4816 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -1727,9 +1727,9 @@ mwifiex_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
int ret;
- if (priv->bss_mode != NL80211_IFTYPE_STATION) {
+ if (GET_BSS_ROLE(priv) != MWIFIEX_BSS_ROLE_STA) {
wiphy_err(wiphy,
- "%s: reject infra assoc request in non-STA mode\n",
+ "%s: reject infra assoc request in non-STA role\n",
dev->name);
return -EINVAL;
}
diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c
index ba043ca..9d7c0e6 100644
--- a/drivers/net/wireless/mwifiex/join.c
+++ b/drivers/net/wireless/mwifiex/join.c
@@ -1291,8 +1291,10 @@ int mwifiex_associate(struct mwifiex_private *priv,
{
u8 current_bssid[ETH_ALEN];
- /* Return error if the adapter or table entry is not marked as infra */
- if ((priv->bss_mode != NL80211_IFTYPE_STATION) ||
+ /* Return error if the adapter is not STA role or table entry
+ * is not marked as infra.
+ */
+ if ((GET_BSS_ROLE(priv) != MWIFIEX_BSS_ROLE_STA) ||
(bss_desc->bss_mode != NL80211_IFTYPE_STATION))
return -1;
--
1.8.2.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 3.11 2/3] mwifiex: fix wrong data rates in P2P client
2013-07-29 23:32 [PATCH 3.11 1/3] mwifiex: check for bss_role instead of bss_mode for STA operations Bing Zhao
@ 2013-07-29 23:32 ` Bing Zhao
2013-07-29 23:32 ` [PATCH 3.11 3/3] mwifiex: fix command 0x2c timeout during p2p_find or p2p_connect Bing Zhao
1 sibling, 0 replies; 3+ messages in thread
From: Bing Zhao @ 2013-07-29 23:32 UTC (permalink / raw)
To: linux-wireless
Cc: John W. Linville, Avinash Patil, Stone Piao, Amitkumar Karwar,
Nishant Sarmukadam, Frank Huang, Bing Zhao
From: Avinash Patil <patila@marvell.com>
This patch fixes an issue wherein adhoc rates were being copied
into association request from P2P client.
Cc: <stable@vger.kernel.org> # 3.10.y
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
---
drivers/net/wireless/mwifiex/cfp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mwifiex/cfp.c b/drivers/net/wireless/mwifiex/cfp.c
index 988552d..5178c46 100644
--- a/drivers/net/wireless/mwifiex/cfp.c
+++ b/drivers/net/wireless/mwifiex/cfp.c
@@ -415,7 +415,8 @@ u32 mwifiex_get_supported_rates(struct mwifiex_private *priv, u8 *rates)
u32 k = 0;
struct mwifiex_adapter *adapter = priv->adapter;
- if (priv->bss_mode == NL80211_IFTYPE_STATION) {
+ if (priv->bss_mode == NL80211_IFTYPE_STATION ||
+ priv->bss_mode == NL80211_IFTYPE_P2P_CLIENT) {
switch (adapter->config_bands) {
case BAND_B:
dev_dbg(adapter->dev, "info: infra band=%d "
--
1.8.2.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 3.11 3/3] mwifiex: fix command 0x2c timeout during p2p_find or p2p_connect
2013-07-29 23:32 [PATCH 3.11 1/3] mwifiex: check for bss_role instead of bss_mode for STA operations Bing Zhao
2013-07-29 23:32 ` [PATCH 3.11 2/3] mwifiex: fix wrong data rates in P2P client Bing Zhao
@ 2013-07-29 23:32 ` Bing Zhao
1 sibling, 0 replies; 3+ messages in thread
From: Bing Zhao @ 2013-07-29 23:32 UTC (permalink / raw)
To: linux-wireless
Cc: John W. Linville, Avinash Patil, Stone Piao, Amitkumar Karwar,
Nishant Sarmukadam, Frank Huang, Bing Zhao
From: Stone Piao <piaoyun@marvell.com>
We missed bss_mode check for P2P client.
Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
---
drivers/net/wireless/mwifiex/sta_ioctl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
index c071ce9..f084412 100644
--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
@@ -257,10 +257,10 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
goto done;
}
- if (priv->bss_mode == NL80211_IFTYPE_STATION) {
+ if (priv->bss_mode == NL80211_IFTYPE_STATION ||
+ priv->bss_mode == NL80211_IFTYPE_P2P_CLIENT) {
u8 config_bands;
- /* Infra mode */
ret = mwifiex_deauthenticate(priv, NULL);
if (ret)
goto done;
--
1.8.2.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-29 23:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-29 23:32 [PATCH 3.11 1/3] mwifiex: check for bss_role instead of bss_mode for STA operations Bing Zhao
2013-07-29 23:32 ` [PATCH 3.11 2/3] mwifiex: fix wrong data rates in P2P client Bing Zhao
2013-07-29 23:32 ` [PATCH 3.11 3/3] mwifiex: fix command 0x2c timeout during p2p_find or p2p_connect Bing Zhao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox