summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAniket Nagarnaik2015-07-16 17:48:43 +0200
committerKalle Valo2015-07-21 17:09:53 +0200
commite79801ffe9c862597750359b8c6825f3a3bfaa4f (patch)
tree41ace369fa741accc6a3a3be2f0bf6163e0bc9d4
parentmwifiex: use maximum ssid length as 0xfe for p2p (diff)
downloadkernel-qcow2-linux-e79801ffe9c862597750359b8c6825f3a3bfaa4f.tar.gz
kernel-qcow2-linux-e79801ffe9c862597750359b8c6825f3a3bfaa4f.tar.xz
kernel-qcow2-linux-e79801ffe9c862597750359b8c6825f3a3bfaa4f.zip
mwifiex: correct p2p and station interface counters
While changing interface type from p2p client or p2p go to station, we should update counters for p2p interface and station interface. Also calling mwifiex_cfg80211_deinit_p2p method instead of mwifiex_cfg80211_init_p2p_client method to deinit p2p interface. Signed-off-by: Aniket Nagarnaik <aniketn@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index d4b327752a5e..ff63cb5632eb 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -1145,8 +1145,10 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
case NL80211_IFTYPE_P2P_GO:
switch (type) {
case NL80211_IFTYPE_STATION:
- if (mwifiex_cfg80211_init_p2p_client(priv))
+ if (mwifiex_cfg80211_deinit_p2p(priv))
return -EFAULT;
+ priv->adapter->curr_iface_comb.p2p_intf--;
+ priv->adapter->curr_iface_comb.sta_intf++;
dev->ieee80211_ptr->iftype = type;
break;
case NL80211_IFTYPE_ADHOC: