summaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorAndy Duan <fugang.duan@nxp.com>2018-12-07 15:15:42 +0800
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:35:38 +0800
commitc539d271cf0c3d45ca65a346e082867f6545f2d2 (patch)
treee564c4096b59cc64ace456d378999183fa571cc2 /net/wireless
parent8bf12d728fe09a143b9d0016ba4e0de11cf7ce42 (diff)
MLK-20541 cfg80211: fix phy index confliction with loadable test for multiple phys
The commit ae97fd867aa3 ("MLK-19091 cfg80211: make phy index match after wiphy dev is released") manage wiphy_counter matching between creating and freeing wiphy device. Then for one wifi instance, the index of attached phy is not changed during loadable test. But it ignores multiple wifi cards loadable test case, that introduces the phy index confliction. So the patch revert the commit. Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com> Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 41ec0b89488c..45cbade9ad68 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -41,8 +41,6 @@ MODULE_ALIAS_GENL_FAMILY(NL80211_GENL_NAME);
LIST_HEAD(cfg80211_rdev_list);
int cfg80211_rdev_list_generation;
-static atomic_t wiphy_counter = ATOMIC_INIT(0);
-
/* for debugfs */
static struct dentry *ieee80211_debugfs_dir;
@@ -385,6 +383,8 @@ static void cfg80211_propagate_cac_done_wk(struct work_struct *work)
struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
const char *requested_name)
{
+ static atomic_t wiphy_counter = ATOMIC_INIT(0);
+
struct cfg80211_registered_device *rdev;
int alloc_size;
@@ -972,7 +972,6 @@ void cfg80211_dev_free(struct cfg80211_registered_device *rdev)
}
list_for_each_entry_safe(scan, tmp, &rdev->bss_list, list)
cfg80211_put_bss(&rdev->wiphy, &scan->pub);
- atomic_dec(&wiphy_counter);
kfree(rdev);
}