From: Xinming Hu <[email protected]>

Interface counters should be incremented in add_virtual_intf()
and decremented in del_virtual_intf() function. This patch
corrects it.

Signed-off-by: Xinming Hu <[email protected]>
Signed-off-by: Amitkumar Karwar <[email protected]>
---
 drivers/net/wireless/mwifiex/cfg80211.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/cfg80211.c 
b/drivers/net/wireless/mwifiex/cfg80211.c
index 7e71dd7..4e06e98 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -2862,14 +2862,14 @@ int mwifiex_del_virtual_intf(struct wiphy *wiphy, 
struct wireless_dev *wdev)
        case NL80211_IFTYPE_UNSPECIFIED:
        case NL80211_IFTYPE_STATION:
        case NL80211_IFTYPE_ADHOC:
-               adapter->curr_iface_comb.sta_intf++;
+               adapter->curr_iface_comb.sta_intf--;
                break;
        case NL80211_IFTYPE_AP:
-               adapter->curr_iface_comb.uap_intf++;
+               adapter->curr_iface_comb.uap_intf--;
                break;
        case NL80211_IFTYPE_P2P_CLIENT:
        case NL80211_IFTYPE_P2P_GO:
-               adapter->curr_iface_comb.p2p_intf++;
+               adapter->curr_iface_comb.p2p_intf--;
                break;
        default:
                mwifiex_dbg(adapter, ERROR,
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to