forked from mirrors/linux
		
	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 <johannes.berg@intel.com>
This commit is contained in:
		
							parent
							
								
									7777018992
								
							
						
					
					
						commit
						414532d8aa
					
				
					 2 changed files with 1 additions and 5 deletions
				
			
		|  | @ -6223,7 +6223,7 @@ struct wireless_dev { | |||
| 			int beacon_interval; | ||||
| 			struct cfg80211_chan_def preset_chandef; | ||||
| 			struct cfg80211_chan_def chandef; | ||||
| 			u8 id[IEEE80211_MAX_SSID_LEN]; | ||||
| 			u8 id[IEEE80211_MAX_MESH_ID_LEN]; | ||||
| 			u8 id_len, id_up_len; | ||||
| 		} mesh; | ||||
| 		struct { | ||||
|  |  | |||
|  | @ -4205,8 +4205,6 @@ static int nl80211_set_interface(struct sk_buff *skb, struct genl_info *info) | |||
| 		if (netif_running(dev)) | ||||
| 			return -EBUSY; | ||||
| 
 | ||||
| 		BUILD_BUG_ON(IEEE80211_MAX_SSID_LEN != | ||||
| 			     IEEE80211_MAX_MESH_ID_LEN); | ||||
| 		wdev->u.mesh.id_up_len = | ||||
| 			nla_len(info->attrs[NL80211_ATTR_MESH_ID]); | ||||
| 		memcpy(wdev->u.mesh.id, | ||||
|  | @ -4312,8 +4310,6 @@ static int _nl80211_new_interface(struct sk_buff *skb, struct genl_info *info) | |||
| 	case NL80211_IFTYPE_MESH_POINT: | ||||
| 		if (!info->attrs[NL80211_ATTR_MESH_ID]) | ||||
| 			break; | ||||
| 		BUILD_BUG_ON(IEEE80211_MAX_SSID_LEN != | ||||
| 			     IEEE80211_MAX_MESH_ID_LEN); | ||||
| 		wdev->u.mesh.id_up_len = | ||||
| 			nla_len(info->attrs[NL80211_ATTR_MESH_ID]); | ||||
| 		memcpy(wdev->u.mesh.id, | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Johannes Berg
						Johannes Berg