Skip to content

Commit

Permalink
mwifiex: correct p2p and station interface counters
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Aniket Nagarnaik authored and Kalle Valo committed Jul 21, 2015
1 parent 0c6303c commit e79801f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/wireless/mwifiex/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e79801f

Please sign in to comment.