aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r--net/wireless/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index a6f3cac8c640..c0fd8a85e7f7 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -95,6 +95,9 @@ static int cfg80211_dev_check_name(struct cfg80211_registered_device *rdev,
95 95
96 ASSERT_RTNL(); 96 ASSERT_RTNL();
97 97
98 if (strlen(newname) > NL80211_WIPHY_NAME_MAXLEN)
99 return -EINVAL;
100
98 /* prohibit calling the thing phy%d when %d is not its number */ 101 /* prohibit calling the thing phy%d when %d is not its number */
99 sscanf(newname, PHY_NAME "%d%n", &wiphy_idx, &taken); 102 sscanf(newname, PHY_NAME "%d%n", &wiphy_idx, &taken);
100 if (taken == strlen(newname) && wiphy_idx != rdev->wiphy_idx) { 103 if (taken == strlen(newname) && wiphy_idx != rdev->wiphy_idx) {