Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wireless: move mesh config length constant

This is a constant from the 802.11 specification.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Johannes Berg and committed by
John W. Linville
1239cd58 97c8b013

+6 -6
+3
include/linux/ieee80211.h
··· 97 97 #define IEEE80211_MAX_FRAME_LEN 2352 98 98 99 99 #define IEEE80211_MAX_SSID_LEN 32 100 + 100 101 #define IEEE80211_MAX_MESH_ID_LEN 32 102 + #define IEEE80211_MESH_CONFIG_LEN 19 103 + 101 104 #define IEEE80211_QOS_CTL_LEN 2 102 105 #define IEEE80211_QOS_CTL_TID_MASK 0x000F 103 106 #define IEEE80211_QOS_CTL_TAG1D_MASK 0x0007
+1 -1
net/mac80211/mesh.c
··· 238 238 239 239 pos = skb_put(skb, 21); 240 240 *pos++ = WLAN_EID_MESH_CONFIG; 241 - *pos++ = MESH_CFG_LEN; 241 + *pos++ = IEEE80211_MESH_CONFIG_LEN; 242 242 /* Version */ 243 243 *pos++ = 1; 244 244
+1 -4
net/mac80211/mesh.h
··· 145 145 }; 146 146 147 147 148 - /* Mesh IEs constants */ 149 - #define MESH_CFG_LEN 19 150 - 151 148 /* 152 149 * MESH_CFG_COMP_LEN Includes: 153 150 * - Active path selection protocol ID. ··· 154 157 * Does not include mesh capabilities, which may vary across nodes in the same 155 158 * mesh 156 159 */ 157 - #define MESH_CFG_CMP_LEN 17 160 + #define MESH_CFG_CMP_LEN (IEEE80211_MESH_CONFIG_LEN - 2) 158 161 159 162 /* Default values, timeouts in ms */ 160 163 #define MESH_TTL 5
+1 -1
net/mac80211/scan.c
··· 159 159 { 160 160 struct ieee80211_bss *bss; 161 161 162 - if (mesh_config_len != MESH_CFG_LEN) 162 + if (mesh_config_len != IEEE80211_MESH_CONFIG_LEN) 163 163 return NULL; 164 164 165 165 bss = kzalloc(sizeof(*bss), GFP_ATOMIC);