Skip to content

Commit 414532d

Browse files
committed
wifi: cfg80211: use IEEE80211_MAX_MESH_ID_LEN appropriately
Even if that's the same as IEEE80211_MAX_SSID_LEN, we really should just use IEEE80211_MAX_MESH_ID_LEN for mesh, rather than having the BUILD_BUG_ON()s. Signed-off-by: Johannes Berg <[email protected]>
1 parent 7777018 commit 414532d

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

include/net/cfg80211.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6223,7 +6223,7 @@ struct wireless_dev {
62236223
int beacon_interval;
62246224
struct cfg80211_chan_def preset_chandef;
62256225
struct cfg80211_chan_def chandef;
6226-
u8 id[IEEE80211_MAX_SSID_LEN];
6226+
u8 id[IEEE80211_MAX_MESH_ID_LEN];
62276227
u8 id_len, id_up_len;
62286228
} mesh;
62296229
struct {

net/wireless/nl80211.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4205,8 +4205,6 @@ static int nl80211_set_interface(struct sk_buff *skb, struct genl_info *info)
42054205
if (netif_running(dev))
42064206
return -EBUSY;
42074207

4208-
BUILD_BUG_ON(IEEE80211_MAX_SSID_LEN !=
4209-
IEEE80211_MAX_MESH_ID_LEN);
42104208
wdev->u.mesh.id_up_len =
42114209
nla_len(info->attrs[NL80211_ATTR_MESH_ID]);
42124210
memcpy(wdev->u.mesh.id,
@@ -4312,8 +4310,6 @@ static int _nl80211_new_interface(struct sk_buff *skb, struct genl_info *info)
43124310
case NL80211_IFTYPE_MESH_POINT:
43134311
if (!info->attrs[NL80211_ATTR_MESH_ID])
43144312
break;
4315-
BUILD_BUG_ON(IEEE80211_MAX_SSID_LEN !=
4316-
IEEE80211_MAX_MESH_ID_LEN);
43174313
wdev->u.mesh.id_up_len =
43184314
nla_len(info->attrs[NL80211_ATTR_MESH_ID]);
43194315
memcpy(wdev->u.mesh.id,

0 commit comments

Comments
 (0)